note editing implemented
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
{{define "Form"}}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>NoteHub — Add note</title>
|
||||
<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" />
|
||||
@@ -9,13 +10,10 @@
|
||||
</head>
|
||||
<body>
|
||||
<form action="/note" autocomplete="off" method="POST" target="_self">
|
||||
<textarea autofocus name="text"></textarea>
|
||||
<textarea autofocus name="text">{{.Text}}</textarea>
|
||||
<fieldset>
|
||||
<input class="ui-elem"
|
||||
name="plain-password"
|
||||
placeholder="Password for editing"
|
||||
type="text"
|
||||
autocomplete="off">
|
||||
<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">
|
||||
<label style="margin-right: 1em">
|
||||
<input id="tos" name="tos" type="checkbox" onClick="toggleButton()">
|
||||
Accept <a href="/TOS.md">Terms of Service</a>
|
||||
@@ -33,3 +31,4 @@
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
@@ -1,8 +1,8 @@
|
||||
{{define "Stats"}}
|
||||
<h2>Statistics</h2>
|
||||
<table>
|
||||
<tr><td>Published</td><td>{{.Published}}</td></tr>
|
||||
<tr><td>Edited</td><td>{{.Edited}}</td></tr>
|
||||
<tr><td>Published</td><td>{{.Published.Format "Jan 02, 2006 15:04:05 UTC"}}</td></tr>
|
||||
<tr><td>Edited</td><td>{{.Edited.Format "Jan 02, 2006 15:04:05 UTC"}}</td></tr>
|
||||
<tr><td>Views</td><td>{{.Views}}</td></tr>
|
||||
</table>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user