Change if block for supervisor selection
This commit is contained in:
parent
2bbb621a56
commit
5ed230e895
@ -27,8 +27,7 @@
|
|||||||
<select name='{{ field_name(form.supervisor) }}' id='user_form_supervisor' class='form-control'>
|
<select name='{{ field_name(form.supervisor) }}' id='user_form_supervisor' class='form-control'>
|
||||||
<option value=''></option>
|
<option value=''></option>
|
||||||
{% for s in supervisors %}
|
{% for s in supervisors %}
|
||||||
{% set selected = (s.id == data.id) %}
|
<option value='{{ s.id }}' {% if user.supervisor and user.supervisor.id == s.id %} selected="selected" {% endif %}>{{ s.name }}</option>
|
||||||
<option value='{{ s.id }}' {% if selected %} selected="true" {% endif %}>{{ s.name }}</option>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user