Files
notehub/assets/templates/form.html
T

42 lines
1.7 KiB
HTML
Raw Normal View History

2017-09-18 22:12:09 +02:00
{{define "Form"}}
2017-09-11 23:40:03 +02:00
<!DOCTYPE html>
<html>
<head>
2017-09-18 22:12:09 +02:00
<title>NoteHub &mdash; {{if .ID}}Edit{{else}}Add{{end}} note</title>
2017-09-21 22:59:23 +02:00
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
2017-09-11 23:40:03 +02:00
<link href="/style.css" rel="stylesheet" type="text/css" />
2017-09-21 22:59:23 +02:00
<script src='https://www.google.com/recaptcha/api.js'></script>
2017-09-24 00:43:58 +02:00
<script src='/new.js'></script>
2017-09-23 23:29:06 +02:00
<script src='/note.js'></script>
2017-09-11 23:40:03 +02:00
</head>
<body>
2017-09-23 23:43:56 +02:00
<form autocomplete="off" onsubmit="return false">
2017-09-23 23:29:06 +02:00
<textarea autofocus id="text">{{.Text}}</textarea>
2017-09-11 23:40:03 +02:00
<fieldset>
2017-09-23 23:29:06 +02:00
<input id="id" value="{{.ID}}" type="hidden" />
<input class="ui-elem" id="password" placeholder="Password for editing" type="text" autocomplete="off" />
2017-09-11 23:40:03 +02:00
<label style="margin-right: 1em">
2017-09-23 23:29:06 +02:00
<input id="tos" type="checkbox" onClick="toggleButton()" />
2017-09-11 23:40:03 +02:00
Accept <a href="/TOS.md">Terms of Service</a>
</label>
2017-09-23 23:43:56 +02:00
<button class="button ui-elem" disabled id="publish-button" type="button" onclick="grecaptcha.execute()">
2017-09-23 23:29:06 +02:00
{{if .ID}}Update{{else}}Publish{{end}} Note
</button>
<span id="feedback"></span>
2017-09-11 23:40:03 +02:00
</fieldset>
</form>
<footer>
2017-09-18 23:59:01 +02:00
<a href="/">&#8962; notehub</a> &middot;
2017-09-11 23:40:03 +02:00
<a href="https://github.com/chmllr/NoteHub">source code</a> &middot;
<a href="/TOS.md">terms of service</a>
</footer>
2017-09-23 23:43:56 +02:00
<div class="g-recaptcha"
data-sitekey="6LfamjEUAAAAAANI45H3fpWG_xaSAcpYhENN4EnO"
data-callback="submitForm"
data-size="invisible">
</div>
2017-09-11 23:40:03 +02:00
</body>
</html>
2017-09-18 22:12:09 +02:00
{{end}}