A web blog and personal homepage engine written in Go.
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.
 
 

80 lines
2.3 KiB

{{ $NC := .V.Comment }}
<form name="comments" action="/comments" method="POST">
{{ CSRF }}
<input type="hidden" name="id" value="{{ $NC.ID }}">
<input type="hidden" name="subject" value="{{ .V.Subject }}">
<input type="hidden" name="thread" value="{{ .V.ThreadID }}">
<input type="hidden" name="origin" value="{{ .V.OriginURL }}">
<div class="form-group row">
<label for="name" class="col-12 col-lg-2 col-form-label">Your name:</label>
<div class="col-12 col-lg-10">
<input type="text"
id="name"
name="name"
class="form-control"
value="{{ $NC.Name }}"
placeholder="Anonymous">
</div>
</div>
<div class="form-group row">
<label for="email" class="col-12 col-lg-2 col-form-label">Your email:</label>
<div class="col-12 col-lg-10">
<input type="email"
id="email"
name="email"
class="form-control"
aria-describedby="emailHelp"
value="{{ $NC.Email }}"
placeholder="(optional)">
<small id="emailHelp" class="form-text text-muted">
Optional; used for your <a href="https://en.gravatar.com/" target="_blank">Gravatar</a>.
</small>
</div>
</div>
<div class="form-group row">
<div class="col-12">
<label for="body">Message:</label>
<textarea name="body"
id="body"
class="form-control"
cols="80"
rows="10"
required="required"
aria-describedby="bodyHelp">{{ $NC.Body }}</textarea>
<small id="bodyHelp" class="form-text text-muted">
You may format your comment using
<a href="https://github.github.com/gfm/" target="_blank">GitHub Flavored Markdown</a>
syntax.
</small>
</div>
</div>
<div class="form-group row" style="display: none">
<div class="col">
<div class="card">
<div class="card-header">Sanity Check</div>
<div class="card-body">
If you can see this, do not touch the following fields.
<input type="text" name="url" value="http://" class="form-control" placeholder="Website">
<textarea name="comment" cols="80" rows="10" class="form-control" placeholder="Comment"></textarea>
</div>
</div>
</div>
</div>
<div class="form-group row">
<div class="col">
<button type="submit"
name="submit"
value="preview"
class="btn btn-primary">Preview</button>
<button type="submit"
name="submit"
value="post"
class="btn btn-danger">Post</button>
</div>
</div>
</form>