mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-11 05:33:57 +00:00
Fixed language and locale preset for new users
This commit is contained in:
parent
93b020b77c
commit
a2a48515d4
@ -27,14 +27,14 @@
|
||||
<label for="locale">{{_('Language')}}</label>
|
||||
<select name="locale" id="locale" class="form-control">
|
||||
{% for translation in translations %}
|
||||
<option value="{{translation}}" {% if translation|string == content.locale %}selected{% endif %}>{{ translation.display_name }}</option>
|
||||
<option value="{{translation.language}}" {% if translation.language == content.locale %}selected{% endif %} {% if new_user == 1 and loop.first %}selected{% endif %}>{{ translation.display_name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="default_language">{{_('Show books with language')}}</label>
|
||||
<select name="default_language" id="default_language" class="form-control">
|
||||
<option value="all" >{{ _('Show all') }}</option>
|
||||
<option value="all" {% if new_user == 1 %}selected{% endif %}>{{ _('Show all') }}</option>
|
||||
{% for language in languages %}
|
||||
<option value="{{ language.lang_code }}" {% if content.default_language == language.lang_code %}selected{% endif %}>{{ language.name }}</option>
|
||||
{% endfor %}
|
||||
|
@ -1547,7 +1547,7 @@ def new_user():
|
||||
ub.session.rollback()
|
||||
flash(_(u"Found an existing account for this email address or nickname."), category="error")
|
||||
return render_template("user_edit.html", new_user=1, content=content, translations=translations,
|
||||
languages=languages, title="Add new user")
|
||||
languages=languages, title=_("Add new user"))
|
||||
|
||||
|
||||
@app.route("/admin/mailsettings", methods=["GET", "POST"])
|
||||
|
Loading…
Reference in New Issue
Block a user