summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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");
+ }
}
}
}