PageSourceSearch

https://www.umayplus.com/umay/js/forms/functions/updatebankaccountform/index.js?v=202607270100

js umayplus.com collected 2026-10-02 15:29:23 UTC 3,699 bytes, 89 lines download raw bytes

1if ($("#UpdateBankAccountForm").length > 0) {
2
3  const inputIdCardElement = document.getElementById("idCard");
4  var inputmaskIdCard = new Inputmask("9-9999-99999-99-9", {
5    placeholder: " ",
6    showMaskOnHover: false,
7    showMaskOnFocus: false,
8    clearMaskOnLostFocus: true,
9  });
10  const inputPhoneElement = document.getElementById("phone");
11  var inputmaskPhone = new Inputmask("999-999-9999", {
12    placeholder: " ",
13    showMaskOnHover: false,
14    showMaskOnFocus: false,
15    clearMaskOnLostFocus: true,
16  });
17
18  $(document).ready(function () {
19    inputmaskIdCard.mask(inputIdCardElement);
20    inputmaskPhone.mask(inputPhoneElement);
21  });
22
23  let divCustomerServiceotherMail = $("#updateBankAccountMailProvider").val();
24  if (divCustomerServiceotherMail == "other") {
25    $("#divUpdateBankAccountOtherMail").show();
26  } else {
27    $("#divUpdateBankAccountOtherMail").hide();
28  }
29
30  $("#updateBankAccountMailProvider").on("change", function () {
31    console.log($(this).val())
32    if ($(this).val() == "other") {
33      $('#UpdateBankAccountForm').validate().settings.rules.updateBankAccountOtherMail.required = true
34      $("#divUpdateBankAccountOtherMail").show();
35    } else {
36      $('#UpdateBankAccountForm').validate().settings.rules.updateBankAccountOtherMail.required = false
37      $("#divUpdateBankAccountOtherMail").hide();
38    }
39  });
40
41  $("#UploadimageBankAccountMoreFileButton.btn-more-file").click((e) => {
42    const fileField = (index) => `
43      <div class="col-12 py-2 py-sm-2" id="divBankFile${index}">
44        <div class="form-control form-control-file  form-control-xl w-100 d-flex  align-items-center text-nowrap file-count">
45            <label class="h-100 w-100 d-flex  align-items-center overflow-hidden">
46                <span class="btn-file btn-blue text-white ">เลือกไฟล์</span>
47                <span class="text-btn-file d-inline-block text-truncate" for="bankAccount${index}">ยังไม่ได้เลือกไฟล์</span>
48                <input type="file" name="bankAccount${index}" id="bankAccount${index}" accept="application/pdf,image/png,image/jpg">
49              </label>
50              <span class="justify-self-end d-flex align-self-center delete-icon delete-bank-file-button" name="bankAccount-${index}" id="delete-bank-file-${index}"><i class="fas fa-times-circle"></i></span>
51            </div>
52        <div class="error" for="bankAccount${index}"></div>
53      </div>
54    `;
55    const countFileField = $(
56      "#UploadimageBankAccountFileForm .file-count"
57    ).length;
58    if (countFileField < 6) {
59      let idx = $("#UploadimageBankAccountFileForm .file-count").length;
60      $("div#UploadimageBankAccountFileForm").append(fileField(idx + 1));
61      if (countFileField == 5) {
62        $("#DivUploadimageBankAccountMoreFileButton").hide();
63      }
64    }
65  });
66
67  $(document).on("click", ".delete-bank-file-button", (e) => {
68    let fieldForm = e.currentTarget.parentElement.parentElement.id;
69    $(`#${fieldForm}`).remove();
70    let countFileField = $("#UploadimageBankAccountFileForm .file-count").length;
71    if (countFileField < 6) {
72      $("#DivUploadimageBankAccountMoreFileButton").show();
73    }
74  });
75  
76  $("#acceptTerm").on("click", function () {
77    if ($("#UpdateBankAccountForm").valid()) {
78      $("#UpdateBankAccountSubmitButton").removeClass("btn-disabled");
79      $("#UpdateBankAccountSubmitButton").attr("disabled", false);
80      $("#UpdateBankAccountSubmitButton").addClass("btn");
81    } else {
82      $("#acceptTerm").prop("checked", false);
83      $("#UpdateBankAccountSubmitButton").addClass("btn-disabled");
84      $("#UpdateBankAccountSubmitButton").attr("disabled", true);
85    }
86  });
87
88 
89}

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.