aboutsummaryrefslogtreecommitdiffhomepage
path: root/template/html/create_category.html
blob: 1a7212c6ba97d9d68e4f5d3cd1f7ee9440c4010c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{{ define "title"}}{{ t "page.new_category.title" }}{{ end }}

{{ define "content"}}
<section class="page-header">
    <h1>{{ t "page.new_category.title" }}</h1>
    <ul>
        <li>
            <a href="{{ route "categories" }}">{{ t "menu.categories" }}</a>
        </li>
    </ul>
</section>

<form action="{{ route "saveCategory" }}" method="post" autocomplete="off">
    <input type="hidden" name="csrf" value="{{ .csrf }}">

    {{ if .errorMessage }}
        <div class="alert alert-error">{{ t .errorMessage }}</div>
    {{ end }}

    <label for="form-title">{{ t "form.category.label.title" }}</label>
    <input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>

    <div class="buttons">
        <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.save" }}</button> {{ t "action.or" }} <a href="{{ route "categories" }}">{{ t "action.cancel" }}</a>
    </div>
</form>
{{ end }}