mirror of
https://github.com/apache/archiva.git
synced 2025-03-08 01:43:06 +00:00
use configured applicationUrl to send reset password email.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1342649 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5f43a65cd8
commit
23bd07d564
@ -451,6 +451,11 @@ define("redback.user",["jquery","order!utils","i18n","jquery.validate","order!kn
|
||||
);
|
||||
}
|
||||
|
||||
ResetPasswordRequest=function(username,applicationUrl){
|
||||
this.username=username;
|
||||
this.applicationUrl=applicationUrl;
|
||||
}
|
||||
|
||||
passwordReset=function(){
|
||||
var username = $("#user-login-form-username" ).val();
|
||||
if(username.trim().length<1){
|
||||
@ -466,8 +471,17 @@ define("redback.user",["jquery","order!utils","i18n","jquery.validate","order!kn
|
||||
window.modalLoginWindow.modal('hide');
|
||||
}
|
||||
$("#user-messages" ).html(mediumSpinnerImg());
|
||||
$.ajax("restServices/redbackServices/userService/resetPassword/"+encodeURIComponent(username), {
|
||||
|
||||
$.ajax({
|
||||
url: "restServices/archivaServices/archivaAdministrationService/applicationUrl",
|
||||
type: "GET",
|
||||
dataType: 'text',
|
||||
success: function(data){
|
||||
|
||||
$.ajax("restServices/redbackServices/userService/resetPassword", {
|
||||
type: "POST",
|
||||
data: JSON.stringify(new ResetPasswordRequest(username,data)),
|
||||
contentType: "application/json",
|
||||
success: function(result) {
|
||||
clearUserMessages();
|
||||
displayInfoMessage($.i18n.prop("password.reset.success"));
|
||||
@ -479,6 +493,8 @@ define("redback.user",["jquery","order!utils","i18n","jquery.validate","order!kn
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* validate login box before ajax call
|
||||
|
Loading…
x
Reference in New Issue
Block a user