From 707bbf186352c4a4dfc6166df1c79d79797c719e Mon Sep 17 00:00:00 2001 From: ArtemB Date: Fri, 24 Nov 2023 16:38:24 +0300 Subject: [PATCH] 0.0.257 return form in create_new_route --- static/css/styles(boris).css | 39 ----- static/js/user_profile.js | 8 +- templates/blocks/profile/b_new_route.html | 145 ++++++------------ .../static_pages_blocks/b_advertisement.html | 6 +- 4 files changed, 54 insertions(+), 144 deletions(-) diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index cac6e5e..2193e82 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -1041,45 +1041,6 @@ font-size: 14px; } -.to_address_point_txt.post_route{ - display: block; - border-left: 1px solid #E6E6E6; - border-top: 1px solid #E6E6E6; - border-right: 0; - border-bottom: 1px solid #E6E6E6; - color: #272424; - font-family: Inter; - font-size: 16px; - font-style: normal; - font-weight: 400; - line-height: 22px; - appearance: none; - margin-top: 10px; - height: 20px; - border-radius: 15px 0 0 15px; - padding: 20px 15.2px; - width: calc(100% - 95px); -} - -.from_address_point_txt.post_route{ - display: block; - border-left: 1px solid #E6E6E6; - border-top: 1px solid #E6E6E6; - border-right: 0; - border-bottom: 1px solid #E6E6E6; - color: #272424; - font-family: Inter; - font-size: 16px; - font-style: normal; - font-weight: 400; - line-height: 22px; - appearance: none; - margin-top: 10px; - height: 20px; - border-radius: 15px 0 0 15px; - padding: 20px 15.2px; - width: calc(100% - 95px); -} .input_list.find_route{ width: 100%; diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 6e147b5..b82b868 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -255,13 +255,13 @@ function loader_place_ins_boris (el,type=null){ function searchTown(el){ - if (el.value.length > 0){ - // el.style.background = 'white url("/static/img/svg/loader.svg") no-repeat calc(100% - 15px) center'; + if (el.value.length > 2){ + el.style.background = 'white url("/static/img/svg/loader.svg") no-repeat calc(100% - 15px) center'; }else { - // el.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center'; + el.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center'; } if(el.value.length>=3){ @@ -294,7 +294,7 @@ function searchTown(el){ // enctype: 'json', data: JSON.stringify(get_address_point), success: function(data){ - // el.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center'; + el.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center'; loader_place_ins_boris(el,"el") diff --git a/templates/blocks/profile/b_new_route.html b/templates/blocks/profile/b_new_route.html index df2367f..ce6d457 100644 --- a/templates/blocks/profile/b_new_route.html +++ b/templates/blocks/profile/b_new_route.html @@ -110,119 +110,68 @@
-{# #} -{# #} -{# #} -{##} -{# #} -{##} -{#
#} -{##} -{#
#} -{# boris changed input#} -
- - + -
-
+ {% if form.initial.from_address_point_txt %}value="{{ form.initial.from_address_point_txt }}"{% endif %} + /> + + + + +
+
{% if not errors_off and form.errors and form.errors.from_address_point %} {{ form.errors.from_address_point}} {% endif %}
- -{# #} -{# #} -{#
#} -{##} -{#
#} -
- - {{ form.fields.to_address_point.label }} + + - -
-
+ onFocus="this.select()" + autocomplete="off" + type="text" + name="to_address_point_txt" + {% if form.fields.to_address_point.required %} required{% endif %} + id="id_to_address_point_txt" + class="to_address_point_txt post_route el_form_b_new_route" + {% if form.initial.to_address_point_txt %}value="{{ form.initial.to_address_point_txt}}"{% endif %} + + /> +
+ +
{% if not errors_off and form.errors and form.errors.to_address_point %} {{ form.errors.to_address_point }} {% endif %} diff --git a/templates/blocks/static_pages_blocks/b_advertisement.html b/templates/blocks/static_pages_blocks/b_advertisement.html index e157eae..31e4082 100644 --- a/templates/blocks/static_pages_blocks/b_advertisement.html +++ b/templates/blocks/static_pages_blocks/b_advertisement.html @@ -19,7 +19,7 @@

{% translate "Почему это выгодно?" %}

- +
{% translate "Полное брендирвоание страницы или раздела" %}
@@ -27,11 +27,11 @@
{% translate "Реклама для целевой аудитории" %}
- +
{% translate "Индивидуальное согласование цены при объеме" %}
- +
{% translate "Более чем 10 000 уникальных посещений в день" %}