diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2016-11-06 20:49:49 -0600 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2016-11-06 20:49:49 -0600 |
commit | 81cc31e12563861003b7db11c84b0df2b7f41cac (patch) | |
tree | 507dd6b153329e2432af72e925bc73703ff6ce47 /src | |
parent | 3c3f9397ded654b9f913932d6f844b0e3554b6c2 (diff) | |
parent | 6a54698517430760ddcbc84dd0476046d3926b31 (diff) | |
download | pfsense-81cc31e12563861003b7db11c84b0df2b7f41cac.zip pfsense-81cc31e12563861003b7db11c84b0df2b7f41cac.tar.gz |
Merge pull request #3199 from phil-davis/ipv6lower
* 'ipv6lower' of https://github.com/phil-davis/pfsense:
Remove "use lowercase" hint
Fix #6864 automatically convert IPv6 input to lowercase
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/classes/Form/IpAddress.class.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/usr/local/www/classes/Form/IpAddress.class.php b/src/usr/local/www/classes/Form/IpAddress.class.php index 036828f..812a2f7 100644 --- a/src/usr/local/www/classes/Form/IpAddress.class.php +++ b/src/usr/local/www/classes/Form/IpAddress.class.php @@ -31,14 +31,19 @@ class Form_IpAddress extends Form_Input switch ($type) { case "BOTH": $this->_attributes['pattern'] = '[a-f0-9:.]*'; + $this->_attributes['title'] = 'An IPv4 address like 1.2.3.4 or an IPv6 address like 1:2a:3b:ffff::1'; + $this->_attributes['onChange'] = 'javascript:this.value=this.value.toLowerCase();'; break; case "V4": $this->_attributes['pattern'] = '[0-9.]*'; + $this->_attributes['title'] = 'An IPv4 address like 1.2.3.4'; break; case "V6": $this->_attributes['pattern'] = '[a-f0-9:]*'; + $this->_attributes['title'] = 'An IPv6 address like 1:2a:3b:ffff::1'; + $this->_attributes['onChange'] = 'javascript:this.value=this.value.toLowerCase();'; break; } } |