From 0b4a808b4cdab8f30bb7f10a71fe775326cedb69 Mon Sep 17 00:00:00 2001 From: Ilya_Chis Date: Thu, 21 Nov 2024 16:47:32 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=82=D0=B5=D0=BB=D0=B5=D1=84=D0=BE=D0=BD=D0=B0=20(?= =?UTF-8?q?=D0=BE=D1=87=D0=B8=D1=81=D1=82=D0=BA=D0=B0=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webApp/templates/2.0/main_page.pug | 7 ++++++- webApp/templates/static/css/1_model_icons.css | 6 ++++++ webApp/templates/static/js/2.0.dashboard.js | 6 +++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/webApp/templates/2.0/main_page.pug b/webApp/templates/2.0/main_page.pug index 4256d3f..d2917b1 100644 --- a/webApp/templates/2.0/main_page.pug +++ b/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 .my-3.mx-4.success-field label.form-label.m-0(for="tel")="Телефон" - input.form-control.tg_input#tel(type="text") + .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") + .col-auto.m-0.p-0 + button.btn.btn-danger#clear_tel + span.x-icn small="(Пожалуйста, проверьте формат ввода)" .my-3.mx-4.success-field label.form-label.m-0(for="dob")='Дата рождения' diff --git a/webApp/templates/static/css/1_model_icons.css b/webApp/templates/static/css/1_model_icons.css index 50f1871..4b6abdf 100644 --- a/webApp/templates/static/css/1_model_icons.css +++ b/webApp/templates/static/css/1_model_icons.css @@ -15,6 +15,12 @@ color: orange; } +.x-icn::before { + font-family: 'Font Awesome\ 5 Free'; + content: "\f00d"; + font-weight: 900; +} + .m-off::before{ margin: 0px !important; } \ No newline at end of file diff --git a/webApp/templates/static/js/2.0.dashboard.js b/webApp/templates/static/js/2.0.dashboard.js index 981964d..d893cb7 100644 --- a/webApp/templates/static/js/2.0.dashboard.js +++ b/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 deleteMode = false; }); -7 + phoneInput.addEventListener('input', (e) => { if (deleteMode) { phoneInput.value = phoneInput.value;