diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-05-20 11:06:21 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-05-20 11:06:21 -0600 |
commit | f69ed83de73bbfc4b7af0931de6ced8cf12dea61 (patch) | |
tree | 42fbeb421786acc01cd5c9720d5e789dfda8cfca /srv/src/api/tpl/edit-post.html | |
parent | 2c4b617ddeb71a5856075c94dcc7dfff3cfcbcaa (diff) |
Add preview button to edit post page
Diffstat (limited to 'srv/src/api/tpl/edit-post.html')
-rw-r--r-- | srv/src/api/tpl/edit-post.html | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/srv/src/api/tpl/edit-post.html b/srv/src/api/tpl/edit-post.html index 708858d..9ccfa2a 100644 --- a/srv/src/api/tpl/edit-post.html +++ b/srv/src/api/tpl/edit-post.html @@ -1,11 +1,5 @@ {{ define "body" }} - <p> - <a href="{{ BlogURL "posts/" }}"> - <button>Back to Posts</button> - </a> - </p> - <form method="POST" action="{{ BlogURL "posts/" }}"> {{ .CSRFFormInput }} @@ -87,7 +81,18 @@ </div> </div> - <input type="submit" value="Save" /> + <input + type="submit" + value="Preview" + formaction="{{ BlogURL "posts/" }}{{ .Payload.ID }}?method=preview" + formtarget="_blank" + /> + + <input type="submit" value="Save" formaction="{{ BlogURL "posts/" }}" /> + + <a href="{{ BlogURL "posts/" }}"> + <button type="button">Cancel</button> + </a> </form> |