PageSourceSearch

https://surplus.nl/wp-content/mu-plugins/10000-dwd-toolkit/10000-d…/dwdkit_custom/JobAlert/js/job-alerts.js

js surplus.nl collected 2026-10-10 00:59:11 UTC 1,548 bytes, 54 lines download raw bytes

1jQuery(document).ready(function ($) {
2
3    $('form#job-alert').on('submit', function () {
4
5        var error = false;
6
7        $('form#job-alert .required').each(function () {
8
9            if ($(this).val() == '') {
10                $(this).addClass('wpcf7-not-valid');
11                error = true;
12            } else if ($(this).hasClass('wpcf7-not-valid')) {
13                $(this).removeClass('wpcf7-not-valid');
14            }
15
16        });
17
18        if ($('form#job-alert select#frequence option').filter(':selected').val() == '') {
19            $('form#job-alert select#frequence').parent().addClass('wpcf7-not-valid');
20            error = true;
21        }
22
23        if (error)
24            return false;
25    });
26
27    $('.remove-job-alert').on('click', function (e) {
28        e.preventDefault();
29
30        var formAlert = $('form#job-alert');
31
32        formAlert.find('input[name="action"]').val('delete');
33        formAlert.find('input[name="taxonomy"]').prop('checked', false);
34
35        var answer = confirm(job_alerts.confirm_delete);
36
37        if (answer) {
38            $('.submit-wrapper input[name="action"]').val('delete');
39            $('form#job-alert').submit();
40            return true;
41        }
42
43        return false;
44    });
45
46    $('.acceptance input[name="acceptance"]').on('click', function () {
47        if ($(this).is(':checked')) {
48            $('.submit-wrapper input[type="submit"]').removeAttr('disabled');
49        } else {
50            $('.submit-wrapper input[type="submit"]').attr('disabled', 'disabled');
51        }
52    });
53
54});

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.