diff --git a/src/main/resources/jenkins/security/plugins/ldap/validation/validate.jelly b/src/main/resources/jenkins/security/plugins/ldap/validation/validate.jelly index 5b14f13e..f77fe585 100644 --- a/src/main/resources/jenkins/security/plugins/ldap/validation/validate.jelly +++ b/src/main/resources/jenkins/security/plugins/ldap/validation/validate.jelly @@ -54,10 +54,11 @@
- + diff --git a/src/main/resources/jenkins/security/plugins/ldap/validation/validateButton.js b/src/main/resources/jenkins/security/plugins/ldap/validation/validateButton.js new file mode 100644 index 00000000..c00bfde7 --- /dev/null +++ b/src/main/resources/jenkins/security/plugins/ldap/validation/validateButton.js @@ -0,0 +1,11 @@ + + Behaviour.specify(".ldap-validate-button-reference-holder", 'ldap-validate', 0, function (e) { + var url = e.getAttribute('data-fullurl'); + var attr = e.getAttribute('data-attributes') + var id = e.getAttribute('data-id'); + var button = document.getElementById(id); + button.onclick = function(el) { + ldapValidateButton(url,attr,this,id); + return false; + } + }); \ No newline at end of file diff --git a/src/main/resources/jenkins/security/plugins/ldap/validation/validateButtonOnClick.js b/src/main/resources/jenkins/security/plugins/ldap/validation/validateButtonOnClick.js new file mode 100644 index 00000000..b1d4d808 --- /dev/null +++ b/src/main/resources/jenkins/security/plugins/ldap/validation/validateButtonOnClick.js @@ -0,0 +1,7 @@ + +Behaviour.specify(".ldap-validate-input-button-reference-holder", 'ldap-validate', 0, function (e) { + var validateinp = document.getElementById("ldap-validate-input"); + validateinp.onclick = function(el) { + return false; + } +}); \ No newline at end of file