Add delete button to edit file
alex wennerberg alex@alexwennerberg.com
Sun, 21 Feb 2021 15:22:22 -0800
1 files changed,
9 insertions(+),
1 deletions(-)
jump to
M
templates/edit_file.html
→
templates/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 }}