Subversion Repositories oidplus

Rev

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: "request_freeoid",
24
                        action: "request_freeoid",
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("Instructions have been sent via email.");
37
                                alert(_L("Instructions have been sent via email."));
38
                                window.location.href = '?goto=oidplus:system';
38
                                window.location.href = '?goto=oidplus:system';
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 61... Line 61...
61
                        password1: $("#password1").val(),
61
                        password1: $("#password1").val(),
62
                        password2: $("#password2").val(),
62
                        password2: $("#password2").val(),
63
                        timestamp: $("#timestamp").val()
63
                        timestamp: $("#timestamp").val()
64
                },
64
                },
65
                error:function(jqXHR, textStatus, errorThrown) {
65
                error:function(jqXHR, textStatus, errorThrown) {
66
                        alert("Error: " + errorThrown);
66
                        alert(_L("Error: %1",errorThrown));
67
                },
67
                },
68
                success: function(data) {
68
                success: function(data) {
69
                        if ("error" in data) {
69
                        if ("error" in data) {
70
                                alert("Error: " + data.error);
70
                                alert(_L("Error: %1",data.error));
71
                        } else if (data.status == 0) {
71
                        } else if (data.status == 0) {
72
                                alert("Registration successful! You can now log in.");
72
                                alert(_L("Registration successful! You can now log in."));
73
                                window.location.href = '?goto=oidplus:login';
73
                                window.location.href = '?goto=oidplus:login';
74
                                //reloadContent();
74
                                //reloadContent();
75
                        } else {
75
                        } else {
76
                                alert("Error: " + data);
76
                                alert(_L("Error: %1",data));
77
                        }
77
                        }
78
                }
78
                }
79
        });
79
        });
80
        return false;
80
        return false;
81
}
81
}
82
 
-