flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit be8ac622e2c0202413263c458a5c176780b886de
parent 626e7b5eaa056f89433dd6c6ed35bd2105244572
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun, 21 Feb 2021 15:22:22 -0800

Add delete button to edit file

Diffstat:
Mtemplates/edit_file.html | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/templates/edit_file.html b/templates/edit_file.html @@ -5,7 +5,15 @@ <input type="text" value="{{.FileName}}" id="rename" name="rename"> {{ if .IsText }} {{ if .IsGemini }} - <p> +<form action="/delete/{{.FileName}}" method="POST" class="inline"> + <input + class="button delete" + type="submit" + onclick="return confirm('Are you sure you want to delete this file?');" + value="delete" + /> + </form> + <p> <em>For help with the Gemini markup format, see the <a href="https://admin.flounder.online/gemini_text_guide.gmi">Gemtext Guide</a></em> </p> {{ end }}