fix: twig edit-user

* fix background image display
* fix display for work and personal phone numbers
* add active checkbox
* fix displays for role checkboxes
This commit is contained in:
Ryan Prather 2025-01-21 14:41:49 -05:00
parent 43e6811928
commit 6effcba396

View File

@ -11,7 +11,7 @@
<div class='container'> <div class='container'>
<div class="row"> <div class="row">
<div class="col-6 d-lg-flex d-none h-100 my-auto pe-0 position-absolute top-0 start-0 text-center justify-content-center flex-column"> <div class="col-6 d-lg-flex d-none h-100 my-auto pe-0 position-absolute top-0 start-0 text-center justify-content-center flex-column">
<div class="position-relative bg-gradient-primary h-100 m-3 px-7 border-radius-lg d-flex flex-column justify-content-center" style="background-image: url('/assets/img/illustrations/illustration-signup.jpg'); background-size: cover;"></div> <div class="position-relative bg-gradient-primary h-100 m-3 px-7 border-radius-lg d-flex flex-column justify-content-center" style="background-image: url('{{ asset('/img/illustrations/illustration-signup.jpg') }}'); background-size: cover;"></div>
</div> </div>
<div class="col-xl-4 col-lg-5 col-md-7 d-flex flex-column ms-auto me-auto ms-lg-auto me-lg-5"> <div class="col-xl-4 col-lg-5 col-md-7 d-flex flex-column ms-auto me-auto ms-lg-auto me-lg-5">
<div class="card card-plain"> <div class="card card-plain">
@ -30,32 +30,36 @@
<label for="user_form_email" class="form-label">Email</label> <label for="user_form_email" class="form-label">Email</label>
<input type="email" name="{{ field_name(form.email) }}" value='{{ field_value(form.email) }}' class="form-control" required="required"/> <input type="email" name="{{ field_name(form.email) }}" value='{{ field_value(form.email) }}' class="form-control" required="required"/>
</div> </div>
<div class='input-group input-group-outline mb-3'> <div class='input-group input-group-outline mb-3{% if field_value(form.workPhone) %} is-filled {% endif %}'>
<label for='user_form_workPhone' class='form-label'>Work Phone</label> <label for='user_form_workPhone' class='form-label'>Work Phone</label>
<input type="text" name="{{ field_name(form.workPhone) }}" value='{{ field_value(form.workPhone) }}' class="form-control" required="required"/> <input type="text" name="{{ field_name(form.workPhone) }}" value='{{ field_value(form.workPhone) }}' class="form-control" required="required"/>
</div> </div>
<div class='input-group input-group-outline mb-3'> <div class='input-group input-group-outline mb-3{% if field_value(form.personalPhone) %} is-filled {% endif %}'>
<label for='user_form_personalPhone' class='form-label'>Personal Phone</label> <label for='user_form_personalPhone' class='form-label'>Personal Phone</label>
<input type="text" name="{{ field_name(form.personalPhone) }}" value='{{ field_value(form.personalPhone) }}' class="form-control"/> <input type="text" name="{{ field_name(form.personalPhone) }}" value='{{ field_value(form.personalPhone) }}' class="form-control"/>
</div> </div>
<div class='input-group input-group-outline mb-3'>
<input type='checkbox' name='{{ field_name(form.active) }}' value='1' {% if data.active %} checked="checked" {% endif %}/>
<label for='user_form_active'>Active</label>
</div>
<div class='input-group input-group-outline mb-3'> <div class='input-group input-group-outline mb-3'>
<div class='row justify-content-center flex-column'> <div class='row justify-content-center flex-column'>
<div class='col'> <div class='col'>
<input type='checkbox' name='{{ field_name(form.caseWorker) }}' id='user_form_job_CASE_WORKER' value='CASE_WORKER' {% if data.caseWorker %} checked="checked" {% endif %}/> <input type='checkbox' name='{{ field_name(form.caseWorker) }}' id='user_form_job_CASE_WORKER' value='CASE_WORKER' {% if data.isCaseWorker() %} checked="checked" {% endif %}/>
<label for='user_form_job_CASE_WORKER'>Case Worker</label><br/> <label for='user_form_job_CASE_WORKER'>Case Worker</label><br/>
</div> </div>
<div class='col'> <div class='col'>
<input type='checkbox' name='{{ field_name(form.therapist) }}' id='user_form_job_THERAPIST' value='THERAPIST' {% if data.therapist %} checked="checked" {% endif %}/> <input type='checkbox' name='{{ field_name(form.therapist) }}' id='user_form_job_THERAPIST' value='THERAPIST' {% if data.isTherapist() %} checked="checked" {% endif %}/>
<label for='user_form_job_THERAPIST'>Therapist</label><br/> <label for='user_form_job_THERAPIST'>Therapist</label><br/>
</div> </div>
</div> </div>
<div class='row justify-content-center flex-column'> <div class='row justify-content-center flex-column'>
<div class='col'> <div class='col'>
<input type='checkbox' name='{{ field_name(form.caseManager) }}' id='user_form_job_CASE_MANAGER' value='CASE_MANAGER' {% if data.caseManager %} checked="checked" {% endif %}/> <input type='checkbox' name='{{ field_name(form.caseManager) }}' id='user_form_job_CASE_MANAGER' value='CASE_MANAGER' {% if data.isCaseManager() %} checked="checked" {% endif %}/>
<label for='user_form_job_CASE_MANAGER'>Case Manager</label> <label for='user_form_job_CASE_MANAGER'>Case Manager</label>
</div> </div>
<div class='col'> <div class='col'>
<input type='checkbox' name='{{ field_name(form.su) }}' id='user_form_job_ADMIN' value='ADMIN' {% if data.su %} checked="checked" {% endif %}/> <input type='checkbox' name='{{ field_name(form.su) }}' id='user_form_job_ADMIN' value='ADMIN' {% if data.isAdmin() %} checked="checked" {% endif %}/>
<label for='user_form_job_ADMIN'>Admin</label><br/> <label for='user_form_job_ADMIN'>Admin</label><br/>
</div> </div>
</div> </div>