aboutsummaryrefslogtreecommitdiffhomepage
path: root/template
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2019-08-15 22:08:24 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-08-15 22:21:18 -0700
commit77125f45ccebc1b9abc9aeef2a8576b6841c5768 (patch)
tree106bdd6f0a068e9dbc7608db506a1b8b9980a6fe /template
parentd882bbca85b801ed408644800364ec0a5bdcffd4 (diff)
Improve import form
Diffstat (limited to 'template')
-rw-r--r--template/html/import.html12
-rw-r--r--template/views.go14
2 files changed, 13 insertions, 13 deletions
diff --git a/template/html/import.html b/template/html/import.html
index 3a2b987..1245486 100644
--- a/template/html/import.html
+++ b/template/html/import.html
@@ -16,13 +16,13 @@
</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 }}">
- {{ if .errorMessage }}
- <div class="alert alert-error">{{ t .errorMessage }}</div>
- {{ end }}
-
<label for="form-file">{{ t "form.import.label.file" }}</label>
<input type="file" name="file" id="form-file">
@@ -30,12 +30,12 @@
<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">
+ <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>
diff --git a/template/views.go b/template/views.go
index 86da9c5..9cde929 100644
--- a/template/views.go
+++ b/template/views.go
@@ -940,13 +940,13 @@ var templateViewsMap = map[string]string{
</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 }}">
- {{ if .errorMessage }}
- <div class="alert alert-error">{{ t .errorMessage }}</div>
- {{ end }}
-
<label for="form-file">{{ t "form.import.label.file" }}</label>
<input type="file" name="file" id="form-file">
@@ -954,12 +954,12 @@ var templateViewsMap = map[string]string{
<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">
+ <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>
@@ -1480,7 +1480,7 @@ var templateViewsMapChecksums = map[string]string{
"feed_entries": "4bb6b96ba4d13dbaf22dcf6dd95ae36b6e5a0c99175d502865a164dc68fd4bae",
"feeds": "d11fb629921e22bbf6d9ecb1adcc38922fafcee84f81c437abf47209544bd1c5",
"history_entries": "9763d2120cfaeb78d406fdc029197fed2f7cfa7682970eeedae82ae79be65519",
- "import": "d7abfdc2cd4db38ed695d5fecd140e2e736d3633127589e1292736224dc23798",
+ "import": "5eb56cecaa4d369b9acc991a82be7617710c551089a2e99d34ce8b6e5c37df0a",
"integrations": "f85b4a48ab1fc13b8ca94bfbbc44bd5e8784f35b26a63ec32cbe82b96b45e008",
"login": "2e72d2d4b9786641b696bedbed5e10b04bdfd68254ddbbdb0a53cca621d200c7",
"search_entries": "d71849a4f2b0573c7c76ad0ea941812009e9f022de60895987a781d3e6f08a01",