M handlers.go => handlers.go +1 -1
@@ 186,7 186,7 @@ func (h Handlers) handleNewPaste(w http.ResponseWriter, req *http.Request) {
if nil != validationErrors &&
0 < len(validationErrors) {
h.PasteSubmitError(400, validationErrors, &Content{
- Error: "Form submit error",
+ Error: "You must provide a document and a valid time limit",
OriginalCommand: command,
})(w, req)
return
M templates/homepage.html => templates/homepage.html +4 -1
@@ 11,6 11,9 @@
<hr>
<main>
+ {{if .Error}}
+ <p class="error">{{.Error}}</p>
+ {{end}}
<form method="post">
<fieldset>
<label for="paste">Your document</label>
@@ 19,7 22,7 @@
name="paste"
class="fullsize"
rows="20"
- placeholder="Paste your document here"></textarea>
+ placeholder="Paste your document here">{{.Value}}</textarea>
</fieldset>
<footer class="spaced">