all repos — flounder @ be8ac622e2c0202413263c458a5c176780b886de

A small site builder for the Gemini protocol

Add delete button to edit file
alex wennerberg alex@alexwennerberg.com
Sun, 21 Feb 2021 15:22:22 -0800
commit

be8ac622e2c0202413263c458a5c176780b886de

parent

626e7b5eaa056f89433dd6c6ed35bd2105244572

1 files changed, 9 insertions(+), 1 deletions(-)

jump to
M templates/edit_file.htmltemplates/edit_file.html

@@ -5,7 +5,15 @@ <label for="rename">Rename:</label>

<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 }}