0.0.08 form poster
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
--title-font-weight: 700;
|
||||
--title-margin-bottom: 60px;
|
||||
|
||||
@media (max-width: 992px) {
|
||||
--title-font-size: 32px;
|
||||
}
|
||||
|
||||
.make_poster_order_title{
|
||||
width: 100%;
|
||||
font-size: var(--title-font-size);
|
||||
|
||||
@@ -59,6 +59,9 @@
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
&.half{
|
||||
width: 50%;
|
||||
}
|
||||
&::placeholder{
|
||||
font-size: var(--placeholder-font-size);
|
||||
color: var(--placeholder-color);
|
||||
@@ -87,6 +90,7 @@
|
||||
border: 1px solid #E6E6E6;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
min-width: 30px;
|
||||
border-radius: 10px;
|
||||
&:hover{
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
|
||||
|
||||
@@ -2,8 +2,24 @@
|
||||
.form_line{
|
||||
padding: 40px 0;
|
||||
border-bottom: 1px solid #E6E6E6;
|
||||
input.half{width: calc(100% - 40px)}
|
||||
@media (max-width: 992px) {
|
||||
&._50_grid{
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
input.half{width: 100%}
|
||||
}
|
||||
&:last-of-type{
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 992px) {
|
||||
.w_radio_inputs{
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
} @media (max-width: 768px) {
|
||||
.w_radio_inputs{
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@
|
||||
img{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
min-width: 20px;
|
||||
display: block;
|
||||
}
|
||||
.additional_info_modal{
|
||||
|
||||
@@ -22,7 +22,7 @@ function getFormData(form) {
|
||||
let name = $parent ? $parent.dataset.name : '';
|
||||
if (!name) name = el.name
|
||||
if (!name) name = el.dataset.name;
|
||||
let value = el.value || ''
|
||||
let value = el.querySelector('input')? el.querySelector('input').value : ''
|
||||
|
||||
if (field_type) {
|
||||
if (default_element_types.indexOf(field_type) > -1) {
|
||||
|
||||
@@ -22,6 +22,8 @@ function makePosterOrder(form) {
|
||||
$('body')[0].scrollIntoView({behavior: 'smooth', top: 0});
|
||||
|
||||
$(res.responseJSON.html).insertAfter($($title))
|
||||
|
||||
daterangepickerInit($('.w_daterangepicker'), daterangepickerInit)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ function setLocalSets() {
|
||||
return locale_lang
|
||||
}
|
||||
|
||||
$(function (){daterangepickerInit($('.date_range_input_cont input'), daterangepickerInit)})
|
||||
$(function (){daterangepickerInit($('.w_daterangepicker'), daterangepickerInit)})
|
||||
|
||||
function daterangepickerInit(el, callback) {
|
||||
$('.date_range_input_cont input').daterangepicker({
|
||||
@@ -49,3 +49,9 @@ function daterangepickerInit(el, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
function clickOnDateIconE(el){
|
||||
let $parent = el.closest('.date_range_input_cont')
|
||||
let $input = $parent.querySelector("input")
|
||||
$input.focus()
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="cw_w_radio_inputs_radio_input" data-name="{{ item.0 }}">
|
||||
<div class="radio" onclick="chooseRadioInput(this)"></div>
|
||||
<div class="radio{% if item.0 == initial %} checked{% endif %}" onclick="chooseRadioInput(this)"></div>
|
||||
<div class="radio_label" onclick="chooseRadioInput(this)">{{ item.1 }}</div>
|
||||
</div>
|
||||
@@ -1,10 +1,10 @@
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
<div class="cw_w_select_widget_for_select" data-id="{{ id }}" data-name="{{ country__name }}/{{ name }}" data-country_code="{{ country__short_code }}" data-flag="{{ MEDIA_URL }}{{ country__flag }}" onclick="selectCountry(this)">
|
||||
<div class="cw_w_select_widget_for_select" data-id="{{ id }}" data-name="{{ name }}/{{ country__name }}" data-country_code="{{ country__short_code }}" data-flag="{{ MEDIA_URL }}{{ country__flag }}" onclick="selectCountry(this)">
|
||||
<div class="cw_country_inf_part">
|
||||
<img src="{{ MEDIA_URL }}{{ country__flag }}" alt="">
|
||||
<div class="cw_country_code">{{ country__short_code }}</div>
|
||||
</div>
|
||||
<div class="cw_name_country">{{ country__name }}/{{ name }}</div>
|
||||
<div class="cw_name_country">{{ name }}/{{ country__name }}</div>
|
||||
</div>
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="form_line _50_grid">
|
||||
<div class="field_container" data-type="location" data-name="from_city">
|
||||
<label for="id_from_city"><div class="required_field_icon">*</div> {% trans "Откуда забрать посылку" %}</label>
|
||||
{% include 'v2/widgets/w_select_country.html' with name='from_city' placeholder=placeholder_for_city %}
|
||||
{% include 'v2/widgets/w_select_country.html' with name='from_city' placeholder=placeholder_for_city 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">
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="form_line">
|
||||
<div class="field_container" data-type="radio" data-name="cargo_type">
|
||||
<label for="id_cargo_type"><div class="required_field_icon">*</div> {% trans "Выберите кого (что) вы можете перевезти:" %}</label>
|
||||
{% include 'v2/widgets/w_radio_inputs.html' with name='cargo_type' list=form.fields.cargo_type.choices %}
|
||||
{% include 'v2/widgets/w_radio_inputs.html' with name='cargo_type' list=form.fields.cargo_type.choices initial=form.initial.cargo_type %}
|
||||
{% if form.errors.cargo_type %}<div class="error_container">{{ form.errors.cargo_type.0 }}</div>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="field_container" data-type="input" style="width: 100%" data-name="phone">
|
||||
{% trans "Если вы оставите это поле пустым - перевозчики смогут только написать вам в личные сообщения на нашем сайте TripWB.com" as attention_phone %}
|
||||
<label for="id_cargo_type">{% trans "Контактный номер телефона, по которому с Вами могут связаться перевозчики" %}</label>
|
||||
<input style="height: unset;width: calc(50% - 40px);" type="text" name="phone" id="id_phone" placeholder="{% trans 'Укажите телефон' %}">
|
||||
<input class="half" style="height: unset;" type="text" name="phone" id="id_phone" placeholder="{% trans 'Укажите телефон' %}">
|
||||
{% include 'v2/widgets/w_pay_attention.html' with text=attention_phone %}
|
||||
{% if form.errors.phone %}<div class="error_container">{{ form.errors.phone.0 }}</div>{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
<div class="w_daterangepicker">
|
||||
<div class="date_range_input_cont">
|
||||
<input class="dropped" type="text" name="{{ name }}" id="id_{{ name }}">
|
||||
<img src="{% static "v2/icons/widgets/w_datarangepicker/datarangepicker_icon.svg" %}" alt="">
|
||||
<img onclick="clickOnDateIconE(this)" src="{% static "v2/icons/widgets/w_datarangepicker/datarangepicker_icon.svg" %}" alt="">
|
||||
</div>
|
||||
</div>
|
||||
@@ -5,10 +5,10 @@
|
||||
<div class="w_select_country_header" onclick="openCountruSelectIfDataEnter(this)">
|
||||
<div class="select_country_header_left_part">
|
||||
<div class="container_inf_about_country">
|
||||
<img class="country_flag_img_container">
|
||||
<div class="country_code"></div>
|
||||
<img class="country_flag_img_container"{% if initial.country.flag %} src="{{ initial.country.flag.url }}"{% endif %}>
|
||||
<div class="country_code">{% if initial.country.short_code %}{{ initial.country.short_code }}{% endif %}</div>
|
||||
</div>
|
||||
<input class="dropped" type="text" name="{{ name }}" id="id_{{ name }}" placeholder="{{ placeholder }}" oninput="searchCountry(this)" data-value="" data-id="">
|
||||
<input class="dropped" type="text" name="{{ name }}" id="id_{{ name }}" placeholder="{{ placeholder }}" oninput="searchCountry(this)" data-value="" data-id="" value="{% if initial.name %}{{ initial.name }}/{{ initial.country.name }}{% endif %}">
|
||||
</div>
|
||||
<img class="w_select_country_icon" src="{% static "v2/icons/widgets/w_select_country/pin.svg" %}" alt="">
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user