mirror of https://github.com/apache/archiva.git
fix registration from a registration key
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1389857 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bf8deb5c1f
commit
2d3d6d40c8
|
@ -314,7 +314,7 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) {
|
|||
displayErrorMessage($.i18n.prop( data.errorKey ),idToAppend);
|
||||
} else if (data.errorMessages){
|
||||
$.each(data.errorMessages, function(index, value) {
|
||||
displayErrorMessage( $.i18n.prop(data.errorMessages[index].errorKey,data.errorMessages[index].args?data.errorMessages[index].args:null));
|
||||
displayErrorMessage( $.i18n.prop(data.errorMessages[index].errorKey,data.errorMessages[index].args?data.errorMessages[index].args:null),idToAppend);
|
||||
});
|
||||
} else {
|
||||
$.log("print data.errorMessage:"+data.errorMessage);
|
||||
|
|
|
@ -556,6 +556,7 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
|
|||
* @param registration are we in registration mode ?
|
||||
*/
|
||||
changePasswordBox=function(previousPassword,registration,user,okFn){
|
||||
$.log("changePasswordBox");
|
||||
screenChange();
|
||||
$.log("changePasswordBox previousPassword:"+previousPassword+",registration:"+registration+",user:"+user);
|
||||
if (previousPassword==true){
|
||||
|
@ -715,7 +716,15 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
|
|||
if (registration==true) {
|
||||
$.log("changePassword#sucess,registration:"+registration);
|
||||
displaySuccessMessage($.i18n.prop('change.password.success.section.title'))
|
||||
loginCall(user.username(), $("#passwordChangeFormNewPassword").val(),successLoginCallbackFn);
|
||||
loginCall(user.username(), $("#passwordChangeFormNewPassword").val(),successLoginCallbackFn,
|
||||
function(data){
|
||||
displayRestError(data,"modal-password-change-content");
|
||||
}
|
||||
,function(){
|
||||
window.modalChangePasswordBox.modal('hide');
|
||||
window.location=window.location.toString().substringBeforeFirst("?");
|
||||
window.sammyArchivaApplication.setLocation("#search");
|
||||
});
|
||||
} else {
|
||||
displaySuccessMessage($.i18n.prop('change.password.success.section.title'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue