add_subscription.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {{ define "title"}}{{ t "New Subscription" }}{{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1>{{ t "New Subscription" }}</h1>
  5. <ul>
  6. <li>
  7. <a href="{{ route "feeds" }}">{{ t "Feeds" }}</a>
  8. </li>
  9. <li>
  10. <a href="{{ route "export" }}">{{ t "Export" }}</a>
  11. </li>
  12. <li>
  13. <a href="{{ route "import" }}">{{ t "Import" }}</a>
  14. </li>
  15. </ul>
  16. </section>
  17. {{ if not .categories }}
  18. <p class="alert alert-error">{{ t "There is no category. You must have at least one category." }}</p>
  19. {{ else }}
  20. <form action="{{ route "submitSubscription" }}" method="post" autocomplete="off">
  21. <input type="hidden" name="csrf" value="{{ .csrf }}">
  22. {{ if .errorMessage }}
  23. <div class="alert alert-error">{{ t .errorMessage }}</div>
  24. {{ end }}
  25. <label for="form-url">{{ t "URL" }}</label>
  26. <input type="url" name="url" id="form-url" placeholder="https://domain.tld/" value="{{ .form.URL }}" required autofocus>
  27. <label for="form-category">{{ t "Category" }}</label>
  28. <select id="form-category" name="category_id">
  29. {{ range .categories }}
  30. <option value="{{ .ID }}">{{ .Title }}</option>
  31. {{ end }}
  32. </select>
  33. <label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "Fetch original content" }}</label>
  34. <div class="buttons">
  35. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Find a subscription" }}</button>
  36. </div>
  37. </form>
  38. {{ end }}
  39. {{ end }}