X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ae75c9bee683d5645b033ddea5b211cc99416d19..55515050e1f3aad13dc96796a347cefa98e8e472:/IkiWiki/Plugin/websetup.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index 4d2e611eb..9c032fdc6 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -219,7 +219,8 @@ sub showfields ($$$@) { options => [ [ 1 => $description ] ], fieldset => $section, ); - if (! $form->submitted) { + if (! $form->submitted || + ($info{advanced} && $form->submitted eq 'Advanced Mode')) { $form->field(name => $name, value => $value); } } @@ -253,12 +254,8 @@ sub enable_plugin ($) { sub disable_plugin ($) { my $plugin=shift; - if (grep { $_ eq $plugin } @{$config{add_plugins}}) { - $config{add_plugins}=[grep { $_ ne $plugin } @{$config{add_plugins}}]; - } - else { - push @{$config{disable_plugins}}, $plugin; - } + $config{add_plugins}=[grep { $_ ne $plugin } @{$config{add_plugins}}]; + push @{$config{disable_plugins}}, $plugin; } sub showform ($$) { @@ -293,12 +290,13 @@ sub showform ($$) { ], action => $config{cgiurl}, template => {type => 'div'}, - stylesheet => IkiWiki::baseurl()."style.css", + stylesheet => 1, ); $form->field(name => "do", type => "hidden", value => "setup", force => 1); $form->field(name => "rebuild_asked", type => "hidden"); + $form->field(name => "showadvanced", type => "hidden"); if ($form->submitted eq 'Basic Mode') { $form->field(name => "showadvanced", type => "hidden", @@ -450,8 +448,8 @@ sub showform ($$) { IkiWiki::unlockwiki(); # Print the top part of a standard misctemplate, - # then show the rebuild or refresh. - my $divider="xxx"; + # then show the rebuild or refresh, live. + my $divider="\0"; my $html=IkiWiki::misctemplate("setup", $divider); IkiWiki::printheader($session); my ($head, $tail)=split($divider, $html, 2); @@ -477,7 +475,7 @@ sub showform ($$) { join(" ", @command), $ret). '

'; open(OUT, ">", $config{setupfile}) || error("$config{setupfile}: $!"); - print OUT $oldsetup; + print OUT Encode::encode_utf8($oldsetup); close OUT; }