hide deprecated values if empty after save
parent
4a5793729b
commit
190a845fe1
|
@ -143,6 +143,9 @@ sub formbuilder_setup (@) { #{{{
|
|||
IkiWiki::userinfo_set($user_name, "allowed_attachments",
|
||||
$form->field("allowed_attachments")) ||
|
||||
error("failed to set allowed_attachments");
|
||||
if (length $form->field("allowed_attachments")) {
|
||||
$form->field(name => "allowed_attachments", type => "hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,6 +94,9 @@ sub formbuilder_setup (@) { #{{{
|
|||
IkiWiki::userinfo_set($user_name, "locked_pages",
|
||||
$form->field("locked_pages")) ||
|
||||
error("failed to set locked_pages");
|
||||
if (! length $form->field("locked_pages")) {
|
||||
$form->field(name => "locked_pages", type => "hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue