diff --git a/mailboxes/acl_security.pl b/mailboxes/acl_security.pl
index 561e19265..8fbdb19db 100755
--- a/mailboxes/acl_security.pl
+++ b/mailboxes/acl_security.pl
@@ -8,96 +8,56 @@ sub acl_security_form
my ($o) = @_;
# Users whose mail can be read
-print "
$text{'acl_read'} \n";
-printf " $text{'acl_none'}\n",
- $o->{'mmode'} == 0 ? "checked" : "";
-
-printf " $text{'acl_same'}\n",
- $o->{'mmode'} == 4 ? "checked" : "";
-
-printf " $text{'acl_all'} \n",
- $o->{'mmode'} == 1 ? "checked" : "";
-
-printf " $text{'acl_users'}\n",
- $o->{'mmode'} == 2 ? "checked" : "";
-printf " %s \n",
- $o->{'mmode'} == 2 ? $o->{'musers'} : "",
- &user_chooser_button("musers", 1);
-
-printf " $text{'acl_userse'}\n",
- $o->{'mmode'} == 3 ? "checked" : "";
-printf " %s \n",
- $o->{'mmode'} == 3 ? $o->{'musers'} : "",
- &user_chooser_button("muserse", 1);
-
-printf " $text{'acl_usersg'}\n",
- $o->{'mmode'} == 5 ? "checked" : "";
-printf " %s\n",
- $o->{'mmode'} == 5 ? join(" ", map { scalar(getgrgid($_)) }
- split(/\s+/, $o->{'musers'})) : "",
- &group_chooser_button("musersg", 1);
-printf " %s \n",
- $o->{'msec'} ? "checked" : "", $text{'acl_sec'};
-
-printf " $text{'acl_usersu'}\n",
- $o->{'mmode'} == 7 ? "checked" : "";
-printf " -\n",
- $o->{'mmode'} == 7 ? $o->{'musers'} : "";
-printf " \n",
- $o->{'mmode'} == 7 ? $o->{'musers2'} : "";
-
-printf " $text{'acl_usersm'}\n",
- $o->{'mmode'} == 6 ? "checked" : "";
-printf " \n",
- $o->{'mmode'} == 6 ? $o->{'musers'} : "";
+print &ui_table_row($text{'acl_read'},
+ &ui_radio_table("mmode", $o->{'mmode'},
+ [ [ 0, $text{'acl_none'} ],
+ [ 4, $text{'acl_same'} ],
+ [ 1, $text{'acl_all'} ],
+ [ 2, $text{'acl_users'},
+ &ui_users_textbox("musers",
+ $o->{'mmode'} == 2 ? $o->{'musers'} : "") ],
+ [ 3, $text{'acl_userse'},
+ &ui_users_textbox("muserse",
+ $o->{'mmode'} == 3 ? $o->{'musers'} : "") ],
+ [ 5, $text{'acl_usersg'},
+ &ui_groups_textbox("musersg",
+ $o->{'mmode'} == 5 ? join(" ", map { scalar(getgrgid($_)) }
+ split(/\s+/, $o->{'musers'})) : "").
+ " ".&ui_checkbox("msec", 1, $text{'acl_sec'}, $o->{'msec'}) ],
+ [ 7, $text{'acl_usersu'},
+ &ui_textbox("musersu1", $o->{'mmode'} == 7 ? $o->{'musers'} : "", 6)." - ".&ui_textbox("musersu2", $o->{'mmode'} == 7 ? $o->{'musers2'} : "", 6) ],
+ [ 6, &ui_textbox("musersm", $o->{'mmode'} == 6 ? $o->{'musers'} : "", 15) ],
+ ]), 3);
# Directory for arbitrary files
-print " $text{'acl_dir'} \n";
-print &ui_opt_textbox("dir", $o->{'dir'}, 40, $text{'acl_dirauto'}." ");
-print " \n";
+print &ui_table_row($text{'acl_dir'},
+ &ui_opt_textbox("dir", $o->{'dir'}, 60, $text{'acl_dirauto'}." "),
+ 3);
# Allowed From: addresses
-print " $text{'acl_from'} \n";
-printf " $text{'acl_any'} \n",
- $o->{'fmode'} == 0 ? "checked" : "";
-printf " $text{'acl_fdoms'}\n",
- $o->{'fmode'} == 1 ? "checked" : "";
-printf " \n",
- $o->{'fmode'} == 1 ? $o->{'from'} : '';
-printf " $text{'acl_faddrs'}\n",
- $o->{'fmode'} == 2 ? "checked" : "";
-printf " \n",
- $o->{'fmode'} == 2 ? $o->{'from'} : '';
-printf " $text{'acl_fdom'}\n",
- $o->{'fmode'} == 3 ? "checked" : "";
-printf " \n",
- $o->{'fmode'} == 3 ? $o->{'from'} : '';
-print " \n";
+print &ui_table_row($text{'acl_from'},
+ &ui_radio_table("fmode", $o->{'fmode'},
+ [ [ 0, $text{'acl_any'} ],
+ [ 1, $text{'acl_fdoms'},
+ &ui_textbox("fdoms", $o->{'fmode'} == 1 ? $o->{'from'} : '', 40) ],
+ [ 2, $text{'acl_faddrs'},
+ &ui_textbox("faddrs", $o->{'fmode'} == 2 ? $o->{'from'} : '', 40) ],
+ [ 3, $text{'acl_fdom'},
+ &ui_textbox("fdom", $o->{'fmode'} == 3 ? $o->{'from'} : '', 20) ],
+ ]), 3);
-print " $text{'acl_fromname'} \n";
-print " {'fromname'}'> \n";
+print &ui_table_row($text{'acl_fromname'},
+ &ui_textbox("fromname", $o->{'fromname'}, 60), 3);
-print " $text{'acl_attach'} \n";
-printf " %s\n",
- $o->{'attach'}<0 ? 'checked' : '', $text{'acl_unlimited'};
-printf " \n",
- $o->{'attach'}<0 ? '' : 'checked';
-printf " kB\n",
- $o->{'attach'}<0 ? '' : $o->{'attach'};
-print " \n";
+print &ui_table_row($text{'acl_attach'},
+ &ui_opt_textbox("attach", $o->{'attach'}<0 ? "" : $o->{'attach'},
+ 5, "")." kB");
-print " $text{'acl_canattach'} \n";
-printf " %s\n",
- $o->{'canattach'} ? 'checked' : '', $text{'yes'};
-printf " %s \n",
- $o->{'canattach'} ? '' : 'checked', $text{'no'};
+print &ui_table_row($text{'acl_canattach'},
+ &ui_yesno_radio("canattach", $o->{'canattach'}));
-print " $text{'acl_candetach'} \n";
-printf " %s\n",
- $o->{'candetach'} ? 'checked' : '', $text{'yes'};
-printf " %s \n",
- $o->{'candetach'} ? '' : 'checked', $text{'no'};
+print &ui_table_row($text{'acl_candetach'},
+ &ui_yesno_radio("candetach", $o->{'candetach'}));
}
# acl_security_save(&options)