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
{% set modal_id = modal_id is defined ? modal_id : 'modal_id' %}
{% set modal_title = modal_title is defined ? modal_title : 'Modal title' %}
{% set modal_content = modal_content is defined ? modal_content : 'Modal content' %}
{% set btn_primary = btn_primary is defined ? btn_primary : '' %}
{% set btn_secondary = btn_secondary is defined ? btn_secondary : 'Fermer' %}
{#
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#{{ modal_id }}">
VOIR MODAL
</button>
#}
<div class="modal fade" tabindex="-1" role="dialog" id="{{ modal_id }}" aria-labelledby="{{ modal_id }}" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ modal_title }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
{{ modal_content }}
</div>
{% if btn_primary is not empty and btn_secondary is not empty %}
<div class="modal-footer">
{% if btn_primary is not empty %}
<button type="button" class="btn btn-primary">{{ btn_primary }}</button>
{% endif %}
{% if btn_secondary is not empty %}
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ btn_secondary }}</button>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>