Lots of changes to the website
This commit is contained in:
46
templates/admin/changelog-editor.html
Normal file
46
templates/admin/changelog-editor.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{{define "title"}}{{if .IsNew}}New Entry{{else}}Edit Entry{{end}} — Changelog Admin{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<div class="admin-wrap">
|
||||
<div class="admin-header">
|
||||
<h1>{{if .IsNew}}New Changelog Entry{{else}}Edit Entry{{end}}</h1>
|
||||
<div class="admin-actions">
|
||||
<a href="/admin/changelog" class="btn btn-outline">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if .Error}}<p class="form-error">{{.Error}}</p>{{end}}
|
||||
|
||||
<form method="POST" action="{{if .IsNew}}/admin/changelog/new{{else}}/admin/changelog/edit/{{.Entry.ID}}{{end}}">
|
||||
<div class="form-row">
|
||||
<label for="date">Date</label>
|
||||
<input type="date" id="date" name="date" value="{{.Entry.Date}}" required class="form-input">
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="category">Category</label>
|
||||
<select id="category" name="category" class="form-input">
|
||||
{{range .Categories}}
|
||||
<option value="{{.}}" {{if eq . $.Entry.Category}}selected{{end}}>{{.}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="title">Title</label>
|
||||
<input type="text" id="title" name="title" value="{{.Entry.Title}}" required
|
||||
placeholder="e.g. Migrated fw01 from OpenBSD to OPNsense" class="form-input">
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="description">Description <span class="label-optional">(optional)</span></label>
|
||||
<textarea id="description" name="description" rows="4"
|
||||
placeholder="Additional details about the change…" class="form-input">{{.Entry.Description}}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="editor-footer">
|
||||
<button type="submit" class="btn">{{if .IsNew}}Create{{else}}Save{{end}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user