diff options
Diffstat (limited to 'js/src/setup/scripts.js')
-rw-r--r-- | js/src/setup/scripts.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/js/src/setup/scripts.js b/js/src/setup/scripts.js index c7671c1fa9..83de7b6a0d 100644 --- a/js/src/setup/scripts.js +++ b/js/src/setup/scripts.js @@ -2,8 +2,6 @@ * Functions used in Setup configuration forms */ -/* global displayErrors, getAllValues, getIdPrefix, validators */ // js/config.js - // show this window in top frame if (top !== self) { window.top.location.href = location; @@ -107,7 +105,7 @@ function ajaxValidate (parent, id, values) { error[key] = Array.isArray(value) ? value : [value]; } } - displayErrors(error); + window.Config.displayErrors(error); }, complete: function () { $parent.removeData('ajax'); @@ -124,7 +122,7 @@ $(document).on('change', '.autosubmit', function (e) { e.target.form.submit(); }); -$.extend(true, validators, { +$.extend(true, window.validators, { // field validators field: { /** @@ -169,7 +167,7 @@ $.extend(true, validators, { */ Server: function (isKeyUp) { if (!isKeyUp) { - ajaxValidate(this, 'Server', getAllValues()); + ajaxValidate(this, 'Server', window.Config.getAllValues()); } return true; }, @@ -181,7 +179,7 @@ $.extend(true, validators, { * @return {true} */ Server_login_options: function (isKeyUp) { // eslint-disable-line camelcase - return validators.fieldset.Server.apply(this, [isKeyUp]); + return window.validators.fieldset.Server.apply(this, [isKeyUp]); }, /** * Validates Server_pmadb fieldset @@ -195,9 +193,9 @@ $.extend(true, validators, { return true; } - var prefix = getIdPrefix($(this).find('input')); + var prefix = window.Config.getIdPrefix($(this).find('input')); if ($('#' + prefix + 'pmadb').val() !== '') { - ajaxValidate(this, 'Server_pmadb', getAllValues()); + ajaxValidate(this, 'Server_pmadb', window.Config.getAllValues()); } return true; |