templates/edit_file.html (view raw)
1{{template "header" .}}
2<h2>Editing <a href="//{{.AuthUser.Username}}.{{.Host}}/{{.FileName}}">{{.FileName}}</a></h2>
3<form id="edit-form" action="/edit/{{.FileName}}" method="POST">
4 <label for="rename">Rename:</label>
5 <input type="text" value="{{.FileName}}" id="rename" name="rename">
6 {{ if .IsText }}
7 {{ if .IsGemini }}
8<form action="/delete/{{.FileName}}" method="POST" class="inline">
9 <input
10 class="button delete"
11 type="submit"
12 onclick="return confirm('Are you sure you want to delete this file?');"
13 value="delete"
14 />
15 </form>
16 <p>
17 <em>For help with the Gemini markup format, see the <a href="https://admin.flounder.online/gemini_text_guide.gmi">Gemtext Guide</a></em>
18 </p>
19 {{ end }}
20 {{ if .IsGemlog }}
21 <p>
22 <em>For information about writing a Gemlog, see <a href="https://admin.flounder.online/gemfeed.gmi">Gemini Logs and Feeds</a></em>
23 </p>
24 {{ end }}
25 <textarea rows="27" name="file_text" id="editor">{{.FileText}}</textarea>
26 {{ end }}
27 <br>
28 <input type="submit" value="Save file" class="button">
29 <a href="/my_site">Back</a>
30 <script type="text/javascript">window.setTimeout("document.getElementById('save-message').style.display='none';", 2000); </script>
31 <div id="save-message" class="alert">{{.Alert}}</div>
32 <div class="warning">
33 <p>
34 {{ range .Warnings }}
35 </p>
36 {{ . }}
37 {{ end }}
38 </div>
39</form>
40{{template "footer" .}}