PageSourceSearch

https://freelance.ru/assets/db7ac538/ajax-form.js?v=1790077317

js freelance.ru collected 2026-09-24 08:27:05 UTC 1,448 bytes, 41 lines download raw bytes

1$(document).on('beforeSubmit', '#rejectForm, #reportForm, #reworkForm', function (e) {
2    var $form = $(this);
3    var formId = $form.attr('id');
4    var $button = $form.find('button[type="submit"]');
5
6    if ($button.prop('disabled')) return false;
7
8    var originalHtml = $button.html();
9    $button.prop('disabled', true).html('<i class="fa fa-spinner fa-spin"></i>');
10
11    $.ajax({
12        url: $form.attr('action'),
13        type: 'POST',
14        data: $form.serialize(),
15        dataType: 'json',
16        success: function(res) {
17            if (res.success) {
18                $form.closest('.modal').modal('hide');
19                swal({
20                    title: res.message || "Готово!",
21                    text: "",
22                    icon: "success",
23                    button: "ОК"
24                }).then(function() {
25                    // Выполнится после закрытия окна (нажатия ОК)
26                    if (formId === 'rejectForm' || formId === 'reworkForm') {
27                        location.reload();
28                    }
29                });
30
31                $form[0].reset();
32            } else {
33                alert("Ошибка: " + (res.errors ? Object.values(res.errors)[0] : "данные невалидны"));
34            }
35        },
36        complete: function() {
37            $button.prop('disabled', false).html(originalHtml);
38        }
39    });
40    return false;
41});

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.