}
}
+ checkLdapServerConfiguration=function(){
+ $.log("checkLdapServerConfiguration");
+ clearUserMessages();
+ var userMessages=$("#user-messages");
+ userMessages.html(mediumSpinnerImg());
+ $.log("checkChangedLdapConfiguration");
+ $.ajax("restServices/archivaServices/archivaRuntimeConfigurationService/checkLdapConnection",
+ {
+ type: "GET",
+ success: function(data) {
+ var message=$.i18n.prop('archiva-runtime-configuration.ldap.verified');
+ displaySuccessMessage(message);
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ },
+ complete:function(data){
+ removeMediumSpinnerImg(userMessages);
+ //$("#archiva-runtime-configuration-save" ).button('reset');
+ }
+ }
+ );
+ }
+
+ checkChangedLdapConfiguration=function(){
+ clearUserMessages();
+ var userMessages=$("#user-messages");
+ userMessages.html(mediumSpinnerImg());
+ $.log("checkChangedLdapConfiguration");
+ $.ajax("restServices/archivaServices/archivaRuntimeConfigurationService/checkLdapConnection",
+ {
+ type: "POST",
+ contentType: 'application/json',
+ data:ko.toJSON(self.archivaRuntimeConfiguration().ldapConfiguration),
+ dataType: 'json',
+ success: function(data) {
+ var message=$.i18n.prop('archiva-runtime-configuration.ldap.verified');
+ displaySuccessMessage(message);
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ },
+ complete:function(data){
+ removeMediumSpinnerImg(userMessages);
+ //$("#archiva-runtime-configuration-save" ).button('reset');
+ }
+ }
+ );
+ }
+
for(var i= 0;i<archivaRuntimeConfiguration.userManagerImpls().length;i++){
var id=archivaRuntimeConfiguration.userManagerImpls()[i];
$.log("id:"+id);
<!-- TODO extraPropertiesEntries -->
</fieldset>
</form>
+
+ <button data-bind="click: checkChangedLdapConfiguration,css:{ 'btn-warning': archivaRuntimeConfiguration().ldapConfiguration().modified() },
+ enabled: archivaRuntimeConfiguration().ldapConfiguration().modified()"
+ id="ldap-configuration-check-modification"class="btn">${$.i18n.prop('redback.runtime.ldap.checkModification')}</button>
+
+ <button data-bind="click: checkLdapServerConfiguration"
+ id="ldap-configuration-check-server"class="btn">${$.i18n.prop('redback.runtime.ldap.checkServer')}</button>
+
</div>
</div>