summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--management/editor/editor.go4
-rw-r--r--system/admin/static/dashboard/css/admin.css4
2 files changed, 7 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();
}
diff --git a/system/admin/static/dashboard/css/admin.css b/system/admin/static/dashboard/css/admin.css
index 888dbf1..7da4154 100644
--- a/system/admin/static/dashboard/css/admin.css
+++ b/system/admin/static/dashboard/css/admin.css
@@ -154,6 +154,10 @@ footer p {
color: #9e9e9e;
}
+.post-controls .save-post {
+ margin-left: 10px;
+}
+
/* OVERRIDE Bootstrap + Materialize conflicts */
.iso-texteditor.input-field label {