Add override level checkbox and method on form submit

This commit is contained in:
Ryan Prather 2024-12-10 22:54:34 -05:00
parent 7704319bd1
commit f81e65938d

View File

@ -19,12 +19,15 @@
<h4 class="font-weight-bolder">Assign Case Worker</h4> <h4 class="font-weight-bolder">Assign Case Worker</h4>
</div> </div>
<div class="card-body"> <div class="card-body">
{{ form_start(form, {'attr': {'onsubmit': 'return validateAssignForm()'}}) }}
{{ form_errors(form) }} {{ form_errors(form) }}
{{ form_start(form) }}
<div class='input-group input-group-outline mb-3 is-filled'> <div class='input-group input-group-outline mb-3 is-filled'>
<input type='hidden' id='caseId' value='{{ id }}'/>
<input type='hidden' id='mustOverride' value="false"/>
<label for='user_form_caseWorker' class='form-label'>Case Worker</label> <label for='user_form_caseWorker' class='form-label'>Case Worker</label>
<select name='{{ field_name(form.user) }}' id='user_form_caseWorker' class='form-control'> <select name='{{ field_name(form.user) }}' id='user_form_caseWorker' class='form-control' onchange='javascript:checkLevels()'>
<option value=''></option> <option value=''></option>
{% for w in caseWorkers %} {% for w in caseWorkers %}
{% set selected = (w.id == assignedWorkerId) %} {% set selected = (w.id == assignedWorkerId) %}
@ -34,12 +37,12 @@
</div> </div>
<div class='input-group input-group-outline mb-3'> <div class='input-group input-group-outline mb-3'>
<input type='checkbox' name='user_form_levelOverride' id='user_form_levelOverride' value='1'/> <input type='checkbox' name='{{ field_name(form.overrideLevel) }}' id='user_form_levelOverride' value='1'/>&nbsp;&nbsp;
<label for='user_form_levelOverride' class='form-label'>Override Level</label> <label for='user_form_levelOverride'>Override Level</label>
</div> </div>
<div class="text-center"> <div class="text-center">
<button type="submit" class="btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0">Assign Case Worker</button> <button type="submit" id='submit-btn' class="btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0">Assign Case Worker</button>
</div> </div>
{{ form_end(form) }} {{ form_end(form) }}
</div> </div>