diff --git a/init/acl_security.pl b/init/acl_security.pl
index 615ac8dff..c1cb68e78 100755
--- a/init/acl_security.pl
+++ b/init/acl_security.pl
@@ -5,40 +5,31 @@ require 'init-lib.pl';
# Output HTML for editing security options for the init module
sub acl_security_form
{
-if ($config{'local_script'}) {
- print "
| $text{'acl_script'} | \n";
- }
-else {
- print " |
| $text{'acl_actions'} | \n";
- }
-printf " $text{'yes'}\n",
- $_[0]->{'bootup'} == 1 ? "checked" : "";
+my ($o) = @_;
+
+my $msg = $config{'local_script'} ? $text{'acl_script'} : $text{'acl_actions'};
+my @opts = ( [ 1, $text{'yes'} ] );
if (!$config{'local_script'}) {
- printf " $text{'acl_runonly'}\n",
- $_[0]->{'bootup'} == 2 ? "checked" : "";
+ push(@opts, [ 2, $text{'acl_runonly'} ]);
}
-printf " $text{'no'} |
\n",
- $_[0]->{'bootup'} == 0 ? "checked" : "";
+push(@opts, [ 0, $text{'no'} ]);
+print &ui_table_row($msg,
+ &ui_radio("bootup", $o->{'bootup'}, \@opts));
-print " | $text{'acl_reboot'} | \n";
-printf " $text{'yes'}\n",
- $_[0]->{'reboot'} ? "checked" : "";
-printf " $text{'no'} | \n",
- $_[0]->{'reboot'} ? "" : "checked";
+print &ui_table_row($text{'acl_reboot'},
+ &ui_yesno_radio("reboot", $o->{'reboot'}));
-print "$text{'acl_shutdown'} | \n";
-printf " $text{'yes'}\n",
- $_[0]->{'shutdown'} ? "checked" : "";
-printf " $text{'no'} |
\n",
- $_[0]->{'shutdown'} ? "" : "checked";
+print &ui_table_row($text{'acl_shutdown'},
+ &ui_yesno_radio("shutdown", $o->{'shutdown'}));
}
# acl_security_save(&options)
# Parse the form for security options for the init module
sub acl_security_save
{
-$_[0]->{'bootup'} = $in{'bootup'};
-$_[0]->{'reboot'} = $in{'reboot'};
-$_[0]->{'shutdown'} = $in{'shutdown'};
+my ($o) = @_;
+$o->{'bootup'} = $in{'bootup'};
+$o->{'reboot'} = $in{'reboot'};
+$o->{'shutdown'} = $in{'shutdown'};
}