{% extends 'admin/baseAdmin.html.twig' %}
{% block page_title %}Modifier Destination{% endblock %}
{% block breadcump_main %}Pays{% endblock %}
{% block breadcump_subtitle %}Création de destination{% endblock %}
{% block menu_left_sidebar %}
{% include 'include/menu/menuAdmin.html.twig' with { menu_active_event : '2'} %}
{% endblock %}
{% block stylesheets %}
<link href="{{ asset('admin/libs/select2/css/select2.min.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('admin/css/tailwind.min.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('admin/css/tailwind2.css') }}" rel="stylesheet" type="text/css">
{% endblock %}
{% block title %}{{"Modifier Destination"|trans }}{% endblock %}
{% block content %}
<div class="container-fluid">
<div class="row">
<div class="col-xl-12 px-0">
<div class="card">
<div class="card-body">
<form class="p-1 " method="post" action="{{ path('edit_destination',{'id':destination.id})}}" enctype="multipart/form-data" >
<form class="p-4 pt-1" id="myform1">
<h5 class="text-lg font-semibold mt-5 ">Détails de destination </h5>
<p class="pb-4 text-gray-700 text-sm">Ici, vous pouvez modifier et consulter la destination . </p>
<div class="row mb-4">
<div class="mb-3 col-md-6">
<p for="" class="form-label font-semibold ">Pays</p>
<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">
{% for country in countries %}
<option {% if country.id == destination.country.id %}selected{% endif %} value="{{ country.id }}">{{ country.name }}</option>
{% endfor %}
</select>
</div>
<div class="col-md-6 mb-3">
<p for="" class="form-label font-semibold ">Région</p>
<div class="form-floating pe-0 " id="city">
<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">
<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>
</div>
</div>
<div class=" col-md-6 mb-3 text-base">
<p for="" class="form-label font-semibold ">Type de destination </p>
<select placeholder="choisir les sous catégories" name="typedestination" class="text-sm select" data-allow-clear="1">
<option value="Ville" {% if 'Ville' in destination.typedestination %}selected{% endif %}>Ville</option>
<option value="Destination" {% if 'Destination' in destination.typedestination %}selected{% endif %}>Destination</option>
<option value="Desert" {% if 'Desert' in destination.typedestination %}selected{% endif %}>Desert</option>
<option value="Montagne" {% if 'Montagne' in destination.typedestination %}selected{% endif %}>Montagne</option>
<option value="Réserve naturelle" {% if 'Réserve naturelle' in destination.typedestination %}selected{% endif %}>Réserve naturelle</option>
</select>
</div>
<div class=" col-md-6 col-sm-12 ">
<p for="" class="form-label font-semibold ">Ordre de destination </p>
<div class="form-floating ">
<input value="{{ destination.ordre }}" type="number" name="ordre"
class="form-control sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 ps-5"
id="nom" placeholder="">
<label class="mb-2 ms-2 ps-5 text-sm font-medium text-gray-900 " for="nom">ordre destination </label>
<div class="absolute" style="top: 11px;left: 17px;color: #a1a1a1;">
<i class="bx bx-sort-a-z" style="font-size: 36px;"></i>
</div>
</div>
</div>
</div>
<div class="divider mt-16"></div>
<div class="flex mt-4 row">
<div class="col-md-6">
<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>
</div>
<div class="col-md flex justify-end">
<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">
Annuler</button>
<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>
</div>
</div>
</form>
</div>
<!-- end card body -->
</div>
<!-- end card -->
</div>
<!-- end col -->
<!-- end col -->
</div>
</div> <!-- container-fluid -->
<!-- End main -->
{% endblock %}
{% block javascripts %}
<!-- apexcharts -->
<script src="{{ asset('admin/libs/parsleyjs/parsley.min.js')}}"></script>
<script src="{{ asset('admin/libs/select2/js/select2.min.js')}}"></script>
<script src="{{ asset('admin/libs/bootstrap-maxlength/bootstrap-maxlength.min.js')}}"></script>
<script src="{{ asset('admin/js/pages/form-validation.init.js')}}"></script>
<script src="{{ asset('admin/js/app.js')}}"></script>
<script>
/*
Template Name: Skote - Admin & Dashboard Template
Author: Themesbrand
Website: https://themesbrand.com/
Contact: themesbrand@gmail.com
File: Form Advanced Js File
*/
!function ($) {
"use strict";
var AdvancedForm = function () { };
AdvancedForm.prototype.init = function () {
// Select2
if ($('.select2').length > 0) {
$(".select2").select2();
}
if ($('.select2-tags').length > 0) {
$(".select2-tags").select2({
tags: true
});
}
if ($('.select2-limiting-3').length > 0) {
$(".select2-limiting-3").select2({
maximumSelectionLength: 3
});
}
//Bootstrap-MaxLength
$('input#defaultconfig').maxlength({
warningClass: "badge bg-info",
limitReachedClass: "badge bg-warning"
});
$('input#thresholdconfig').maxlength({
threshold: 20,
warningClass: "badge bg-info",
limitReachedClass: "badge bg-warning"
});
$('input#moreoptions').maxlength({
alwaysShow: true,
warningClass: "badge bg-success",
limitReachedClass: "badge bg-danger"
});
$('input#alloptions').maxlength({
alwaysShow: true,
warningClass: "badge bg-success",
limitReachedClass: "badge bg-danger",
separator: ' out of ',
preText: 'You typed ',
postText: ' chars available.',
validate: true
});
$('textarea#textarea').maxlength({
alwaysShow: true,
warningClass: "badge bg-info",
limitReachedClass: "badge bg-warning"
});
$('input#placement').maxlength({
alwaysShow: true,
placement: 'top-left',
warningClass: "badge bg-info",
limitReachedClass: "badge bg-warning"
});
},
//init
$.AdvancedForm = new AdvancedForm, $.AdvancedForm.Constructor = AdvancedForm
}(window.jQuery),
//Datepicker
function ($) {
"use strict";
$.AdvancedForm.init();
}(window.jQuery);
</script>
{% endblock %}