diff --git a/static/css/styles.css b/static/css/styles.css index f41fd8b..8a00799 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -646,6 +646,14 @@ header .header-second { aspect-ratio: 4/3; } +.from_address_point_txt.red_text{ + color: #ff0000; +} +.to_address_point_txt.red_text{ + color: #ff0000; + +} + .header-second-item, .cont_header_btn_profile, diff --git a/static/js/user_profile.js b/static/js/user_profile.js index f534219..5f465ca 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -351,6 +351,10 @@ function selectItemAddrPoint(id, name, ctrl_name,){ tap_txt_cont.setAttribute('title',name) let tap_cont = document.querySelector("#id_" + ctrl_name.slice(0, -4)); tap_cont.value = id; + if (tap_txt_cont.classList.contains('red_text')){ + tap_txt_cont.classList.remove('red_text') + } + if (!window.location.href.includes("profile")){ changeWidthEL(tap_txt_cont) } @@ -413,17 +417,16 @@ function onblurInputField(event,el){ function clearID(el) { - el.select(); - if(el.id === 'id_from_address_point_txt'){ + if(el.value !== "" && el.id === 'id_from_address_point_txt' ){ document.getElementById('id_from_address_point').value = '' - } else if(el.id === 'id_to_address_point_txt'){ + el.classList.add('red_text') + } else if(el.value !== "" && el.id === 'id_to_address_point_txt'){ document.getElementById('id_to_address_point').value = '' + el.classList.add('red_text') } - - }