Files
account_store/templates/blocks/profile/b_new_route.html
2023-07-17 18:48:33 +03:00

106 lines
4.3 KiB
HTML

{% load static %}
<form class = "new_route" name="new_route" method="post">
{% csrf_token %}
<div>
<label for="id_type_transport">{{ form.fields.type_transport.label }}</label>
</div>
<div>
<select name="type_transport" id="id_type_transport"{% if form.fields.type_transport.required %} required{% endif %}>
{% for item in form.fields.type_transport.choices %}
<option value="{{ item.0 }}"{% if form.fields.type_transport.initial == item.0 %} selected="selected"{% endif %}>{{ item.1 }}</option>
{% endfor %}
</select>
</div>
<hr>
<div class="departure_arrival">
<div>
<label for="id_departure_DT">{{ form.fields.departure_DT.label }}</label>
<input type="datetime-local" name="departure_DT"{% if form.fields.departure_DT.required %} required{% endif %} id="id_departure_DT">
</div>
<div>
<label for="id_arrival_DT">{{ form.fields.arrival_DT.label }}</label>
<input type="datetime-local" name="arrival_DT"{% if form.fields.arrival_DT.required %} required{% endif %} id="id_arrival_DT">
</div>
</div>
<hr>
<div class="from_to_country">
<div>
<label for="id_from_country">{{ form.fields.from_country.label }}</label>
<input type="text" name="from_country"{% if form.fields.from_country.required %} required{% endif %} id="id_from_country">
</div>
<div>
<label for="id_to_country">{{ form.fields.to_country.label }}</label>
<input type="text" name="to_country"{% if form.fields.to_country.required %} required{% endif %} id="id_to_country">
</div>
</div>
{# <div>#}
{# <label for="id_from_city">{{ form.fields.from_city.label }}</label>#}
{# <input type="text" name="from_city"{% if form.fields.from_city.required %} required{% endif %} id="id_from_city">#}
{# </div>#}
{# <div>#}
{# <label for="id_to_city">{{ form.fields.to_city.label }}</label>#}
{# <input type="text" name="to_city"{% if form.fields.to_city.required %} required{% endif %} id="id_to_city">#}
{# </div>#}
<div class="from_to_place">
<div>
<label for="id_from_place">{{ form.fields.from_place.label }}</label>
<select name="from_place" id="id_from_place" {% if form.fields.from_place.required %} required{% endif %}>
{% for item in form.fields.from_place.choices %}
<option value="{{ item.0 }}"{% if form.fields.type_transport.initial == item.0 %} selected="selected"{% endif %}>{{ item.1 }}</option>
{% endfor %}
</select>
</div>
<div>
<label for="id_to_place">{{ form.fields.to_place.label }}</label>
<select name="to_place" id="id_to_place" {% if form.fields.to_place.required %} required{% endif %}>
{% for item in form.fields.to_place.choices %}
<option value="{{ item.0 }}"{% if form.fields.to_place.initial == item.0 %} selected="selected"{% endif %}>{{ item.1 }}</option>
{% endfor %}
</select>
</div>
</div>
<hr>
<div>
<label for="id_cargo_type">{{ form.fields.cargo_type.label }}</label>
</div>
<div>
<select name="cargo_type" id="id_cargo_type" {% if form.fields.cargo_type.required %} required{% endif %}>
{% for item in form.fields.cargo_type.choices %}
<option value="{{ item.0 }}"{% if form.fields.cargo_type.initial == item.0 %} selected="selected"{% endif %}>{{ item.1 }}</option>
{% endfor %}
</select>
</div>
<hr>
<div>
<label for="id_weight">{{ form.fields.weight.label }}</label>
<input type="range" name="weight"{% if form.fields.weight.required %} required{% endif %} value="" id="id_weight">
</div>
<hr>
<div>
<label for="id_phone">{{ form.fields.phone.label }}</label>
<input type="text" name="phone"{% if form.fields.phone.required %} required{% endif %} id="id_phone">
</div>
<div>
<label for="id_extra_phone">{{ form.fields.extra_phone.label }}</label>
<input type="text" name="extra_phone" id="id_extra_phone">
</div>
<hr>
<div>
<label for="id_receive_msg_by_email">{{ form.fields.receive_msg_by_email.label }}</label>
<input type="checkbox" name="receive_msg_by_email" id="id_receive_msg_by_email">
</div>
<div class="button_register">
<button id="registration" onclick="sendRoute(this)"> Разместить объявления </button>
</div>
<script src='{% static "js/sendNewRoute.js" %}'></script>
</form>