summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-08-03 20:51:46 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-08-03 20:51:46 -0400
commit4b79a43db6bf3027bc3b98d8770f98ce878035b8 (patch)
treed7eb2008207c3e44610cecfc135b785e7fac2579 /IkiWiki/Plugin
parentaee84387713a6a3f122b478b2fae3b5b87c76c9f (diff)
checkboxes back
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/websetup.pm27
1 files changed, 12 insertions, 15 deletions
diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm
index 7f4bce5e5..8bef44925 100644
--- a/IkiWiki/Plugin/websetup.pm
+++ b/IkiWiki/Plugin/websetup.pm
@@ -102,15 +102,14 @@ sub showfields ($$$@) { #{{{
my $name="enable.$plugin";
$form->field(
name => $name,
- label => sprintf(gettext("enable %s?"), $plugin),
- type => "radio",
- value => $enabled,
+ label => "",
+ type => "checkbox",
fieldset => $section,
- options => [
- [ 1 => gettext("Yes") ],
- [ 0 => gettext("No") ]
- ],
+ options => [ [ 1 => sprintf(gettext("enable %s?"), $plugin) ]]
);
+ if (! $form->submitted) {
+ $form->field(name => $name, value => $enabled);
+ }
if ($plugin_forced) {
$form->field(name => $name, disabled => 1);
}
@@ -181,15 +180,14 @@ sub showfields ($$$@) { #{{{
elsif ($info{type} eq "boolean") {
$form->field(
name => $name,
- label => $description,
- type => "radio",
- value => $value,
- options => [
- [ 1 => gettext("Yes") ],
- [ 0 => gettext("No") ]
- ],
+ label => "",
+ type => "checkbox",
+ options => [ [ 1 => $description ] ],
fieldset => $section,
);
+ if (! $form->submitted) {
+ $form->field(name => $name, value => $value);
+ }
}
if (! $info{safe}) {
@@ -237,7 +235,6 @@ sub showform ($$) { #{{{
[plugins => gettext("plugins")]
],
action => $config{cgiurl},
- table => 0,
template => {type => 'div'},
stylesheet => IkiWiki::baseurl()."style.css",
);