templates/admin/category/addCategory.html.twig line 1

Open in your IDE?
  1. {% extends 'admin/baseAdmin.html.twig' %}
  2. {% block page_title %}Ajouter categorie {% endblock %}
  3. {% block breadcump_main %}Categorie{% endblock %}
  4. {% block breadcump_subtitle %}Nouvelle category{% 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 content %}
  14.     <form class="custom-validation" method="POST" action="{{ path('add_category') }}" enctype="multipart/form-data"  >
  15.         <div class="row">
  16.             <div class="col-xl-12 px-0">
  17.                 <div class="card">
  18.                     <div class="card-body">
  19.                         <form class="custom-validation" method="post" action="{{ path('add_category')  }}" enctype="multipart/form-data"  >
  20.                             <div class="row">
  21.                                 <div class=" col-12">
  22.                                     <h5 class="text-base px-0 ">Image du category </h5>
  23.                                 </div>
  24.                                 <div class="m-auto my-1 relative col-12">
  25.                                     <label for="avatar-upload" class="relative flex justify-center" style="cursor: pointer;">
  26.                                         <img class="w-full h-72 rounded-lg m-auto object-cover" src="{{ asset('admin/images/juliane-lieberman.jpg') }}" alt="category image" id="avatar-img">
  27.                                         <div class="h-10 w-10 bg-orange rounded-full flex  items-center justify-center" style="position: absolute;right: 43%;bottom: 4px;font-size: 43px;">
  28.                                             <i class="bx bxs-image-alt text-xl text-white"></i>
  29.                                         </div>
  30.                                         <input type="file" id="avatar-upload" name='image' style="display: none;" accept="image/*" onchange="changeAvatar(event)">
  31.                                     </label>
  32.                                 </div>
  33.                             </div>
  34.                             <h5 class="text-base sm:text-lg font-semibold mt-5 ">Information General du category</h5>
  35.                             <p class="pb-4 text-gray-700 text-xs sm:text-sm">Decrivez la category par ses caracteristiques. </p>
  36.                             <div class="row mb-4">
  37.                                 <div class="form-floating col-md-12 col-sm-12 ">
  38.                                     <input required="" type="text" name="name"
  39.                                            class="form-control sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 ps-5"
  40.                                            id="nom" placeholder="">
  41.                                     <label class="mb-2 ms-2 ps-5 text-sm font-medium text-gray-900 " for="nom">Nom du Category</label>
  42.                                     <div class="absolute" style="top: 11px;left: 17px;color: #a1a1a1;">
  43.                                         <i class="bx bx-grid-small" style="font-size: 36px;"></i>
  44.                                     </div>
  45.                                 </div>
  46.                             </div>
  47.                             <div class="row mb-4">
  48.                                 <div class="form-floating">
  49.                                     <textarea required="" class="form-control px-5" placeholder="Messager nous" id="floatingTextarea2" name='description' style="height: 100px"></textarea>
  50.                                     <label class="mb-2 ms-2 ps-5 text-sm font-medium text-gray-900 " for="floatingTextarea2">Description du Category</label>
  51.                                     <div class="absolute" style="top: 15px;left: 23px;color: #a1a1a1;">
  52.                                         <i class="bx bx-notepad text-2xl"></i>
  53.                                     </div>
  54.                                 </div>
  55.                             </div>
  56.                             <div class="divider"></div>
  57.                             <h5 class="text-base sm:text-lg font-semibold mt-5  ">Option avancée du category </h5>
  58.                             <p class="pb-4 text-gray-700 text-xs sm:text-sm">Ici, vous pouvez ajouter des options avancées à la catégorie sélectionnée.
  59.                             </p>
  60.                             <div class="mb-3 flex items-center text-base">
  61.                                 <label for="example-color-input" class="pr-24">Color</label>
  62.                                 <div class="">
  63.                                     <input required=""  class="form-control form-control-color mw-100" type="color" name='color' value="#556ee6" id="example-color-input">
  64.                                 </div>
  65.                                 <p class="text-muted mt-2 mx-3">*Couleur principale de la sous categorie</p>
  66.                             </div>
  67.                             <div class="flex gap-20 mt-4">
  68.                                 <label for="example-text-input" class="block font-medium text-gray-700 mr-2 dark:text-zink-200 text-13">Visibilite du produit dans le menu:</label>
  69.                                 <div class="mx-2 flex gap-2">
  70.                                     <!-- "Afficher" button -->
  71.                                     <input type="checkbox" name="visibility" id="switch3" switch="bool" checked />
  72.                                     <label for="switch3" data-on-label="Oui" data-off-label="Non"></label>
  73.                                     <!-- "Masquer" button -->
  74.                                 </div>
  75.                             </div>
  76.                             <div class="divider mt-16"></div>
  77.                     </div>
  78.                     <!-- end card body -->
  79.                 </div>
  80.                 <!-- end card -->
  81.             </div>
  82.             <!-- end col -->
  83.             <!-- end col -->
  84.         </div>
  85.         <div class="row">
  86.             <div class="col-lg-12">
  87.                 <div class="card">
  88.                     <div class="card-body">
  89.                         <div class="flex mt-4 row">
  90.                             <div class="col-md-6">
  91.                                 <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>
  92.                             </div>
  93.                             <div class="col-md flex justify-end">
  94.                                 <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">
  95.                                     Annuler</button>
  96.                                 <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>
  97.                             </div>
  98.                         </div>
  99.                     </div>
  100.                 </div>
  101.             </div>
  102.         </div>
  103.     </form>
  104. {% endblock %}
  105. {% block javascripts %}
  106.     <!-- apexcharts -->
  107.     <script src="{{ asset('admin/libs/parsleyjs/parsley.min.js')}}"></script>
  108.     <script src="{{ asset('admin/libs/select2/js/select2.min.js')}}"></script>
  109.     <script src="{{ asset('admin/libs/bootstrap-maxlength/bootstrap-maxlength.min.js')}}"></script>
  110.     <script src="{{ asset('admin/js/pages/form-validation.init.js')}}"></script>
  111.     <script src="{{ asset('admin/js/app.js')}}"></script>
  112.     <script>
  113.                                             /*
  114.                                              Template Name: Skote - Admin & Dashboard Template
  115.                                              Author: Themesbrand
  116.                                              Website: https://themesbrand.com/
  117.                                              Contact: themesbrand@gmail.com
  118.                                              File: Form Advanced Js File
  119.                                              */
  120.                                             !function ($) {
  121.                                                 "use strict";
  122.                                                 var AdvancedForm = function () { };
  123.                                                 AdvancedForm.prototype.init = function () {
  124.                                                     // Select2
  125.                                                     if ($('.select2').length > 0) {
  126.                                                         $(".select2").select2();
  127.                                                     }
  128.                                                     if ($('.select2-tags').length > 0) {
  129.                                                         $(".select2-tags").select2({
  130.                                                             tags: true
  131.                                                         });
  132.                                                     }
  133.                                                     if ($('.select2-limiting-3').length > 0) {
  134.                                                         $(".select2-limiting-3").select2({
  135.                                                             maximumSelectionLength: 3
  136.                                                         });
  137.                                                     }
  138.                                                     //Bootstrap-MaxLength
  139.                                                     $('input#defaultconfig').maxlength({
  140.                                                         warningClass: "badge bg-info",
  141.                                                         limitReachedClass: "badge bg-warning"
  142.                                                     });
  143.                                                     $('input#thresholdconfig').maxlength({
  144.                                                         threshold: 20,
  145.                                                         warningClass: "badge bg-info",
  146.                                                         limitReachedClass: "badge bg-warning"
  147.                                                     });
  148.                                                     $('input#moreoptions').maxlength({
  149.                                                         alwaysShow: true,
  150.                                                         warningClass: "badge bg-success",
  151.                                                         limitReachedClass: "badge bg-danger"
  152.                                                     });
  153.                                                     $('input#alloptions').maxlength({
  154.                                                         alwaysShow: true,
  155.                                                         warningClass: "badge bg-success",
  156.                                                         limitReachedClass: "badge bg-danger",
  157.                                                         separator: ' out of ',
  158.                                                         preText: 'You typed ',
  159.                                                         postText: ' chars available.',
  160.                                                         validate: true
  161.                                                     });
  162.                                                     $('textarea#textarea').maxlength({
  163.                                                         alwaysShow: true,
  164.                                                         warningClass: "badge bg-info",
  165.                                                         limitReachedClass: "badge bg-warning"
  166.                                                     });
  167.                                                     $('input#placement').maxlength({
  168.                                                         alwaysShow: true,
  169.                                                         placement: 'top-left',
  170.                                                         warningClass: "badge bg-info",
  171.                                                         limitReachedClass: "badge bg-warning"
  172.                                                     });
  173.                                                 },
  174.                                                         //init
  175.                                                         $.AdvancedForm = new AdvancedForm, $.AdvancedForm.Constructor = AdvancedForm
  176.                                             }(window.jQuery),
  177.                                                     //Datepicker
  178.                                                             function ($) {
  179.                                                                 "use strict";
  180.                                                                 $.AdvancedForm.init();
  181.                                                             }(window.jQuery);
  182.     </script>
  183. {% endblock %}