fix form name for language selector
(so it works with lang.name that has blanks)
This commit is contained in:
parent
0c7c259901
commit
dc23b56537
@ -81,11 +81,11 @@
|
|||||||
{% for lang in langs %}
|
{% for lang in langs %}
|
||||||
{% if lang.code != LANGUAGE_CODE %}
|
{% if lang.code != LANGUAGE_CODE %}
|
||||||
<li>
|
<li>
|
||||||
<form name="setLang{{ lang.name }}" action="{% url 'set_language' %}" method="post">
|
<form name="setLang{{ lang.name.split|join:"_" }}" action="{% url 'set_language' %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="language" value="{{ lang.code }}" />
|
<input type="hidden" name="language" value="{{ lang.code }}" />
|
||||||
</form>
|
</form>
|
||||||
<a href="#" onclick="document.setLang{{ lang.name }}.submit();return false;">
|
<a href="#" onclick="document.setLang{{ lang.name.split|join:"_" }}.submit();return false;">
|
||||||
{{ lang.name_local }} ({{ lang.name }}) [{{ lang.code }}]
|
{{ lang.name_local }} ({{ lang.name }}) [{{ lang.code }}]
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user