forked from parti-renaissance/espace-adherent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit.html.twig
152 lines (127 loc) · 8.12 KB
/
edit.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{% extends 'base.html.twig' %}
{% block page_title event.name %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" type="text/css" href="{{ asset('css/cropper.min.css') }}" />
{% endblock %}
{% block content %}
{% set event_url = url('app_committee_event_show', {slug: event.slug}) %}
<main class="committee__event__create">
<section class="committee__event l__wrapper">
{{ include('events/_header.html.twig') }}
<a href="{{ path('app_committee_event_show', {slug: event.slug}) }}" class="back-to-list icon--with-text b__nudge--top-15">
{{ include('components/caret--left.html.twig') }}
Retour à l'événement
</a>
</section>
<section class="l__wrapper--slim space--30-0 text--body">
<div class="b__nudge--bottom-huge">
<h2 class="b__nudge--bottom-small text--medium">
Modifier l'événement
</h2>
{{ form_start(form, { attr: { class: 'b__nudge--top-40 em-form'} }) }}
{{ form_errors(form) }}
<div class="form__row" id="committee-event-name-field">
{{ form_errors(form.name) }}
{{ form_label(form.name, "Nom de l'événement") }}
{{ form_widget(form.name, { attr: { class: 'form--full committee_event__form__name', placeholder: "Entrez le nom de l'événement (Max 100 caractères)" } }) }}
</div>
<div class="form__row" id="committee-event-description-field">
{{ form_errors(form.category) }}
{{ form_label(form.category, 'Type') }}
{{ form_widget(form.category, { attr: { class: 'form--full committee_event__form__category', placeholder: "Choisissez le type de l'événement" } }) }}
</div>
<div class="form__row" id="committee-event-beginat-field">
{{ form_errors(form.beginAt) }}
{{ form_label(form.beginAt, 'Début') }}
{{ form_widget(form.beginAt, { attr: { class: 'event__begin_at', autocomplete: 'off' } }) }}
</div>
<div class="form__row" id="committee-event-finishat-field">
{{ form_errors(form.finishAt) }}
{{ form_label(form.finishAt, 'Fin') }}
{{ form_widget(form.finishAt, { attr: { class: 'event__finish_at', autocomplete: 'off' } }) }}
</div>
<div id="committee-event-address">
{{ form_errors(form.address) }}
<div class="form__row committee_event__form--trunc" id="committee-event-address-address-field">
{{ form_errors(form.address.address) }}
{{ form_label(form.address.address, 'Adresse') }}
{{ form_widget(form.address.address, { attr: { class: 'form--full', placeholder: "Entrez l'adresse de l'événement" } }) }}
</div>
<div class="event__address l__row l__row--h-stretch">
<div class="form__row committee_event__form__zip_code" id="committee-event-address-zipcode-field">
{{ form_label(form.address.postalCode, 'Code postal') }}
{{ form_widget(form.address.postalCode, { attr: { class: 'form--full', placeholder: 'Entrez le code postal' } }) }}
</div>
<div class="form__row committee_event__form__city" id="committee-event-address-city-field">
{{ form_errors(form.address.city) }}
{{ form_label(form.address.cityName, 'Ville') }}
{{ form_widget(form.address.city, { attr: { class: 'committee_event__form__city'}}) }}
{{ form_widget(form.address.cityName, { attr: { class: 'form--full committee_event__form__city_name', placeholder: 'Ville' } }) }}
</div>
<div class="form__row committee_event__form__country" id="committee-event-address-country-field">
{{ form_errors(form.address.country) }}
{{ form_label(form.address.country, 'Pays') }}
{{ form_widget(form.address.country, { attr: { class: 'form--full', placeholder: 'Choisissez le pays' } }) }}
</div>
<div class="form__row committee_event__form__timezone" id="committee-event-timezone-field">
{{ form_errors(form.timeZone) }}
{{ form_label(form.timeZone, 'Fuseau horaire') }}
{{ form_widget(form.timeZone, { attr: { class: 'form--full', placeholder: 'Choisissez le fuseau horaire' } }) }}
</div>
</div>
</div>
<div class="form__row" id="committee-event-description-field">
{{ form_errors(form.description) }}
{{ form_label(form.description, 'À propos') }}
{{ form_widget(form.description, { attr: {
class: 'event__description form--full form__field--textarea-300',
placeholder: 'Entrez un paragraphe afin de décrire cet événement.'
} }) }}
</div>
{{ form_row(form.image) }}
<div class="form__row" id="committee-event-visiourl-field">
{{ form_errors(form.visioUrl) }}
{{ form_label(form.visioUrl, 'Lien de la visio ou du live') }}
{{ form_widget(form.visioUrl, { attr: { class: 'form--full committee_event__form__visio_url', placeholder: "Entrez le lien de la visio de l'évènement (facultatif)" } }) }}
</div>
<div class="form__row" id="committee-event-capacity-field">
{{ form_errors(form.capacity) }}
{{ form_label(form.capacity, 'Capacité') }}
{{ form_widget(form.capacity, { attr: { class: 'committee_event__form__capacity' } }) }}
</div>
{% if form.private is defined %}
<div class="em-form__group">
<div class="form__checkbox" id="event-private-field">
{{ form_errors(form.private) }}
{{ form_widget(form.private) }}
{{ form_label(form.private, 'Cet événement est réservé aux adhérents') }}
</div>
<div class="em-form__checkbox-legend">
Un événement réservé aux adhérents ne sera affiché qu’aux adhérents connectés sur le site et l'application mobile.
</div>
</div>
{% endif %}
<div class="form__row b__nudge--top">
<button type="submit" class="btn btn--blue">Enregistrer</button>
<a href="{{ path('app_committee_event_show', {slug: event.slug}) }}"
class="btn">
Annuler
</a>
</div>
{{ form_end(form) }}
</div>
</section>
</main>
{% endblock %}
{% block final_javascripts %}
{{ parent() }}
{% import 'javascript.js.twig' as js %}
<script type="text/javascript">
Kernel.onLoad(function() {
{{ js.address(form.address) }}
{{ js.init_event_cropperjs(form.image) }}
App.startDateFieldsSynchronisation('{{ form.beginAt.vars.full_name|e('js') }}', '{{ form.finishAt.vars.full_name|e('js') }}')
});
</script>
{% endblock %}