From b7d6a49be4a5e1d9c94219392179c14dba40034a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 3 Aug 2008 16:46:38 -0400 Subject: [PATCH] ui improvements --- IkiWiki/Plugin/websetup.pm | 12 +++++++----- 1 file 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"]; -- 2.26.2