diff options
author | 2018-01-02 22:04:48 -0800 | |
---|---|---|
committer | 2018-01-02 22:04:48 -0800 | |
commit | 320d1b016747ba4501da9417d9ce5f99368a5768 (patch) | |
tree | 1054d96afde6022951b76cc4a09b78e1e3f05058 /template/html/edit_category.html | |
parent | c39f2e1a8d2de6d412bcc673d29eb0f7a2d1f5f7 (diff) |
Refactor packages to have more idiomatic code base
Diffstat (limited to 'template/html/edit_category.html')
-rw-r--r-- | template/html/edit_category.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/template/html/edit_category.html b/template/html/edit_category.html new file mode 100644 index 0000000..2981fa4 --- /dev/null +++ b/template/html/edit_category.html @@ -0,0 +1,30 @@ +{{ define "title"}}{{ t "Edit Category: %s" .category.Title }}{{ end }} + +{{ define "content"}} +<section class="page-header"> + <h1>{{ t "Edit Category: %s" .category.Title }}</h1> + <ul> + <li> + <a href="{{ route "categories" }}">{{ t "Categories" }}</a> + </li> + <li> + <a href="{{ route "createCategory" }}">{{ t "Create a 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 "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 "Loading..." }}">{{ t "Update" }}</button> {{ t "or" }} <a href="{{ route "categories" }}">{{ t "cancel" }}</a> + </div> +</form> +{{ end }} |