diff --git a/static/css/mobile_styles.css b/static/css/mobile_styles.css index 295b63d..59e3b69 100644 --- a/static/css/mobile_styles.css +++ b/static/css/mobile_styles.css @@ -120,6 +120,9 @@ font-size: 29px; line-height: 33px; } + .header_buttons{ + display: none; + } .not_found_routes>img{ display: none; @@ -1796,9 +1799,7 @@ height: 30px; } - .header_buttons{ - display: none; - } + /*.to_address_point_txt.find_route {*/ /* width: 48.4%;*/ /*}*/ diff --git a/static/css/styles.css b/static/css/styles.css index 6e93135..3b16274 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -635,7 +635,8 @@ header .header-second { .button_profile_header_mobile{ display: none; - cursor: pointer; + cursor: pointer; + vertical-align: middle; } .route_contact_avatar{ @@ -764,7 +765,7 @@ span.btn_profile_name { /*END Language select*/ -.header-second>div>img{ +#support_img{ margin-right: 5px; margin-left: 40px; } @@ -1424,6 +1425,7 @@ span.errorlist{ /*create new route*/ select#id_type_transport{ + cursor: pointer; display: block; height: 60px; width: 47%; @@ -1703,7 +1705,7 @@ div.departure_arrival>div>input{ .input_list .hide{ display: none; } -span.hide{ +span.hide, .error_to_address_point.hide, #id_cargo_lable.hide, #error_id_phone.hide{ display: none; } #agreement_check.hide{ diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 4d2a9f3..5fda6f5 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -598,13 +598,13 @@ function sendRoute(el, routeID = null){ -function validate(el) { - if (el.checked) { - console.log('cheked', el.id); - } else { - console.log("You didn't check it! Let me check it for you.", el.id); - } -} +// function validate(el) { +// if (el.checked) { +// console.log('cheked', el.id); +// } else { +// 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 error_departure_DT = document.getElementById('error_departure_DT') let error_arrival_DT = document.getElementById('error_arrival_DT') - - - - - 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') - } + 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(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){ - // errorFeeedback.classList.add('hide') - // } - + else if(error_feeedback !== null) { + error_feeedback.classList.add('hide') + } } diff --git a/templates/blocks/b_header.html b/templates/blocks/b_header.html index c06c87e..04e84ba 100644 --- a/templates/blocks/b_header.html +++ b/templates/blocks/b_header.html @@ -52,7 +52,7 @@
- +
{% trans "Служба поддержки" %} diff --git a/templates/blocks/profile/b_new_route.html b/templates/blocks/profile/b_new_route.html index 4b2a114..2e0afe0 100644 --- a/templates/blocks/profile/b_new_route.html +++ b/templates/blocks/profile/b_new_route.html @@ -139,10 +139,10 @@ onclick="showSearchList(this)" onblur="onblurInputField(event, this)" onfocus="clearID(this)" + onkeydown = "hideErrors(this)" autocomplete="off" type="text" minlength="3" - name="from_address_point_txt" class="from_address_point_txt post_route el_form_b_new_route" {% if form.fields.from_address_point.required %} required{% endif %} @@ -158,7 +158,7 @@
{% if not errors_off and form.errors and form.errors.from_address_point %} - {{ form.errors.from_address_point}} + {{ form.errors.from_address_point}} {% endif %}
@@ -175,7 +175,7 @@ oninput="searchTown(this)" onclick="showSearchList(this)" onblur="onblurInputField(event, this)" - + onkeydown = "hideErrors(this)" onfocus="clearID(this)" autocomplete="off" type="text" @@ -191,7 +191,7 @@
{% if not errors_off and form.errors and form.errors.to_address_point %} - {{ form.errors.to_address_point }} + {{ form.errors.to_address_point }} {% endif %}
@@ -264,6 +264,7 @@ class="custom-checkbox cargo_check" type="radio" name="cargo_type" + id="id_cargo_type_{{ forloop.counter }}" {% if form.fields.cargo_type.required %} required{% endif %} value="{{ item.0 }}" @@ -273,7 +274,8 @@ /> @@ -282,7 +284,7 @@ {% if not errors_off and form.errors and form.errors.cargo_type %} - {{ form.errors.cargo_type }} + {{ form.errors.cargo_type }} {% endif %} @@ -332,6 +334,7 @@ {% if not errors_off and form.errors and form.errors.phone %} - {{ form.errors.phone }} + {{ form.errors.phone }} {% endif %}