Hotfix: Unable to add training item in requirements form

This commit is contained in:
2022-02-27 22:16:39 +00:00
parent 5eb113156b
commit 7d785f4f1b
5 changed files with 21 additions and 13 deletions

View File

@@ -32,11 +32,7 @@
{% endif %}
<form id="requirement-form" action="{{ form.action|default:request.path }}" method="post">{% csrf_token %}
{% render_field form.level|attr:'hidden' value=form.level.initial %}
<div class="form-group form-row">
<label for="item_id" class="col-sm-2 col-form-label">Item</label>
<select name="item" id="item_id" class="form-control selectpicker custom-select col-sm-10" data-live-search="true" data-sourceurl="{% url 'api_secure' model='training_item' %}" required>
</select>
</div>
{% include 'partials/item_field.html' %}
<div class="form-group form-row">
<label for="depth" class="col-sm-2 col-form-label">Depth</label>
{% render_field form.depth|add_class:'form-control col-sm'|attr:'required' %}