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

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