0.0.56 p search res
This commit is contained in:
17
static/v2/js/blocks/b_search_routes.js
Normal file
17
static/v2/js/blocks/b_search_routes.js
Normal file
@@ -0,0 +1,17 @@
|
||||
function searchRoutes (form) {
|
||||
event.preventDefault()
|
||||
|
||||
let formData = getFormData(form);
|
||||
formData.append('owner_type', 'mover');
|
||||
|
||||
let request = new api({
|
||||
url: '/routes/find_routes/',
|
||||
data: formData,
|
||||
data_type: 'formData',
|
||||
success: function (res) {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
request.ajaxRequest()
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
<link rel="stylesheet" href="{% static "v2/css/blocks/b_search_routes.css" %}">
|
||||
|
||||
<div class="b_search_routes">
|
||||
<form name="search_routes">
|
||||
<form name="search_routes" onsubmit="searchRoutes(this)">
|
||||
<div class="field_container" data-type="location" data-name="from_city">
|
||||
<label for="id_from_city">{% trans "Выезжает из" %}</label>
|
||||
{% include 'v2/widgets/w_select_country.html' with name='from_city' placeholder='' initial=form.initial.from_city %}
|
||||
|
||||
@@ -10,9 +10,13 @@
|
||||
<script src="{% static "v2/js/forms.js" %}"></script>
|
||||
<script src="{% static "v2/js/widgets/w_select_country.js" %}"></script>
|
||||
<script src="{% static "v2/js/widgets/w_daterangepicker.js" %}"></script>
|
||||
<script src="{% static "v2/js/blocks/b_search_routes.js" %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="title">{% trans "Поиск посылки" %}</div>
|
||||
{% include 'v2/blocks/b_search_routes.html' %}
|
||||
<div class="routes_content_part">
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user