{% extends 'admin/baseAdmin.html.twig' %}
{% block page_title %}Modification d'informations Génerale {% endblock %}
{% block breadcump_main %}Experiences{% endblock %}
{% block breadcump_subtitle %}Nouvelle experience{% 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 content %}
<form id="form-general" class="general-info custom-validation" method="POST" action="{{ path('edit_general_info',{'id':experience.id}) }}" enctype="multipart/form-data" >
<div class="container-fluid">
<div class="row">
<div class="col-xl-12 px-0">
<div class="card">
<div class="card-body">
<div class="sm:p-4 p-2 pb-0 pt-1" >
<h5 class="text-lg font-semibold mt-5 ">Information General de l’expérience</h5>
<p class="text-gray-700 text-sm">Enregistrer les informations au dessous pour décrire : {{ experience.title }} .</p>
<div class="divider w-2/6 mt-1 mb-5"></div>
<div class="row mb-4 text-sm ">
<div class="flex items-center">
<p for="" class="form-label font-semibold col-3">Titre</p>
<div class="form-floating mb-3 col-9">
<input value="{{ experience.title }}" required="" class="form-control" id="floatingnameInput" required="" type="text" name="title" placeholder="Entrer le nom de l'expérience">
<label for="floatingnameInput">Entrer le nom de l'expérience</label>
</div>
</div>
</div>
<div class="row mb-4 text-sm">
<div class=" flex ">
<p for="" class="form-label font-semibold col-3 "> Résumé </p>
<div class="relative col-9">
<textarea required="" class="form-control text-sm px-5" name="resume" placeholder="Taper une petite description "
id="floatingTextarea2" style="height: 100px">{{ experience.resume }}</textarea>
<div class="absolute" style="top: 8px;left: 11px;color: #a1a1a1;">
<i class="bx bx-notepad text-2xl"></i>
</div>
</div>
</div>
</div>
<div class="mb-3 row flex items-start text-sm">
<p for="formrow-inputState" class="form-label font-semibold col-3">Type de coaching</p>
<div class="col-9 px-0">
<div class="flex gap-2 justify-between">
<div class="flex items-center ps-4 w-1/3 rounded dark:border-gray-700">
<div class="form-check mb-3">
<input {% if experience.coachingtype == 'private' %} checked{% endif %} class="form-check-input" type="radio" value="private" name="coachingtype"
id="formRadios1" checked>
<label class="form-check-label" for="formRadios1">
Coaching Privé
</label>
</div>
</div>
<div class="flex items-center ps-4 w-1/3 rounded dark:border-gray-700">
<div class="form-check mb-3">
<input {% if experience.coachingtype == 'groupe' %} checked{% endif %} class="form-check-input" type="radio" value="groupe" name="coachingtype"
id="formRadios2" >
<label class="form-check-label" for="formRadios2">
Coaching en groupe
</label>
</div>
</div>
<div class="flex items-center ps-4 w-1/3 rounded dark:border-gray-700">
<div class="form-check mb-3">
<input {% if experience.coachingtype == 'visio' %} checked{% endif %} class="form-check-input" type="radio" value="visio" name="coachingtype"
id="formRadios3">
<label class="form-check-label" for="formRadios3">
Coaching par Visio
</label>
</div>
</div>
</div>
<p class="text-[10px] text-gray-600 my-2">*Vous pouvez sélectionné un seul type de coaching.</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-floating mb-3">
<label class="form-label">Destination</label>
<input hidden="" type="text" value="{{ experience.destination.country.id }}" name="country" >
<select required="" name="destination" class="form-select form-select6LG select2-tags" id="floatingSelectGrid" aria-label="Floating label select example">
{% for destination in experience.destination.country.destinations %}
<option {% if destination.id == experience.destination.id %}selected=""{% endif %} value="{{ destination.id }}" >{{ destination.name }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-floating mb-3">
<label class="form-label">Sous catégorie</label>
<select multiple="" required="" name="subcategories[]" class="form-select form-select6LG select2" id="floatingSelect" aria-label="Floating label select example">
{% for subcategory in experience.subcategories[0].category.subcategories %}
<option {% if subcategory in experience.subcategories %}selected=""{% endif %} value="{{ subcategory.id }}" >{{ subcategory.name }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
<div class="divider mt-20 mb-3"></div>
<div class="flex mt-4 row pt-3">
<div class="col-md-6">
<p class="text-xs text-gray-900 mb-2">En cliquant sur le bouton d'enregistrement, vous mettez à jours les informations
enregistrer par ce formulaire </p>
</div>
<div class="col-md flex justify-end">
<button type="button" style=" color: #ffaa00; border: 1px solid;"
class="font-medium h-10 cursor-pointer 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-pri cursor-pointer mary-700 h-10 py-2.5 rounded-lg text-center text-sm text-white w-40">
Enregistrer</button>
</div>
</div>
</div>
</div>
<!-- end card body -->
</div>
<!-- end card -->
</div>
<!-- end col -->
<!-- end col -->
</div>
</div> <!-- container-fluid -->
</form>
{% 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 %}