2018-09-21 21:53:29 -04:00
|
|
|
{{ define "title"}}{{ t "page.add_feed.title" }}{{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
<section class="page-header">
|
2018-09-21 21:53:29 -04:00
|
|
|
<h1>{{ t "page.add_feed.title" }}</h1>
|
2017-11-20 00:10:04 -05:00
|
|
|
<ul>
|
|
|
|
<li>
|
2018-09-21 21:53:29 -04:00
|
|
|
<a href="{{ route "feeds" }}">{{ t "menu.feeds" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
|
|
|
<li>
|
2018-09-21 21:53:29 -04:00
|
|
|
<a href="{{ route "export" }}">{{ t "menu.export" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
|
|
|
<li>
|
2018-09-21 21:53:29 -04:00
|
|
|
<a href="{{ route "import" }}">{{ t "menu.import" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{{ if not .categories }}
|
2018-09-21 21:53:29 -04:00
|
|
|
<p class="alert alert-error">{{ t "page.add_feed.no_category" }}</p>
|
2017-11-20 00:10:04 -05:00
|
|
|
{{ 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 }}
|
|
|
|
|
2018-09-21 21:53:29 -04:00
|
|
|
<label for="form-url">{{ t "page.add_feed.label.url" }}</label>
|
2017-11-20 00:10:04 -05:00
|
|
|
<input type="url" name="url" id="form-url" placeholder="https://domain.tld/" value="{{ .form.URL }}" required autofocus>
|
|
|
|
|
2018-09-21 21:53:29 -04:00
|
|
|
<label for="form-category">{{ t "form.feed.label.category" }}</label>
|
2017-11-20 00:10:04 -05:00
|
|
|
<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>
|
2018-09-21 21:53:29 -04:00
|
|
|
<legend>{{ t "page.add_feed.legend.advanced_options" }}</legend>
|
2018-06-20 01:58:29 -04:00
|
|
|
|
2018-09-21 21:53:29 -04:00
|
|
|
<label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "form.feed.label.crawler" }}</label>
|
2018-06-20 01:58:29 -04:00
|
|
|
|
2018-09-21 21:53:29 -04:00
|
|
|
<label for="form-user-agent">{{ t "form.feed.label.user_agent" }}</label>
|
|
|
|
<input type="text" name="user_agent" id="form-user-agent" placeholder="{{ .defaultUserAgent }}" value="{{ .form.UserAgent }}" autocomplete="off">
|
2018-09-19 21:19:24 -04:00
|
|
|
|
2018-09-21 21:53:29 -04:00
|
|
|
<label for="form-feed-username">{{ t "form.feed.label.feed_username" }}</label>
|
2018-07-08 21:21:56 -04:00
|
|
|
<input type="text" name="feed_username" id="form-feed-username" value="{{ .form.Username }}">
|
2018-06-20 01:58:29 -04:00
|
|
|
|
2018-09-21 21:53:29 -04:00
|
|
|
<label for="form-feed-password">{{ t "form.feed.label.feed_password" }}</label>
|
2018-07-08 21:21:56 -04:00
|
|
|
<!--
|
|
|
|
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">
|
2018-09-21 21:53:29 -04:00
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.loading" }}">{{ t "page.add_feed.submit" }}</button>
|
2017-11-20 00:10:04 -05:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ end }}
|