fix 18.11

This commit is contained in:
Kirill Pet
2024-11-18 17:26:46 +03:00
parent 01e6e988e5
commit 767d40f248
5 changed files with 24 additions and 13 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -143,6 +143,7 @@
display: flex;
justify-content: space-between;
align-items: center;
}
.order-your-calculation__title{
font-family: var(--font-family);

View File

@@ -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);
})
})

View File

@@ -227,7 +227,7 @@
<main class="wrapper">
<div class="order">
<div class="order__contacts">
<form action="" id="recipient" class="order__contacts">
<div class="order-contacts__header">
<p class="order__title">
Контакты получателя
@@ -238,7 +238,7 @@
</button>
</div>
<form action="" class="order-contacts__form" id="recipient">
<div class="order-contacts__form">
<div class="modal-form-content__line">
<div class="modal-form-content-line__element">
<label for="firstname" class="label-name">Имя и фамилия</label>
@@ -259,7 +259,7 @@
re
</div>
</div>
<input id="firstname" class="form__input" type="text" name="name" placeholder="Начните вводить ваш email" required="">
<input id="firstname" class="form__input" type="email" name="name" placeholder="Начните вводить ваш email" required="">
<span class="form-input__error form-input__error--absolute">Email введен неверно</span>
</div>
</div>
@@ -267,7 +267,7 @@
<div class="modal-form-content__line">
<div class="modal-form-content-line__element">
<label for="firstname" class="label-name">Телефон</label>
<input class="form__input no-flag" type="text" maxlength="15" minlength="15" pattern="7\s[0-9]{3}\s[0-9]{3}\s[0-9]{4}" placeholder="+7 ___ ___ ____" required="" data-code="7">
<input class="form__input no-flag" type="text" maxlength="15" minlength="15" pattern="+7\s[0-9]{3}\s[0-9]{3}\s[0-9]{4}" placeholder="+7 ___ ___ ____" required="" data-code="7">
<span class="form-input__error form-input__error--absolute">Номер телефона введен неверно</span>
</div>
</div>
@@ -280,7 +280,7 @@
<label for="remember" class="form-agreement__label">Запомнить меня</label>
</div>
</div>
</form>
</div>
<div class="order-contacts__delivery">
<p class="order__title">Доставка</p>
@@ -322,7 +322,7 @@
<div class="order-contacts-deliver__item">
<div class="modal-form-content-line__element modal-form-content-line__element--arrow">
<label for="firstname" class="label-name">Пункт выдачи</label>
<input id="firstname" class="form__input form__input--grey form-open" type="text" name="name" placeholder="Выберите пункт выдачи" required="" readonly data-form="form-point">
<input id="firstname" class="form__input form__input--grey form-open mandatory " type="text" name="name" placeholder="Выберите пункт выдачи" required="" data-form="form-point">
</div>
</div>
</div>
@@ -330,7 +330,7 @@
<div class="order-contacts-deliver__item">
<div class="modal-form-content-line__element modal-form-content-line__element--arrow">
<label for="firstname" class="label-name">Адрес доставки</label>
<input id="firstname" class="form__input form__input--grey form-open" type="text" name="name" placeholder="Выберите адрес доставки" required="" readonly data-form="form-address">
<input id="firstname" class="form__input form__input--grey form-open mandatory" type="text" name="name" placeholder="Выберите адрес доставки" data-form="form-address">
</div>
</div>
@@ -378,13 +378,13 @@
<div class="order-contacts-deliver__item">
<div class="modal-form-content-line__element">
<label for="firstname" class="label-name">Комментарий для доставки</label>
<textarea id="firstname" class="form__input form__input--textarea-72 form__input--grey" type="text" name="name" placeholder="Для службы доставки" required="" ></textarea>
<textarea id="firstname" class="form__input form__input--textarea-72 form__input--grey" type="text" name="name" placeholder="Для службы доставки"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<div class="order__your">
<p class="order__title">Ваш заказ</p>