summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-08-16 10:36:57 -0400
committerSteve Beaver <sbeaver@netgate.com>2017-08-16 10:40:05 -0400
commitedbca48045a1203be16b31126e7a30df92466c5b (patch)
tree771cba04074d7ba7c9fca5510a9d4be2e5c15c27 /src
parentfb8c533aab03f84017a844ba873bd50982e10d3e (diff)
downloadpfsense-edbca48045a1203be16b31126e7a30df92466c5b.zip
pfsense-edbca48045a1203be16b31126e7a30df92466c5b.tar.gz
Don't automatically update CIDR masks if the selector is disabled
(cherry picked from commit a379a5ff12b170df3a27e643794e576caf316a44)
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/js/pfSense.js21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/usr/local/www/js/pfSense.js b/src/usr/local/www/js/pfSense.js
index 92c4e21..14b252f 100644
--- a/src/usr/local/www/js/pfSense.js
+++ b/src/usr/local/www/js/pfSense.js
@@ -157,13 +157,20 @@ $(function() {
if (input.val() == "")
return;
- // 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);
-
- if (select.options.length < max) {
- for (var i=select.options.length; i<=max; i++)
- select.options.add(new Option(i, i), 0);
+ var attr = $(select).attr('disabled');
+
+ // Don't do anything if the mask selector is disabled
+ if (typeof attr === typeof undefined || attr === false) {
+ // 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);
+
+ if (select.options.length < max) {
+ 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