2018-09-22 03:53:29 +02:00
{{ define "title"}}{{ t "page.add_feed.title" }}{{ end }}
2017-11-20 06:10:04 +01:00
{{ define "content"}}
< section class = "page-header" >
2018-09-22 03:53:29 +02:00
< h1 > {{ t "page.add_feed.title" }}< / h1 >
2020-01-02 22:03:34 +01:00
{{ template "feed_menu" }}
2017-11-20 06:10:04 +01:00
< / section >
{{ if not .categories }}
2018-09-22 03:53:29 +02:00
< p class = "alert alert-error" > {{ t "page.add_feed.no_category" }}< / p >
2017-11-20 06:10:04 +01: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-22 03:53:29 +02:00
< label for = "form-url" > {{ t "page.add_feed.label.url" }}< / label >
2021-01-05 05:29:12 +01:00
< input type = "url" name = "url" id = "form-url" placeholder = "https://domain.tld/" value = "{{ .form.URL }}" spellcheck = "false" required autofocus >
2017-11-20 06:10:04 +01:00
2018-09-22 03:53:29 +02:00
< label for = "form-category" > {{ t "form.feed.label.category" }}< / label >
2017-11-20 06:10:04 +01:00
< select id = "form-category" name = "category_id" >
{{ range .categories }}
2018-12-13 06:31:50 +01:00
< option value = "{{ .ID }}" { { if eq $ . form . CategoryID . ID } } selected = "selected" { { end } } > {{ .Title }}< / option >
2017-11-20 06:10:04 +01:00
{{ end }}
< / select >
2018-09-22 07:27:53 +02:00
< details >
< summary > {{ t "page.add_feed.legend.advanced_options" }}< / summary >
< div class = "details-content" >
< label > < input type = "checkbox" name = "crawler" value = "1" { { if . form . Crawler } } checked { { end } } > {{ t "form.feed.label.crawler" }}< / label >
2021-02-21 22:42:49 +01:00
< label > < input type = "checkbox" name = "allow_self_signed_certificates" value = "1" { { if . form . AllowSelfSignedCertificates } } checked { { end } } > {{ t "form.feed.label.allow_self_signed_certificates" }}< / label >
2020-09-10 08:28:54 +02:00
{{ if .hasProxyConfigured }}
< label > < input type = "checkbox" name = "fetch_via_proxy" value = "1" { { if . form . FetchViaProxy } } checked { { end } } > {{ t "form.feed.label.fetch_via_proxy" }}< / label >
{{ end }}
2018-06-20 07:58:29 +02:00
2018-09-22 07:27:53 +02:00
< label for = "form-user-agent" > {{ t "form.feed.label.user_agent" }}< / label >
2021-01-05 05:29:12 +01:00
< input type = "text" name = "user_agent" id = "form-user-agent" placeholder = "{{ .defaultUserAgent }}" value = "{{ .form.UserAgent }}" spellcheck = "false" autocomplete = "off" >
2018-06-20 07:58:29 +02:00
2018-09-22 07:27:53 +02:00
< label for = "form-feed-username" > {{ t "form.feed.label.feed_username" }}< / label >
2021-01-05 05:29:12 +01:00
< input type = "text" name = "feed_username" id = "form-feed-username" value = "{{ .form.Username }}" spellcheck = "false" >
2018-09-20 03:19:24 +02:00
2018-09-22 07:27:53 +02:00
< label for = "form-feed-password" > {{ t "form.feed.label.feed_password" }}< / label >
<!--
We are using the type "text" otherwise Firefox always autocomplete this password:
2018-06-20 07:58:29 +02:00
2018-09-22 07:27:53 +02:00
- 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
-->
2021-01-05 05:29:12 +01:00
< input type = "text" name = "feed_password" id = "form-feed-password" value = "{{ .form.Password }}" spellcheck = "false" >
2019-11-29 20:17:14 +01:00
< label for = "form-scraper-rules" > {{ t "form.feed.label.scraper_rules" }}< / label >
2021-01-05 05:29:12 +01:00
< input type = "text" name = "scraper_rules" id = "form-scraper-rules" value = "{{ .form.ScraperRules }}" spellcheck = "false" >
2019-11-29 20:17:14 +01:00
< label for = "form-rewrite-rules" > {{ t "form.feed.label.rewrite_rules" }}< / label >
2021-01-05 05:29:12 +01:00
< input type = "text" name = "rewrite_rules" id = "form-rewrite-rules" value = "{{ .form.RewriteRules }}" spellcheck = "false" >
2020-10-16 23:40:56 +02:00
< label for = "form-blocklist-rules" > {{ t "form.feed.label.blocklist_rules" }}< / label >
2021-01-05 05:29:12 +01:00
< input type = "text" name = "blocklist_rules" id = "form-blocklist-rules" value = "{{ .form.BlocklistRules }}" spellcheck = "false" >
2020-10-16 23:40:56 +02:00
< label for = "form-keeplist-rules" > {{ t "form.feed.label.keeplist_rules" }}< / label >
2021-01-05 05:29:12 +01:00
< input type = "text" name = "keeplist_rules" id = "form-keeplist-rules" value = "{{ .form.KeeplistRules }}" spellcheck = "false" >
2018-09-22 07:27:53 +02:00
< / div >
< / details >
2017-12-13 04:19:36 +01:00
2017-11-20 06:10:04 +01:00
< div class = "buttons" >
2018-09-22 03:53:29 +02:00
< button type = "submit" class = "button button-primary" data-label-loading = "{{ t " form . submit . loading " } } " > {{ t "page.add_feed.submit" }}< / button >
2017-11-20 06:10:04 +01:00
< / div >
< / form >
{{ end }}
{{ end }}