summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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