summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-11-30 06:40:31 +0000
committerErmal Luçi <eri@pfsense.org>2009-11-30 06:40:31 +0000
commit72cb5bafa3e000bdf19118ef28fa721c841294fd (patch)
tree133fdef5e3328b66843cac60e7d594c2f7c667c5 /usr/local/www
parentf71e0ac64d69f423ae202afa93cb13b745ccff99 (diff)
downloadpfsense-72cb5bafa3e000bdf19118ef28fa721c841294fd.zip
pfsense-72cb5bafa3e000bdf19118ef28fa721c841294fd.tar.gz
Ticket #146. Fix the autocompletion of ports aliases only for the ports and host/network aliases for the src/dst. Checking if a valid alias is entered end if it is a correct one for this box seems like to much overhead and work for this.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php17
-rw-r--r--usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js11
2 files changed, 13 insertions, 15 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index e5cc424..8231692 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -1206,20 +1206,27 @@ include("head.inc");
$aliasesaddr = "";
if($config['aliases']['alias'] <> "" and is_array($config['aliases']['alias']))
foreach($config['aliases']['alias'] as $alias_name) {
- if(!stristr($alias_name['address'], ".")) {
- if($isfirst == 1) $aliases .= ",";
- $aliases .= "'" . $alias_name['name'] . "'";
+ switch ($alias_name['type']) {
+ case "port":
+ if($isfirst == 1) $portaliases .= ",";
+ $portaliases .= "'" . $alias_name['name'] . "'";
$isfirst = 1;
- } else {
+ break;
+ case "host":
+ case "network":
+ case "openvpn":
if($addrisfirst == 1) $aliasesaddr .= ",";
$aliasesaddr .= "'" . $alias_name['name'] . "'";
$addrisfirst = 1;
+ break;
+ default:
+ break;
}
}
?>
var addressarray=new Array(<?php echo $aliasesaddr; ?>);
- var customarray=new Array(<?php echo $aliases; ?>);
+ var customarray=new Array(<?php echo $portaliases; ?>);
var oTextbox1 = new AutoSuggestControl(document.getElementById("src"), new StateSuggestions(addressarray));
var oTextbox2 = new AutoSuggestControl(document.getElementById("srcbeginport_cust"), new StateSuggestions(customarray));
diff --git a/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js b/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js
index a8276d9..b6570b6 100644
--- a/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js
+++ b/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js
@@ -143,13 +143,4 @@ function src_rep_change() {
function dst_rep_change() {
document.iform.dstendport.selectedIndex = document.iform.dstbeginport.selectedIndex;
}
-
-window.onload = function () {
- var oTextbox1 = new AutoSuggestControl(document.getElementById("src"), new StateSuggestions(addressarray));
- var oTextbox2 = new AutoSuggestControl(document.getElementById("srcbeginport_cust"), new StateSuggestions(customarray));
- var oTextbox3 = new AutoSuggestControl(document.getElementById("srcendport_cust"), new StateSuggestions(customarray));
- var oTextbox4 = new AutoSuggestControl(document.getElementById("dst"), new StateSuggestions(addressarray));
- var oTextbox5 = new AutoSuggestControl(document.getElementById("dstbeginport_cust"), new StateSuggestions(customarray));
- var oTextbox6 = new AutoSuggestControl(document.getElementById("dstendport_cust"), new StateSuggestions(customarray));
-}
-//--> \ No newline at end of file
+//-->
OpenPOWER on IntegriCloud