Subversion Repositories oidplus

Rev

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

Rev 642 Rev 702
Line 73... Line 73...
73
                                plugin:OIDplusPagePublicLogin.oid,
73
                                plugin:OIDplusPagePublicLogin.oid,
74
                                action:"ra_login",
74
                                action:"ra_login",
75
                                email:email,
75
                                email:email,
76
                                password:password,
76
                                password:password,
77
                                remember_me:remember_me?1:0,
77
                                remember_me:remember_me?1:0,
78
                                captcha: $(".g-recaptcha").length > 0 ? grecaptcha.getResponse() : null
78
                                captcha: oidplus_captcha_response()
79
                        },
79
                        },
80
                        error:function(jqXHR, textStatus, errorThrown) {
80
                        error:function(jqXHR, textStatus, errorThrown) {
81
                                if (errorThrown == "abort") return;
81
                                if (errorThrown == "abort") return;
82
                                alert(_L("Error: %1",errorThrown));
82
                                alert(_L("Error: %1",errorThrown));
83
                                if ($(".g-recaptcha").length > 0) grecaptcha.reset();
83
                                oidplus_captcha_reset();
84
                        },
84
                        },
85
                        success:function(data) {
85
                        success:function(data) {
86
                                if ("error" in data) {
86
                                if ("error" in data) {
87
                                        alert(_L("Error: %1",data.error));
87
                                        alert(_L("Error: %1",data.error));
88
                                        if ($(".g-recaptcha").length > 0) grecaptcha.reset();
88
                                        oidplus_captcha_reset();
89
                                } else if (data.status >= 0) {
89
                                } else if (data.status >= 0) {
90
                                        window.location.href = '?goto=oidplus:system';
90
                                        window.location.href = '?goto=oidplus:system';
91
                                        // reloadContent();
91
                                        // reloadContent();
92
                                } else {
92
                                } else {
93
                                        alert(_L("Error: %1",data));
93
                                        alert(_L("Error: %1",data));
94
                                        if ($(".g-recaptcha").length > 0) grecaptcha.reset();
94
                                        oidplus_captcha_reset();
95
                                }
95
                                }
96
                        }
96
                        }
97
                });
97
                });
98
        },
98
        },
99
 
99
 
Line 120... Line 120...
120
                                csrf_token:csrf_token,
120
                                csrf_token:csrf_token,
121
                                plugin:OIDplusPagePublicLogin.oid,
121
                                plugin:OIDplusPagePublicLogin.oid,
122
                                action:"admin_login",
122
                                action:"admin_login",
123
                                password:password,
123
                                password:password,
124
                                remember_me:remember_me?1:0,
124
                                remember_me:remember_me?1:0,
125
                                captcha: $(".g-recaptcha").length > 0 ? grecaptcha.getResponse() : null
125
                                captcha: oidplus_captcha_response()
126
                        },
126
                        },
127
                        error:function(jqXHR, textStatus, errorThrown) {
127
                        error:function(jqXHR, textStatus, errorThrown) {
128
                                if (errorThrown == "abort") return;
128
                                if (errorThrown == "abort") return;
129
                                alert(_L("Error: %1",errorThrown));
129
                                alert(_L("Error: %1",errorThrown));
130
                                if ($(".g-recaptcha").length > 0) grecaptcha.reset();
130
                                oidplus_captcha_reset();
131
                        },
131
                        },
132
                        success:function(data) {
132
                        success:function(data) {
133
                                if ("error" in data) {
133
                                if ("error" in data) {
134
                                        alert(_L("Error: %1",data.error));
134
                                        alert(_L("Error: %1",data.error));
135
                                        if ($(".g-recaptcha").length > 0) grecaptcha.reset();
135
                                        oidplus_captcha_reset();
136
                                } else if (data.status >= 0) {
136
                                } else if (data.status >= 0) {
137
                                        window.location.href = '?goto=oidplus:system';
137
                                        window.location.href = '?goto=oidplus:system';
138
                                        // reloadContent();
138
                                        // reloadContent();
139
                                } else {
139
                                } else {
140
                                        alert(_L("Error: %1",data));
140
                                        alert(_L("Error: %1",data));
141
                                        if ($(".g-recaptcha").length > 0) grecaptcha.reset();
141
                                        oidplus_captcha_reset();
142
                                }
142
                                }
143
                        }
143
                        }
144
                });
144
                });
145
        },
145
        },
146
 
146