Skip to content

Commit 0c58365

Browse files
committed
allow purging post through delete page
1 parent 810ef53 commit 0c58365

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

views/community/delete_post.moon

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,20 @@ class CommunityPost extends require "widgets.page"
55
column_content: =>
66
form method: "post", class: "form", ->
77
@csrf_input!
8+
89
input type: "hidden", name: "action", value: "delete"
10+
if @post.deleted
11+
input type: "hidden", name: "hard", value: "true"
12+
913
p ->
1014
text "Are you sure you want to delete this "
1115
strong @noun
1216
text "? "
13-
button class:"button", "Delete"
17+
if @post.deleted
18+
button class:"button", "Purge"
19+
else
20+
button class:"button", "Delete"
1421

22+
br!
23+
br!
1524
widget PostList posts: { @post }

0 commit comments

Comments
 (0)