2017-11-20 00:10:04 -05:00
|
|
|
{{ define "title"}}{{ t "New Subscription" }}{{ end }}
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
<section class="page-header">
|
|
|
|
<h1>{{ t "New Subscription" }}</h1>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<a href="{{ route "feeds" }}">{{ t "Feeds" }}</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="{{ route "export" }}">{{ t "Export" }}</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="{{ route "import" }}">{{ t "Import" }}</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{{ if not .categories }}
|
|
|
|
<p class="alert alert-error">{{ t "There is no category. You must have at least one category." }}</p>
|
|
|
|
{{ else }}
|
|
|
|
<form action="{{ route "submitSubscription" }}" method="post" autocomplete="off">
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<label for="form-url">{{ t "URL" }}</label>
|
|
|
|
<input type="url" name="url" id="form-url" placeholder="https://domain.tld/" value="{{ .form.URL }}" required autofocus>
|
|
|
|
|
|
|
|
<label for="form-category">{{ t "Category" }}</label>
|
|
|
|
<select id="form-category" name="category_id">
|
|
|
|
{{ range .categories }}
|
|
|
|
<option value="{{ .ID }}">{{ .Title }}</option>
|
|
|
|
{{ end }}
|
|
|
|
</select>
|
|
|
|
|
2018-06-20 01:58:29 -04:00
|
|
|
<fieldset>
|
|
|
|
<legend>{{ t "Advanced Options" }}</legend>
|
|
|
|
|
|
|
|
<label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "Fetch original content" }}</label>
|
|
|
|
|
2018-07-08 21:21:56 -04:00
|
|
|
<label for="form-feed-username">{{ t "Feed Username" }}</label>
|
|
|
|
<input type="text" name="feed_username" id="form-feed-username" value="{{ .form.Username }}">
|
2018-06-20 01:58:29 -04:00
|
|
|
|
2018-07-08 21:21:56 -04:00
|
|
|
<label for="form-feed-password">{{ t "Feed Password" }}</label>
|
|
|
|
<!--
|
|
|
|
We are using the type "text" otherwise Firefox always autocomplete this password:
|
|
|
|
|
|
|
|
- autocomplete="off" or autocomplete="new-password" doesn't change anything
|
|
|
|
- Changing the input ID doesn't change anything
|
|
|
|
- Using a different input name doesn't change anything
|
|
|
|
-->
|
|
|
|
<input type="text" name="feed_password" id="form-feed-password" value="{{ .form.Password }}">
|
2018-06-20 01:58:29 -04:00
|
|
|
</fieldset>
|
2017-12-12 22:19:36 -05:00
|
|
|
|
2017-11-20 00:10:04 -05:00
|
|
|
<div class="buttons">
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Find a subscription" }}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ end }}
|