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.
36 lines
1.5 KiB
36 lines
1.5 KiB
{{define "Form"}} |
|
<!DOCTYPE html> |
|
<html> |
|
<head> |
|
<title>NoteHub — {{if .ID}}Edit{{else}}Add{{end}} note</title> |
|
<meta charset="UTF-8" /> |
|
<meta content="width=device-width, initial-scale=1.0" name="viewport" /> |
|
<link href="/style.css" rel="stylesheet" type="text/css" /> |
|
<script src='/new.js'></script> |
|
<script src='/note.js'></script> |
|
</head> |
|
<body> |
|
<form autocomplete="off" onsubmit="return false"> |
|
<textarea autofocus id="text">{{.Text}}</textarea> |
|
<fieldset> |
|
<input id="id" value="{{.ID}}" type="hidden" /> |
|
<input class="ui-elem" id="password" placeholder="Password for editing" type="text" autocomplete="off" /> |
|
{{if not .ID}} |
|
<input class="ui-elem" id="name" placeholder="Note name" type="text" autocomplete="off" /> |
|
{{else}} |
|
<input class="ui-elem" id="name" placeholder="Note name" type="text" autocomplete="off" hidden value=""/> |
|
{{end}} |
|
<button class="button ui-elem" id="publish-button" type="button" onclick="submitForm()"> |
|
{{if .ID}}Update{{else}}Publish{{end}} Note |
|
</button> |
|
<span id="feedback"></span> |
|
</fieldset> |
|
</form> |
|
<footer> |
|
<a href="/">⌂ notehub</a> · |
|
<a href="https://github.com/chmllr/NoteHub">source code</a> · |
|
</footer> |
|
</body> |
|
</html> |
|
|
|
{{end}} |