summaryrefslogtreecommitdiff
path: root/srv/src/http/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'srv/src/http/tpl')
-rw-r--r--srv/src/http/tpl/edit-post.html20
-rw-r--r--srv/src/http/tpl/posts.html6
2 files changed, 18 insertions, 8 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 }}
diff --git a/srv/src/http/tpl/posts.html b/srv/src/http/tpl/posts.html
index 946c713..5f75168 100644
--- a/srv/src/http/tpl/posts.html
+++ b/srv/src/http/tpl/posts.html
@@ -2,12 +2,6 @@
<h1>Posts</h1>
- <p>
- <a href="{{ BlogURL "posts/" }}?edit">
- New Post
- </a>
- </p>
-
{{ if ge .Payload.PrevPage 0 }}
<p>
<a href="?p={{ .Payload.PrevPage}}">&lt; &lt; Previous Page</a>