From 52ca65ee3dabf252399015bd6dfdd5b795cf1911 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 18 Jan 2016 23:07:08 +0545 Subject: firewall_nat_1to1 config descr and delete button 1) The description written when the config was saved said "Outbound" but should be "1 to 1". gettext() it while here. 2) The Delete button had no text displayed when hovering over it - make it like in firewall_nat. --- src/usr/local/www/firewall_nat_1to1.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr/local/www/firewall_nat_1to1.php b/src/usr/local/www/firewall_nat_1to1.php index 4be8a9e..0683c92 100644 --- a/src/usr/local/www/firewall_nat_1to1.php +++ b/src/usr/local/www/firewall_nat_1to1.php @@ -144,7 +144,7 @@ if (isset($_POST['del_x'])) { } else { $a_1to1[$_GET['id']]['disabled'] = true; } - if (write_config("Firewall: NAT: Outbound, enable/disable NAT rule")) { + if (write_config(gettext("Firewall: NAT: 1 to 1, enable/disable NAT rule"))) { mark_subsystem_dirty('natconf'); } header("Location: firewall_nat_1to1.php"); @@ -269,7 +269,7 @@ display_top_tabs($tab_array); - -- cgit v1.1 From 49cb08d14485b939401b211e41a0203539347036 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 18 Jan 2016 23:20:03 +0545 Subject: firewall_nat_1to1 fix save button text There was no text appearing when hovering over the Save button, and Save did not actually save the changed rule order. Make the code the same sort of stuff as in firewall_nat and it works. --- src/usr/local/www/firewall_nat_1to1.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr/local/www/firewall_nat_1to1.php b/src/usr/local/www/firewall_nat_1to1.php index 0683c92..f336433 100644 --- a/src/usr/local/www/firewall_nat_1to1.php +++ b/src/usr/local/www/firewall_nat_1to1.php @@ -75,7 +75,7 @@ if (!is_array($config['nat']['onetoone'])) { $a_1to1 = &$config['nat']['onetoone']; /* update rule order, POST[rule] is an array of ordered IDs */ -if ($_POST['order-store']) { +if (array_key_exists('order-store', $_POST)) { if (is_array($_POST['rule']) && !empty($_POST['rule'])) { $a_1to1_new = array(); @@ -273,7 +273,7 @@ display_top_tabs($tab_array); - -- cgit v1.1