File manager - Edit - /home/gzbnyc5/pty-app/realstate/public/assetsv2/js/custom/documentation/forms/formvalidation/advanced.js.map
Back
{"version":3,"file":"js/custom/documentation/forms/formvalidation/advanced.js","mappings":";;;;;;AAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,6CAA6C;AAC7C,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,6CAA6C;AAC7C,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,6CAA6C;AAC7C,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,6CAA6C;AAC7C,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,6CAA6C;AAC7C,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,6CAA6C;AAC7C,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,6CAA6C;AAC7C,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC","sources":["webpack://keenthemes/../src/js/custom/documentation/forms/formvalidation/advanced.js"],"sourcesContent":["\"use strict\";\r\n\r\n// Class definition\r\nvar KTFormValidationDemoAdvanced = function () {\r\n\r\n // Private functions\r\n var exampleAdvanced = function () {\r\n // Define form element\r\n const form = document.getElementById('kt_docs_formvalidation_advanced');\r\n\r\n // Init daterangepicker --- for more info, please visit: https://www.daterangepicker.com/\r\n $(\"#kt_daterangepicker\").daterangepicker();\r\n\r\n // Init flatpickr --- for more info, please visit: https://flatpickr.js.org/\r\n $(\"#kt_flatpickr\").flatpickr();\r\n\r\n // Init tagify --- for more info, please visit: https://yaireo.github.io/tagify/\r\n new Tagify(document.querySelector(\"#kt_tagify\"), {\r\n whitelist: [\"Tag 1\", \"Tag 2\", \"Tag 3\", \"Tag 4\", \"Tag 5\", \"Tag 6\", \"Tag 7\", \"Tag 8\", \"Tag 9\", \"Tag 10\", \"Tag 11\", \"Tag 12\"],\r\n maxTags: 6,\r\n dropdown: {\r\n maxItems: 20, // <- mixumum allowed rendered suggestions\r\n classname: \"tagify__inline__suggestions\", // <- custom classname for this dropdown, so it could be targeted\r\n enabled: 0, // <- show suggestions on focus\r\n closeOnSelect: false // <- do not hide the suggestions dropdown once an item has been selected\r\n }\r\n });\r\n\r\n\r\n // Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/\r\n var validator = FormValidation.formValidation(\r\n form,\r\n {\r\n fields: {\r\n 'daterangepicker_input': {\r\n validators: {\r\n notEmpty: {\r\n message: 'Date range input is required'\r\n }\r\n }\r\n },\r\n 'flatpickr_input': {\r\n validators: {\r\n date: {\r\n format: 'YYYY-MM-DD',\r\n message: 'The value is not a valid date',\r\n },\r\n notEmpty: {\r\n message: 'Flatpickr input is required'\r\n }\r\n }\r\n },\r\n 'avatar': {\r\n validators: {\r\n notEmpty: {\r\n message: 'Please select an image'\r\n },\r\n file: {\r\n extension: 'jpg,jpeg,png',\r\n type: 'image/jpeg,image/png',\r\n message: 'The selected file is not valid'\r\n },\r\n }\r\n },\r\n 'select2_input': {\r\n validators: {\r\n notEmpty: {\r\n message: 'Select2 input is required'\r\n }\r\n }\r\n },\r\n 'tagify_input': {\r\n validators: {\r\n notEmpty: {\r\n message: 'Tagify input is required'\r\n }\r\n }\r\n },\r\n },\r\n\r\n plugins: {\r\n trigger: new FormValidation.plugins.Trigger(),\r\n bootstrap: new FormValidation.plugins.Bootstrap5({\r\n rowSelector: '.fv-row',\r\n eleInvalidClass: '',\r\n eleValidClass: ''\r\n })\r\n }\r\n }\r\n );\r\n\r\n // Revalidate Select2 input. For more info, plase visit the official plugin site: https://select2.org/\r\n $(form.querySelector('[name=\"select2_input\"]')).on('change', function () {\r\n // Revalidate the field when an option is chosen\r\n validator.revalidateField('select2_input');\r\n });\r\n\r\n // Submit button handler\r\n const submitButton = document.getElementById('kt_docs_formvalidation_submit');\r\n submitButton.addEventListener('click', function (e) {\r\n // Prevent default button action\r\n e.preventDefault();\r\n\r\n // Validate form before submit\r\n if (validator) {\r\n validator.validate().then(function (status) {\r\n console.log('validated!');\r\n\r\n if (status == 'Valid') {\r\n // Show loading indication\r\n submitButton.setAttribute('data-kt-indicator', 'on');\r\n\r\n // Disable button to avoid multiple click \r\n submitButton.disabled = true;\r\n\r\n // Simulate form submission. For more info check the plugin's official documentation: https://sweetalert2.github.io/\r\n setTimeout(function () {\r\n // Remove loading indication\r\n submitButton.removeAttribute('data-kt-indicator');\r\n\r\n // Enable button\r\n submitButton.disabled = false;\r\n\r\n // Show popup confirmation \r\n Swal.fire({\r\n text: \"Form has been successfully submitted!\",\r\n icon: \"success\",\r\n buttonsStyling: false,\r\n confirmButtonText: \"Ok, got it!\",\r\n customClass: {\r\n confirmButton: \"btn btn-primary\"\r\n }\r\n });\r\n\r\n //form.submit(); // Submit form\r\n }, 2000);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n var exampleDateRangePicker = function () {\r\n // Define form element\r\n const form = document.getElementById('kt_docs_formvalidation_daterangepicker');\r\n\r\n // Init daterangepicker --- for more info, please visit: https://www.daterangepicker.com/\r\n $(\"#kt_daterangepicker\").daterangepicker();\r\n\r\n // Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/\r\n var validator = FormValidation.formValidation(\r\n form,\r\n {\r\n fields: {\r\n 'daterangepicker_input': {\r\n validators: {\r\n notEmpty: {\r\n message: 'Date range input is required'\r\n }\r\n }\r\n },\r\n },\r\n\r\n plugins: {\r\n trigger: new FormValidation.plugins.Trigger(),\r\n bootstrap: new FormValidation.plugins.Bootstrap5({\r\n rowSelector: '.fv-row',\r\n eleInvalidClass: '',\r\n eleValidClass: ''\r\n })\r\n }\r\n }\r\n );\r\n\r\n // Submit button handler\r\n const submitButton = document.getElementById('kt_docs_formvalidation_daterangepicker_submit');\r\n submitButton.addEventListener('click', function (e) {\r\n // Prevent default button action\r\n e.preventDefault();\r\n\r\n // Validate form before submit\r\n if (validator) {\r\n validator.validate().then(function (status) {\r\n console.log('validated!');\r\n\r\n if (status == 'Valid') {\r\n // Show loading indication\r\n submitButton.setAttribute('data-kt-indicator', 'on');\r\n\r\n // Disable button to avoid multiple click \r\n submitButton.disabled = true;\r\n\r\n // Simulate form submission. For more info check the plugin's official documentation: https://sweetalert2.github.io/\r\n setTimeout(function () {\r\n // Remove loading indication\r\n submitButton.removeAttribute('data-kt-indicator');\r\n\r\n // Enable button\r\n submitButton.disabled = false;\r\n\r\n // Show popup confirmation \r\n Swal.fire({\r\n text: \"Form has been successfully submitted!\",\r\n icon: \"success\",\r\n buttonsStyling: false,\r\n confirmButtonText: \"Ok, got it!\",\r\n customClass: {\r\n confirmButton: \"btn btn-primary\"\r\n }\r\n });\r\n\r\n //form.submit(); // Submit form\r\n }, 2000);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n var exampleFlatpickr = function () {\r\n // Define form element\r\n const form = document.getElementById('kt_docs_formvalidation_flatpickr');\r\n\r\n // Init flatpickr --- for more info, please visit: https://flatpickr.js.org/\r\n $(\"#kt_flatpickr\").flatpickr();\r\n\r\n // Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/\r\n var validator = FormValidation.formValidation(\r\n form,\r\n {\r\n fields: {\r\n 'flatpickr_input': {\r\n validators: {\r\n date: {\r\n format: 'YYYY-MM-DD',\r\n message: 'The value is not a valid date',\r\n },\r\n notEmpty: {\r\n message: 'Flatpickr input is required'\r\n }\r\n }\r\n },\r\n },\r\n\r\n plugins: {\r\n trigger: new FormValidation.plugins.Trigger(),\r\n bootstrap: new FormValidation.plugins.Bootstrap5({\r\n rowSelector: '.fv-row',\r\n eleInvalidClass: '',\r\n eleValidClass: ''\r\n })\r\n }\r\n }\r\n );\r\n\r\n // Submit button handler\r\n const submitButton = document.getElementById('kt_docs_formvalidation_flatpickr_submit');\r\n submitButton.addEventListener('click', function (e) {\r\n // Prevent default button action\r\n e.preventDefault();\r\n\r\n // Validate form before submit\r\n if (validator) {\r\n validator.validate().then(function (status) {\r\n console.log('validated!');\r\n\r\n if (status == 'Valid') {\r\n // Show loading indication\r\n submitButton.setAttribute('data-kt-indicator', 'on');\r\n\r\n // Disable button to avoid multiple click \r\n submitButton.disabled = true;\r\n\r\n // Simulate form submission. For more info check the plugin's official documentation: https://sweetalert2.github.io/\r\n setTimeout(function () {\r\n // Remove loading indication\r\n submitButton.removeAttribute('data-kt-indicator');\r\n\r\n // Enable button\r\n submitButton.disabled = false;\r\n\r\n // Show popup confirmation \r\n Swal.fire({\r\n text: \"Form has been successfully submitted!\",\r\n icon: \"success\",\r\n buttonsStyling: false,\r\n confirmButtonText: \"Ok, got it!\",\r\n customClass: {\r\n confirmButton: \"btn btn-primary\"\r\n }\r\n });\r\n\r\n //form.submit(); // Submit form\r\n }, 2000);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n var exampleImageInput = function () {\r\n // Define form element\r\n const form = document.getElementById('kt_docs_formvalidation_image_input');\r\n\r\n // Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/\r\n var validator = FormValidation.formValidation(\r\n form,\r\n {\r\n fields: {\r\n 'avatar': {\r\n validators: {\r\n notEmpty: {\r\n message: 'Please select an image'\r\n },\r\n file: {\r\n extension: 'jpg,jpeg,png',\r\n type: 'image/jpeg,image/png',\r\n message: 'The selected file is not valid'\r\n },\r\n }\r\n },\r\n },\r\n\r\n plugins: {\r\n trigger: new FormValidation.plugins.Trigger(),\r\n bootstrap: new FormValidation.plugins.Bootstrap5({\r\n rowSelector: '.fv-row',\r\n eleInvalidClass: '',\r\n eleValidClass: ''\r\n })\r\n }\r\n }\r\n );\r\n\r\n // Submit button handler\r\n const submitButton = document.getElementById('kt_docs_formvalidation_image_input_submit');\r\n submitButton.addEventListener('click', function (e) {\r\n // Prevent default button action\r\n e.preventDefault();\r\n\r\n // Validate form before submit\r\n if (validator) {\r\n validator.validate().then(function (status) {\r\n console.log('validated!');\r\n\r\n if (status == 'Valid') {\r\n // Show loading indication\r\n submitButton.setAttribute('data-kt-indicator', 'on');\r\n\r\n // Disable button to avoid multiple click \r\n submitButton.disabled = true;\r\n\r\n // Simulate form submission. For more info check the plugin's official documentation: https://sweetalert2.github.io/\r\n setTimeout(function () {\r\n // Remove loading indication\r\n submitButton.removeAttribute('data-kt-indicator');\r\n\r\n // Enable button\r\n submitButton.disabled = false;\r\n\r\n // Show popup confirmation \r\n Swal.fire({\r\n text: \"Form has been successfully submitted!\",\r\n icon: \"success\",\r\n buttonsStyling: false,\r\n confirmButtonText: \"Ok, got it!\",\r\n customClass: {\r\n confirmButton: \"btn btn-primary\"\r\n }\r\n });\r\n\r\n //form.submit(); // Submit form\r\n }, 2000);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n var examplePassword = function () {\r\n // Define form element\r\n const form = document.getElementById('kt_docs_formvalidation_password');\r\n\r\n // Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/\r\n var validator = FormValidation.formValidation(\r\n form,\r\n {\r\n fields: {\r\n 'current_password': {\r\n validators: {\r\n notEmpty: {\r\n message: 'Current password is required'\r\n }\r\n }\r\n },\r\n 'new_password': {\r\n validators: {\r\n notEmpty: {\r\n message: 'The password is required'\r\n },\r\n callback: {\r\n message: 'Please enter valid password',\r\n callback: function (input) {\r\n if (input.value.length > 0) {\r\n return validatePassword();\r\n }\r\n }\r\n }\r\n }\r\n },\r\n 'confirm_password': {\r\n validators: {\r\n notEmpty: {\r\n message: 'The password confirmation is required'\r\n },\r\n identical: {\r\n compare: function () {\r\n return form.querySelector('[name=\"new_password\"]').value;\r\n },\r\n message: 'The password and its confirm are not the same'\r\n }\r\n }\r\n },\r\n },\r\n\r\n plugins: {\r\n trigger: new FormValidation.plugins.Trigger(),\r\n bootstrap: new FormValidation.plugins.Bootstrap5({\r\n rowSelector: '.fv-row',\r\n eleInvalidClass: '',\r\n eleValidClass: ''\r\n })\r\n }\r\n }\r\n );\r\n\r\n // Submit button handler\r\n const submitButton = document.getElementById('kt_docs_formvalidation_password_submit');\r\n submitButton.addEventListener('click', function (e) {\r\n // Prevent default button action\r\n e.preventDefault();\r\n\r\n // Validate form before submit\r\n if (validator) {\r\n validator.validate().then(function (status) {\r\n console.log('validated!');\r\n\r\n if (status == 'Valid') {\r\n // Show loading indication\r\n submitButton.setAttribute('data-kt-indicator', 'on');\r\n\r\n // Disable button to avoid multiple click \r\n submitButton.disabled = true;\r\n\r\n // Simulate form submission. For more info check the plugin's official documentation: https://sweetalert2.github.io/\r\n setTimeout(function () {\r\n // Remove loading indication\r\n submitButton.removeAttribute('data-kt-indicator');\r\n\r\n // Enable button\r\n submitButton.disabled = false;\r\n\r\n // Show popup confirmation \r\n Swal.fire({\r\n text: \"Form has been successfully submitted!\",\r\n icon: \"success\",\r\n buttonsStyling: false,\r\n confirmButtonText: \"Ok, got it!\",\r\n customClass: {\r\n confirmButton: \"btn btn-primary\"\r\n }\r\n });\r\n\r\n //form.submit(); // Submit form\r\n }, 2000);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n var exampleSelect2 = function () {\r\n // Define form element\r\n const form = document.getElementById('kt_docs_formvalidation_select2');\r\n\r\n // Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/\r\n var validator = FormValidation.formValidation(\r\n form,\r\n {\r\n fields: {\r\n 'select2_input': {\r\n validators: {\r\n notEmpty: {\r\n message: 'Select2 input is required'\r\n }\r\n }\r\n },\r\n },\r\n\r\n plugins: {\r\n trigger: new FormValidation.plugins.Trigger(),\r\n bootstrap: new FormValidation.plugins.Bootstrap5({\r\n rowSelector: '.fv-row',\r\n eleInvalidClass: '',\r\n eleValidClass: ''\r\n })\r\n }\r\n }\r\n );\r\n\r\n // Revalidate Select2 input. For more info, plase visit the official plugin site: https://select2.org/\r\n $(form.querySelector('[name=\"select2_input\"]')).on('change', function () {\r\n // Revalidate the field when an option is chosen\r\n validator.revalidateField('select2_input');\r\n });\r\n\r\n // Submit button handler\r\n const submitButton = document.getElementById('kt_docs_formvalidation_select2_submit');\r\n submitButton.addEventListener('click', function (e) {\r\n // Prevent default button action\r\n e.preventDefault();\r\n\r\n // Validate form before submit\r\n if (validator) {\r\n validator.validate().then(function (status) {\r\n console.log('validated!');\r\n\r\n if (status == 'Valid') {\r\n // Show loading indication\r\n submitButton.setAttribute('data-kt-indicator', 'on');\r\n\r\n // Disable button to avoid multiple click \r\n submitButton.disabled = true;\r\n\r\n // Simulate form submission. For more info check the plugin's official documentation: https://sweetalert2.github.io/\r\n setTimeout(function () {\r\n // Remove loading indication\r\n submitButton.removeAttribute('data-kt-indicator');\r\n\r\n // Enable button\r\n submitButton.disabled = false;\r\n\r\n // Show popup confirmation \r\n Swal.fire({\r\n text: \"Form has been successfully submitted!\",\r\n icon: \"success\",\r\n buttonsStyling: false,\r\n confirmButtonText: \"Ok, got it!\",\r\n customClass: {\r\n confirmButton: \"btn btn-primary\"\r\n }\r\n });\r\n\r\n //form.submit(); // Submit form\r\n }, 2000);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n var exampleTagify = function () {\r\n // Define form element\r\n const form = document.getElementById('kt_docs_formvalidation_tagify');\r\n\r\n // Init tagify --- for more info, please visit: https://yaireo.github.io/tagify/\r\n new Tagify(document.querySelector(\"#kt_tagify\"), {\r\n whitelist: [\"Tag 1\", \"Tag 2\", \"Tag 3\", \"Tag 4\", \"Tag 5\", \"Tag 6\", \"Tag 7\", \"Tag 8\", \"Tag 9\", \"Tag 10\", \"Tag 11\", \"Tag 12\"],\r\n maxTags: 6,\r\n dropdown: {\r\n maxItems: 20, // <- mixumum allowed rendered suggestions\r\n classname: \"tagify__inline__suggestions\", // <- custom classname for this dropdown, so it could be targeted\r\n enabled: 0, // <- show suggestions on focus\r\n closeOnSelect: false // <- do not hide the suggestions dropdown once an item has been selected\r\n }\r\n });\r\n\r\n // Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/\r\n var validator = FormValidation.formValidation(\r\n form,\r\n {\r\n fields: {\r\n 'tagify_input': {\r\n validators: {\r\n notEmpty: {\r\n message: 'Tagify input is required'\r\n }\r\n }\r\n },\r\n },\r\n\r\n plugins: {\r\n trigger: new FormValidation.plugins.Trigger(),\r\n bootstrap: new FormValidation.plugins.Bootstrap5({\r\n rowSelector: '.fv-row',\r\n eleInvalidClass: '',\r\n eleValidClass: ''\r\n })\r\n }\r\n }\r\n );\r\n\r\n // Submit button handler\r\n const submitButton = document.getElementById('kt_docs_formvalidation_tagify_submit');\r\n submitButton.addEventListener('click', function (e) {\r\n // Prevent default button action\r\n e.preventDefault();\r\n\r\n // Validate form before submit\r\n if (validator) {\r\n validator.validate().then(function (status) {\r\n console.log('validated!');\r\n\r\n if (status == 'Valid') {\r\n // Show loading indication\r\n submitButton.setAttribute('data-kt-indicator', 'on');\r\n\r\n // Disable button to avoid multiple click \r\n submitButton.disabled = true;\r\n\r\n // Simulate form submission. For more info check the plugin's official documentation: https://sweetalert2.github.io/\r\n setTimeout(function () {\r\n // Remove loading indication\r\n submitButton.removeAttribute('data-kt-indicator');\r\n\r\n // Enable button\r\n submitButton.disabled = false;\r\n\r\n // Show popup confirmation \r\n Swal.fire({\r\n text: \"Form has been successfully submitted!\",\r\n icon: \"success\",\r\n buttonsStyling: false,\r\n confirmButtonText: \"Ok, got it!\",\r\n customClass: {\r\n confirmButton: \"btn btn-primary\"\r\n }\r\n });\r\n\r\n //form.submit(); // Submit form\r\n }, 2000);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n return {\r\n // Public Functions\r\n init: function () {\r\n exampleDateRangePicker();\r\n exampleFlatpickr();\r\n exampleImageInput();\r\n examplePassword();\r\n exampleSelect2();\r\n exampleTagify();\r\n }\r\n };\r\n}();\r\n\r\n// On document ready\r\nKTUtil.onDOMContentLoaded(function () {\r\n KTFormValidationDemoAdvanced.init();\r\n});\r\n"],"names":[],"sourceRoot":""}
| ver. 1.4 |
Github
|
.
| PHP 8.3.31 | Generation time: 0 |
proxy
|
phpinfo
|
Settings