0.0.319 upd create_route, header_buttons alight

This commit is contained in:
2023-12-06 15:51:55 +03:00
parent d7ace77de8
commit d14a46d3d7
5 changed files with 53 additions and 42 deletions

View File

@@ -120,6 +120,9 @@
font-size: 29px; font-size: 29px;
line-height: 33px; line-height: 33px;
} }
.header_buttons{
display: none;
}
.not_found_routes>img{ .not_found_routes>img{
display: none; display: none;
@@ -1796,9 +1799,7 @@
height: 30px; height: 30px;
} }
.header_buttons{
display: none;
}
/*.to_address_point_txt.find_route {*/ /*.to_address_point_txt.find_route {*/
/* width: 48.4%;*/ /* width: 48.4%;*/
/*}*/ /*}*/

View File

@@ -635,7 +635,8 @@ header .header-second {
.button_profile_header_mobile{ .button_profile_header_mobile{
display: none; display: none;
cursor: pointer; cursor: pointer;
vertical-align: middle;
} }
.route_contact_avatar{ .route_contact_avatar{
@@ -764,7 +765,7 @@ span.btn_profile_name {
/*END Language select*/ /*END Language select*/
.header-second>div>img{ #support_img{
margin-right: 5px; margin-right: 5px;
margin-left: 40px; margin-left: 40px;
} }
@@ -1424,6 +1425,7 @@ span.errorlist{
/*create new route*/ /*create new route*/
select#id_type_transport{ select#id_type_transport{
cursor: pointer;
display: block; display: block;
height: 60px; height: 60px;
width: 47%; width: 47%;
@@ -1703,7 +1705,7 @@ div.departure_arrival>div>input{
.input_list .hide{ .input_list .hide{
display: none; display: none;
} }
span.hide{ span.hide, .error_to_address_point.hide, #id_cargo_lable.hide, #error_id_phone.hide{
display: none; display: none;
} }
#agreement_check.hide{ #agreement_check.hide{

View File

@@ -598,13 +598,13 @@ function sendRoute(el, routeID = null){
function validate(el) { // function validate(el) {
if (el.checked) { // if (el.checked) {
console.log('cheked', el.id); // console.log('cheked', el.id);
} else { // } else {
console.log("You didn't check it! Let me check it for you.", el.id); // console.log("You didn't check it! Let me check it for you.", el.id);
} // }
} // }
@@ -962,33 +962,38 @@ function hideErrors(el) {
let agree_error = document.getElementById('reg_agree_error') let agree_error = document.getElementById('reg_agree_error')
let error_departure_DT = document.getElementById('error_departure_DT') let error_departure_DT = document.getElementById('error_departure_DT')
let error_arrival_DT = document.getElementById('error_arrival_DT') let error_arrival_DT = document.getElementById('error_arrival_DT')
let error_from_address_point = document.getElementById('error_from_address_point')
let error_to_address_point = document.getElementById('error_to_address_point')
let error_cargo_type = document.getElementById('error_cargo_type')
let error_id_phone = document.getElementById('error_id_phone')
if(error_feeedback === counter_text && error_feeedback !== null && error_feeedback_text !== null ){
error_feeedback_text.classList.add('hide')
} else if(error_feeedback === footer_button && error_footer !== null ){
error_footer.classList.add('hide')
} else if(el.id === 'agreement_check'){
agree_error.classList.add('hide')
} else if(el.id === 'id_arrival_DT' && error_arrival_DT !== null){
error_arrival_DT.classList.add('hide')
}else if(el.id === 'id_departure_DT' && error_departure_DT !== null){
error_departure_DT.classList.add('hide')
} else if(error_feeedback !== null) {
error_feeedback.classList.add('hide')
}
if(error_feeedback === counter_text && error_feeedback !== null && error_feeedback_text !== null ){
error_feeedback_text.classList.add('hide')
} else if(error_feeedback === footer_button && error_footer !== null ){
error_footer.classList.add('hide')
} else if(el.id === 'agreement_check'){
agree_error.classList.add('hide')
} else if(el.id === 'id_arrival_DT' && error_arrival_DT !== null){
error_arrival_DT.classList.add('hide')
}else if(el.id === 'id_departure_DT' && error_departure_DT !== null){
error_departure_DT.classList.add('hide')
} else if(el.id === 'id_from_address_point_txt' && error_from_address_point !== null ){
error_from_address_point.classList.add('hide')
}else if(el.id === 'id_to_address_point_txt' && error_to_address_point !== null ){
error_to_address_point.classList.add('hide')
} else if(el.id === 'id_cargo_lable' && error_cargo_type !== null){
error_cargo_type.classList.add('hide')
} else if(el.id === 'id_phone' && error_id_phone !==null){
error_id_phone.classList.add('hide')
}
// if(el.nextElementSibling === errorFeeedback){ else if(error_feeedback !== null) {
// errorFeeedback.classList.add('hide') error_feeedback.classList.add('hide')
// } }
} }

View File

@@ -52,7 +52,7 @@
</div> </div>
</div> </div>
<div class="header-second-item"> <div class="header-second-item">
<img class="svg" src="/static/img/svg/Helpdesk_%20Icon.svg"> <img id="support_img" class="svg" src="/static/img/svg/Helpdesk_%20Icon.svg">
</div> </div>
<div class="header-second-item"> <div class="header-second-item">
<a id="customer_service" href="{% url 'static_page' 'customer_service' %}">{% trans "Служба поддержки" %}</a> <a id="customer_service" href="{% url 'static_page' 'customer_service' %}">{% trans "Служба поддержки" %}</a>

View File

@@ -139,10 +139,10 @@
onclick="showSearchList(this)" onclick="showSearchList(this)"
onblur="onblurInputField(event, this)" onblur="onblurInputField(event, this)"
onfocus="clearID(this)" onfocus="clearID(this)"
onkeydown = "hideErrors(this)"
autocomplete="off" autocomplete="off"
type="text" type="text"
minlength="3" minlength="3"
name="from_address_point_txt" name="from_address_point_txt"
class="from_address_point_txt post_route el_form_b_new_route" class="from_address_point_txt post_route el_form_b_new_route"
{% if form.fields.from_address_point.required %} required{% endif %} {% if form.fields.from_address_point.required %} required{% endif %}
@@ -158,7 +158,7 @@
</div> </div>
{% if not errors_off and form.errors and form.errors.from_address_point %} {% if not errors_off and form.errors and form.errors.from_address_point %}
<span>{{ form.errors.from_address_point}}</span> <span id="error_from_address_point">{{ form.errors.from_address_point}}</span>
{% endif %} {% endif %}
</div> </div>
<div class="wrap_right"> <div class="wrap_right">
@@ -175,7 +175,7 @@
oninput="searchTown(this)" oninput="searchTown(this)"
onclick="showSearchList(this)" onclick="showSearchList(this)"
onblur="onblurInputField(event, this)" onblur="onblurInputField(event, this)"
onkeydown = "hideErrors(this)"
onfocus="clearID(this)" onfocus="clearID(this)"
autocomplete="off" autocomplete="off"
type="text" type="text"
@@ -191,7 +191,7 @@
</div> </div>
{% if not errors_off and form.errors and form.errors.to_address_point %} {% if not errors_off and form.errors and form.errors.to_address_point %}
<span>{{ form.errors.to_address_point }}</span> <span id="error_to_address_point">{{ form.errors.to_address_point }}</span>
{% endif %} {% endif %}
</div> </div>
<div class="clear_both"></div> <div class="clear_both"></div>
@@ -264,6 +264,7 @@
class="custom-checkbox cargo_check" class="custom-checkbox cargo_check"
type="radio" type="radio"
name="cargo_type" name="cargo_type"
id="id_cargo_type_{{ forloop.counter }}" id="id_cargo_type_{{ forloop.counter }}"
{% if form.fields.cargo_type.required %} required{% endif %} {% if form.fields.cargo_type.required %} required{% endif %}
value="{{ item.0 }}" value="{{ item.0 }}"
@@ -273,7 +274,8 @@
/> />
<label <label
onmousedown="hideErrors(this)"
id="id_cargo_lable"
for="id_cargo_type_{{ forloop.counter }}" > for="id_cargo_type_{{ forloop.counter }}" >
<span>{{ item.1 }}</span> <span>{{ item.1 }}</span>
</label> </label>
@@ -282,7 +284,7 @@
{% if not errors_off and form.errors and form.errors.cargo_type %} {% if not errors_off and form.errors and form.errors.cargo_type %}
<span>{{ form.errors.cargo_type }}</span> <span id="error_cargo_type">{{ form.errors.cargo_type }}</span>
{% endif %} {% endif %}
</div> </div>
@@ -332,6 +334,7 @@
<input <input
type="phone" type="phone"
name="phone" name="phone"
onkeydown="hideErrors(this)"
autocomplete="off" autocomplete="off"
maxlength="13" maxlength="13"
minlength="11" minlength="11"
@@ -343,7 +346,7 @@
/> />
{% if not errors_off and form.errors and form.errors.phone %} {% if not errors_off and form.errors and form.errors.phone %}
<span>{{ form.errors.phone }}</span> <span id="error_id_phone">{{ form.errors.phone }}</span>
{% endif %} {% endif %}
</div> </div>