| 1 |
{{ define "title"}}{{ t "page.edit_category.title" .category.Title }}{{ end }} |
| 2 |
|
| 3 |
{{ define "page_header"}} |
| 4 |
<section class="page-header" aria-labelledby="page-header-title"> |
| 5 |
<h1 id="page-header-title">{{ t "page.edit_category.title" .category.Title }}</h1> |
| 6 |
<nav aria-label="{{ t "page.edit_category.title" .category.Title }} {{ t "menu.title" }}"> |
| 7 |
<ul> |
| 8 |
<li> |
| 9 |
<a href="{{ routePath "/categories" }}">{{ icon "categories" }}{{ t "menu.categories" }}</a> |
| 10 |
</li> |
| 11 |
<li> |
| 12 |
<a href="{{ routePath "/category/%d/feeds" .category.ID }}">{{ icon "feeds" }}{{ t "menu.feeds" }}</a> |
| 13 |
</li> |
| 14 |
<li> |
| 15 |
<a href="{{ routePath "/category/create" }}">{{ icon "add-category" }}{{ t "menu.create_category" }}</a> |
| 16 |
</li> |
| 17 |
</ul> |
| 18 |
</nav> |
| 19 |
</section> |
| 20 |
{{ end }} |
| 21 |
|
| 22 |
{{ define "content"}} |
| 23 |
<form action="{{ routePath "/category/%d/update" .category.ID }}" method="post" autocomplete="off"> |
| 24 |
<input type="hidden" name="csrf" value="{{ .csrf }}"> |
| 25 |
|
| 26 |
{{ if .errorMessage }} |
| 27 |
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div> |
| 28 |
{{ end }} |
| 29 |
|
| 30 |
<label for="form-title">{{ t "form.category.label.title" }}</label> |
| 31 |
<input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus> |
| 32 |
|
| 33 |
<label> |
| 34 |
<input type="checkbox" name="hide_globally" {{ if .form.HideGlobally }}checked{{ end }} value="1"> |
| 35 |
{{ t "form.category.hide_globally" }} |
| 36 |
</label> |
| 37 |
|
| 38 |
<div class="buttons"> |
| 39 |
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button> |
| 40 |
</div> |
| 41 |
</form> |
| 42 |
{{ end }} |