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 37... Line 37...
37
                                plugin:OIDplusPagePublicLoginLDAP.oid,
37
                                plugin:OIDplusPagePublicLoginLDAP.oid,
38
                                action:"ra_login_ldap",
38
                                action:"ra_login_ldap",
39
                                email:email,
39
                                email:email,
40
                                password:password,
40
                                password:password,
41
                                remember_me:remember_me?1:0,
41
                                remember_me:remember_me?1:0,
42
                                captcha: $(".g-recaptcha").length > 0 ? grecaptcha.getResponse() : null
42
                                captcha: oidplus_captcha_response()
43
                        },
43
                        },
44
                        error:function(jqXHR, textStatus, errorThrown) {
44
                        error:function(jqXHR, textStatus, errorThrown) {
45
                                if (errorThrown == "abort") return;
45
                                if (errorThrown == "abort") return;
46
                                alert(_L("Error: %1",errorThrown));
46
                                alert(_L("Error: %1",errorThrown));
47
                                if ($(".g-recaptcha").length > 0) grecaptcha.reset();
47
                                oidplus_captcha_reset();
48
                        },
48
                        },
49
                        success:function(data) {
49
                        success:function(data) {
50
                                if ("error" in data) {
50
                                if ("error" in data) {
51
                                        alert(_L("Error: %1",data.error));
51
                                        alert(_L("Error: %1",data.error));
52
                                        if ($(".g-recaptcha").length > 0) grecaptcha.reset();
52
                                        oidplus_captcha_reset();
53
                                } else if (data.status >= 0) {
53
                                } else if (data.status >= 0) {
54
                                        window.location.href = '?goto=oidplus:system';
54
                                        window.location.href = '?goto=oidplus:system';
55
                                        // reloadContent();
55
                                        // reloadContent();
56
                                } else {
56
                                } else {
57
                                        alert(_L("Error: %1",data));
57
                                        alert(_L("Error: %1",data));
58
                                        if ($(".g-recaptcha").length > 0) grecaptcha.reset();
58
                                        oidplus_captcha_reset();
59
                                }
59
                                }
60
                        }
60
                        }
61
                });
61
                });
62
        },
62
        },
63
 
63