summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-08-01 17:09:27 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-08-01 17:39:17 -0400
commit190a845fe1ab44d3947f2ecdc0305a180e21e6f2 (patch)
tree7fc597e00cfd8333e40a23c9cb596efa05198e65 /IkiWiki
parent4a5793729b3d4bdbcabd9116257fe6333f291602 (diff)
hide deprecated values if empty after save
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/attachment.pm3
-rw-r--r--IkiWiki/Plugin/lockedit.pm3
2 files changed, 6 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm
index b6327f0c5..bd21ed1ed 100644
--- a/IkiWiki/Plugin/attachment.pm
+++ b/IkiWiki/Plugin/attachment.pm
@@ -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");
+ }
}
}
}
diff --git a/IkiWiki/Plugin/lockedit.pm b/IkiWiki/Plugin/lockedit.pm
index 033b38263..4e1b4f878 100644
--- a/IkiWiki/Plugin/lockedit.pm
+++ b/IkiWiki/Plugin/lockedit.pm
@@ -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");
+ }
}
}
}