0.0.07 form poster
This commit is contained in:
@@ -498,7 +498,7 @@ footer>div {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.wrapper_header_content{
|
.wrapper_header_content{
|
||||||
max-width: 1280px;
|
max-width: 1720px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,19 +52,11 @@ function select_tab_profile (el,url,owner_type=null, check_orders_required) {
|
|||||||
let confirm_url_f_lang_ru = ''
|
let confirm_url_f_lang_ru = ''
|
||||||
let confirm_url_f_lang_en = ''
|
let confirm_url_f_lang_en = ''
|
||||||
if (owner_type){
|
if (owner_type){
|
||||||
window.history.pushState({ prevUrl: window.location.href }, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}`)
|
|
||||||
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`
|
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`
|
||||||
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`
|
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`
|
||||||
if(!window.history.state.prevUrl.match(/create/)) {
|
|
||||||
window.location.reload()
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
window.history.pushState({ prevUrl: window.location.href }, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(url)}/`)
|
|
||||||
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(url)}/`
|
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(url)}/`
|
||||||
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(url)}/`
|
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(url)}/`
|
||||||
if(window.history.state.prevUrl.match(/create/)) {
|
|
||||||
window.location.reload()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
document.querySelector("#ru_lang").href = confirm_url_f_lang_ru
|
document.querySelector("#ru_lang").href = confirm_url_f_lang_ru
|
||||||
document.querySelector("#en_lang").href = confirm_url_f_lang_en
|
document.querySelector("#en_lang").href = confirm_url_f_lang_en
|
||||||
|
|||||||
@@ -12,12 +12,16 @@ function makePosterOrder(form) {
|
|||||||
|
|
||||||
|
|
||||||
}, error: function (res) {
|
}, error: function (res) {
|
||||||
if (res.JSON) return;
|
if (!res.responseJSON) return;
|
||||||
|
|
||||||
let $parent = form.closest('.b_make_poster_order')
|
let $parent = form.closest('.b_make_poster_order')
|
||||||
let $title = $parent.querySelector(".make_poster_order_title")
|
let $title = $parent.querySelector(".make_poster_order_title")
|
||||||
|
let $form = $parent.querySelector(".f_make_poster_order")
|
||||||
|
$form.remove()
|
||||||
|
|
||||||
|
$('body')[0].scrollIntoView({behavior: 'smooth', top: 0});
|
||||||
|
|
||||||
|
$(res.responseJSON.html).insertAfter($($title))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class api {
|
|||||||
this.data_type = props.data_type;
|
this.data_type = props.data_type;
|
||||||
this.type = props.type || 'POST';
|
this.type = props.type || 'POST';
|
||||||
this.success_callback = props.success;
|
this.success_callback = props.success;
|
||||||
this.error_callback = props.error_callback;
|
this.error_callback = props.error;
|
||||||
}
|
}
|
||||||
|
|
||||||
ajaxRequest (){
|
ajaxRequest (){
|
||||||
|
|||||||
@@ -8,26 +8,26 @@
|
|||||||
<div class="field_container" data-type="location" data-name="from_city">
|
<div class="field_container" data-type="location" data-name="from_city">
|
||||||
<label for="id_from_city"><div class="required_field_icon">*</div> {% trans "Откуда забрать посылку" %}</label>
|
<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 %}
|
||||||
{% if form.errors.from_city %}<div class="error_container">{{ form.errors.from_city }}</div>{% endif %}
|
{% if form.errors.from_city %}<div class="error_container">{{ form.errors.from_city.0 }}</div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="field_container" data-type="location" data-name="to_city">
|
<div class="field_container" data-type="location" data-name="to_city">
|
||||||
<label for="id_from_city"><div class="required_field_icon">*</div> {% trans "Куда доставить посылку" %}</label>
|
<label for="id_from_city"><div class="required_field_icon">*</div> {% trans "Куда доставить посылку" %}</label>
|
||||||
{% include 'v2/widgets/w_select_country.html' with name='to_city' placeholder=placeholder_for_city %}
|
{% include 'v2/widgets/w_select_country.html' with name='to_city' placeholder=placeholder_for_city %}
|
||||||
{% if form.errors.to_city %}<div class="error_container">{{ form.errors.to_city }}</div>{% endif %}
|
{% if form.errors.to_city %}<div class="error_container">{{ form.errors.to_city.0 }}</div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form_line">
|
<div class="form_line">
|
||||||
<div class="field_container" data-type="radio" data-name="cargo_type">
|
<div class="field_container" data-type="radio" data-name="cargo_type">
|
||||||
<label for="id_cargo_type"><div class="required_field_icon">*</div> {% trans "Выберите кого (что) вы можете перевезти:" %}</label>
|
<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 %}
|
||||||
{% if form.errors.cargo_type %}<div class="error_container">{{ form.errors.cargo_type }}</div>{% endif %}
|
{% if form.errors.cargo_type %}<div class="error_container">{{ form.errors.cargo_type.0 }}</div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form_line _50_grid">
|
<div class="form_line _50_grid">
|
||||||
<div class="field_container" data-type="date" data-name="arrival_DT">
|
<div class="field_container" data-type="date" data-name="arrival_DT">
|
||||||
<label for="id_arrival_DT"><div class="required_field_icon">*</div> {% trans "Дата доставки посылки" %}</label>
|
<label for="id_arrival_DT"><div class="required_field_icon">*</div> {% trans "Дата доставки посылки" %}</label>
|
||||||
{% include 'v2/widgets/w_daterangepicker.html' with name='arrival_DT' %}
|
{% include 'v2/widgets/w_daterangepicker.html' with name='arrival_DT' %}
|
||||||
{% if form.errors.arrival_DT %}<div class="error_container">{{ form.errors.arrival_DT }}</div>{% endif %}
|
{% if form.errors.arrival_DT %}<div class="error_container">{{ form.errors.arrival_DT.0 }}</div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form_line">
|
<div class="form_line">
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<label for="id_cargo_type"><div class="required_field_icon">*</div> {% trans "Каким способом Вы хотите отправить?" %}</label>
|
<label for="id_cargo_type"><div class="required_field_icon">*</div> {% trans "Каким способом Вы хотите отправить?" %}</label>
|
||||||
{% include 'v2/widgets/w_radio_inputs.html' with name='type_transport' list=form.fields.type_transport.choices %}
|
{% include 'v2/widgets/w_radio_inputs.html' with name='type_transport' list=form.fields.type_transport.choices %}
|
||||||
{% include 'v2/widgets/w_pay_attention.html' with text=attention_type_transport %}
|
{% include 'v2/widgets/w_pay_attention.html' with text=attention_type_transport %}
|
||||||
{% if form.errors.type_transport %}<div class="error_container">{{ form.errors.type_transport }}</div>{% endif %}
|
{% if form.errors.type_transport %}<div class="error_container">{{ form.errors.type_transport.0 }}</div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form_line">
|
<div class="form_line">
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<label for="id_cargo_type">{% trans "Контактный номер телефона, по которому с Вами могут связаться перевозчики" %}</label>
|
<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 style="height: unset;width: calc(50% - 40px);" type="text" name="phone" id="id_phone" placeholder="{% trans 'Укажите телефон' %}">
|
||||||
{% include 'v2/widgets/w_pay_attention.html' with text=attention_phone %}
|
{% include 'v2/widgets/w_pay_attention.html' with text=attention_phone %}
|
||||||
{% if form.errors.phone %}<div class="error_container">{{ form.errors.phone }}</div>{% endif %}
|
{% if form.errors.phone %}<div class="error_container">{{ form.errors.phone.0 }}</div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form_line">
|
<div class="form_line">
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
{% trans 'Если желаете, то здесь можно указать важную информацию, например: вес, габариты посылки, количество попутчиков и т.д.)' as comment_placeholder %}
|
{% trans 'Если желаете, то здесь можно указать важную информацию, например: вес, габариты посылки, количество попутчиков и т.д.)' as comment_placeholder %}
|
||||||
<label for="id_comment">{% trans "Примечание (необязательно)" %}</label>
|
<label for="id_comment">{% trans "Примечание (необязательно)" %}</label>
|
||||||
{% include 'v2/widgets/w_textarea_w_counter.html' with name='comment' placeholder=comment_placeholder max_val='300' %}
|
{% include 'v2/widgets/w_textarea_w_counter.html' with name='comment' placeholder=comment_placeholder max_val='300' %}
|
||||||
{% if form.errors.comment %}<div class="error_container">{{ form.errors.comment }}</div>{% endif %}
|
{% if form.errors.comment %}<div class="error_container">{{ form.errors.comment.0 }}</div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form_line">
|
<div class="form_line">
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<div class="checkbox" onclick="chooseCheckbox(this)"></div>
|
<div class="checkbox" onclick="chooseCheckbox(this)"></div>
|
||||||
<div class="checkbox_label" onclick="chooseCheckbox(this)">{% trans "Хочу получать уведомления на E-mail о появлении перевозчика по моим критериям" %}</div>
|
<div class="checkbox_label" onclick="chooseCheckbox(this)">{% trans "Хочу получать уведомления на E-mail о появлении перевозчика по моим критериям" %}</div>
|
||||||
{% include 'v2/widgets/w_additional_info.html' %}
|
{% include 'v2/widgets/w_additional_info.html' %}
|
||||||
{% if form.errors.receive_msg_by_email %}<div class="error_container">{{ form.errors.receive_msg_by_email }}</div>{% endif %}
|
{% if form.errors.receive_msg_by_email %}<div class="error_container">{{ form.errors.receive_msg_by_email.0 }}</div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user