templates/employee/_employee_fields.html.twig line 1

Open in your IDE?
  1. <div class="row">
  2.     <div class="col-xl-2"></div>
  3.     <div class="col-xl-8">
  4.         {{ form_start(form, {'method': 'POST', 'attr': {'class': 'form', 'enctype': 'multipart/form-data'}}) }}
  5.         <div class="card-body">
  6.             {% if readonly is not defined %}
  7.                 <div class="row mb-6">
  8.                     <label class="col-lg-4 col-form-label fw-bold fs-6">Photo</label>
  9.                     <div class="col-lg-8">
  10.                         <div class="image-input image-input-outline" data-kt-image-input="true"
  11.                              style="background-image: url({{ asset('assets/theme/media/avatars/blank.png') }})">
  12.                             <div class="image-input-wrapper w-125px h-125px"
  13.                                  style="background-image: url({{ employee | avatar }})"></div>
  14.                             <label class="btn btn-icon btn-circle btn-active-color-primary w-25px h-25px bg-body shadow"
  15.                                    data-kt-image-input-action="change" data-bs-toggle="tooltip"
  16.                                    title="Changer">
  17.                                 <i class="bi bi-pencil-fill fs-7"></i>
  18.                                 <input type="file" name="pictureFile" accept=".png, .jpg, .jpeg"/>
  19.                                 <input type="hidden" name="no_picture"/>
  20.                             </label>
  21.                             <span class="btn btn-icon btn-circle btn-active-color-primary w-25px h-25px bg-body shadow"
  22.                                   data-kt-image-input-action="cancel" data-bs-toggle="tooltip"
  23.                                   title="Annuler"><i class="bi bi-x fs-2"></i></span>
  24.                             <span class="btn btn-icon btn-circle btn-active-color-primary w-25px h-25px bg-body shadow"
  25.                                   data-kt-image-input-action="remove" data-bs-toggle="tooltip"
  26.                                   title="Supprimer"><i class="bi bi-x fs-2"></i></span>
  27.                         </div>
  28.                         <div class="form-text">Allowed file types: png, jpg, jpeg.</div>
  29.                     </div>
  30.                 </div>
  31.             {% endif %}
  32.             {% for key, field in form.children %}
  33.                 {% if key != "_token" %}
  34.                     <div class="row mb-6">
  35.                         <label class="col-lg-3 col-form-label">{{ form_label(field) }}</label>
  36.                         <div class="col-lg-6">
  37.                             {{ form_widget(field) }}
  38.                         </div>
  39.                     </div>
  40.                 {% endif %}
  41.             {% endfor %}
  42.         </div>
  43.         {% if readonly is not defined %}
  44.             <div class="card-footer">
  45.                 <div class="row">
  46.                     <div class="col-lg-3"></div>
  47.                     <div class="col-lg-6">
  48.                         <button type="submit"
  49.                                 class="btn btn-success mr-2">{{ button_label|default('Valider') }}</button>
  50.                         <button type="reset" class="btn btn-secondary">Annuler</button>
  51.                     </div>
  52.                 </div>
  53.             </div>
  54.         {% endif %}
  55.         {{ form_end(form) }}
  56.     </div>
  57. </div>