Fettling with level granting logic

Untested as all of my forms broke I guess
This commit is contained in:
2021-07-07 17:34:19 +01:00
parent 54f2bd36bd
commit 0a9f82e480
9 changed files with 96 additions and 12 deletions

View File

@@ -24,7 +24,7 @@
{% include 'form_errors.html' %}
{% endif %}
<form id="requirement-form" action="{{ form.action|default:request.path }}" method="post">{% csrf_token %}
{% render_field form.level|attr:'hidden' value=form.trainee.initial %}
{% 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>
@@ -32,7 +32,7 @@
</div>
<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 custom-select col-sm'|attr:'required' %}
{% render_field form.depth|add_class:'form-control col-sm'|attr:'required' %}
</div>
<input type="submit" class="btn btn-primary">
</form>