aboutsummaryrefslogtreecommitdiffhomepage
path: root/template/html/edit_category.html
blob: 3506e455a2b501f651ea84f70abfe8ed962b7406 (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
28
29
30
31
32
33
{{ define "title"}}{{ t "page.edit_category.title" .category.Title }}{{ end }}

{{ define "content"}}
<section class="page-header">
    <h1>{{ t "page.edit_category.title" .category.Title }}</h1>
    <ul>
        <li>
            <a href="{{ route "categories" }}">{{ t "menu.categories" }}</a>
        </li>
        <li>
            <a href="{{ route "categoryFeeds" "categoryID" .category.ID }}">{{ t "menu.feeds" }}</a>
        </li>
        <li>
            <a href="{{ route "createCategory" }}">{{ t "menu.create_category" }}</a>
        </li>
    </ul>
</section>

<form action="{{ route "updateCategory" "categoryID" .category.ID }}" 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.update" }}</button>
    </div>
</form>
{{ end }}