add sortir

This commit is contained in:
marvin
2024-11-21 10:12:44 +01:00
parent 182d1867c5
commit a27921f1a8
2 changed files with 107 additions and 32 deletions

View File

@@ -13,6 +13,39 @@
width: 100%;
height: 500px;
}
.form-group {
display: flex;
flex-direction: column;
}
.form-group label {
margin-bottom: 0.5rem;
font-weight: bold;
}
.modern-button {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.75rem 1rem;
background-color: #1d4ed8;
color: #fff;
border: none;
border-radius: 0.5rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease-in-out;
}
.modern-button:hover {
background-color: #2563eb;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transform: translateY(-1px);
}
.modern-button svg {
margin-right: 0.5rem;
}
</style>
{% endblock %}
</head>
@@ -27,19 +60,54 @@
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="space-y-4">
{{ form_row(form.nom, {'label': 'Nom de la sortie', 'attr': {'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500'}}) }}
{{ form_row(form.dateHeureDebut, {'label': 'Date et heure de la sortie', 'attr': {'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500'}}) }}
{{ form_row(form.dateLimiteInscription, {'label': 'Date limite d\'inscription', 'attr': {'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500'}}) }}
{{ form_row(form.nbInscriptionsMax, {'label': 'Nombre de places', 'attr': {'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500'}}) }}
{{ form_row(form.duree, {'label': 'Durée (en minutes)', 'attr': {'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500'}}) }}
{{ form_row(form.infosSortie, {'label': 'Description et infos', 'attr': {'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500'}}) }}
<div class="form-group">
<label for="sortie_nom">Nom de la sortie</label>
{{ form_widget(form.nom, { 'attr': { 'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500' } }) }}
</div>
<div class="form-group">
<label for="sortie_dateHeureDebut">Date et heure de début</label>
{{ form_widget(form.dateHeureDebut, { 'attr': { 'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500' } }) }}
</div>
<div class="form-group">
<label for="sortie_dateLimiteInscription">Date limite d'inscription</label>
{{ form_widget(form.dateLimiteInscription, { 'attr': { 'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500' } }) }}
</div>
<div class="form-group">
<label for="sortie_nbInscriptionsMax">Nombre de places</label>
{{ form_widget(form.nbInscriptionsMax, { 'attr': { 'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500' } }) }}
</div>
<div class="form-group">
<label for="sortie_duree">Durée (en minutes)</label>
{{ form_widget(form.duree, { 'attr': { 'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500' } }) }}
</div>
<div class="form-group">
<label for="sortie_infosSortie">Description et infos</label>
{{ form_widget(form.infosSortie, { 'attr': { 'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500' } }) }}
</div>
</div>
<div class="space-y-4">
{{ form_row(form.ville, {'label': 'Ville organisatrice', 'attr': {'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500', 'id': 'ville-select'}}) }}
<div class="flex items-center space-x-2">
{{ form_row(form.lieu, {'label': 'Lieu', 'attr': {'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500', 'id': 'lieu-select'}}) }}
<button type="button" id="add-lieu-button" class="p-3 bg-blue-500 text-white rounded-lg hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-300">+</button>
<div class="form-group">
<label for="sortie_ville">Ville organisatrice</label>
{{ form_widget(form.ville, { 'attr': { 'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500', 'id': 'ville-select' } }) }}
</div>
<div class="form-group">
<label for="sortie_lieu">Lieu</label>
<div class="flex items-center space-x-2">
{{ form_widget(form.lieu, { 'attr': { 'class': 'block w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500', 'id': 'lieu-select' } }) }}
<button type="button" id="add-lieu-button" class="modern-button">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-5 h-5">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />
</svg>
Ajouter
</button>
</div>
</div>
<div>
@@ -70,7 +138,7 @@
</a>
</div>
{{ form_end(form) }}
{{ form_end(form, { 'render_rest': false }) }}
</div>
</div>