Subversion Repositories oidplus

Rev

Rev 1036 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1036 Rev 1305
Line 48... Line 48...
48
                                });
48
                                });
49
                        }
49
                        }
50
                });
50
                });
51
        },
51
        },
52
 
52
 
53
        raLogin: function(email, password, remember_me) {
53
        raLogin: function(email, password) {
54
                $.ajax({
54
                $.ajax({
55
                        url:"ajax.php",
55
                        url:"ajax.php",
56
                        method:"POST",
56
                        method:"POST",
57
                        beforeSend: function(jqXHR, settings) {
57
                        beforeSend: function(jqXHR, settings) {
58
                                $.xhrPool.abortAll();
58
                                $.xhrPool.abortAll();
Line 65... Line 65...
65
                                csrf_token:csrf_token,
65
                                csrf_token:csrf_token,
66
                                plugin:OIDplusPagePublicLogin.oid,
66
                                plugin:OIDplusPagePublicLogin.oid,
67
                                action:"ra_login",
67
                                action:"ra_login",
68
                                email:email,
68
                                email:email,
69
                                password:password,
69
                                password:password,
70
                                remember_me:remember_me?1:0,
-
 
71
                                captcha: oidplus_captcha_response()
70
                                captcha: oidplus_captcha_response()
72
                        },
71
                        },
73
                        error: function (jqXHR, textStatus, errorThrown) {
72
                        error: function (jqXHR, textStatus, errorThrown) {
74
                                oidplus_ajax_error(jqXHR, textStatus, errorThrown);
73
                                oidplus_ajax_error(jqXHR, textStatus, errorThrown);
75
                                oidplus_captcha_reset();
74
                                oidplus_captcha_reset();
Line 85... Line 84...
85
                        }
84
                        }
86
                });
85
                });
87
        },
86
        },
88
 
87
 
89
        raLoginOnSubmit: function() {
88
        raLoginOnSubmit: function() {
90
                var remember_me = $("#remember_me_ra").length == 0 ? false : $("#remember_me_ra")[0].checked;
-
 
91
                OIDplusPagePublicLogin.raLogin($("#raLoginEMail")[0].value, $("#raLoginPassword")[0].value, remember_me);
89
                OIDplusPagePublicLogin.raLogin($("#raLoginEMail")[0].value, $("#raLoginPassword")[0].value);
92
                return false;
90
                return false;
93
        },
91
        },
94
 
92
 
95
        /* Admin */
93
        /* Admin */
96
 
94
 
97
        adminLogin: function(password, remember_me) {
95
        adminLogin: function(password) {
98
                $.ajax({
96
                $.ajax({
99
                        url:"ajax.php",
97
                        url:"ajax.php",
100
                        method:"POST",
98
                        method:"POST",
101
                        beforeSend: function(jqXHR, settings) {
99
                        beforeSend: function(jqXHR, settings) {
102
                                $.xhrPool.abortAll();
100
                                $.xhrPool.abortAll();
Line 108... Line 106...
108
                        data: {
106
                        data: {
109
                                csrf_token:csrf_token,
107
                                csrf_token:csrf_token,
110
                                plugin:OIDplusPagePublicLogin.oid,
108
                                plugin:OIDplusPagePublicLogin.oid,
111
                                action:"admin_login",
109
                                action:"admin_login",
112
                                password:password,
110
                                password:password,
113
                                remember_me:remember_me?1:0,
-
 
114
                                captcha: oidplus_captcha_response()
111
                                captcha: oidplus_captcha_response()
115
                        },
112
                        },
116
                        error: function (jqXHR, textStatus, errorThrown) {
113
                        error: function (jqXHR, textStatus, errorThrown) {
117
                                oidplus_ajax_error(jqXHR, textStatus, errorThrown);
114
                                oidplus_ajax_error(jqXHR, textStatus, errorThrown);
118
                                oidplus_captcha_reset();
115
                                oidplus_captcha_reset();
Line 156... Line 153...
156
                        }
153
                        }
157
                });
154
                });
158
        },
155
        },
159
 
156
 
160
        adminLoginOnSubmit: function() {
157
        adminLoginOnSubmit: function() {
161
                var remember_me = $("#remember_me_admin").length == 0 ? false : $("#remember_me_admin")[0].checked;
-
 
162
                OIDplusPagePublicLogin.adminLogin($("#adminLoginPassword")[0].value, remember_me);
158
                OIDplusPagePublicLogin.adminLogin($("#adminLoginPassword")[0].value);
163
                return false;
159
                return false;
164
        }
160
        }
165
 
161
 
166
};
162
};