diff --git a/proftpd/mod_core.pl b/proftpd/mod_core.pl
index 6b5527e57..aedbc1924 100755
--- a/proftpd/mod_core.pl
+++ b/proftpd/mod_core.pl
@@ -857,14 +857,13 @@ return &parse_choice("MultilineRFC2228", "");
sub edit_PassivePorts
{
-local $rv = sprintf " %s\n",
- $_[0] ? "" : "checked", $text{'default'};
-$rv .= sprintf " %s\n",
- $_[0] ? "checked" : "", $text{'mod_core_pasvr'};
-$rv .= sprintf " -\n",
- $_[0]->{'words'}->[0];
-$rv .= sprintf "\n",
- $_[0]->{'words'}->[1];
+my $rv = &ui_radio("PassivePorts_def", $_[0] ? 0 : 1,
+ [ [ 1, $text{'default'} ],
+ [ 0, $text{'mod_core_pasvr'}." ".
+ &ui_textbox("PassivePorts_f", $_[0] ? $_[0]->{'words'}->[0] : "", 5).
+ " - ".
+ &ui_textbox("PassivePorts_t", $_[0] ? $_[0]->{'words'}->[1] : "", 5) ]
+ ]);
return (1, $text{'mod_core_pasv'}, $rv);
}
sub save_PassivePorts
@@ -964,28 +963,21 @@ return &parse_rlimit("RLimitOpenFiles", $text{'mod_core_efilelimit'});
# rlimit_input(name, desc, value)
sub rlimit_input
{
-local @w = @{$_[2]->{'words'}};
-local $rv;
-$rv .= sprintf "%s %s\n",
- $text{'mod_core_soft'}, $_[0], $w[0] ? "" : "checked",
- $text{'default'};
-$rv .= sprintf " %s\n",
- $_[0], $w[0] eq 'max' ? "checked" : "", $text{'mod_core_max'};
-$rv .= sprintf "\n",
- $_[0], !$w[0] || $w[0] eq 'max' ? "" : "checked";
-$rv .= sprintf "\n",
- $_[0], $w[0] eq 'max' ? '' : $w[0];
-$rv .= " ";
-
-$rv .= sprintf "%s %s\n",
- $text{'mod_core_hard'}, $_[0], $w[1] ? "" : "checked",
- $text{'default'};
-$rv .= sprintf " %s\n",
- $_[0], $w[1] eq 'max' ? "checked" : "", $text{'mod_core_max'};
-$rv .= sprintf "\n",
- $_[0], !$w[1] || $w[1] eq 'max' ? "" : "checked";
-$rv .= sprintf "\n",
- $_[0], $w[1] eq 'max' ? '' : $w[1];
+my @w = @{$_[2]->{'words'}};
+my $rv = "$text{'mod_core_soft'} ".
+ &ui_radio("$_[0]_smax",
+ $w[0] eq 'max' ? 1 : $w[0] ? 2 : 0,
+ [ [ 2, $text{'default'} ],
+ [ 1, $text{'mod_core_max'} ],
+ [ 0, &ui_textbox("$_[0]_soft",
+ $w[0] eq 'max' ? '' : $w[0], 6) ] ]);
+$rv .= "$text{'mod_core_hard'} ".
+ &ui_radio("$_[0]_hmax",
+ $w[1] eq 'max' ? 1 : $w[1] ? 2 : 0,
+ [ [ 2, $text{'default'} ],
+ [ 1, $text{'mod_core_max'} ],
+ [ 0, &ui_textbox("$_[0]_hard",
+ $w[1] eq 'max' ? '' : $w[1], 6) ] ]);
return (2, $_[1], $rv);
}
@@ -1269,22 +1261,11 @@ return &parse_opt("TimeoutStalled", '^\d+$', $text{'mod_core_etstalled'});
sub edit_Umask
{
-local $rv;
-$rv .= sprintf " %s\n",
- $_[0]->{'words'}->[0] ? "" : "checked", $text{'default'};
-$rv .= sprintf " %s\n",
- $_[0]->{'words'}->[0] ? "checked" : "", $text{'mod_core_octal'};
-$rv .= sprintf "\n",
- $_[0]->{'words'}->[0];
-
-$rv .= " $text{'mod_core_umask_d'}\n";
-$rv .= sprintf " %s\n",
- $_[0]->{'words'}->[1] ? "" : "checked", $text{'default'};
-$rv .= sprintf " %s\n",
- $_[0]->{'words'}->[1] ? "checked" : "", $text{'mod_core_octal'};
-$rv .= sprintf "\n",
- $_[0]->{'words'}->[1];
-
+my $rv = &ui_opt_textbox("Umask", $_[0]->{'words'}->[0], 5,
+ $text{'default'}, $text{'mod_core_octal'});
+$rv .= " $text{'mod_core_umask_d'}\n";
+$rv .= &ui_opt_textbox("Umask_d", $_[0]->{'words'}->[1], 5,
+ $text{'default'}, $text{'mod_core_octal'});
return (2, $text{'mod_core_umask'}, $rv);
}
sub save_Umask
@@ -1368,20 +1349,15 @@ return &parse_choice("UserDirRoot", "");
sub edit_User
{
-local($rv, @uinfo);
-$rv = sprintf " $text{'default'}\n",
- $_[0] ? "" : "checked";
-$rv .= sprintf " %s\n",
- $_[0] && $_[0]->{'value'} !~ /^#/ ? "checked" : "",
- $text{'mod_core_uname'};
-$rv .= sprintf " %s \n",
- $_[0]->{'value'} !~ /^#/ ? $_[0]->{'value'} : "",
- &user_chooser_button("User_name", 0);
-$rv .= sprintf " %s\n",
- $_[0]->{'value'} =~ /^#/ ? "checked" : "",
- $text{'mod_core_uid'};
-$rv .= sprintf "\n",
- $_[0]->{'value'} =~ /^#(.*)$/ ? $1 : "";
+my @ginfo;
+my $rv = &ui_radio_table("User",
+ !$_[0] ? 0 :
+ $_[0]->{'value'} =~ /^#/ ? 2 : 1,
+ [ [ 0, $text{'default'} ],
+ [ 1, $text{'mod_core_uname'},
+ &ui_textbox("User_name", $_[0]->{'value'} !~ /^#/ ? $_[0]->{'value'} : "", 13) ],
+ [ 2, $text{'mod_core_uid'},
+ &ui_textbox("User_name", $_[0]->{'value'} =~ /^#(.*)$/ ? $1 : "", 13) ] ]);
return (2, $text{'mod_core_user'}, $rv);
}
sub save_User