Rev 320 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 320 | Rev 360 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | action: "forgot_password", |
24 | action: "forgot_password", |
25 | email: $("#email").val(), |
25 | email: $("#email").val(), |
26 | captcha: document.getElementsByClassName('g-recaptcha').length > 0 ? grecaptcha.getResponse() : null |
26 | captcha: document.getElementsByClassName('g-recaptcha').length > 0 ? grecaptcha.getResponse() : null |
27 | }, |
27 | }, |
28 | error:function(jqXHR, textStatus, errorThrown) { |
28 | error:function(jqXHR, textStatus, errorThrown) { |
29 | alert("Error: " + errorThrown); |
29 | alert(_L("Error: %1",errorThrown)); |
30 | if (document.getElementsByClassName('g-recaptcha').length > 0) grecaptcha.reset(); |
30 | if (document.getElementsByClassName('g-recaptcha').length > 0) grecaptcha.reset(); |
31 | }, |
31 | }, |
32 | success: function(data) { |
32 | success: function(data) { |
33 | if ("error" in data) { |
33 | if ("error" in data) { |
34 | alert("Error: " + data.error); |
34 | alert(_L("Error: %1",data.error)); |
35 | if (document.getElementsByClassName('g-recaptcha').length > 0) grecaptcha.reset(); |
35 | if (document.getElementsByClassName('g-recaptcha').length > 0) grecaptcha.reset(); |
36 | } else if (data.status == 0) { |
36 | } else if (data.status == 0) { |
37 | alert("E-Mail sent."); |
37 | alert(_L("E-Mail sent.")); |
38 | window.location.href = '?goto=oidplus:login'; |
38 | window.location.href = '?goto=oidplus:login'; |
39 | //reloadContent(); |
39 | //reloadContent(); |
40 | } else { |
40 | } else { |
41 | alert("Error: " + data); |
41 | alert(_L("Error: %1",data)); |
42 | if (document.getElementsByClassName('g-recaptcha').length > 0) grecaptcha.reset(); |
42 | if (document.getElementsByClassName('g-recaptcha').length > 0) grecaptcha.reset(); |
43 | } |
43 | } |
44 | } |
44 | } |
45 | }); |
45 | }); |
46 | return false; |
46 | return false; |
Line 58... | Line 58... | ||
58 | password1: $("#password1").val(), |
58 | password1: $("#password1").val(), |
59 | password2: $("#password2").val(), |
59 | password2: $("#password2").val(), |
60 | timestamp: $("#timestamp").val() |
60 | timestamp: $("#timestamp").val() |
61 | }, |
61 | }, |
62 | error:function(jqXHR, textStatus, errorThrown) { |
62 | error:function(jqXHR, textStatus, errorThrown) { |
63 | alert("Error: " + errorThrown); |
63 | alert(_L("Error: %1",errorThrown)); |
64 | }, |
64 | }, |
65 | success: function(data) { |
65 | success: function(data) { |
66 | if ("error" in data) { |
66 | if ("error" in data) { |
67 | alert("Error: " + data.error); |
67 | alert(_L("Error: %1",data.error)); |
68 | } else if (data.status == 0) { |
68 | } else if (data.status == 0) { |
69 | alert("Password sucessfully changed. You can now log in."); |
69 | alert(_L("Password successfully changed. You can now log in.")); |
70 | window.location.href = '?goto=oidplus:login'; |
70 | window.location.href = '?goto=oidplus:login'; |
71 | //reloadContent(); |
71 | //reloadContent(); |
72 | } else { |
72 | } else { |
73 | alert("Error: " + data); |
73 | alert(_L("Error: %1",data)); |
74 | } |
74 | } |
75 | } |
75 | } |
76 | }); |
76 | }); |
77 | return false; |
77 | return false; |
78 | } |
78 | } |
79 | - |