Debian Codegraph @

internal/template/templates/views/import.html

raw
1 {{ define "title"}}{{ t "page.import.title" }}{{ end }}
2
3 {{ define "page_header"}}
4 <section class="page-header" aria-labelledby="page-header-title">
5 <h1 id="page-header-title">{{ t "page.import.title" }}</h1>
6 {{ template "feed_menu" dict "csrf" .csrf }}
7 </section>
8 {{ end }}
9
10 {{ define "content"}}
11 {{ if .errorMessage }}
12 <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
13 {{ end }}
14
15 <form action="{{ routePath "/upload" }}" method="post" enctype="multipart/form-data">
16 <input type="hidden" name="csrf" value="{{ .csrf }}">
17
18 <label for="form-file">{{ t "form.import.label.file" }}</label>
19 <input type="file" name="file" id="form-file">
20
21 <div class="buttons">
22 <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.import" }}</button>
23 </div>
24 </form>
25 <hr>
26 <form action="{{ routePath "/fetch" }}" method="post" enctype="multipart/form-data">
27 <input type="hidden" name="csrf" value="{{ .csrf }}">
28
29 <label for="form-url">{{ t "form.import.label.url" }}</label>
30 <input type="url" name="url" id="form-url" required>
31
32 <div class="buttons">
33 <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.import" }}</button>
34 </div>
35 </form>
36
37 {{ end }}