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 <textarea rows="27" name="file_text" id="editor">{{.FileText}}</textarea>
8 {{ end }}
9 <br>
10 <input type="submit" value="Save file" class="button">
11 <a href="/my_site">Back</a>
12 <script type="text/javascript">window.setTimeout("document.getElementById('save-message').style.display='none';", 2000); </script>
13 <div id="save-message" class="alert">{{.Alert}}</div>
14</form>
15{{template "footer" .}}