4
0

create_category.html 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. {{ define "title"}}{{ t "page.new_category.title" }}{{ end }}
  2. {{ define "page_header"}}
  3. <section class="page-header" aria-labelledby="page-header-title">
  4. <h1 id="page-header-title">{{ t "page.new_category.title" }}</h1>
  5. <nav aria-label="{{ t "page.new_category.title" }} {{ t "menu.title" }}">
  6. <ul>
  7. <li>
  8. <a href="{{ route "categories" }}">{{ icon "categories" }}{{ t "menu.categories" }}</a>
  9. </li>
  10. </ul>
  11. </nav>
  12. </section>
  13. {{ end }}
  14. {{ define "content"}}
  15. <form action="{{ route "saveCategory" }}" method="post" autocomplete="off">
  16. <input type="hidden" name="csrf" value="{{ .csrf }}">
  17. {{ if .errorMessage }}
  18. <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
  19. {{ end }}
  20. <label for="form-title">{{ t "form.category.label.title" }}</label>
  21. <input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
  22. <div class="buttons">
  23. <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>
  24. </div>
  25. </form>
  26. {{ end }}