]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
hide deprecated values if empty after save
authorJoey Hess <joey@kodama.kitenet.net>
Fri, 1 Aug 2008 21:09:27 +0000 (17:09 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Fri, 1 Aug 2008 21:39:17 +0000 (17:39 -0400)
IkiWiki/Plugin/attachment.pm
IkiWiki/Plugin/lockedit.pm

index b6327f0c5455fdfe1a622e0e26f36663653357da..bd21ed1edd4549b2ba99ecbc85c620477b84b40c 100644 (file)
@@ -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");
+                               }
                        }
                }
        }
index 033b3826347fce2ea83ad67b2a28e7d9ccc56260..4e1b4f8787249c3e17a4c97d77442ca8f0e9bd8d 100644 (file)
@@ -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");
+                               }
                        }
                }
        }