PageSourceSearch

https://misp-modzelewski.pl/wp-content/themes/misp/js/forms-2.js

js misp-modzelewski.pl collected 2026-10-09 01:05:26 UTC 4,603 bytes, 130 lines download raw bytes

1(function ($) {
2
3    "use strict";
4
5    var $document = $(document),
6        $window = $(window),
7        forms = {
8            contactForm: $('#contactform'),
9            appointmentForm: $('#appointment-form')
10        };
11
12    $document.ready(function () {
13
14        // appointment form
15        if (forms.appointmentForm.length) {
16            var $appointmentForm = forms.appointmentForm;
17            $appointmentForm.validate({
18                rules: {
19                    name: {
20                        required: true,
21                        minlength: 2
22                    },
23                    message: {
24                        required: true,
25                        minlength: 20
26                    },
27                    email: {
28                        required: true,
29                        email: true
30                    }
31
32                },
33                messages: {
34                    name: {
35                        required: "Please enter your name",
36                        minlength: "Your name must consist of at least 2 characters"
37                    },
38                    message: {
39                        required: "Please enter message",
40                        minlength: "Your message must consist of at least 20 characters"
41                    },
42                    email: {
43                        required: "Please enter your email"
44                    }
45                },
46                submitHandler: function (form) {
47                    $(form).ajaxSubmit({
48                        type: "POST",
49                        data: $(form).serialize(),
50                        url: "form/process-appointment.php",
51                        success: function () {
52                            $('#successAppointment').fadeIn();
53                            $('#appointment-form').each(function () {
54                                this.reset();
55                            });
56                        },
57                        error: function () {
58                            $('#appointment-form').fadeTo("slow", 0, function () {
59                                $('#errorAppointment').fadeIn();
60                            });
61                        }
62                    });
63                }
64            });
65        }
66
67        // contact page form
68        if (forms.contactForm.length) {
69            var $contactform = forms.contactForm;
70            $contactform.validate({
71                rules: {
72                    firstname: {
73                        required: true,
74                        minlength: 2
75                    },
76                    phonenumber: {
77                        required: true,
78                        minlength: 10
79                    },
80                    message: {
81                        required: true,
82                        minlength: 20
83                    },
84                    email: {
85                        required: true,
86                        email: true
87                    }
88
89                },
90                messages: {
91                    firstname: {
92                        required: "Please enter your first name",
93                        minlength: "Your name must consist of at least 2 characters"
94                    },
95                    phonenumber: {
96                        required: "Please enter your Phone number",
97                        minlength: "Your phone number must consist of at least 10 characters"
98                    },
99                    message: {
100                        required: "Please enter message",
101                        minlength: "Your message must consist of at least 20 characters"
102                    },
103                    email: {
104                        required: "Please enter your email"
105                    }
106                },
107                submitHandler: function (form) {
108                    $(form).ajaxSubmit({
109                        type: "POST",
110                        data: $(form).serialize(),
111                        url: "form/quote-contact.php",
112                        success: function () {
113                            $('#success').fadeIn();
114                            $('#contactform').each(function () {
115                                this.reset();
116                            });
117                        },
118                        error: function () {
119                            $('#contactform').fadeTo("slow", 0, function () {
120                                $('#error').fadeIn();
121                            });
122                        }
123                    });
124                }
125            });
126        }
127
128    });
129
130})(jQuery);

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.