diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index ac965be..e903f8f 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -678,6 +678,8 @@ margin-top: 60px; margin-bottom: 40px; border-radius: 10px; + display: flex; + padding: 13px; } .container_form_search_carrier > form{ @@ -815,6 +817,7 @@ font-style: normal; font-weight: 400; margin-top: 0; + padding-left: 10px; } .cont-el-form-search-carrier.last > select:focus-visible{ diff --git a/static/js/filters_functions_find_route.js b/static/js/filters_functions_find_route.js index c4e8535..c1a45e2 100644 --- a/static/js/filters_functions_find_route.js +++ b/static/js/filters_functions_find_route.js @@ -1,5 +1,19 @@ -function filters_func_find_route_main (){ - let urls_for_els = { - 'road_url':'' - } +function filters_func_find_route_main (el){ + event.preventDefault() + let form = el.form + let formData = new FormData(form) + $.ajax({ + headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, + url: '/ru/routes/find_route/', + type: "POST", + // async: true, + cache: false, + processData: false, + contentType: false, + // enctype: 'json', + data: formData, + success: function(data){ + + }, + }); } \ No newline at end of file diff --git a/templates/pages/p_results_find_route.html b/templates/pages/p_results_find_route.html index 86763da..8b3e1aa 100644 --- a/templates/pages/p_results_find_route.html +++ b/templates/pages/p_results_find_route.html @@ -10,6 +10,7 @@ + {% endblock %} @@ -20,11 +21,11 @@

Поиск перевозчика

-
-
- {% csrf_token %} + + {% csrf_token %} +
- + {# #} @@ -61,7 +62,7 @@
- + {#
#} {# #} @@ -97,106 +98,124 @@
- - + +
- - + +
- +
- +
-
-
-
-
-
Все фильтры
-
-
Способ перевозки
-{#
#} -{#
#} -{# #} -{#
#} +
+
+
+
Все фильтры
+
+
Способ перевозки
+ {#
#} + {#
#} + {# #} + {#
#} + {#
#} + {# #} + {#
#} + {% for item in form.fields.type_transport.choices %} + {% if forloop.counter0 > 0 %} +
+ + + +
+ {% endif %} + {% endfor %} +{#
#} +{# #} +{##} +{# #} {#
#} -{# #} -{#
#} -
- +
+
+
Откуда забрать посылку
+ - + +
-
-
-
Откуда забрать посылку
- -
-
-
Куда доставить посылку
- -
-
-
- +
+
Куда доставить посылку
+
-
- - -
+
+
+ +
+
+ + +
+
+ +
+
+
Сортировать по:
+
-
-
Сортировать по:
- -
+
+ {% for route in routes %} + {% include "widgets/w_carrier_card.html" %} + {% endfor %} + + +
+
- -
- {% for route in routes %} - {% include "widgets/w_carrier_card.html" %} - {% endfor %} - - -
-
-
+
{% endblock %} \ No newline at end of file