aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/Views/partials/flash.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/Views/partials/flash.php')
-rw-r--r--src/app/Views/partials/flash.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/app/Views/partials/flash.php b/src/app/Views/partials/flash.php
new file mode 100644
index 0000000..e9a87e7
--- /dev/null
+++ b/src/app/Views/partials/flash.php
@@ -0,0 +1,8 @@
+<?php
+// Displays a one-time flash message (success or error) if one is set.
+$flash = \App\Flash::get();
+if ($flash): ?>
+<div class="flash flash-<?= htmlspecialchars($flash['type']) ?>">
+ <?= htmlspecialchars($flash['message']) ?>
+</div>
+<?php endif; ?>