1
+ <?php
2
+
3
+ use webinterface \main ;
4
+
5
+ if (isset ($ _GET ["action " ])) {
6
+ ?>
7
+ <div x-data="{ showModal : true }">
8
+ <!-- Modal Background -->
9
+ <div
10
+ class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full"
11
+ x-show="showModal"
12
+ id="my-modal"
13
+ ></div>
14
+ <div x-show="showModal"
15
+ class="fixed text-gray-600 flex items-center justify-center overflow-auto z-50 bg-black bg-opacity-40 left-0 right-0 top-0 bottom-0"
16
+ x-transition:enter="transition ease duration-300" x-transition:enter-start="opacity-0"
17
+ x-transition:enter-end="opacity-100" x-transition:leave="transition ease duration-300"
18
+ x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0">
19
+ <!-- Modal -->
20
+ <div x-show="showModal"
21
+ class="dark:bg-gray-800 dark:text-white text-center bg-white rounded-xl shadow-2xl p-6 sm:w-8/12 mx-10"
22
+ @click.away="showModal = false" x-transition:enter="transition ease duration-100 transform"
23
+ x-transition:enter-start="opacity-0 scale-90 translate-y-1"
24
+ x-transition:enter-end="opacity-100 scale-100 translate-y-0"
25
+ x-transition:leave="transition ease duration-100 transform"
26
+ x-transition:leave-start="opacity-100 scale-100 translate-y-0"
27
+ x-transition:leave-end="opacity-0 scale-90 translate-y-1">
28
+
29
+ <?php if ($ _GET ["success " ] === "true " ) { ?>
30
+ <div class="hero container max-w-screen-lg mx-auto p-5">
31
+ <svg xmlns="http://www.w3.org/2000/svg"
32
+ id="Capa_1" x="0px" y="0px" viewBox="0 0 507.506 507.506"
33
+ fill="currentColor"
34
+ class="mx-auto h-32 text-green-400"
35
+ height="512">
36
+ <g>
37
+ <path d="M163.865,436.934c-14.406,0.006-28.222-5.72-38.4-15.915L9.369,304.966c-12.492-12.496-12.492-32.752,0-45.248l0,0 c12.496-12.492,32.752-12.492,45.248,0l109.248,109.248L452.889,79.942c12.496-12.492,32.752-12.492,45.248,0l0,0 c12.492,12.496,12.492,32.752,0,45.248L202.265,421.019C192.087,431.214,178.271,436.94,163.865,436.934z"/>
38
+ </g>
39
+ </svg>
40
+ </div>
41
+ <span class="font-bold block text-3xl mb-3"><?= main::getMessage ("successmodal " ) ?> </span>
42
+ <?php } else { ?>
43
+ <div class="hero container max-w-screen-lg mx-auto p-5">
44
+ <svg class="mx-auto h-32 text-red-400" fill="currentColor" xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="512"
45
+ height="512">
46
+ <path d="M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"/>
47
+ <path d="M12,5a1,1,0,0,0-1,1v8a1,1,0,0,0,2,0V6A1,1,0,0,0,12,5Z"/>
48
+ <rect x="11" y="17" width="2" height="2" rx="1"/>
49
+ </svg>
50
+ </div>
51
+ <span class="font-bold block text-3xl mb-3 p-5"><?= main::getMessage ("errormodal " ) ?> </span>
52
+ <?php } ?>
53
+
54
+ <span class="font-bold block text-xl mb-3"><?= main::getMessage ($ _GET ["message " ]) ?> </span>
55
+
56
+ <!-- Buttons -->
57
+ <div class="text-right space-x-5 mt-5">
58
+ <button @click="showModal = !showModal"
59
+ class="px-4 py-2 text-sm bg-white rounded-xl border transition-colors duration-150 ease-linear border-gray-200 text-gray-500 focus:outline-none focus:ring-0 font-bold hover:bg-gray-50 focus:bg-indigo-50 focus:text-indigo"><?= main::getMessage ("closemodal " ) ?> </button>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ <?php
65
+ }
66
+ ?>
0 commit comments