summaryrefslogtreecommitdiff
path: root/fai_gestion/src/Template/Element
diff options
context:
space:
mode:
Diffstat (limited to 'fai_gestion/src/Template/Element')
-rw-r--r--fai_gestion/src/Template/Element/Flash/default.ctp10
-rw-r--r--fai_gestion/src/Template/Element/Flash/error.ctp6
-rw-r--r--fai_gestion/src/Template/Element/Flash/success.ctp6
3 files changed, 22 insertions, 0 deletions
diff --git a/fai_gestion/src/Template/Element/Flash/default.ctp b/fai_gestion/src/Template/Element/Flash/default.ctp
new file mode 100644
index 0000000..736b27d
--- /dev/null
+++ b/fai_gestion/src/Template/Element/Flash/default.ctp
@@ -0,0 +1,10 @@
+<?php
+$class = 'message';
+if (!empty($params['class'])) {
+ $class .= ' ' . $params['class'];
+}
+if (!isset($params['escape']) || $params['escape'] !== false) {
+ $message = h($message);
+}
+?>
+<div class="<?= h($class) ?>" onclick="this.classList.add('hidden');"><?= $message ?></div>
diff --git a/fai_gestion/src/Template/Element/Flash/error.ctp b/fai_gestion/src/Template/Element/Flash/error.ctp
new file mode 100644
index 0000000..e7c4af1
--- /dev/null
+++ b/fai_gestion/src/Template/Element/Flash/error.ctp
@@ -0,0 +1,6 @@
+<?php
+if (!isset($params['escape']) || $params['escape'] !== false) {
+ $message = h($message);
+}
+?>
+<div class="message error" onclick="this.classList.add('hidden');"><?= $message ?></div>
diff --git a/fai_gestion/src/Template/Element/Flash/success.ctp b/fai_gestion/src/Template/Element/Flash/success.ctp
new file mode 100644
index 0000000..becd5a1
--- /dev/null
+++ b/fai_gestion/src/Template/Element/Flash/success.ctp
@@ -0,0 +1,6 @@
+<?php
+if (!isset($params['escape']) || $params['escape'] !== false) {
+ $message = h($message);
+}
+?>
+<div class="message success" onclick="this.classList.add('hidden')"><?= $message ?></div>