diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-13 12:14:53 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-13 12:14:53 -0700 |
commit | 6148ddb2473f00fb74b135e00127bbadd2062861 (patch) | |
tree | 8159335c8cc7a1063b5450cd703eeb5e1d0fc48c /management/editor/editor.go | |
parent | 0163196a4d7908f95c92faa7c7145753f0b5bdb1 (diff) |
fixing style and layout for delete button
Diffstat (limited to 'management/editor/editor.go')
-rw-r--r-- | management/editor/editor.go | 4 |
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(); } |