edit_category.html 1.1 KB

123456789101112131415161718192021222324252627282930
  1. {{ define "title"}}{{ t "Edit Category: %s" .category.Title }}{{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1>{{ t "Edit Category: %s" .category.Title }}</h1>
  5. <ul>
  6. <li>
  7. <a href="{{ route "categories" }}">{{ t "Categories" }}</a>
  8. </li>
  9. <li>
  10. <a href="{{ route "createCategory" }}">{{ t "Create a category" }}</a>
  11. </li>
  12. </ul>
  13. </section>
  14. <form action="{{ route "updateCategory" "categoryID" .category.ID }}" method="post" autocomplete="off">
  15. <input type="hidden" name="csrf" value="{{ .csrf }}">
  16. {{ if .errorMessage }}
  17. <div class="alert alert-error">{{ t .errorMessage }}</div>
  18. {{ end }}
  19. <label for="form-title">{{ t "Title" }}</label>
  20. <input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
  21. <div class="buttons">
  22. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> {{ t "or" }} <a href="{{ route "categories" }}">{{ t "cancel" }}</a>
  23. </div>
  24. </form>
  25. {{ end }}