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
|
@ -245,9 +245,9 @@ function description_macro(param) {
|
|||
*/
|
||||
function shareable_macro(param) {
|
||||
if (param.as == "editor" && !this.site) {
|
||||
var inputParam = this.createInputParam("shareable", param);
|
||||
if ((req.data.save && req.data.shareable) || (!req.data.save && this.shareable))
|
||||
inputParam.checked = "checked";
|
||||
var inputParam = this.createCheckBoxParam("shareable", param);
|
||||
if (req.data.save && !req.data.shareable)
|
||||
delete inputParam.checked;
|
||||
Html.checkBox(inputParam);
|
||||
} else if (this.shareable)
|
||||
res.write(param.yes ? param.yes : "yes");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue