diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-08-03 16:46:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-08-03 16:46:38 -0400 |
commit | b7d6a49be4a5e1d9c94219392179c14dba40034a (patch) | |
tree | 58c57691805ebe450adb8373b8cbb6c4cff5fbc9 /IkiWiki/Plugin | |
parent | aacec52a0724afccb962891784123cf2a4bce70a (diff) |
ui improvements
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/websetup.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index ad8270f79..4c9367410 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -90,6 +90,7 @@ sub showfields ($$$@) { #{{{ } my %shownfields; + my %skippedfields; my $section=defined $plugin ? $plugin." ".gettext("plugin") : "main"; while (@show) { @@ -163,6 +164,7 @@ sub showfields ($$$@) { #{{{ if (! $info{safe}) { $form->field(name => $name, disabled => 1); + $skippedfields{$name}=1; } else { $shownfields{$name}=[$key, \%info]; @@ -171,7 +173,7 @@ sub showfields ($$$@) { #{{{ if (defined $plugin && (! $plugin_forced || $config{websetup_advanced})) { my $name="enable.$plugin"; - $section="plugins" unless %shownfields; + $section="plugins" unless %shownfields || (%skippedfields && $config{websetup_advanced}); $form->field( name => $name, label => "", @@ -221,22 +223,22 @@ sub showform ($$) { #{{{ stylesheet => IkiWiki::baseurl()."style.css", ); - if ($form->submitted eq 'Basic') { + if ($form->submitted eq 'Basic Mode') { $form->field(name => "showadvanced", type => "hidden", value => 0, force => 1); } - elsif ($form->submitted eq 'Advanced') { + elsif ($form->submitted eq 'Advanced Mode') { $form->field(name => "showadvanced", type => "hidden", value => 1, force => 1); } my $advancedtoggle; if ($form->field("showadvanced")) { $config{websetup_advanced}=1; - $advancedtoggle="Basic"; + $advancedtoggle="Basic Mode"; } else { $config{websetup_advanced}=0; - $advancedtoggle="Advanced"; + $advancedtoggle="Advanced Mode"; } my $buttons=["Save Setup", $advancedtoggle, "Cancel"]; |