X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/bb394fdae8ba488f1031d6f053f1544c689a3628..799bcbcd477653ff49aaee2e49818b62e40b6724:/IkiWiki/Plugin/lockedit.pm diff --git a/IkiWiki/Plugin/lockedit.pm b/IkiWiki/Plugin/lockedit.pm index 033b38263..7462de41c 100644 --- a/IkiWiki/Plugin/lockedit.pm +++ b/IkiWiki/Plugin/lockedit.pm @@ -14,12 +14,15 @@ sub import { #{{{ sub getsetup () { #{{{ return + plugin => { + safe => 1, + rebuild => 0, + }, locked_pages => { - type => "string", + type => "pagespec", example => "!*/Discussion", description => "PageSpec controlling which pages are locked", - description_html => htmllink("", "", "ikiwiki/PageSpec", noimageinline => 1). - " controlling which pages are locked", + link => "ikiwiki/PageSpec", safe => 1, rebuild => 0, }, @@ -94,6 +97,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"); + } } } }