summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-08-16 10:34:18 -0400
committerSteve Beaver <sbeaver@netgate.com>2017-08-16 10:34:35 -0400
commita7c47d85270fcf8c784e6af61ea2fd09f9d4f5ac (patch)
treece998cbf0b79f197b90e935feccd81d0cbe0b8cd /src/usr/local/www
parent866e537d5b1110fe3f7bc00eff6d2a4213d6b841 (diff)
downloadpfsense-a7c47d85270fcf8c784e6af61ea2fd09f9d4f5ac.zip
pfsense-a7c47d85270fcf8c784e6af61ea2fd09f9d4f5ac.tar.gz
Fixed #7625
Diffstat (limited to 'src/usr/local/www')
-rw-r--r--src/usr/local/www/js/pfSense.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/usr/local/www/js/pfSense.js b/src/usr/local/www/js/pfSense.js
index 67dc654..ae74fcd 100644
--- a/src/usr/local/www/js/pfSense.js
+++ b/src/usr/local/www/js/pfSense.js
@@ -129,17 +129,15 @@ $(function() {
var attr = $(select).attr('disabled');
- // DOn't do anything if the mask selector is disabled
+ // Don't do anything if the mask selector is disabled
if (typeof attr === typeof undefined || attr === false) {
- // Remove all options
- $(select).find('option').remove().end();
+ // Eat all of the options with a value greater than max. We don't want them to be available
+ while (select.options[0].value > max)
+ select.remove(0);
- // Then re-install the required ones
if (select.options.length < max) {
- for (var i=select.options.length; i<=max; i++) {
+ for (var i=select.options.length; i<=max; i++)
select.options.add(new Option(i, i), 0);
- }
-
// Make sure index 0 is selected otherwise it will stay in "32" for V6
select.options.selectedIndex = "0";
}
OpenPOWER on IntegriCloud