modified checkbox rendering: use createCheckBoxParam() instead of createInputParam(), checkboxes now preserve their status even if the user is redirected back to the form
This commit is contained in:
parent
3ee00ed75d
commit
6b4c7649a2
3 changed files with 21 additions and 24 deletions
|
@ -49,9 +49,9 @@ function email_macro(param) {
|
|||
|
||||
function publishemail_macro(param) {
|
||||
if (param.as == "editor") {
|
||||
var inputParam = this.createInputParam("publishemail", param);
|
||||
if ((req.data.save && req.data.publishemail) || (!req.data.save && this.publishemail))
|
||||
inputParam.checked = "checked";
|
||||
var inputParam = this.createCheckBoxParam("publishemail", param);
|
||||
if (req.data.save && !req.data.publishemail)
|
||||
delete inputParam.checked;
|
||||
Html.checkBox(inputParam);
|
||||
} else
|
||||
res.write(this.publishemail ? "yes" : "no");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue