PageSourceSearch

https://ecostock.by/local/templates/main/components/manao/system.auth.form/login_popup/script.js

js ecostock.by collected 2026-10-08 12:53:01 UTC 2,315 bytes, 56 lines download raw bytes

1$("#auth-form-popup #PASSWORD").on('keypress',function(e) {
2    if(e.which == 13) {
3        event.preventDefault();
4        sendAuthAjaxPopup();
5    }
6});
7
8function sendAuthAjaxPopup() {
9    var $this = $("#auth-form-popup form");
10    var $form = {
11        action: $this.find("input[name='ajax_path']").val(),
12        post: {'ajax_mode':'y', "url":$this.attr("action")}
13    };
14    var domain = $this.find("input[name='DOMAIN']").val();
15    $.each($('input', $this), function(){
16        if ($(this).attr('name').length) {
17            var name = $(this).attr('name');
18            name = name.replace(domain, "");
19            $form.post[name] = $(this).val();
20        }
21    });
22    $("#auth-form-popup input[type='button']").addClass("disabled");
23    loaderStart();
24    BX.ajax({
25        url: $form.action,
26        method: 'POST',
27        dataType: 'json',
28        data: $form.post,
29        onsuccess: BX.delegate(function (result) {
30            $("#auth-form-popup").removeClass("error");
31            $("#auth-form-popup .text-input--error").remove();
32            if (result.errors != undefined) {
33                $("#auth-form-popup #EMAIL").parent().addClass("error");
34                $("#auth-form-popup #EMAIL").parent().append("<div class='text-input--error'>" + result.errors + "</div>");
35                $("#auth-form-popup #PASSWORD").parent().addClass("error");
36                $("#auth-form-popup #PASSWORD").parent().append("<div class='text-input--error'>" + result.errors + "</div>");
37            } else {
38                console.log(result);
39                $("#auth-form-popup input[type='button']").removeClass("disabled");
40                loaderEnd();
41                if (result.backurl != undefined) {
42                    window.location = result.backurl;
43                } else {
44                    location.reload();
45                }
46            }
47            $("#auth-form-popup input[type='button']").removeClass("disabled");
48            loaderEnd();
49        }, this),
50        onfailure: BX.delegate(function (result) {
51            console.log("fail ajax manao:main.register");
52            $("#auth-form-popup input[type='button']").val("Ошибка. Попробуйте позже");
53            loaderEnd();
54        }, this)
55    });
56}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.