Revise if block for case level checking

This commit is contained in:
Ryan Prather 2024-12-10 22:55:18 -05:00
parent f81e65938d
commit 5d14d05019

View File

@ -54,11 +54,7 @@
<select name='{{ field_name(form.level) }}' id='case_form_level' class='form-control'>
<option value=''></option>
{% for l in enum('App\\Enums\\CaseLevel').cases() %}
{% set selected="" %}
{% if case.level.value == l.value %}
{% set selected=" selected='selected" %}
{% endif %}
<option value='{{ l.value }}' {{ selected }}>{{ l.name }}</option>
<option value='{{ l.value }}' {% if case.level.value == l.value %} selected='selected'{% endif %}>{{ l.name }}</option>
{% endfor %}
</select>
</div>