You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.5 KiB
35 lines
1.5 KiB
|
8 years ago
|
{{define "Form"}}
|
||
|
8 years ago
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
8 years ago
|
<title>NoteHub — {{if .ID}}Edit{{else}}Add{{end}} note</title>
|
||
|
8 years ago
|
<meta charset="UTF-8">
|
||
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||
|
|
<link href="/style.css" rel="stylesheet" type="text/css" />
|
||
|
|
<base target="_blank">
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<form action="/note" autocomplete="off" method="POST" target="_self">
|
||
|
8 years ago
|
<textarea autofocus name="text">{{.Text}}</textarea>
|
||
|
8 years ago
|
<fieldset>
|
||
|
8 years ago
|
<input id="id" name="id" value="{{.ID}}" type="hidden" />
|
||
|
|
<input class="ui-elem" id="password" name="password" placeholder="Password for editing" type="text" autocomplete="off">
|
||
|
8 years ago
|
<label style="margin-right: 1em">
|
||
|
|
<input id="tos" name="tos" type="checkbox" onClick="toggleButton()">
|
||
|
|
Accept <a href="/TOS.md">Terms of Service</a>
|
||
|
|
</label>
|
||
|
|
<input class="button ui-elem" disabled id="publish-button" name="button" type="submit" value="Publish">
|
||
|
|
</fieldset>
|
||
|
|
</form>
|
||
|
|
<footer>
|
||
|
|
<a href="https://github.com/chmllr/NoteHub">source code</a> ·
|
||
|
|
<a href="/TOS.md">terms of service</a>
|
||
|
|
</footer>
|
||
|
|
<script>
|
||
|
|
function $(id) { return document.getElementById(id) }
|
||
|
|
function toggleButton() { $('publish-button').disabled = !$('tos').checked }
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
8 years ago
|
{{end}}
|