add_subscription.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. <fieldset>
  34. <legend>{{ t "Advanced Options" }}</legend>
  35. <label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "Fetch original content" }}</label>
  36. <label for="form-feed-username">{{ t "Feed Username" }}</label>
  37. <input type="text" name="feed_username" id="form-feed-username" value="{{ .form.Username }}">
  38. <label for="form-feed-password">{{ t "Feed Password" }}</label>
  39. <!--
  40. We are using the type "text" otherwise Firefox always autocomplete this password:
  41. - autocomplete="off" or autocomplete="new-password" doesn't change anything
  42. - Changing the input ID doesn't change anything
  43. - Using a different input name doesn't change anything
  44. -->
  45. <input type="text" name="feed_password" id="form-feed-password" value="{{ .form.Password }}">
  46. </fieldset>
  47. <div class="buttons">
  48. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Find a subscription" }}</button>
  49. </div>
  50. </form>
  51. {{ end }}
  52. {{ end }}