- return %shownfields;
-} #}}}
-
-sub showplugintoggle ($$$$) { #{{{
- my $form=shift;
- my $plugin=shift;
- my $enabled=shift;
- my $section=shift;
-
- if (exists $config{websetup_force_plugins} &&
- grep { $_ eq $plugin } @{$config{websetup_force_plugins}}) {
- return 0;
- }
- if (grep { $_ eq $plugin } @force_plugins, @rcs_plugins) {
- return 0;
+ if (defined $plugin && (! $plugin_forced || $config{websetup_advanced})) {
+ my $name="enable.$plugin";
+ $section="plugins" unless %shownfields;
+ $form->field(
+ name => $name,
+ label => "",
+ type => "checkbox",
+ options => [ [ 1 => sprintf(gettext("enable %s?"), $plugin) ] ],
+ value => $enabled,
+ fieldset => $section,
+ );
+ if ($plugin_forced) {
+ $form->field(name => $name, disabled => 1);
+ }
+ else {
+ $shownfields{$name}=[$name, \%plugininfo];
+ }