edit_category.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {{ define "title"}}{{ t "page.edit_category.title" .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.edit_category.title" .category.Title }}</h1>
  5. <nav aria-label="{{ t "page.edit_category.title" .category.Title }} {{ t "menu.title" }}">
  6. <ul>
  7. <li>
  8. <a href="{{ routePath "/categories" }}">{{ icon "categories" }}{{ t "menu.categories" }}</a>
  9. </li>
  10. <li>
  11. <a href="{{ routePath "/category/%d/feeds" .category.ID }}">{{ icon "feeds" }}{{ t "menu.feeds" }}</a>
  12. </li>
  13. <li>
  14. <a href="{{ routePath "/category/create" }}">{{ icon "add-category" }}{{ t "menu.create_category" }}</a>
  15. </li>
  16. </ul>
  17. </nav>
  18. </section>
  19. {{ end }}
  20. {{ define "content"}}
  21. <form action="{{ routePath "/category/%d/update" .category.ID }}" method="post" autocomplete="off">
  22. <input type="hidden" name="csrf" value="{{ .csrf }}">
  23. {{ if .errorMessage }}
  24. <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
  25. {{ end }}
  26. <label for="form-title">{{ t "form.category.label.title" }}</label>
  27. <input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
  28. <label>
  29. <input type="checkbox" name="hide_globally" {{ if .form.HideGlobally }}checked{{ end }} value="1">
  30. {{ t "form.category.hide_globally" }}
  31. </label>
  32. <div class="buttons">
  33. <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
  34. </div>
  35. </form>
  36. {{ end }}