88 lines
2.5 KiB
Plaintext
88 lines
2.5 KiB
Plaintext
{{ $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>
|
|
|
|
|
|
<p class="mt-1 text-muted">
|
|
<label style="font-weight: normal">
|
|
<input type="checkbox" name="subscribe" value="true"{{ if $NC.Subscribe }} checked{{ end }}> Notify me of future comments on this page
|
|
</label>
|
|
</p>
|
|
</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>
|