From 224c9254e892f7b35925b86c5c70eb5c89dfbea0 Mon Sep 17 00:00:00 2001 From: Kirill Pet Date: Tue, 19 Nov 2024 18:55:44 +0300 Subject: [PATCH] fix 19.11 --- assets/css/gp-style-core.css | 3 +++ assets/js/gp-form.js | 18 +++++++++++++++++- order.html | 6 ++++-- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/assets/css/gp-style-core.css b/assets/css/gp-style-core.css index c4c1a33..0c8baab 100644 --- a/assets/css/gp-style-core.css +++ b/assets/css/gp-style-core.css @@ -1992,6 +1992,9 @@ button{ background: var(--background-9); position: relative; } +.modal-map-control-item__input{ + display: none; +} .modal-map-control-item-circle__content{ width: 16px; aspect-ratio: 1; diff --git a/assets/js/gp-form.js b/assets/js/gp-form.js index aadd9ed..9bfcdd9 100644 --- a/assets/js/gp-form.js +++ b/assets/js/gp-form.js @@ -76,7 +76,7 @@ function checkPhone(input) { inputTabs('.form-input__tabs', '.form-input-tabs__button'); inputTabs('.modal-map__control', '.modal-map-control__item'); -function inputTabs(main, button, mandatory) { +function inputTabs(main, button) { let mains = document.querySelectorAll(main); mains.forEach(main => { @@ -91,6 +91,8 @@ function inputTabs(main, button, mandatory) { main.querySelector('.active').classList.remove('active'); button.classList.add('active'); + + button.querySelector('input').click(); } }) @@ -265,4 +267,18 @@ function inputCheck(className) { input.click(); } }) +} + + +inputRead('.input-read'); +function inputRead(className) { + let inputs = document.querySelectorAll(className); + + inputs.forEach(input => { + input.addEventListener("input", function (event) { + let text = event.target.value; + + event.target.value = text.slice(0, -1); + }) + }) } \ No newline at end of file diff --git a/order.html b/order.html index 0629241..e41149f 100644 --- a/order.html +++ b/order.html @@ -299,6 +299,7 @@ + @@ -322,7 +324,7 @@
@@ -330,7 +332,7 @@