cmtracker/templates/internal/admin/users/edit-user.html.twig

93 lines
4.8 KiB
Twig
Raw Normal View History

{% extends 'base.html.twig' %}
{% block body %}
{{ block('nav', 'internal/libs/nav.html.twig') }}
<main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
{{ block('topnav', 'internal/libs/top-nav.html.twig') }}
<section>
<div class='page-header min-vh-100'>
<div class='container'>
<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="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>
<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-header">
<h4 class="font-weight-bolder">Update User</h4>
</div>
<div class="card-body">
{{ form_errors(form) }}
{{ form_start(form) }}
<div class="input-group input-group-outline mb-3 is-filled">
<label for="user_form_name" class="form-label">Name</label>
<input type="text" name="{{ field_name(form.name) }}" value='{{ field_value(form.name) }}' class="form-control" required="required"/>
</div>
<div class="input-group input-group-outline mb-3 is-filled">
<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"/>
</div>
2024-12-05 01:07:17 -05:00
<div class='input-group input-group-outline mb-3'>
<div class='row justify-content-center flex-column'>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.caseWorker) }}' id='user_form_job_CASE_WORKER' value='CASE_WORKER' {% if is_granted('ROLE_CASE_WORKER') %} checked="checked" {% endif %}/>
<label for='user_form_job_CASE_WORKER'>Case Worker</label><br/>
</div>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.therapist) }}' id='user_form_job_THERAPIST' value='THERAPIST' {% if is_granted('ROLE_THERAPIST') %} checked="checked" {% endif %}/>
<label for='user_form_job_THERAPIST'>Therapist</label><br/>
</div>
</div>
<div class='row justify-content-center flex-column'>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.caseManager) }}' id='user_form_job_CASE_MANAGER' value='CASE_MANAGER' {% if is_granted('ROLE_CASE_MANAGER') %} checked="checked" {% endif %}/>
<label for='user_form_job_CASE_MANAGER'>Case Manager</label>
</div>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.su) }}' id='user_form_job_ADMIN' value='ADMIN' {% if is_granted('ROLE_ADMIN') %} checked="checked" {% endif %}/>
<label for='user_form_job_ADMIN'>Admin</label><br/>
</div>
</div>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='user_form_level' class='form-label'>Level</label>
<select name='{{ field_name(form.level) }}' id='user_form_level' class='form-control'>
<option value=''></option>
{% for l in enum('App\\Enums\\CaseLevel').cases() %}
{% set selected = (l.value == data.level.value) %}
<option value='{{ l.value }}' {% if selected %} selected="true" {% endif %}>{{ l.name }}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='user_form_rateType' class='form-label'>Rate Type</label>
<select name='{{ field_name(form.rateType) }}' id='user_form_rateType' class='form-control'>
<option value=''></option>
{% for rt in enum('App\\Enums\\RateType').cases() %}
{% set selected = (rt.value == data.rateType.value) %}
<option value='{{ rt.value }}' {% if selected %} selected="true" {% endif %}>{{ rt.name }}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='user_form_rate' class='form-label'>Rate</label>
<input type='number' name='{{ field_name(form.rate) }}' id='user_form_rate' class='form-control' value='{{ data.rate }}' min='0' step='0.01'/>
</div>
<div class="text-center">
<button type="submit" class="btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0">Save</button>
</div>
{{ form_end(form) }}
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
{% endblock %}