mirror of https://gitlab.crans.org/bde/nk20
Update Django locale selector
This commit is contained in:
parent
2270a0aa82
commit
e8005a6c58
|
@ -177,12 +177,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
onchange="this.form.submit()">
|
onchange="this.form.submit()">
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
{% get_available_languages as LANGUAGES %}
|
{% get_available_languages as LANGUAGES %}
|
||||||
{% get_language_info_list for LANGUAGES as languages %}
|
{% for lang_code, lang_name in LANGUAGES %}
|
||||||
{% for language in languages %}
|
<option value="{{ lang_code }}"
|
||||||
<option value="{{ language.code }}"
|
{% if lang_code == LANGUAGE_CODE %}
|
||||||
{% if language.code == LANGUAGE_CODE %}
|
|
||||||
selected{% endif %}>
|
selected{% endif %}>
|
||||||
{{ language.name_local }} ({{ language.code }})
|
{{ lang_name }} ({{ lang_code }})
|
||||||
</option>
|
</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
|
@ -203,7 +202,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<script>
|
<script>
|
||||||
CSRF_TOKEN = "{{ csrf_token }}";
|
CSRF_TOKEN = "{{ csrf_token }}";
|
||||||
$(".invalid-feedback").addClass("d-block");
|
$(".invalid-feedback").addClass("d-block");
|
||||||
</script>
|
<script>
|
||||||
|
|
||||||
{% block extrajavascript %}{% endblock %}
|
{% block extrajavascript %}{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue