summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/classes
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-09-08 09:36:36 -0400
committerStephen Beaver <sbeaver@netgate.com>2015-09-08 09:38:05 -0400
commitcddc70a20177dd4d2d622f6dd8e9e08f181774c8 (patch)
tree3584ff54c82897d7c6a9d90a60eb8a63da104a27 /src/usr/local/www/classes
parent1167a8c539d72f70c564d02763af0d678330f5bf (diff)
downloadpfsense-cddc70a20177dd4d2d622f6dd8e9e08f181774c8.zip
pfsense-cddc70a20177dd4d2d622f6dd8e9e08f181774c8.tar.gz
Fixed #5102
javascript revised to accommodate VPN masks
Diffstat (limited to 'src/usr/local/www/classes')
-rw-r--r--src/usr/local/www/classes/Form/IpAddress.class.php18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/usr/local/www/classes/Form/IpAddress.class.php b/src/usr/local/www/classes/Form/IpAddress.class.php
index e45cc38..f071c1b 100644
--- a/src/usr/local/www/classes/Form/IpAddress.class.php
+++ b/src/usr/local/www/classes/Form/IpAddress.class.php
@@ -38,31 +38,19 @@ class Form_IpAddress extends Form_Input
$this->_attributes['pattern'] = '[a-f0-9:.]*';
}
- public function addMask($name, $value, $max = 128)
+ // $min is provided to allow for VPN masks in which '0' is valid
+ public function addMask($name, $value, $max = 128, $min = 1)
{
$this->_mask = new Form_Select(
$name,
null,
$value,
- array_combine(range($max, 1), range($max, 1))
+ array_combine(range($max, $min), range($max, $min))
);
return $this;
}
- // Masks on vpn_ipsec* pages allow a mask of '0'
- public function addVPNMask($name, $value, $max = 128)
- {
- $this->_mask = new Form_Select(
- $name,
- null,
- $value,
- array_combine(range($max, 0), range($max, 0))
- );
-
- return $this;
- }
-
public function setIsRepeated()
{
if (isset($this->_mask))
OpenPOWER on IntegriCloud