This commit is contained in:
2023-08-11 18:05:53 +03:00
parent 724d5394d7
commit b7ff089cca
4 changed files with 56 additions and 15 deletions

View File

@@ -13,7 +13,7 @@
<a
href="{% url "user_profile" %}">
Профиль
{{ user.username }}
</a>
{% endif %}

View File

@@ -6,24 +6,28 @@
<form class = "new_route" name="new_route" method="post">
{% csrf_token %}
<h2 class="title_new_route">Разместить объявление о перевозке посылки</h2>
<div>
<label for="id_type_transport">{{ form.fields.type_transport.label }}</label>
</div>
<div>
<label for="id_type_transport">{{ form.fields.type_transport.label }}</label>
<select
onchange="OnSelectionChange(this)"
name="type_transport"
id="id_type_transport">
{% for item in form.fields.type_transport.choices %}
<option
value="{{ item.0 }}"
{% if form.initial.type_transport == item.0 %}
selected="selected"
{% endif %}>
{{ item.1 }}
</option>
{% endfor %}
{% for item in form.fields.type_transport.choices %}
<option
value="{{ item.0 }}"
{% if form.initial.type_transport == item.0 %}
selected="selected"
{% endif %}>
{{ item.1 }}
</option>
{% endfor %}
</select>
{% if not errors_off and form.errors and form.errors.type_transport %}
<span>{{ form.errors.type_transport }}</span>
@@ -217,7 +221,13 @@
<div class="extra-controls">
<label for="id_weight">{{ form.fields.weight.label }}</label>
<input type="text" maxlength="3" class="js-input" placeholder="Укажите вес" value="" />
<input
type="number"
maxLength="1000"
class="js-input"
placeholder="Укажите вес"
{# onchange="maxLength(this)"#}
/>
</div>
<div class="range-slider">