This commit is contained in:
2023-08-07 15:09:14 +03:00
parent ddec69a7d6
commit 09cd04078c
3 changed files with 38 additions and 64 deletions

View File

@@ -178,36 +178,23 @@
<hr>
<div>
<label for="id_cargo_type">{{ form.fields.cargo_type.label }}</label>
<label>{{ form.fields.cargo_type.label }}</label>
</div>
{#<div>#}
{# <select#}
{# multiple#}
{# size="5"#}
{# 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 == item.0 %}#}
{# selected="selected"{% endif %}>{{ item.1 }}#}
{# </option>#}
{# {% endfor %}#}
{##}
{# </select>#}
{# </div>#}
<div class="checkbox_cargo_type">
{% for item in form.fields.cargo_type.choices %}
<input
type="checkbox"
name="cargo_type"
id="id_cargo_type"
{% if form.fields.cargo_type.required %} required{% endif %}
id="id_cargo_type_{{ forloop.counter }}"
{% if form.fields.cargo_type.required %} required{% endif %}
value="{{ item.0 }}"
{% if form.fields.cargo_type == item.0 %}
{% endif %}/>{{ item.1 }}
{% if form.initial.cargo_type == item.0 %}
checked="checked"
{% endif %}/>
<lable for="id_cargo_type_{{ forloop.counter }}">
{{ item.1 }}
</lable>
{% endfor %}
{# <lable for="">#}