forked from kiloutyg/docauposte2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
incidents.html.twig
executable file
·154 lines (148 loc) · 4.63 KB
/
incidents.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
153
154
{% if is_granted('ROLE_LINE_ADMIN') %}
<div
class="accordion-item">
<h2
class="accordion-header"
id="headingIncident">
<button
class="accordion-button fs-3 collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#collapseIncident"
aria-expanded="false"
aria-controls="collapseIncident">
<strong>
Formulaire d'ajout d'Incident :
</strong>
</button>
</h2>
<div
id="collapseIncident"
class="accordion-collapse collapse"
aria-labelledby="headingIncident"
data-bs-parent="#accordionAdmin">
<div
class="accordion-body accordion-bg shadow shadow-inset">
<div
class="card border-0 shadow rounded-3 my-5">
<div
class="card-body">
<div
class="row">
<form
action="{{path('app_generic_upload_incident_files')}}" method="POST"
enctype="multipart/form-data">
<div
class="card border-0 shadow rounded-3 my-5 bg-secondary">
<div
class="card-body ">
<div
class="row d-flex align-items-center gy-lg-0 gy-5">
<div
class="col-lg-6 col-md-12 col-sm-12">
<p
class="text-white m-0">
Ajouter un fichier:
</p>
<form
class="form-floating justify-content-center "
id="upload-form"
action="{{path('app_generic_upload_incident_files')}}" method="POST"
enctype="multipart/form-data">
<div
class="fallback">
<input
type="file"
class="form-control"
id="file"
name="file"
accept=".pdf"
required>
<div
class="mb-3">
<label
for="incidents_newFileName"
style="color:white"
class="form-label">
Nom du fichier:
</label>
<input
type="text"
class="form-control"
id="incidents_newFileName"
name="incidents_newFileName"
placeholder="Entrer un nouveau nom de fichier (optionnel)">
</div>
{% include 'services/incidents/cascading_dropdowns_incidents.html.twig' %}
</div>
<div
class="d-grid gap-2 d-md-flex justify-content-md-center mt-2 mb-5">
<button
type="submit"
class="btn btn-primary">
Charger
</button>
</div>
</form>
<hr>
{% if is_granted('ROLE_ADMIN') %}
<div
class="row mt-5 mb-3">
<label
for="incidents_newFileName"
style="color:white"
class="form-label">
Ajout d'un nouveau Type d'Incident:
</label>
<div
class="col-sm">
<input
type="text"
class="form-control"
id="incident_incidentsCategory_name"
name="incident_incidentsCategory_name"
placeholder="Entrer un nouveau type d'incident">
</div>
<div
class="col-sm-auto">
<input
type="button"
id="create_incident_incidentsCategory"
class="btn btn-secondary shadow border border-dark-subtle"
value="Ajouter un nouveau type d'incident">
</div>
</div>
{% for incidentCategory in incidentCategories %}
<div
class="row mb-3">
<li
class="form-control shadow d-flex justify-content-between align-items-center">
{{incidentCategory.name|split('.')|first|upper}}
<a
href="{{ path('app_incident_incidentsCategory_deletion', {incidentCategoryId : incidentCategory.id}) }}" type="button"
class="btn btn-danger shadow border border-dark-subtle delete-incidentCategory">
supprimer
</a>
</li>
</div>
{% endfor %}
{% endif %}
</div>
<div
class="col-lg-6 col-md-12 col-sm-12">
{% include 'services/incidents/incidents_list.html.twig' %}
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{# {% block javascripts %}
{{ encore_entry_script_tags('incident-cascading-dropdowns') }}
{% endblock %} #}