forked from SymfonyCasts/symfony-ux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodal-add-modal-partial.diff
46 lines (45 loc) · 1.45 KB
/
modal-add-modal-partial.diff
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
diff --git a/templates/_modal.html.twig b/templates/_modal.html.twig
new file mode 100644
index 0000000..fa7b04b
--- /dev/null
+++ b/templates/_modal.html.twig
@@ -0,0 +1,27 @@
+<div
+ class="modal fade"
+ tabindex="-1"
+ aria-hidden="true"
+>
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h5 class="modal-title">Modal title</h5>
+ <button type="button" class="btn-close"
+ data-bs-dismiss="modal"
+ aria-label="Close"></button>
+ </div>
+ <div class="modal-body">
+ ...
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-secondary"
+ data-bs-dismiss="modal">Close
+ </button>
+ <button type="button" class="btn btn-primary">
+ Understood
+ </button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/templates/product_admin/index.html.twig b/templates/product_admin/index.html.twig
index 7449ffb..2315288 100644
--- a/templates/product_admin/index.html.twig
+++ b/templates/product_admin/index.html.twig
@@ -12,6 +12,8 @@
class="btn btn-primary btn-sm"
data-action="modal-form#openModal"
>Add+</button>
+
+ {{ include('_modal.html.twig') }}
</div>
</div>