diff options
author | Phil Davis <phil.davis@inf.org> | 2016-07-07 16:27:41 +0930 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-07-08 12:30:28 -0300 |
commit | 9461d2081360b2a6d57fbaa08f579a4625ce3f3c (patch) | |
tree | 542951def31f1b422a4e49c49b288c2a8ebf0ba8 /src/usr/local/www/firewall_aliases.php | |
parent | 1f9c2cb696f493aaaa3512f29c080b7e422b24f2 (diff) | |
download | pfsense-9461d2081360b2a6d57fbaa08f579a4625ce3f3c.zip pfsense-9461d2081360b2a6d57fbaa08f579a4625ce3f3c.tar.gz |
Fix #6582 Allow import of ports
This change does:
1) Allow bulk import of a port alias. That happens when the Import
button is pressed from the Ports tab of the firewall_aliases screen.
2) Allow bulk import of an IP alias, automatically determine if the
imported data fits a host or network alias type. That happens when the
Import button is pressed from the IP tab of the firewall_aliases screen.
3) When Import is pressed from the "All" tab of the firewall_aliases
screen, make an IP alias.
4) Do not display the Import button when on the URL tab of the
firewall_aliases screen.
(cherry picked from commit e4c784bfeb5d9bad4c65c421cefb767af0b164dd)
Diffstat (limited to 'src/usr/local/www/firewall_aliases.php')
-rw-r--r-- | src/usr/local/www/firewall_aliases.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/usr/local/www/firewall_aliases.php b/src/usr/local/www/firewall_aliases.php index b6be2ff..bdf508a 100644 --- a/src/usr/local/www/firewall_aliases.php +++ b/src/usr/local/www/firewall_aliases.php @@ -309,10 +309,16 @@ display_top_tabs($tab_array); <i class="fa fa-plus icon-embed-btn"></i> <?=gettext("Add");?> </a> - <a href="firewall_aliases_import.php" role="button" class="btn btn-primary btn-sm"> +<?php +if (($tab == "ip") || ($tab == "port") || ($tab == "all")): +?> + <a href="firewall_aliases_import.php?tab=<?=$tab?>" role="button" class="btn btn-primary btn-sm"> <i class="fa fa-upload icon-embed-btn"></i> <?=gettext("Import");?> </a> +<?php +endif +?> </nav> <!-- Information section. Icon ID must be "showinfo" and the information <div> ID must be "infoblock". |