File manager - Edit - /home/gzbnyc5/pty-app/realstate/public/js/pty.v2.form.js
Back
const PtyFormService = (function () { let form; let modelId; const initFormClasses = function () { const itemDisabledOnExist = form.find(".pty-disabled-on-exist"); if (modelId > 0 && itemDisabledOnExist.length > 0) { itemDisabledOnExist.attr("disabled", true); } const itemHiddenOnNew = form.find(".pty-hidden-on-new"); if (modelId === 0 && itemHiddenOnNew.length > 0) { itemHiddenOnNew.remove(); } }; const initFormDatePickers = function () { const datePickers = form.find(".pty-flatpickr"); datePickers.each((index, item) => { if( item.value && item.value.length > 0 ) { item.value = moment(item.value).format(globalConsts.js_moment_date); } $(item).flatpickr({ dateFormat: globalConsts.php_date_format, }); }); }; return { init: function () { form = $("#kt_page_add_form"); modelId = Number($('[name="model_id"]').val()); initFormClasses(); initFormDatePickers(); }, }; })(); // On document ready KTUtil.onDOMContentLoaded(function () { PtyFormService.init(); });
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0 |
proxy
|
phpinfo
|
Settings