summaryrefslogtreecommitdiff
path: root/management/editor/editor.go
diff options
context:
space:
mode:
Diffstat (limited to 'management/editor/editor.go')
-rw-r--r--management/editor/editor.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/management/editor/editor.go b/management/editor/editor.go
index 01a30f9..85214f0 100644
--- a/management/editor/editor.go
+++ b/management/editor/editor.go
@@ -46,7 +46,7 @@ func Form(post Editable, fields ...Field) ([]byte, error) {
addPostDefaultFieldsToEditorView(post, editor)
submit := `
-<div class="input-field">
+<div class="input-field post-controls">
<button class="right waves-effect waves-light btn green save-post" type="submit">Save</button>
<button class="right waves-effect waves-light btn red delete-post" type="submit">Delete</button>
</div>
@@ -60,6 +60,8 @@ func Form(post Editable, fields ...Field) ([]byte, error) {
e.preventDefault();
var action = form.attr('action');
action = action + '/delete';
+ form.attr('action', action);
+
if (confirm("Ponzu: Please confirm:\n\nAre you sure you want to delete this post?\nThis cannot be undone.")) {
form.submit();
}