aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/template/html/add_subscription.html
blob: b65dabbc24c8a64618c68a7c083358aa19dff3e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{{ 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>

        <label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "Fetch original content" }}</label>

        <div class="buttons">
            <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Find a subscription" }}</button>
        </div>
    </form>
{{ end }}

{{ end }}