TRI-293: edit form-poster + page styles
This commit is contained in:
@@ -27,9 +27,9 @@
|
||||
<div hidden>
|
||||
csrfmiddlewaretoken: eoN2nLYYo46PpDIhi82dmTFASHH4ONiBdEQOz1jQNyUpsHJ4RrvcmFwfnM45TNtl
|
||||
type_transport: road
|
||||
from_address_point: 59613 4267
|
||||
from_city: 59613 4267
|
||||
from_address_point_txt: Москаленки / Россия
|
||||
to_address_point: 2824
|
||||
to_city: 2824
|
||||
to_address_point_txt: Берлар / Бельгия
|
||||
departure_DT: 17.12.2024 23:04
|
||||
arrival_DT: 29.12.2024 20:04
|
||||
@@ -54,20 +54,20 @@
|
||||
{% csrf_token %}
|
||||
<input
|
||||
type="number"
|
||||
name="from_address_point"
|
||||
id="from_address_point"
|
||||
name="from_city"
|
||||
id="from_city"
|
||||
hidden
|
||||
{% if form.initial.from_address_point %}value="{{ form.initial.from_address_point }}"{% endif %}
|
||||
{% if form.initial.from_city %}value="{{ form.initial.from_city }}"{% endif %}
|
||||
/>
|
||||
<input
|
||||
type="number"
|
||||
name="to_address_point"
|
||||
id="to_address_point"
|
||||
name="to_city"
|
||||
id="to_city"
|
||||
hidden
|
||||
{% if form.initial.to_address_point %}value="{{ form.initial.to_address_point }}"{% endif %}
|
||||
{% if form.initial.to_city %}value="{{ form.initial.to_city }}"{% endif %}
|
||||
/>
|
||||
<input
|
||||
id="hide_owner_type"
|
||||
id="owner_type"
|
||||
name="owner_type"
|
||||
hidden
|
||||
{% if form.initial.owner_type %}
|
||||
@@ -76,17 +76,6 @@
|
||||
value="{{ form.data.owner_type }}"
|
||||
{% endif %}
|
||||
>
|
||||
<input
|
||||
id="hiddenTime"
|
||||
type="text"
|
||||
name="hiddenTime"
|
||||
hidden
|
||||
{% if route.departure_DT %}
|
||||
value="{{ route.from_city.get_current_datetime }}"
|
||||
{% elif form.initial.departure_DT %}
|
||||
value="{{ form.initial.departure_DT }}"
|
||||
{% endif %}
|
||||
>
|
||||
{#type-transport#}
|
||||
<div class="poster__row poster__row--transport">
|
||||
<div class="poster__col col-12">
|
||||
@@ -126,8 +115,18 @@
|
||||
<label for="from" class="poster__label " required>
|
||||
{{ l_from }}
|
||||
</label>
|
||||
<input type="text" autocomplete="off" name="from_address_point_txt" id="from" class="poster__locate locate"
|
||||
placeholder="{% translate "Укажите город" %}" required>
|
||||
<div class="poster__inp-box">
|
||||
|
||||
<input type="text" autocomplete="off" name="from_address_point_txt" id="from" class="poster__locate locate"
|
||||
placeholder="{% translate "Укажите город" %}" required
|
||||
{% if form.initial.from_address_point_txt %}value="{{ form.initial.from_address_point_txt }}"{% endif %}
|
||||
|
||||
>
|
||||
{# <div class="poster__inp-country">#}
|
||||
{# <img src="/media/uploads/flags/HU_-_Hungary.svg" alt="Венгрия">#}
|
||||
{# <span>BY</span>#}
|
||||
{# </div>#}
|
||||
</div>
|
||||
<div class="poster__towns-list"></div>
|
||||
{% if not errors_off and form.errors and form.errors.from_address_point %}
|
||||
<span id="error_from_address_point">{{ form.errors.from_address_point }}</span>
|
||||
@@ -137,8 +136,18 @@
|
||||
<label for="to" class="poster__label " required>
|
||||
{{ l_to }}
|
||||
</label>
|
||||
<input type="text" autocomplete="off" name="to_address_point_txt" id="to" class="poster__locate locate"
|
||||
placeholder="{% translate "Укажите город" %}" required>
|
||||
<div class="poster__inp-box">
|
||||
<input
|
||||
type="text"
|
||||
autocomplete="off"
|
||||
name="to_address_point_txt"
|
||||
id="to"
|
||||
class="poster__locate locate"
|
||||
placeholder="{% translate "Укажите город" %}"
|
||||
required
|
||||
{% if form.initial.to_address_point_txt %}value="{{ form.initial.to_address_point_txt }}"{% endif %}
|
||||
>
|
||||
</div>
|
||||
<div class="poster__towns-list"></div>
|
||||
{% if not errors_off and form.errors and form.errors.from_address_point %}
|
||||
<span id="error_to_address_point">{{ form.errors.from_address_point }}</span>
|
||||
@@ -149,7 +158,7 @@
|
||||
<div class="poster__col poster__col--inner">
|
||||
{#date-from#}
|
||||
<div class="poster__col">
|
||||
<label for="departure_DT" required class="poster__label col-12 ">
|
||||
<label for="departure_DT" class="poster__label col-12" required>
|
||||
{{ l_date_from }}
|
||||
</label>
|
||||
<input
|
||||
@@ -158,11 +167,15 @@
|
||||
id="departure_DT"
|
||||
name="departure_DT"
|
||||
readonly
|
||||
value="{% if route.departure_DT %}
|
||||
{{ route.from_city.get_current_datetime }}{% elif form.initial.departure_DT %}{{ form.initial.departure_DT }}{% endif %}"
|
||||
required
|
||||
{% if route.departure_DT %}
|
||||
value="{{ route.from_city.get_current_datetime.strip }}"
|
||||
{% elif form.initial.departure_DT %}
|
||||
value="{{ form.initial.departure_DT }}"
|
||||
{% endif %}
|
||||
/>
|
||||
{% if not errors_off and form.errors and form.errors.departure_DT %}
|
||||
<span id="error_arrival_DT">{{ form.errors.departure_DT }}</span>
|
||||
<span id="error_departure_DT">{{ form.errors.departure_DT }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{#date-to#}
|
||||
@@ -176,11 +189,11 @@
|
||||
id="arrival_DT"
|
||||
name="arrival_DT"
|
||||
readonly
|
||||
value="{% if route.departure_DT %}
|
||||
{{ route.from_city.get_current_datetime }}
|
||||
{% if route.arrival_DT %}
|
||||
value="{{ route.from_city.get_current_datetime }}"
|
||||
{% elif form.initial.arrival_DT %}
|
||||
{{ form.initial.arrival_DT }}
|
||||
{% endif %}"
|
||||
value="{{ form.initial.arrival_DT }}"
|
||||
{% endif %}
|
||||
/>
|
||||
{% if not errors_off and form.errors and form.errors.arrival_DT %}
|
||||
<span id="error_arrival_DT">{{ form.errors.arrival_DT }}</span>
|
||||
@@ -229,7 +242,7 @@
|
||||
<div class="poster__row poster__row--date">
|
||||
{#date-to#}
|
||||
<div class="poster__col">
|
||||
<label for="arrival_DT" required class="poster__label col-12 ">
|
||||
<label for="arrival_DT" class="poster__label col-12" required>
|
||||
{{ l_date_to }}
|
||||
</label>
|
||||
<input
|
||||
@@ -237,12 +250,13 @@
|
||||
class="poster__date date"
|
||||
id="arrival_DT"
|
||||
name="arrival_DT"
|
||||
readonly
|
||||
value="{% if route.arrival_DT %}
|
||||
{{ route.from_city.get_current_datetime }}
|
||||
{% elif form.initial.arrival_DT %}
|
||||
{{ form.initial.arrival_DT }}
|
||||
{% endif %}"
|
||||
placeholder="{% translate "Выберите дату" %}"
|
||||
required
|
||||
{% if route.arrival_DT %}
|
||||
value="{{ route.from_city.get_current_datetime }}"
|
||||
{% elif form.initial.arrival_DT %}
|
||||
value="{{ form.initial.arrival_DT }}"
|
||||
{% endif %}
|
||||
/>
|
||||
{% if not errors_off and form.errors and form.errors.arrival_DT %}
|
||||
<span id="error_arrival_DT">{{ form.errors.arrival_DT }}</span>
|
||||
@@ -254,12 +268,11 @@
|
||||
id="departure_DT"
|
||||
name="departure_DT"
|
||||
hidden
|
||||
value="
|
||||
{% if route.departure_DT %}
|
||||
{{ route.from_city.get_current_datetime }}
|
||||
value="{{ route.from_city.get_current_datetime.strip }}"
|
||||
{% elif form.initial.departure_DT %}
|
||||
{{ form.initial.departure_DT }}
|
||||
{% endif %}"
|
||||
value="{{ form.initial.departure_DT }}"
|
||||
{% endif %}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -271,8 +284,16 @@
|
||||
<label for="phone" class="col-12">
|
||||
{% translate "Контактный номер телефона, по которому с Вами могут связаться перевозчики" %}
|
||||
</label>
|
||||
<input class="col-12 col-xl-6" type="text" pattern="[0-9\-+]{5,}" maxlength="30"
|
||||
placeholder="{% translate "Укажите телефон" %}" title="{% translate "Только цифры или - или +" %}">
|
||||
<input id="phone"
|
||||
name="phone"
|
||||
class="col-12 col-xl-6"
|
||||
type="text"
|
||||
pattern="[0-9\-+]{5,}"
|
||||
maxlength="30"
|
||||
{% if form.initial.phone %}value="{{ form.initial.phone}}"{% endif %}
|
||||
placeholder="{% translate "Укажите телефон" %}"
|
||||
title="{% translate "Только цифры или - или +" %}"
|
||||
>
|
||||
<div class="poster__info">
|
||||
{% translate "Если вы оставите это поле пустым - перевозчики смогут только написать вам в личные сообщения на нашем сайте TripWB.com" %}
|
||||
</div>
|
||||
@@ -281,16 +302,17 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{#description#}
|
||||
{#comment#}
|
||||
<div class="poster__row poster__row--description">
|
||||
<div class="poster__col col-12">
|
||||
|
||||
<label for="description" class="col-12">
|
||||
<label for="comment" class="col-12">
|
||||
{% translate "Примечание (необязательно)" %}
|
||||
</label>
|
||||
<textarea
|
||||
name="description"
|
||||
id="description"
|
||||
name="comment"
|
||||
id="comment"
|
||||
value="{{ form.initial.comment }}"
|
||||
maxlength="{{ maxLetterLength }}"
|
||||
placeholder="{% translate "Если желаете, то здесь можно указать важную информацию, например: вес, габариты посылки, количество попутчиков и т.д.)" %}"
|
||||
></textarea>
|
||||
@@ -310,7 +332,7 @@
|
||||
name="receive_msg_by_email"
|
||||
class="cargo__inp"
|
||||
{% if form.initial.receive_msg_by_email == True %}
|
||||
checked="checked"
|
||||
checked
|
||||
{% endif %}
|
||||
id="receive_msg_by_email">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user