summaryrefslogtreecommitdiff
path: root/srv/src/http/tpl/edit-post.html
diff options
context:
space:
mode:
Diffstat (limited to 'srv/src/http/tpl/edit-post.html')
-rw-r--r--srv/src/http/tpl/edit-post.html20
1 files changed, 18 insertions, 2 deletions
diff --git a/srv/src/http/tpl/edit-post.html b/srv/src/http/tpl/edit-post.html
index ea1f2c1..ea07680 100644
--- a/srv/src/http/tpl/edit-post.html
+++ b/srv/src/http/tpl/edit-post.html
@@ -90,6 +90,7 @@
</p>
<p>
+
<input
type="submit"
value="Preview"
@@ -99,8 +100,23 @@
{{ if .Payload.IsDraft }}
<input type="submit" value="Save" formaction="{{ BlogURL "drafts/" }}" />
- {{ else if eq .Payload.Post.ID "" }}
- <input type="submit" value="Publish" formaction="{{ BlogURL "posts/" }}" />
+
+
+ <script>
+ function confirmPublish(event) {
+ if (!confirm("Are you sure you're ready to publish?"))
+ event.preventDefault();
+ }
+ </script>
+
+
+ <input
+ type="submit"
+ value="Publish"
+ formaction="{{ BlogURL "posts/" }}"
+ onclick="confirmPublish(event)"
+ />
+
{{ else }}
<input type="submit" value="Update" formaction="{{ BlogURL "posts/" }}" />
{{ end }}