0.0.54 p search res
This commit is contained in:
27
static/v2/css/blocks/b_search_routes.css
Normal file
27
static/v2/css/blocks/b_search_routes.css
Normal file
@@ -0,0 +1,27 @@
|
||||
.b_search_routes {
|
||||
|
||||
--button-font-size: 18px;
|
||||
form{
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, calc(33.3% - 72px)) 215px;
|
||||
align-items: end;
|
||||
gap: 5px;
|
||||
[data-type="location"] {
|
||||
&:first-of-type{
|
||||
.w_select_country_header{--select-border-radius: 10px 0 0 10px!important;}
|
||||
}
|
||||
.w_select_country_header{--select-border-radius: 0!important;}
|
||||
}
|
||||
.w_daterangepicker{
|
||||
--range-picker-border-radius: 0 10px 10px 0!important;
|
||||
}
|
||||
}
|
||||
button{
|
||||
padding: 17px 0;
|
||||
background: #FF613A;
|
||||
font-size: var(--button-font-size);
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
height: calc(100% - 27px);
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ function daterangepickerInit(el, callback, date) {
|
||||
$($datarangepicker).daterangepicker({
|
||||
"autoapply": true,
|
||||
"linkedCalendars": false,
|
||||
"singleDatePicker": true,
|
||||
"singleDatePicker": !!el.dataset.range,
|
||||
"timePicker": false,
|
||||
"timePicker24Hour": false,
|
||||
"minDate": moment(date),
|
||||
@@ -57,6 +57,7 @@ function daterangepickerInit(el, callback, date) {
|
||||
if (last_opened_daterangepicker) $parent = last_opened_daterangepicker.closest('.w_daterangepicker');
|
||||
let $input = $parent.querySelector(".date_range_input_cont input")
|
||||
$input.value = start.format('DD.MM.YYYY');
|
||||
if (end) $input.value = `${start.format('DD.MM.YYYY')} - ${end.format('DD.MM.YYYY')}`
|
||||
resetFieldError(el);
|
||||
if (callback) callback(el)
|
||||
});
|
||||
@@ -68,3 +69,6 @@ function clickOnDateIconE(el){
|
||||
$input.focus()
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
datarangepickerinitAll()
|
||||
})
|
||||
|
||||
@@ -201,16 +201,16 @@ function gtag_report_conversion(url) {
|
||||
</div>
|
||||
{% if page_type == 'routes' %}
|
||||
<div class="cut_width_f_curtain{% if page_type == 'profile' %}{% else %} n_profile{% endif %} left">
|
||||
<div class="menu_buttons curtain left open first filters" data-name="<img style='width: 15px;display: block;position: relative;bottom: 0;transform: rotate(270deg);' src='{% static "/img/svg/filter.svg" %}'>">
|
||||
|
||||
{% include "forms/f_find_route_filters_form.html" %}
|
||||
{# <div class="menu_buttons curtain left open first filters" data-name="<img style='width: 15px;display: block;position: relative;bottom: 0;transform: rotate(270deg);' src='{% static "/img/svg/filter.svg" %}'>">#}
|
||||
{##}
|
||||
{# {% include "forms/f_find_route_filters_form.html" %}#}
|
||||
{# <div class="handler_menu close" onclick="open_curtain_w_contacts()">#}
|
||||
{# <img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">#}
|
||||
{# <div class="text_f_curtain left"><img style='width: 15px;display: block;position: relative;bottom: 0;transform: rotate(270deg);' src='{% static "/img/svg/filter.svg" %}'></div>#}
|
||||
{# <img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">#}
|
||||
{# <div class="clear_both"></div>#}
|
||||
{# </div>#}
|
||||
</div>
|
||||
{# </div>#}
|
||||
</div>
|
||||
<div class="handler_curtain_left close" onclick="open_curtain_w_contacts()">
|
||||
<div class="container_content_handler_curtain_left">
|
||||
|
||||
24
templates/v2/blocks/b_search_routes.html
Normal file
24
templates/v2/blocks/b_search_routes.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
<link rel="stylesheet" href="{% static "v2/css/blocks/b_search_routes.css" %}">
|
||||
|
||||
<div class="b_search_routes">
|
||||
<form name="search_routes">
|
||||
<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 %}
|
||||
{% if form.errors.from_city %}<div class="error_container">{{ form.errors.from_city.0 }}</div>{% endif %}
|
||||
</div>
|
||||
<div class="field_container" data-type="location" data-name="to_city">
|
||||
<label for="id_from_city">{% trans "Прибывает в" %}</label>
|
||||
{% include 'v2/widgets/w_select_country.html' with name='to_city' placeholder='' initial=form.initial.to_city %}
|
||||
{% if form.errors.to_city %}<div class="error_container">{{ form.errors.to_city.0 }}</div>{% endif %}
|
||||
</div>
|
||||
<div class="field_container" data-type="date" data-name="arrival_DT">
|
||||
<label for="id_arrival_DT">{% trans "Дата (период) доставки" %}</label>
|
||||
{% include 'v2/widgets/w_daterangepicker.html' with name='arrival_DT' range='true' initial=form.initial.arrival_DT %}
|
||||
{% if form.errors.arrival_DT %}<div class="error_container">{{ form.errors.arrival_DT.0 }}</div>{% endif %}
|
||||
</div>
|
||||
<button type="submit">{% trans "Найти посылку" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -3,9 +3,14 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block meta %}
|
||||
|
||||
<link rel="stylesheet" href="{% static "v2/css/forms.css" %}">
|
||||
<link rel="stylesheet" href="{% static "v2/css/widgets/w_select_country.css" %}">
|
||||
<link rel="stylesheet" href="{% static "v2/css/widgets/w_datarangepicker.css" %}">
|
||||
<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>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div>HAHAHA!</div>
|
||||
{% include 'v2/blocks/b_search_routes.html' %}
|
||||
{% endblock %}
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<div class="w_daterangepicker" onclick="selectInputWContainer(this)">
|
||||
<div class="date_range_input_cont">
|
||||
<input class="dropped" type="text" name="{{ name }}" id="id_{{ name }}" autocomplete="off"{% if initial %} value="{{ initial|date:'d.m.Y' }}"{% endif %}>
|
||||
<input class="dropped" {% if range %}data-range="{{ range }}"{% endif %} type="text" name="{{ name }}" id="id_{{ name }}" autocomplete="off"{% if initial %} value="{{ initial|date:'d.m.Y' }}"{% endif %}>
|
||||
<img onclick="clickOnDateIconE(this)" src="{% static "v2/icons/widgets/w_datarangepicker/datarangepicker_icon.svg" %}" alt="">
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user