diff --git a/firewall/edit_rule.cgi b/firewall/edit_rule.cgi
index 233e9238d..6492dfb35 100755
--- a/firewall/edit_rule.cgi
+++ b/firewall/edit_rule.cgi
@@ -31,7 +31,7 @@ foreach $f ('table', 'idx', 'new', 'chain', 'before', 'after') {
# Display action section
print &ui_table_start($text{'edit_header1'}, "width=100%", 2);
-print &ui_table_row(text{'edit_chain'},
+print &ui_table_row($text{'edit_chain'},
$text{"index_chain_".lc($rule->{'chain'})} ||
&text('index_chain', "$rule->{'chain'}"));
@@ -65,9 +65,11 @@ else {
@jumps = ( undef, 'ACCEPT', 'DROP', 'REJECT', 'QUEUE', 'RETURN', 'LOG' );
}
@grid = ( );
+$found = 0;
foreach $j (grep { &can_jump($_) } @jumps) {
push(@grid, &ui_oneradio("jump", $j, $text{"index_jump_".lc($j)},
$rule->{'j'}->[1] eq $j));
+ $found++ if ($rule->{'j'}->[1] eq $j);
}
push(@grid, &ui_oneradio("jump", "*", $text{'edit_jump_other'}, !$found));
push(@grid, &ui_textbox("other", $found ? "" : $rule->{'j'}->[1], 12));
@@ -294,7 +296,7 @@ print &ui_table_row($text{'edit_state'},
"
".
&ui_select("state", [ split(/,/, $rule->{'state'}->[1]) ],
[ map { [ $_, $text{"edit_state_".lc($_)} ] }
- ('NEW', 'ESTABLISHED', 'RELATED', 'INVALID', 'UNTRACKED') ]).
+ ('NEW', 'ESTABLISHED', 'RELATED', 'INVALID', 'UNTRACKED') ], 5, 1).
" | ");
# Type of service
@@ -353,7 +355,7 @@ else {
# print_mode(name, &value, [yes-option, no-option], [no-no-option])
sub print_mode
{
-local ($name, $value, $yes_opt, $no_opt, $no_no_opt);
+local ($name, $value, $yes_opt, $no_opt, $no_no_opt) = @_;
local $m = !$value ? 0 :
$value->[0] eq "!" ? 2 : 1;
return &ui_select($name, $m,
@@ -434,6 +436,7 @@ sub protocol_input
{
local ($name, $value) = @_;
local @stdprotos = ( 'tcp', 'udp', 'icmp', undef );
+$value ||= "tcp";
local @otherprotos;
open(PROTOS, "/etc/protocols");
while() {
diff --git a/firewall/lang/en b/firewall/lang/en
index e72ebc492..bd153b689 100644
--- a/firewall/lang/en
+++ b/firewall/lang/en
@@ -32,7 +32,7 @@ index_jump_redirect=Redirect
index_jump_dnat=Destination NAT
index_jump_snat=Source NAT
index_jump_=Do nothing
-index_jump=Run chain $1
+index_jump=Jump to chain $1
index_radd=Add Rule
index_cdelete=Delete Chain
index_crename=Rename Chain
diff --git a/ui-lib.pl b/ui-lib.pl
index 1c1548869..4aee5c658 100755
--- a/ui-lib.pl
+++ b/ui-lib.pl
@@ -1391,6 +1391,9 @@ sub ui_buttons_row
{
return &theme_ui_buttons_row(@_) if (defined(&theme_ui_buttons_row));
my ($script, $label, $desc, $hiddens, $after, $before) = @_;
+if (ref($hiddens)) {
+ $hiddens = join("\n", map { &ui_hidden(@$_) } @$hiddens);
+ }
return "