checkboxes back

master
Joey Hess 2008-08-03 20:51:46 -04:00
parent aee8438771
commit 4b79a43db6
1 changed files with 12 additions and 15 deletions

View File

@ -102,15 +102,14 @@ sub showfields ($$$@) { #{{{
my $name="enable.$plugin"; my $name="enable.$plugin";
$form->field( $form->field(
name => $name, name => $name,
label => sprintf(gettext("enable %s?"), $plugin), label => "",
type => "radio", type => "checkbox",
value => $enabled,
fieldset => $section, fieldset => $section,
options => [ options => [ [ 1 => sprintf(gettext("enable %s?"), $plugin) ]]
[ 1 => gettext("Yes") ],
[ 0 => gettext("No") ]
],
); );
if (! $form->submitted) {
$form->field(name => $name, value => $enabled);
}
if ($plugin_forced) { if ($plugin_forced) {
$form->field(name => $name, disabled => 1); $form->field(name => $name, disabled => 1);
} }
@ -181,15 +180,14 @@ sub showfields ($$$@) { #{{{
elsif ($info{type} eq "boolean") { elsif ($info{type} eq "boolean") {
$form->field( $form->field(
name => $name, name => $name,
label => $description, label => "",
type => "radio", type => "checkbox",
value => $value, options => [ [ 1 => $description ] ],
options => [
[ 1 => gettext("Yes") ],
[ 0 => gettext("No") ]
],
fieldset => $section, fieldset => $section,
); );
if (! $form->submitted) {
$form->field(name => $name, value => $value);
}
} }
if (! $info{safe}) { if (! $info{safe}) {
@ -237,7 +235,6 @@ sub showform ($$) { #{{{
[plugins => gettext("plugins")] [plugins => gettext("plugins")]
], ],
action => $config{cgiurl}, action => $config{cgiurl},
table => 0,
template => {type => 'div'}, template => {type => 'div'},
stylesheet => IkiWiki::baseurl()."style.css", stylesheet => IkiWiki::baseurl()."style.css",
); );