]> git.parisson.com Git - telemeta.git/commitdiff
Add next input for redirect to current url when change language
authormathieu <mathieu.boye28@gmail.com>
Mon, 11 Jul 2016 09:33:57 +0000 (11:33 +0200)
committermathieu <mathieu.boye28@gmail.com>
Mon, 11 Jul 2016 09:33:57 +0000 (11:33 +0200)
telemeta/templates/telemeta/base.html

index 7a4fb90355c64538ad5be8000483bd4a0394ef28..ffa104718115b466bf0a3c97d551fbe9844893f0 100644 (file)
                         </ul>
                         <form id="formlang" action="/i18n/setlang/" method="post" style="display:inline-block; {% if LANGUAGE_BIDI %}float: left;{% endif %}" onchange='this.submit();'>
                             {% csrf_token %}
+                            <input name="next" type="hidden" value="{{ request.path }}"/>
                             <select name="language" class="form-control" id="language-selector">
                                 {% for lang in LANGUAGES %}
                                     <option value="{{ lang.0 }}" {% if lang.0|slice:"2" == LANGUAGE_CODE|slice:"2" %}selected="selected"{% endif %}>{{ lang.1 }}</option>