PageSourceSearch

https://www.breakthru.pk/assets/js/liquidAjaxContactForm.min.js

js breakthru.pk collected 2026-10-09 03:51:33 UTC 3,605 bytes, 88 lines download raw bytes

1!function (t) {
2    "use strict";
3
4    function launchConfirmModal(message){
5        t("#confMessage").text(message);
6        t("#appConfModal").modal("show");
7    }
8    function resetForm(){
9        let contactForm = t("#post-application");
10        contactForm[0].reset();
11        contactForm.find("#resume-title").empty();
12        contactForm.find("#submitButton").removeAttr("disabled");
13    }
14    t("#confirm-delete").click(function(event) {
15            event.preventDefault();
16            t('#delete-previous').prop('disabled', false);
17            submitApplication(event, t("#post-application"));
18            t("#appConfModal").modal("hide");
19        }
20    );
21    t("#skip-application").click(function(event) {
22            event.preventDefault();
23            t('#delete-previous').prop('disabled', true);
24            resetForm();
25            t("#appConfModal").modal("hide");
26        }
27    );
28    function submitApplication(e, that){
29        e.preventDefault();
30        var s = !0, thisForm = that, o = t(thisForm).siblings(".contact-form-result"), i;
31        if (t(thisForm).find(":required").each((function () {
32            t(this).css("border-color", ""), t.trim(t(this).val()) || (t(this).css("border-color", "red"), s = !1);
33            var r = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
34            "email" != t(this).attr("type") || r.test(t.trim(t(this).val())) || (t(this).css("border-color", "red"), s = !1)
35        })).keyup((function () {
36            t(this).css("border-color", "")
37        })).change((function () {
38            t(this).css("border-color", "")
39        })), s) {
40            var applicationForm = document.getElementById("post-application");
41            var form_data = new FormData(applicationForm);
42            t("#submitButton"). attr("disabled", true);
43            var action = t(thisForm).attr("action"), method = t(thisForm).attr("method"), data = t(thisForm).serialize();
44            /*
45            var myfiles= form_data.files;
46            var data = new FormData();
47            var i=0;
48            for (i = 0; i < myfiles.length; i++) {
49                data.append('file' + i, myfiles[i]);
50            }
51             */
52            t.ajax({
53                url: action,
54                type: method,
55                contentType: false,
56                data: form_data,
57                processData: false,
58                cache: false
59            }).done(function(response) {
60                response = JSON.parse(response);
61                let i = "";
62                if("error" == response.type){
63                    i = '<p class="form-message form-error text-center">' + response.text + "</p>";
64                    t(thisForm)[0].reset();
65                    t(thisForm).find("#resume-title").empty();
66                    return;
67                }
68                if("confirmation" == response.type){
69                    launchConfirmModal(response.text);
70                    return;
71                }
72                t('#delete-previous').prop('disabled', true);
73                i = '<p class="form-message form-success text-center">' + response.text + "</p>";
74                o.removeClass("hidden").html(i), setTimeout((function () {
75                    o.addClass("hidden").html("")
76                }), 7000)
77                resetForm();
78                t("#submitButton"). attr("disabled", false);
79            });
80        }
81    }
82    t("form", ".contact-form").submit((function (r) {
83        r.preventDefault();
84        submitApplication(r, this);
85    }))
86}(jQuery);
87
88

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.