2022-08-27 02:50:33 +00:00
|
|
|
{{define "title"}}
|
|
|
|
{{if .EditCommentID}}
|
|
|
|
Edit Comment
|
|
|
|
{{else}}
|
|
|
|
New Comment
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
{{define "content"}}
|
|
|
|
<div class="container">
|
2024-08-23 05:44:19 +00:00
|
|
|
<section class="hero is-info">
|
2022-08-27 02:50:33 +00:00
|
|
|
<div class="hero-body">
|
|
|
|
<div class="container">
|
|
|
|
<h1 class="title">
|
|
|
|
{{if .EditCommentID}}
|
|
|
|
Edit Comment
|
|
|
|
{{else}}
|
|
|
|
Add Comment
|
|
|
|
{{end}}
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<div class="block p-4">
|
|
|
|
<div class="columns is-centered">
|
|
|
|
<div class="column is-half">
|
|
|
|
|
|
|
|
<div class="card" style="width: 100%; max-width: 640px">
|
|
|
|
<header class="card-header has-background-link">
|
|
|
|
<p class="card-header-title has-text-light">
|
|
|
|
<span class="icon"><i class="fa fa-message"></i></span>
|
|
|
|
{{if .EditCommentID}}
|
|
|
|
Edit Comment
|
|
|
|
{{else}}
|
|
|
|
New Comment
|
|
|
|
{{end}}
|
|
|
|
</p>
|
|
|
|
</header>
|
|
|
|
<div class="card-content">
|
|
|
|
|
|
|
|
{{if and (eq .Request.Method "POST") (ne .Message "")}}
|
|
|
|
<label class="label">Preview:</label>
|
2024-03-30 23:11:55 +00:00
|
|
|
<div class="box content has-background-warning-light has-text-dark">
|
2022-08-27 02:50:33 +00:00
|
|
|
{{ToMarkdown .Message}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
<form action="{{.Request.URL.Path}}" method="POST">
|
|
|
|
{{InputCSRF}}
|
|
|
|
<input type="hidden" name="table_name" value="{{.TableName}}">
|
|
|
|
<input type="hidden" name="table_id" value="{{.TableID}}">
|
|
|
|
<input type="hidden" name="next" value="{{.Next}}">
|
|
|
|
<input type="hidden" name="edit" value="{{.EditCommentID}}">
|
|
|
|
|
|
|
|
<div class="field block">
|
|
|
|
<label for="message" class="label">Message</label>
|
|
|
|
<textarea class="textarea" cols="80" rows="8"
|
|
|
|
name="message"
|
|
|
|
id="message"
|
|
|
|
required
|
|
|
|
placeholder="Message">{{.Message}}</textarea>
|
|
|
|
<p class="help">
|
2023-02-06 04:26:36 +00:00
|
|
|
<a href="/markdown" target="_blank">Markdown formatting</a> supported.
|
2022-08-27 02:50:33 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="field has-text-centered">
|
|
|
|
<button type="submit"
|
|
|
|
name="intent"
|
|
|
|
value="preview"
|
|
|
|
class="button is-link">
|
|
|
|
Preview
|
|
|
|
</button>
|
|
|
|
<button type="submit"
|
|
|
|
name="intent"
|
|
|
|
value="submit"
|
|
|
|
class="button is-success">
|
2022-08-27 03:04:48 +00:00
|
|
|
Post Comment
|
2022-08-27 02:50:33 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{{end}}
|