diff options
author | Freya Murphy <freya@freyacat.org> | 2024-03-30 12:14:42 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-03-30 12:14:42 -0400 |
commit | 1f04b83be337cc91a3fabcf4e574e2306f3d2eaa (patch) | |
tree | 74d7d65a7047e60d1877384e3c7b0d70c7b0e49a /web/views/template/toast.php | |
parent | start database (user and post), and initial barebones home page (diff) | |
download | xssbook2-1f04b83be337cc91a3fabcf4e574e2306f3d2eaa.tar.gz xssbook2-1f04b83be337cc91a3fabcf4e574e2306f3d2eaa.tar.bz2 xssbook2-1f04b83be337cc91a3fabcf4e574e2306f3d2eaa.zip |
refactor
Diffstat (limited to '')
-rw-r--r-- | web/views/template/toast.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/web/views/template/toast.php b/web/views/template/toast.php new file mode 100644 index 0000000..1f74602 --- /dev/null +++ b/web/views/template/toast.php @@ -0,0 +1,19 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> +<?php /* vi: syntax=php */ ?> +<?php + $params = array(); + + if ($detail) { + array_push($params, lang('api_column_' . $detail)); + } + + if ($hint) { + array_push($params, $hint); + } + + $msg = lang($msg, sub: $params); +?> +<div class="toast error"> + <?=ucfirst($msg)?> + <?=ilang('action_close', class: 'action-close-toast')?> +</div> |