templates/admin/country/edit/editDestination.html.twig line 1

Open in your IDE?
  1. {% extends 'admin/baseAdmin.html.twig' %}
  2. {% block page_title %}Modifier Destination{% endblock %}
  3. {% block breadcump_main %}Pays{% endblock %}
  4. {% block breadcump_subtitle %}Création de destination{% 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 Destination"|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_destination',{'id':destination.id})}}" enctype="multipart/form-data"  >
  21.                             <form class="p-4 pt-1" id="myform1">
  22.                                 <h5 class="text-lg font-semibold mt-5 ">Détails de destination </h5>
  23.                                 <p class="pb-4 text-gray-700 text-sm">Ici, vous pouvez modifier et consulter la destination . </p>
  24.                                 <div class="row mb-4">
  25.                                     <div class="mb-3 col-md-6">
  26.                                         <p for="" class="form-label font-semibold ">Pays</p>
  27.                                         <select id="country" 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">
  28.                                             {% for country in countries %}
  29.                                                 <option {% if country.id == destination.country.id %}selected{% endif %} value="{{ country.id }}">{{ country.name }}</option>
  30.                                             {% endfor %}     
  31.                                         </select>
  32.                                     </div>
  33.                                     <div class="col-md-6 mb-3">
  34.                                         <p for="" class="form-label font-semibold ">Région</p>
  35.                                         <div class="form-floating  pe-0 " id="city">
  36.                                             <input type="text" name="name" value="{{destination.name}}" class="block sm:text-sm form-control p-2.5 rounded-lg w-full mt-0" id="floatingInput" placeholder="lieu">
  37.                                             <label class="mb-2 ps-4 text-sm font-medium text-gray-900 dark:text-white" for="floatingInput">Destination, ville ou lieu de l'expérience                                                 </label>
  38.                                         </div>
  39.                                     </div>
  40.                                     <div class=" col-md-6 mb-3 text-base">
  41.                                         <p for="" class="form-label font-semibold ">Type de destination </p>
  42.                                         <select  placeholder="choisir les sous catégories" name="typedestination" class="text-sm select" data-allow-clear="1">
  43.                                             <option value="Ville" {% if 'Ville' in destination.typedestination %}selected{% endif %}>Ville</option>
  44.                                             <option value="Destination" {% if 'Destination' in destination.typedestination %}selected{% endif %}>Destination</option>
  45.                                             <option value="Desert" {% if 'Desert' in destination.typedestination %}selected{% endif %}>Desert</option>
  46.                                             <option value="Montagne" {% if 'Montagne' in destination.typedestination %}selected{% endif %}>Montagne</option>
  47.                                             <option value="Réserve naturelle" {% if 'Réserve naturelle' in destination.typedestination %}selected{% endif %}>Réserve naturelle</option>
  48.                                         </select>
  49.                                     </div>
  50.                                     <div class=" col-md-6 col-sm-12 ">
  51.                                         <p for="" class="form-label font-semibold ">Ordre de destination </p>
  52.                                         <div class="form-floating ">
  53.                                             <input value="{{ destination.ordre }}" type="number" name="ordre"
  54.                                                    class="form-control sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 ps-5"
  55.                                                    id="nom" placeholder="">
  56.                                             <label class="mb-2 ms-2 ps-5 text-sm font-medium text-gray-900 " for="nom">ordre destination </label>
  57.                                             <div class="absolute" style="top: 11px;left: 17px;color: #a1a1a1;">
  58.                                                 <i class="bx bx-sort-a-z" style="font-size: 36px;"></i>
  59.                                             </div>
  60.                                         </div>
  61.                                     </div>
  62.                                 </div>
  63.                                 <div class="divider mt-16"></div>
  64.                                 <div class="flex mt-4 row">
  65.                                     <div class="col-md-6">
  66.                                         <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>
  67.                                     </div>
  68.                                     <div class="col-md flex justify-end">
  69.                                         <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">
  70.                                             Annuler</button>
  71.                                         <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>
  72.                                     </div>
  73.                                 </div>
  74.                             </form>
  75.                     </div>
  76.                     <!-- end card body -->
  77.                 </div>
  78.                 <!-- end card -->
  79.             </div>
  80.             <!-- end col -->
  81.             <!-- end col -->
  82.         </div>
  83.     </div> <!-- container-fluid -->
  84.     <!-- End main -->
  85. {% endblock %}
  86. {% block javascripts %}
  87.     <!-- apexcharts -->
  88.     <script src="{{ asset('admin/libs/parsleyjs/parsley.min.js')}}"></script>
  89.     <script src="{{ asset('admin/libs/select2/js/select2.min.js')}}"></script>
  90.     <script src="{{ asset('admin/libs/bootstrap-maxlength/bootstrap-maxlength.min.js')}}"></script>
  91.     <script src="{{ asset('admin/js/pages/form-validation.init.js')}}"></script>
  92.     <script src="{{ asset('admin/js/app.js')}}"></script>
  93.     <script>
  94.         /*
  95.          Template Name: Skote - Admin & Dashboard Template
  96.          Author: Themesbrand
  97.          Website: https://themesbrand.com/
  98.          Contact: themesbrand@gmail.com
  99.          File: Form Advanced Js File
  100.          */
  101.         !function ($) {
  102.             "use strict";
  103.             var AdvancedForm = function () { };
  104.             AdvancedForm.prototype.init = function () {
  105.                 // Select2
  106.                 if ($('.select2').length > 0) {
  107.                     $(".select2").select2();
  108.                 }
  109.                 if ($('.select2-tags').length > 0) {
  110.                     $(".select2-tags").select2({
  111.                         tags: true
  112.                     });
  113.                 }
  114.                 if ($('.select2-limiting-3').length > 0) {
  115.                     $(".select2-limiting-3").select2({
  116.                         maximumSelectionLength: 3
  117.                     });
  118.                 }
  119.                 //Bootstrap-MaxLength
  120.                 $('input#defaultconfig').maxlength({
  121.                     warningClass: "badge bg-info",
  122.                     limitReachedClass: "badge bg-warning"
  123.                 });
  124.                 $('input#thresholdconfig').maxlength({
  125.                     threshold: 20,
  126.                     warningClass: "badge bg-info",
  127.                     limitReachedClass: "badge bg-warning"
  128.                 });
  129.                 $('input#moreoptions').maxlength({
  130.                     alwaysShow: true,
  131.                     warningClass: "badge bg-success",
  132.                     limitReachedClass: "badge bg-danger"
  133.                 });
  134.                 $('input#alloptions').maxlength({
  135.                     alwaysShow: true,
  136.                     warningClass: "badge bg-success",
  137.                     limitReachedClass: "badge bg-danger",
  138.                     separator: ' out of ',
  139.                     preText: 'You typed ',
  140.                     postText: ' chars available.',
  141.                     validate: true
  142.                 });
  143.                 $('textarea#textarea').maxlength({
  144.                     alwaysShow: true,
  145.                     warningClass: "badge bg-info",
  146.                     limitReachedClass: "badge bg-warning"
  147.                 });
  148.                 $('input#placement').maxlength({
  149.                     alwaysShow: true,
  150.                     placement: 'top-left',
  151.                     warningClass: "badge bg-info",
  152.                     limitReachedClass: "badge bg-warning"
  153.                 });
  154.             },
  155.                     //init
  156.                     $.AdvancedForm = new AdvancedForm, $.AdvancedForm.Constructor = AdvancedForm
  157.         }(window.jQuery),
  158.                 //Datepicker
  159.                         function ($) {
  160.                             "use strict";
  161.                             $.AdvancedForm.init();
  162.                         }(window.jQuery);
  163.     </script>
  164. {% endblock %}