2018-09-22 03:53:29 +02:00
{{ define "title"}}{{ t "page.new_category.title" }}{{ end }}
2017-11-20 06:10:04 +01:00
2024-01-27 09:25:55 +01:00
{{ define "page_header"}}
< section class = "page-header" aria-labelledby = "page-header-title" >
2024-01-25 07:22:18 +01:00
< h1 id = "page-header-title" > {{ t "page.new_category.title" }}< / h1 >
2024-01-23 03:42:10 +01:00
< nav aria-label = "{{ t " page . new_category . title " } } { { t " menu . title " } } " >
< ul >
< li >
< a href = "{{ route " categories " } } " > {{ icon "categories" }}{{ t "menu.categories" }}< / a >
< / li >
< / ul >
< / nav >
2024-01-27 09:25:55 +01:00
< / section >
2024-01-25 07:22:18 +01:00
{{ end }}
2017-11-20 06:10:04 +01:00
2024-01-25 07:22:18 +01:00
{{ define "content"}}
2017-11-20 06:10:04 +01:00
< form action = "{{ route " saveCategory " } } " method = "post" autocomplete = "off" >
< input type = "hidden" name = "csrf" value = "{{ .csrf }}" >
{{ if .errorMessage }}
2024-02-05 07:20:05 +01:00
< div role = "alert" class = "alert alert-error" > {{ .errorMessage }}< / div >
2017-11-20 06:10:04 +01:00
{{ end }}
2018-09-22 03:53:29 +02:00
< label for = "form-title" > {{ t "form.category.label.title" }}< / label >
2017-11-20 06:10:04 +01:00
< input type = "text" name = "title" id = "form-title" value = "{{ .form.Title }}" required autofocus >
< div class = "buttons" >
2018-09-22 03:53:29 +02:00
< 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 >
2017-11-20 06:10:04 +01:00
< / div >
< / form >
{{ end }}