aboutsummaryrefslogtreecommitdiffhomepage
path: root/template/html/import.html
blob: 12454860c72cb27adc951e658881c46bb9ad5b9a (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
{{ define "title"}}{{ t "page.import.title" }}{{ end }}

{{ define "content"}}
<section class="page-header">
    <h1>{{ t "page.import.title" }}</h1>
    <ul>
        <li>
            <a href="{{ route "feeds" }}">{{ t "menu.feeds" }}</a>
        </li>
        <li>
            <a href="{{ route "addSubscription" }}">{{ t "menu.add_feed" }}</a>
        </li>
        <li>
            <a href="{{ route "export" }}">{{ t "menu.export" }}</a>
        </li>
    </ul>
</section>

{{ if .errorMessage }}
    <div class="alert alert-error">{{ t .errorMessage }}</div>
{{ end }}

<form action="{{ route "uploadOPML" }}" method="post" enctype="multipart/form-data">
    <input type="hidden" name="csrf" value="{{ .csrf }}">

    <label for="form-file">{{ t "form.import.label.file" }}</label>
    <input type="file" name="file" id="form-file">

    <div class="buttons">
        <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.import" }}</button>
    </div>
</form>
<hr>
<form action="{{ route "fetchOPML" }}" method="post" enctype="multipart/form-data">
    <input type="hidden" name="csrf" value="{{ .csrf }}">

    <label for="form-url">{{ t "form.import.label.url" }}</label>
    <input type="url" name="url" id="form-url" required>

    <div class="buttons">
        <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.import" }}</button>
    </div>
</form>

{{ end }}