summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/local/www/js/pfSenseHelpers.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/usr/local/www/js/pfSenseHelpers.js b/src/usr/local/www/js/pfSenseHelpers.js
index d98a50a..341c3bb 100644
--- a/src/usr/local/www/js/pfSenseHelpers.js
+++ b/src/usr/local/www/js/pfSenseHelpers.js
@@ -52,6 +52,14 @@
// These helper functions are used on many/most UI pages to hide/show/disable/enable form elements where required
+// Cause the input to be displayed as a required field by adding the element-required class to the label
+function setRequired(id, req) {
+ if (req)
+ $('#' + id).parent().parent('div').find('span:first').addClass('element-required');
+ else
+ $('#' + id).parent().parent('div').find('span:first').removeClass('element-required');
+}
+
// Hides the <div> in which the specified input element lives so that the input, its label and help text are hidden
function hideInput(id, hide) {
if (hide)
OpenPOWER on IntegriCloud