PageSourceSearch

https://www.materik-m.ru/local/templates/.default/components/bitrix/main.register/.default/script.js

js materik-m.ru collected 2026-09-25 09:59:09 UTC 2,180 bytes, 57 lines download raw bytes

1$(document).ready(function () {
2$(document).on('submit', '.regForm', function (event) {
3    event.preventDefault();
4    var $this = $(this);
5    var ajax_key = $this.attr('data-key');
6    var $form = {
7        action: $this.attr('action'),
8        post: {'ajax_reg_key': ajax_key}
9    };
10    $this.find('[name="REGISTER[LOGIN]"]').val($this.find('[name="REGISTER[EMAIL]"]').val());
11    $this.find('[name="REGISTER[CONFIRM_PASSWORD]"]').val($this.find('[name="REGISTER[PASSWORD]"]').val());
12    $this.find('input').each(function () {
13        if ($(this).attr('name') && $(this).val()) {
14            if ($(this).attr('type') == 'checkbox') {
15                if ($(this).prop('checked')){
16                    $form.post[$(this).attr('name')] = $(this).val();
17                }
18            } else {
19                $form.post[$(this).attr('name')] = $(this).val();
20            }
21        }
22    });
23
24    $.post($form.action, $form.post, function (data) {
25        $('input', $this).removeAttr('disabled');
26        $this.find('.smart-input').removeClass('__invalid');
27        $this.find('.smart-input').removeClass('__valid');
28        //console.log(data);
29        if (data.type == 'error') {
30            var message = '';
31            for (var key in data.message) {
32                if ($this.find('.smart-input-' + key).length) {
33                    $this.find('.smart-input-' + key).addClass('__invalid');
34                }
35//                console.log(key);
36                message = message + "<p>" + data.message[key] + "</p>";
37            }
38            $this.find('.smart-input').each(function(){
39                if (!$(this).hasClass('__invalid')) {
40                    $(this).addClass('__valid')
41                }
42            });
43            $this.find('.response-zone').html(message);
44            $this.find('.response-zone').show();
45
46            /*setTimeout(function () {
47                $this.find('.response-zone').empty();
48            }, 20000);*/
49        } else {
50            $this.find('.smart-input').addClass('__valid');
51            location.reload();
52            $this.find('.popup-final').addClass('loader-submit');
53        }
54    }, 'json');
55    return false;
56});
57});

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.