fix error message when cannot validate ldap connection

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1448674 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-02-21 14:57:40 +00:00
parent 08c68fe7f0
commit f8ae2f2f25
1 changed files with 23 additions and 12 deletions

View File

@ -1439,14 +1439,20 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
displaySuccessMessage(message);
},
error: function(data) {
var res = $.parseJSON(data.responseText);
displayRestError(res);
},
complete:function(data){
removeMediumSpinnerImg(userMessages);
btn.button('reset');
try{
var res = $.parseJSON(data.responseText);
displayRestError(res);
}catch (e){
displayErrorMessage( $.i18n.prop("error.500"));
}
}
}
).always(
function(data){
removeMediumSpinnerImg(userMessages);
btn.button('reset');
}
);
}
@ -1468,14 +1474,19 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
displaySuccessMessage(message);
},
error: function(data) {
var res = $.parseJSON(data.responseText);
displayRestError(res);
},
complete:function(data){
removeMediumSpinnerImg(userMessages);
btn.button('reset');
try{
var res = $.parseJSON(data.responseText);
displayRestError(res);
}catch (e){
displayErrorMessage( $.i18n.prop("error.500"));
}
}
}
).always(
function(data){
removeMediumSpinnerImg(userMessages);
btn.button('reset');
}
);
}