Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "use strict";
- (function e(t, n, r) {
- function s(o, u) {
- if (!n[o]) {
- if (!t[o]) {
- var a = typeof require == "function" && require;if (!u && a) return a(o, !0);if (i) return i(o, !0);throw new Error("Cannot find module '" + o + "'");
- }var f = n[o] = { exports: {} };t[o][0].call(f.exports, function (e) {
- var n = t[o][1][e];return s(n ? n : e);
- }, f, f.exports, e, t, n, r);
- }return n[o].exports;
- }var i = typeof require == "function" && require;for (var o = 0; o < r.length; o++) {
- s(r[o]);
- }return s;
- })({ 1: [function (require, module, exports) {
- (function ($) {
- "use strict";
- var $document = $(document),
- $window = $(window),
- forms = {
- contactForm: $('#contactForm'),
- bookingForm: $('#bookingForm')
- };
- $document.ready(function () {
- // booking form
- if (forms.bookingForm.length) {
- var $bookingForm = forms.bookingForm;
- $bookingForm.validate({
- rules: {
- name: {
- required: true,
- minlength: 2
- },
- message: {
- required: true,
- minlength: 20
- },
- email: {
- required: true,
- email: true
- }
- },
- messages: {
- name: {
- required: "Uzupełnij swoje imię",
- minlength: "Twoje imię musi zawierać co najmniej 2 znaki"
- },
- message: {
- required: "Wpisz swoją wiadomość",
- minlength: "Twoja wiadomość musi mieć co najmniej 20 znaków"
- },
- email: {
- required: "Uzupełnij swój adres e-mail"
- }
- },
- submitHandler: function submitHandler(form) {
- $(form).ajaxSubmit({
- type: "POST",
- data: $(form).serialize(),
- url: "form/process-booking.php",
- success: function success() {
- $('.successform', $bookingForm).fadeIn();
- $bookingForm.get(0).reset();
- },
- error: function error() {
- $('.errorform', $bookingForm).fadeIn();
- }
- });
- }
- });
- }
- // contact page form
- if (forms.contactForm.length) {
- var $contactform = forms.contactForm;
- $contactform.validate({
- rules: {
- name: {
- required: true,
- minlength: 2
- },
- message: {
- required: true,
- minlength: 20
- },
- email: {
- required: true,
- email: true
- }
- },
- messages: {
- name: {
- required: "Uzupełnij swoje imię",
- minlength: "Twoje imię musi zawierać co najmniej 2 znaki"
- },
- message: {
- required: "Wpisz swoją wiadomość",
- minlength: "Twoja wiadomość musi mieć co najmniej 20 znaków"
- },
- email: {
- required: "Uzupełnij swój adres e-mail"
- }
- },
- submitHandler: function submitHandler(form) {
- $(form).ajaxSubmit({
- type: "POST",
- data: $(form).serialize(),
- url: "form/process-contact.php",
- success: function success() {
- $('.successform', $contactform).fadeIn();
- $contactform.get(0).reset();
- },
- error: function error() {
- $('.errorform', $contactform).fadeIn();
- }
- });
- }
- });
- }
- // datepicker
- if ($('.datetimepicker').length) {
- $('.datetimepicker').datetimepicker({
- format: 'DD/MM/YYYY',
- icons: {
- time: 'icon icon-clock',
- date: 'icon icon-calendar',
- up: 'icon icon-arrow_up',
- down: 'icon icon-arrow_down',
- previous: 'icon icon-arrow-left',
- next: 'icon icon-arrow-right',
- today: 'icon icon-today',
- clear: 'icon icon-trash',
- close: 'icon icon-cancel-music'
- }
- });
- }
- if ($('.timepicker').length) {
- $('.timepicker').datetimepicker({
- format: 'LT',
- icons: {
- time: 'icon icon-clock',
- up: 'icon icon-arrow_up',
- down: 'icon icon-arrow_down',
- previous: 'icon icon-arrow-left',
- next: 'icon icon-arrow-right'
- }
- });
- }
- });
- })(jQuery);
- }, {}] }, {}, [1]);
Advertisement
Add Comment
Please, Sign In to add comment