templates/admin/coach/editCoach.html.twig line 1

Open in your IDE?
  1. {% extends 'admin/baseAdmin.html.twig' %}
  2. {% block page_title %}Modifier Coach{% endblock %}
  3. {% block breadcump_main %}Coach{% endblock %}
  4. {% block breadcump_subtitle %}Modification de compte{% endblock %}
  5. {% block menu_left_sidebar %}
  6.     {% include 'include/menu/menuAdmin.html.twig' with { menu_active_event : '2'} %}
  7. {% endblock %}
  8. {% block stylesheets %}
  9.     <link href="{{ asset('admin/libs/select2/css/select2.min.css') }}" rel="stylesheet" type="text/css">
  10.     <link href="{{ asset('admin/css/tailwind.min.css') }}" rel="stylesheet" type="text/css">
  11.     <link href="{{ asset('admin/css/tailwind2.css') }}" rel="stylesheet" type="text/css">
  12. {% endblock %}
  13. {% block title %}{{"Modifier le compte Coach"|trans }}{% endblock %} 
  14. {% block content %} 
  15.             <div class="container-fluid">
  16.                 <div class="row">
  17.                     <div class="col-xl-12 px-0">
  18.                         <div class="card">
  19.                             <div class="card-body">
  20.                                 <form class="p-1 " method="post" action="{{ path('edit_coach',{'id':coach.id})}}" enctype="multipart/form-data"  >
  21.                                     <div class="m-auto my-3 relative">
  22.                                         <label for="avatar-upload" class="relative flex justify-center" style="cursor: pointer;">
  23.                                             <img class="w-40 h-40 rounded-full ring-2 ring-gray-700 dark:ring-gray-500 m-auto"   src="{{asset(''~coach.image) }}" alt="Bordered avatar" id="avatar-img">
  24.                                             <div class="h-10 w-10 bg-gray-300 rounded-full flex  items-center justify-center" style="position: absolute;right: 48%;bottom: 4px;font-size: 35px;">
  25.                                                 <i class="bx bxs-image-alt text-gray-600"></i>
  26.                                             </div>
  27.                                             <input type="file" id="avatar-upload" style="display: none;" name="image" value="{{coach.image}}" accept="image/*" onchange="changeAvatar(event)">
  28.                                         </label>
  29.                                         <p class="pb-4 text-gray-700 text-center text-sm">Modifier photo de profile du coach </p>
  30.                                     </div>
  31.                                     <h5 class="text-lg font-semibold mt-5  ">Information personnel du coach </h5>
  32.                                     <p class="pb-4 text-gray-700 text-sm">Ici, vous pouvez modifier et consulter les informations personnelles du coach. </p>
  33.                                     <div class="row mb-4">
  34.                                         <div class="form-floating col-md-6 col-sm-12 ">
  35.                                             <input type="text" name="firstname" value="{{coach.firstName}}"
  36.                                                    class="form-control sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 ps-5"
  37.                                                    id="nom" placeholder="John">
  38.                                             <label class="mb-2 ms-2 ps-5 text-sm font-medium text-gray-900 " for="nom">Nom</label>
  39.                                             <div class="absolute" style="top: 15px;left: 21px;color: #a1a1a1;">
  40.                                                 <i class="bx bxs-user-circle text-2xl"></i>
  41.                                             </div>
  42.                                         </div>
  43.                                         <div class="form-floating col-md-6 col-sm-12 mt-2.5 sm:mt-0">
  44.                                             <input type="text" name="lastname" value="{{coach.lastName}}"
  45.                                                    class="form-control sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 ps-5"
  46.                                                    id="prenom" placeholder="Doe">
  47.                                             <label class="mb-2 ms-2 ps-5 text-sm font-medium text-gray-900 " for="prenom">Prénom</label>
  48.                                             <div class="absolute" style="top: 15px;left: 21px;color: #a1a1a1;">
  49.                                                 <i class="bx bxs-user-circle text-2xl"></i>
  50.                                             </div>
  51.                                         </div>
  52.                                     </div>
  53.                                     <div class="row mb-4">
  54.                                         <div class="form-floating mb-3 col-md-6 col-sm-12">
  55.                                             <input type="email" name="email" value="{{coach.lastName}}"
  56.                                                    class="block font-medium form-control  p-2.5 rounded-lg sm:text-sm text-gray-900 w-full ps-5" id="email"
  57.                                                    placeholder="name@example.com">
  58.                                             <label class="mb-2 ms-2 ps-5 text-sm font-medium text-gray-900 dark:text-white" for="email">Email address</label>
  59.                                             <div class="absolute" style="top: 15px;left: 21px;color: #a1a1a1;">
  60.                                                 <i class="bx bx-envelope text-2xl"></i>
  61.                                             </div>
  62.                                         </div>
  63.                                         <div class="form-floating col-md-6 mb-3 col-md-6">
  64.                                             <input type="tel"  class="block sm:text-sm form-control p-2.5 rounded-lg w-full input-tel py-3" name="phone" id="phone" placeholder="1234567">
  65.                                         </div>
  66.                                     </div>
  67.                                     <div class="row mb-4">
  68.                                         <div class=" rounded p-1">
  69.                                             <label for="inline-radio" class="ms-2 text-sm font-medium text-gray-500 dark:text-gray-300">Genre:</label>
  70.                                             <div class="flex justify-between w-50  ms-2 pt-1">
  71.                                                 <label class="container_check mb-0">
  72.                                                     <div class="d-flex justify-content-between"><span>Homme</span></div>
  73.                                                     <input type="radio" value="1" name="gender" {% if coach.gender == '1' %}checked{% endif %}>
  74.                                                     <span class="custom-radio"></span>
  75.                                                 </label>
  76.                                                 <label class="container_check">
  77.                                                     <div class="d-flex justify-content-between"><span>Femme</span></div>
  78.                                                     <input type="radio"  value="0" name="gender" {% if coach.gender == '0' %}checked{% endif %}>
  79.                                                     <span class="custom-radio"></span>
  80.                                                 </label>
  81.                                             </div>
  82.                                         </div>
  83.                                     </div>
  84.                                     <div class="row pb-9 text-sm">
  85.                                         <div class="  ">
  86.                                             <p for="" class="form-label font-semibold col-2  ">Biographie</p>
  87.                                             <div class="relative w-full">
  88.                                                 <textarea class="form-control text-sm px-5 pe-4" name="description" placeholder="Qui suis-je ?" id="description_programe" style="height: 100px">{{ coach.bio }}</textarea>
  89.                                                 <div class="absolute" style="top: 8px;left: 11px;color: #a1a1a1;">
  90.                                                     <i class="bx bx-notepad text-2xl" style=""></i>
  91.                                                 </div>
  92.                                             </div>
  93.                                         </div>
  94.                                     </div>
  95.                                     <h5 class="text-lg font-semibold mt-5 ">Détails de Résidence </h5>
  96.                                     <p class="pb-4 text-gray-700 text-sm">Ici, vous pouvez modifier et consulter l'adresse du coach. </p>
  97.                                     <div class="row mb-4">
  98.                                         <div class="mb-3 col-md-6">
  99.                                             <select id="countries" name="country" class="select border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-3.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 py-3">
  100.                                                 <option value="BE" data-capital="Brussels" {% if coach.country == 'BE' %}selected{% endif %}>Belgium</option>
  101.                                                 <option value="CA" data-capital="Ottawa" {% if coach.country == 'CA' %}selected{% endif %}>Canada</option>
  102.                                                 <option value="FR" data-capital="Paris" {% if coach.country == 'FR' %}selected{% endif %}>France</option>
  103.                                                 <option value="PF" data-capital="Papeete" {% if coach.country == 'PF' %}selected{% endif %}>French Polynesia</option>
  104.                                                 <option value="LU" data-capital="Luxembourg City" {% if coach.country == 'LU' %}selected{% endif %}>Luxembourg</option>
  105.                                                 <option value="MA" data-capital="Rabat" {% if coach.country == 'MA' %}selected{% endif %}>Morocco</option>
  106.                                                 <option value="NL" data-capital="Amsterdam" {% if coach.country == 'NL' %}selected{% endif %}>Netherlands</option>
  107.                                                 <option value="NZ" data-capital="Wellington" {% if coach.country == 'NZ' %}selected{% endif %}>New Zealand</option>
  108.                                             </select>
  109.                                         </div>
  110.                                         <div class="form-floating mb-3 col-md-6" id="city">
  111.                                             <input type="text" name="adresse" value="{{coach.address}}" class="block sm:text-sm form-control p-2.5 rounded-lg w-full mt-0" id="floatingInput" placeholder="Adresse">
  112.                                             <label class="mb-2 ps-4 text-sm font-medium text-gray-900 dark:text-white" for="floatingInput">Adresse
  113.                                             </label>
  114.                                         </div>
  115.                                     </div>
  116.                                     <div class="divider mt-16"></div>
  117.                                     <div class="flex mt-4 row">
  118.                                         <div class="col-md-6">
  119.                                             <p class="text-xs  text-gray-900 mb-2">En cliquant sur le bouton de Enregistrer, vous mettez à jours les informations envoyé dans ce formulaire </p>
  120.                                         </div>
  121.                                         <div class="col-md flex justify-end">
  122.                                             <button type="reset" style=" color: #ffaa00; border: 1px solid;" class="font-medium h-10  py-2.5 rounded-lg text-center text-sm  w-40 me-2">
  123.                                                 Annuler</button>
  124.                                             <button type="submit" style=" background: #ffaa00;" class="font-medium hover:bg-primary-700 h-10  py-2.5 rounded-lg text-center text-sm text-white w-40">Enregistrer</button>
  125.                                         </div>
  126.                                     </div>
  127.                                 </form>
  128.                             </div>
  129.                             <!-- end card body -->
  130.                         </div>
  131.                         <!-- end card -->
  132.                     </div>
  133.                     <!-- end col -->
  134.                     <!-- end col -->
  135.                 </div>
  136.             </div> <!-- container-fluid -->
  137. <!-- End main -->
  138. {% endblock %}
  139. {% block javascripts %}
  140.     <!-- apexcharts -->
  141.     <script src="{{ asset('admin/libs/parsleyjs/parsley.min.js')}}"></script>
  142.     <script src="{{ asset('admin/libs/select2/js/select2.min.js')}}"></script>
  143.     <script src="{{ asset('admin/libs/bootstrap-maxlength/bootstrap-maxlength.min.js')}}"></script>
  144.     <script src="{{ asset('admin/js/pages/form-validation.init.js')}}"></script>
  145.     <script src="{{ asset('admin/js/app.js')}}"></script>
  146.     <script>
  147.                                         /*
  148.                                          Template Name: Skote - Admin & Dashboard Template
  149.                                          Author: Themesbrand
  150.                                          Website: https://themesbrand.com/
  151.                                          Contact: themesbrand@gmail.com
  152.                                          File: Form Advanced Js File
  153.                                          */
  154.                                         !function ($) {
  155.                                             "use strict";
  156.                                             var AdvancedForm = function () { };
  157.                                             AdvancedForm.prototype.init = function () {
  158.                                                 // Select2
  159.                                                 if ($('.select2').length > 0) {
  160.                                                     $(".select2").select2();
  161.                                                 }
  162.                                                 if ($('.select2-tags').length > 0) {
  163.                                                     $(".select2-tags").select2({
  164.                                                         tags: true
  165.                                                     });
  166.                                                 }
  167.                                                 if ($('.select2-limiting-3').length > 0) {
  168.                                                     $(".select2-limiting-3").select2({
  169.                                                         maximumSelectionLength: 3
  170.                                                     });
  171.                                                 }
  172.                                                 //Bootstrap-MaxLength
  173.                                                 $('input#defaultconfig').maxlength({
  174.                                                     warningClass: "badge bg-info",
  175.                                                     limitReachedClass: "badge bg-warning"
  176.                                                 });
  177.                                                 $('input#thresholdconfig').maxlength({
  178.                                                     threshold: 20,
  179.                                                     warningClass: "badge bg-info",
  180.                                                     limitReachedClass: "badge bg-warning"
  181.                                                 });
  182.                                                 $('input#moreoptions').maxlength({
  183.                                                     alwaysShow: true,
  184.                                                     warningClass: "badge bg-success",
  185.                                                     limitReachedClass: "badge bg-danger"
  186.                                                 });
  187.                                                 $('input#alloptions').maxlength({
  188.                                                     alwaysShow: true,
  189.                                                     warningClass: "badge bg-success",
  190.                                                     limitReachedClass: "badge bg-danger",
  191.                                                     separator: ' out of ',
  192.                                                     preText: 'You typed ',
  193.                                                     postText: ' chars available.',
  194.                                                     validate: true
  195.                                                 });
  196.                                                 $('textarea#textarea').maxlength({
  197.                                                     alwaysShow: true,
  198.                                                     warningClass: "badge bg-info",
  199.                                                     limitReachedClass: "badge bg-warning"
  200.                                                 });
  201.                                                 $('input#placement').maxlength({
  202.                                                     alwaysShow: true,
  203.                                                     placement: 'top-left',
  204.                                                     warningClass: "badge bg-info",
  205.                                                     limitReachedClass: "badge bg-warning"
  206.                                                 });
  207.                                             },
  208.                                                     //init
  209.                                                     $.AdvancedForm = new AdvancedForm, $.AdvancedForm.Constructor = AdvancedForm
  210.                                         }(window.jQuery),
  211.                                                 //Datepicker
  212.                                                         function ($) {
  213.                                                             "use strict";
  214.                                                             $.AdvancedForm.init();
  215.                                                         }(window.jQuery);
  216.     </script>
  217. {% endblock %}