0.0.19 use new file structure
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
{% 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>
|
||||
@@ -10,22 +14,27 @@
|
||||
</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">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<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">#}
|
||||
@@ -34,26 +43,31 @@
|
||||
{# <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>
|
||||
<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>
|
||||
@@ -65,7 +79,7 @@
|
||||
|
||||
<div>
|
||||
<label for="id_weight">{{ form.fields.weight.label }}</label>
|
||||
<input type="number" name="weight"{% if form.fields.weight.required %} required{% endif %} id="id_weight">
|
||||
<input type="range" name="weight"{% if form.fields.weight.required %} required{% endif %} value="" id="id_weight">
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@@ -88,5 +102,5 @@
|
||||
<div class="button_register">
|
||||
<button id="registration" onclick="sendRoute(this)"> Разместить объявления </button>
|
||||
</div>
|
||||
|
||||
<script src='{% static "js/sendNewRoute.js" %}'></script>
|
||||
</form>
|
||||
Reference in New Issue
Block a user