Subversion Repositories oidplus

Rev

Rev 702 | Rev 962 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 702 Rev 833
Line 37... Line 37...
37
                                email: $("#email").val(),
37
                                email: $("#email").val(),
38
                                captcha: oidplus_captcha_response()
38
                                captcha: oidplus_captcha_response()
39
                        },
39
                        },
40
                        error:function(jqXHR, textStatus, errorThrown) {
40
                        error:function(jqXHR, textStatus, errorThrown) {
41
                                if (errorThrown == "abort") return;
41
                                if (errorThrown == "abort") return;
42
                                alert(_L("Error: %1",errorThrown));
42
                                alertError(_L("Error: %1",errorThrown));
43
                                oidplus_captcha_reset();
43
                                oidplus_captcha_reset();
44
                        },
44
                        },
45
                        success: function(data) {
45
                        success: function(data) {
46
                                if ("error" in data) {
46
                                if ("error" in data) {
47
                                        alert(_L("Error: %1",data.error));
47
                                        alertError(_L("Error: %1",data.error));
48
                                        oidplus_captcha_reset();
48
                                        oidplus_captcha_reset();
49
                                } else if (data.status >= 0) {
49
                                } else if (data.status >= 0) {
50
                                        alert(_L("Instructions have been sent via email."));
50
                                        alertSuccess(_L("Instructions have been sent via email."));
51
                                        window.location.href = '?goto=oidplus:system';
51
                                        window.location.href = '?goto=oidplus:system';
52
                                        //reloadContent();
52
                                        //reloadContent();
53
                                } else {
53
                                } else {
54
                                        alert(_L("Error: %1",data));
54
                                        alertError(_L("Error: %1",data));
55
                                        oidplus_captcha_reset();
55
                                        oidplus_captcha_reset();
56
                                }
56
                                }
57
                        }
57
                        }
58
                });
58
                });
59
                return false;
59
                return false;
Line 83... Line 83...
83
                                password2: $("#password2").val(),
83
                                password2: $("#password2").val(),
84
                                timestamp: $("#timestamp").val()
84
                                timestamp: $("#timestamp").val()
85
                        },
85
                        },
86
                        error:function(jqXHR, textStatus, errorThrown) {
86
                        error:function(jqXHR, textStatus, errorThrown) {
87
                                if (errorThrown == "abort") return;
87
                                if (errorThrown == "abort") return;
88
                                alert(_L("Error: %1",errorThrown));
88
                                alertError(_L("Error: %1",errorThrown));
89
                        },
89
                        },
90
                        success: function(data) {
90
                        success: function(data) {
91
                                if ("error" in data) {
91
                                if ("error" in data) {
92
                                        alert(_L("Error: %1",data.error));
92
                                        alertError(_L("Error: %1",data.error));
93
                                } else if (data.status >= 0) {
93
                                } else if (data.status >= 0) {
94
                                        alert(_L("Registration successful! You received OID %1 and can now start using it.",data.new_oid));
94
                                        alertSuccess(_L("Registration successful! You received OID %1 and can now start using it.",data.new_oid));
95
                                        window.location.href = '?goto=oidplus:login';
95
                                        window.location.href = '?goto=oidplus:login';
96
                                        //reloadContent();
96
                                        //reloadContent();
97
                                } else {
97
                                } else {
98
                                        alert(_L("Error: %1",data));
98
                                        alertError(_L("Error: %1",data));
99
                                }
99
                                }
100
                        }
100
                        }
101
                });
101
                });
102
                return false;
102
                return false;
103
        }
103
        }