Debian Codegraph @

internal/template/templates/views/create_category.html

raw
1 {{ define "title"}}{{ t "page.new_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.new_category.title" }}</h1>
6 <nav aria-label="{{ t "page.new_category.title" }} {{ t "menu.title" }}">
7 <ul>
8 <li>
9 <a href="{{ routePath "/categories" }}">{{ icon "categories" }}{{ t "menu.categories" }}</a>
10 </li>
11 </ul>
12 </nav>
13 </section>
14 {{ end }}
15
16 {{ define "content"}}
17 <form action="{{ routePath "/category/save" }}" method="post" autocomplete="off">
18 <input type="hidden" name="csrf" value="{{ .csrf }}">
19
20 {{ if .errorMessage }}
21 <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
22 {{ end }}
23
24 <label for="form-title">{{ t "form.category.label.title" }}</label>
25 <input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
26
27 <div class="buttons">
28 <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.save" }}</button> {{ t "action.or" }} <a href="{{ routePath "/categories" }}">{{ t "action.cancel" }}</a>
29 </div>
30 </form>
31 {{ end }}