From c9b688aee93de53d8a9cb9c21eb89bc4478f71c2 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sun, 22 Jan 2017 15:50:18 +0545 Subject: Display input error when no aliases to import Currently if you put nothing in the "Aliases to import" box and press Save then the page just reloads - nothing saves and there is no message about the problem. It should tell you to that "Aliases to import" is required. (cherry picked from commit f99bbf5e01f71ba21ff6ed0b95d47b1b7d163154) --- src/usr/local/www/firewall_aliases_import.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/firewall_aliases_import.php b/src/usr/local/www/firewall_aliases_import.php index aa941d1..06a8a1b 100644 --- a/src/usr/local/www/firewall_aliases_import.php +++ b/src/usr/local/www/firewall_aliases_import.php @@ -91,9 +91,9 @@ if (!is_array($config['aliases']['alias'])) { } $a_aliases = &$config['aliases']['alias']; -if ($_POST['aliasimport'] != "") { +if ($_POST) { $reqdfields = explode(" ", "name aliasimport"); - $reqdfieldsn = array(gettext("Name"), gettext("Aliases")); + $reqdfieldsn = array(gettext("Name"), gettext("Aliases to import")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); -- cgit v1.1