From 767d40f248e1f604bd5c6870671b5989a07f3d7c Mon Sep 17 00:00:00 2001 From: Kirill Pet Date: Mon, 18 Nov 2024 17:26:46 +0300 Subject: [PATCH] fix 18.11 --- assets/css/gp-style-core.css | 3 +++ assets/css/gp-style-mobile.css | 3 --- assets/css/gp-style-order.css | 1 + assets/js/gp-form.js | 12 +++++++++++- order.html | 18 +++++++++--------- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/assets/css/gp-style-core.css b/assets/css/gp-style-core.css index 347eccf..c4c1a33 100644 --- a/assets/css/gp-style-core.css +++ b/assets/css/gp-style-core.css @@ -1862,6 +1862,9 @@ button{ display: flex; justify-content: space-between; } +.modal-form-content__line--two-mobile .modal-form-content-line__element{ + width: calc(50% - 12px); +} .modal-form-content-line__element{ position: relative; } diff --git a/assets/css/gp-style-mobile.css b/assets/css/gp-style-mobile.css index 9117bd9..40f29dd 100644 --- a/assets/css/gp-style-mobile.css +++ b/assets/css/gp-style-mobile.css @@ -99,9 +99,6 @@ .modal-form-content__line--three .modal-form-content-line__element:nth-child(3){ width: 82px; } -.modal-form-content__line--two-mobile .modal-form-content-line__element{ - width: calc(50% - 12px); -} .form__input{ padding: 12px 14px; } diff --git a/assets/css/gp-style-order.css b/assets/css/gp-style-order.css index 0646b9b..fcfde9e 100644 --- a/assets/css/gp-style-order.css +++ b/assets/css/gp-style-order.css @@ -143,6 +143,7 @@ display: flex; justify-content: space-between; + align-items: center; } .order-your-calculation__title{ font-family: var(--font-family); diff --git a/assets/js/gp-form.js b/assets/js/gp-form.js index b6b9391..aadd9ed 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) { +function inputTabs(main, button, mandatory) { let mains = document.querySelectorAll(main); mains.forEach(main => { @@ -186,6 +186,16 @@ function remoteControl(main, button) { subject.querySelector('.remote-control__item.active').classList.remove('active'); subject.children[indexActive].classList.add('active'); + + let mandatorys = subject.querySelectorAll('.mandatory'); + + mandatorys.forEach(mandatory => { + if (mandatory.required) { + mandatory.required = false; + }else{ + mandatory.required = true; + } + }) }, 0); }) }) diff --git a/order.html b/order.html index a9553a2..0629241 100644 --- a/order.html +++ b/order.html @@ -227,7 +227,7 @@
-
+

Контакты получателя @@ -238,7 +238,7 @@

- +
- + Email введен неверно
@@ -267,7 +267,7 @@ @@ -280,7 +280,7 @@
- +

Доставка

@@ -322,7 +322,7 @@
@@ -330,7 +330,7 @@
@@ -378,13 +378,13 @@
- +

Ваш заказ