Browse Source

Удаление телефона (очистка поля)

master
Ilya_Chis 2 months ago
parent
commit
0b4a808b4c
  1. 5
      webApp/templates/2.0/main_page.pug
  2. 6
      webApp/templates/static/css/1_model_icons.css
  3. 6
      webApp/templates/static/js/2.0.dashboard.js

5
webApp/templates/2.0/main_page.pug

@ -27,7 +27,12 @@ script(type="text/javascript", src="/js/2.0.dashboard.js?q="~randomString())
input.form-control.tg_input#fio input.form-control.tg_input#fio
.my-3.mx-4.success-field .my-3.mx-4.success-field
label.form-label.m-0(for="tel")="Телефон" label.form-label.m-0(for="tel")="Телефон"
.row.m-0.p-0.justify-content-between
.col-auto.m-0.p-0(style="min-width: 85%;")
input.form-control.tg_input#tel(type="text") input.form-control.tg_input#tel(type="text")
.col-auto.m-0.p-0
button.btn.btn-danger#clear_tel
span.x-icn
small="(Пожалуйста, проверьте формат ввода)" small="(Пожалуйста, проверьте формат ввода)"
.my-3.mx-4.success-field .my-3.mx-4.success-field
label.form-label.m-0(for="dob")='Дата рождения' label.form-label.m-0(for="dob")='Дата рождения'

6
webApp/templates/static/css/1_model_icons.css

@ -15,6 +15,12 @@
color: orange; color: orange;
} }
.x-icn::before {
font-family: 'Font Awesome\ 5 Free';
content: "\f00d";
font-weight: 900;
}
.m-off::before{ .m-off::before{
margin: 0px !important; margin: 0px !important;
} }

6
webApp/templates/static/js/2.0.dashboard.js

@ -370,6 +370,10 @@ $(document).ready(function(){
}); });
}); });
$('#clear_tel').click(function(){
phoneStr = '';
phoneInput.value = formatPhoneString();
})
@ -412,7 +416,7 @@ $(document).ready(function(){
else else
deleteMode = false; deleteMode = false;
}); });
7
phoneInput.addEventListener('input', (e) => { phoneInput.addEventListener('input', (e) => {
if (deleteMode) { if (deleteMode) {
phoneInput.value = phoneInput.value; phoneInput.value = phoneInput.value;

Loading…
Cancel
Save