summaryrefslogtreecommitdiff
path: root/src/application/templates/modern/delete_post.twig
diff options
context:
space:
mode:
authorJonas Kohl2024-10-19 12:38:45 +0200
committerJonas Kohl2024-10-19 12:38:45 +0200
commitf490626b8a2ff360c4a914615484ea6e5bf8cdee (patch)
tree96cbbcea2a63283b44186a32fcf6528f692f6523 /src/application/templates/modern/delete_post.twig
parent3c8f4f695f1b9ec7a188b85e0ce38bc69c697008 (diff)
Add modern theme
Diffstat (limited to 'src/application/templates/modern/delete_post.twig')
-rw-r--r--src/application/templates/modern/delete_post.twig40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/application/templates/modern/delete_post.twig b/src/application/templates/modern/delete_post.twig
new file mode 100644
index 0000000..e37841a
--- /dev/null
+++ b/src/application/templates/modern/delete_post.twig
@@ -0,0 +1,40 @@
+{% set title = __("Delete post") %}
+
+{% extends "base.twig" %}
+
+{% block content %}
+
+<div class="page-header">
+ <h1>{{ __("Do you want to delete this post?") }}</h1>
+</div>
+
+<div class="alert alert-danger">
+ <svg viewBox="0 0 24 24" class="icon"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/></svg>
+ <span>{{ __("Are you sure you want to delete the following post:") }}</span>
+</div>
+{% include "components/post.twig" with {
+ post: ctx.post,
+ postAuthor: ctx.postAuthor,
+ attachments: ctx.attachments,
+ hide_actions: true,
+} %}
+<div class="page-actions">
+ <form action=".#post-{{ ctx.post.id }}" method="get" class="seamless-inline">
+ <input type="hidden" name="_action" value="viewtopic">
+ <input type="hidden" name="topic" value="{{ ctx.post.topicId }}">
+ <button>
+ <svg viewBox="0 0 24 24" class="icon"><path d="m12 19-7-7 7-7"/><path d="M19 12H5"/></svg>
+ <span>{{ __("Keep post") }}</span>
+ </button>
+ </form>
+ <form action="?_action=deletepost" method="post" class="seamless-inline">
+ <input type="hidden" name="post" value="{{ ctx.post.id }}">
+ <input type="hidden" name="confirm" value="{{ ("confirm" ~ ctx.post.id)|hash("sha256", true)|base64_encode }}">
+ <button class="btn-danger">
+ <svg viewBox="0 0 24 24" class="icon"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>
+ <span>{{ __("Delete post") }}</span>
+ </button>
+ </form>
+</div>
+
+{% endblock %}