Allow articles to be edited
This commit is contained in:
@ -4,39 +4,41 @@
|
||||
<form id="edit-area">
|
||||
<div class="flex flex-col gap-y-1">
|
||||
<label for="article-title">Titel</label>
|
||||
<input name="article-title" type="text" value="{{.Title}}" />
|
||||
<input name="article-title" type="text" value="{{.Article.Title}}" />
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-y-1">
|
||||
<label for="article-description">Beschreibung</label>
|
||||
<textarea name="article-description">{{.Description}}</textarea>
|
||||
<textarea name="article-description">{{.Article.Description}}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-y-1">
|
||||
<label for="easyMDE">Artikel</label>
|
||||
<textarea id="easyMDE">{{.Content}}</textarea>
|
||||
<input id="article-content" name="article-content" type="hidden" />
|
||||
<input id="article-content" name="article-content" type="hidden" value="{{.Content}}" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>Tags</span>
|
||||
<div class="flex flex-wrap gap-x-4">
|
||||
<div>
|
||||
<input id="issue" name="issue" type="checkbox" />
|
||||
<input id="issue" name="issue" type="checkbox" {{if .Article.IsInIssue}}checked{{end}} />
|
||||
<label for="issue">Orient Express</label>
|
||||
</div>
|
||||
|
||||
{{range .Tags}}
|
||||
<div>
|
||||
<input id="{{.Name}}" name="tags" type="checkbox" value="{{.ID}}" />
|
||||
<label for="{{.Name}}">{{.Name}}</label>
|
||||
<input id="tag-{{.Name}}" name="tags" type="checkbox" value="{{.ID}}" {{if index $.Selected
|
||||
.ID}}checked{{end}} />
|
||||
<label for="tag-{{.Name}}">{{.Name}}</label>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-area">
|
||||
<input class="action-btn" type="submit" value="Senden" hx-post="/article/submit" hx-target="#page-content" />
|
||||
<input class="action-btn" type="submit" value="Senden" hx-post="/article/{{.Action}}"
|
||||
hx-target="#page-content" />
|
||||
<button class="btn" hx-get="/hub" hx-target="#page-content">Abbrechen</button>
|
||||
</div>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user