1
0
Fork 0
miniflux/template/html/settings.html

85 lines
3.5 KiB
HTML
Raw Normal View History

{{ define "title"}}{{ t "page.settings.title" }}{{ end }}
2017-11-20 00:10:04 -05:00
{{ define "content"}}
<section class="page-header">
<h1>{{ t "page.settings.title" }}</h1>
2017-11-20 00:10:04 -05:00
<ul>
2017-11-21 22:37:47 -05:00
<li>
<a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
2017-11-21 22:37:47 -05:00
</li>
2017-11-20 00:10:04 -05:00
<li>
<a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
2017-11-20 00:10:04 -05:00
</li>
{{ if .user.IsAdmin }}
<li>
<a href="{{ route "users" }}">{{ t "menu.users" }}</a>
2017-11-20 00:10:04 -05:00
</li>
{{ end }}
<li>
<a href="{{ route "about" }}">{{ t "menu.about" }}</a>
2017-11-20 00:10:04 -05:00
</li>
</ul>
</section>
<form method="post" autocomplete="off" action="{{ route "updateSettings" }}">
<input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }}
<div class="alert alert-error">{{ t .errorMessage }}</div>
{{ end }}
<label for="form-username">{{ t "form.user.label.username" }}</label>
2017-11-20 00:10:04 -05:00
<input type="text" name="username" id="form-username" value="{{ .form.Username }}" required>
<label for="form-password">{{ t "form.user.label.password" }}</label>
<input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password">
2017-11-20 00:10:04 -05:00
<label for="form-confirmation">{{ t "form.user.label.confirmation" }}</label>
<input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" autocomplete="new-password">
2017-11-20 00:10:04 -05:00
<label for="form-language">{{ t "form.prefs.label.language" }}</label>
2017-11-20 00:10:04 -05:00
<select id="form-language" name="language">
{{ range $key, $value := .languages }}
<option value="{{ $key }}" {{ if eq $key $.form.Language }}selected="selected"{{ end }}>{{ $value }}</option>
{{ end }}
</select>
<label for="form-timezone">{{ t "form.prefs.label.timezone" }}</label>
2017-11-20 00:10:04 -05:00
<select id="form-timezone" name="timezone">
{{ range $key, $value := .timezones }}
<option value="{{ $key }}" {{ if eq $key $.form.Timezone }}selected="selected"{{ end }}>{{ $value }}</option>
{{ end }}
</select>
<label for="form-theme">{{ t "form.prefs.label.theme" }}</label>
2017-11-20 00:10:04 -05:00
<select id="form-theme" name="theme">
{{ range $key, $value := .themes }}
<option value="{{ $key }}" {{ if eq $key $.form.Theme }}selected="selected"{{ end }}>{{ $value }}</option>
{{ end }}
</select>
<label for="form-entry-direction">{{ t "form.prefs.label.entry_sorting" }}</label>
2017-12-02 20:04:01 -05:00
<select id="form-entry-direction" name="entry_direction">
<option value="asc" {{ if eq "asc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "form.prefs.select.older_first" }}</option>
<option value="desc" {{ if eq "desc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "form.prefs.select.recent_first" }}</option>
2017-12-02 20:04:01 -05:00
</select>
<label><input type="checkbox" name="keyboard_shortcuts" value="1" {{ if .form.KeyboardShortcuts }}checked{{ end }}> {{ t "form.prefs.label.keyboard_shortcuts" }}</label>
2017-11-20 00:10:04 -05:00
<div class="buttons">
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
2017-11-20 00:10:04 -05:00
</div>
</form>
2017-11-24 19:09:10 -05:00
{{ if hasOAuth2Provider "google" }}
<div class="panel">
{{ if hasKey .user.Extra "google_id" }}
<a href="{{ route "oauth2Unlink" "provider" "google" }}">{{ t "page.settings.unlink_google_account" }}</a>
2017-11-24 19:09:10 -05:00
{{ else }}
<a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "page.settings.link_google_account" }}</a>
2017-11-24 19:09:10 -05:00
{{ end }}
</div>
{{ end }}
2017-11-20 00:10:04 -05:00
{{ end }}