create_api_key.html 1.0 KB

12345678910111213141516171819202122232425
  1. {{ define "title"}}{{ t "page.new_api_key.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_api_key.title" }}</h1>
  5. {{ template "settings_menu" dict "user" .user }}
  6. </section>
  7. {{ end }}
  8. {{ define "content"}}
  9. <form action="{{ route "saveAPIKey" }}" method="post" autocomplete="off">
  10. <input type="hidden" name="csrf" value="{{ .csrf }}">
  11. {{ if .errorMessage }}
  12. <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
  13. {{ end }}
  14. <label for="form-description">{{ t "form.api_key.label.description" }}</label>
  15. <input type="text" name="description" id="form-description" value="{{ .form.Description }}" spellcheck="false" required autofocus>
  16. <div class="buttons">
  17. <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.save" }}</button> {{ t "action.or" }} <a href="{{ route "apiKeys" }}">{{ t "action.cancel" }}</a>
  18. </div>
  19. </form>
  20. {{ end }}