summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOllie Phillips <oliver@eantics.co.uk>2019-03-25 16:42:04 +0000
committerSteve Manuel <nilslice@gmail.com>2019-03-25 13:02:06 -0600
commit53c809c7ad73c324bf2a399b4e25c1f6bf64e60e (patch)
tree1a23aa6574ce6e8963d3dbfc60d62d32ac20c2be
parent5ad601fb87da1e345eb4a6b947972bd77d96c720 (diff)
fix action target for uploads deletes
-rw-r--r--system/admin/handlers.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index bc46b5c..d0818ec 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -1560,10 +1560,11 @@ func adminPostListItem(e editor.Editable, typeName, status string) []byte {
default:
status = "__" + status
}
-
+ action := "/admin/edit/delete"
link := `<a href="/admin/edit?type=` + typeName + `&status=` + strings.TrimPrefix(status, "__") + `&id=` + cid + `">` + i.String() + `</a>`
if strings.HasPrefix(typeName, "__") {
link = `<a href="/admin/edit/upload?id=` + cid + `">` + i.String() + `</a>`
+ action = "/admin/edit/upload/delete"
}
post := `
@@ -1572,7 +1573,7 @@ func adminPostListItem(e editor.Editable, typeName, status string) []byte {
<span class="post-detail">Updated: ` + updatedTime + `</span>
<span class="publish-date right">` + publishTime + `</span>
- <form enctype="multipart/form-data" class="quick-delete-post __ponzu right" action="/admin/edit/delete" method="post">
+ <form enctype="multipart/form-data" class="quick-delete-post __ponzu right" action="` + action + `" method="post">
<span>Delete</span>
<input type="hidden" name="id" value="` + cid + `" />
<input type="hidden" name="type" value="` + typeName + status + `" />