0.0.311 add red color for changed input in from_to_addres_point

This commit is contained in:
2023-12-05 14:38:25 +03:00
parent 3ac85784a9
commit 325acd3580
2 changed files with 16 additions and 5 deletions

View File

@@ -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,

View File

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