import.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. {{ define "title"}}{{ t "page.import.title" }}{{ end }}
  2. {{ define "page_header"}}
  3. <section class="page-header" aria-labelledby="page-header-title">
  4. <h1 id="page-header-title">{{ t "page.import.title" }}</h1>
  5. {{ template "feed_menu" }}
  6. </section>
  7. {{ end }}
  8. {{ define "content"}}
  9. {{ if .errorMessage }}
  10. <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
  11. {{ end }}
  12. <form action="{{ route "uploadOPML" }}" method="post" enctype="multipart/form-data">
  13. <input type="hidden" name="csrf" value="{{ .csrf }}">
  14. <label for="form-file">{{ t "form.import.label.file" }}</label>
  15. <input type="file" name="file" id="form-file">
  16. <div class="buttons">
  17. <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.import" }}</button>
  18. </div>
  19. </form>
  20. <hr>
  21. <form action="{{ route "fetchOPML" }}" method="post" enctype="multipart/form-data">
  22. <input type="hidden" name="csrf" value="{{ .csrf }}">
  23. <label for="form-url">{{ t "form.import.label.url" }}</label>
  24. <input type="url" name="url" id="form-url" required>
  25. <div class="buttons">
  26. <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.import" }}</button>
  27. </div>
  28. </form>
  29. {{ end }}