Change if block for supervisor selection

This commit is contained in:
Ryan Prather 2024-12-10 23:04:02 -05:00
parent 2bbb621a56
commit 5ed230e895

View File

@ -27,8 +27,7 @@
<select name='{{ field_name(form.supervisor) }}' id='user_form_supervisor' class='form-control'>
<option value=''></option>
{% for s in supervisors %}
{% set selected = (s.id == data.id) %}
<option value='{{ s.id }}' {% if selected %} selected="true" {% endif %}>{{ s.name }}</option>
<option value='{{ s.id }}' {% if user.supervisor and user.supervisor.id == s.id %} selected="selected" {% endif %}>{{ s.name }}</option>
{% endfor %}
</select>
</div>