cleaner structure

This commit is contained in:
Matthias 2021-08-04 19:44:01 +02:00
parent efd4644045
commit 3ecb1e6577
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -71,27 +71,31 @@
</div> </div>
<div class="row"> <div class="row">
<form action="{% url 'set_language' %}" method="post"> <div class="col">
{% csrf_token %} <form action="{% url 'set_language' %}" method="post">
<input name="next" type="hidden" value="{% url 'settings' %}"> {% csrf_token %}
<div class="col-sm-6" style="width: 200px;"><div id="div_id_language" class="form-group"><div class="controls "> <input name="next" type="hidden" value="{% url 'settings' %}">
<select name="language" class="select form-control"> <div class="col-sm-6" style="width: 200px;"><div id="div_id_language" class="form-group"><div class="controls ">
{% get_current_language as LANGUAGE_CODE %} <select name="language" class="select form-control">
{% get_available_languages as LANGUAGES %} {% get_current_language as LANGUAGE_CODE %}
{% get_language_info_list for LANGUAGES as languages %} {% get_available_languages as LANGUAGES %}
{% for language in languages %} {% get_language_info_list for LANGUAGES as languages %}
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}> {% for language in languages %}
{{ language.name_local }} ({{ language.code }}) <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}>
</option> {{ language.name_local }} ({{ language.code }})
{% endfor %} </option>
</select> {% endfor %}
</div></div></div> </select>
<div class="col-sm-6" style="width: auto;"> </div></div></div>
<input type="submit" value="{% trans 'Set Language' %}" class="btn btn btn-primary"> <div class="col-sm-6" style="width: auto;">
</div> <input type="submit" value="{% trans 'Set Language' %}" class="btn btn btn-primary">
</form> </div>
<h3>{% trans "Help the translation efforts!" %}</h3> </form>
<p>{% blocktrans with link="https://crowdin.com/project/inventree" %}Native language translation of the InvenTree web application is <a href="{{link}}">community contributed via crowdin</a>. Contributions are welcomed and encouraged.{% endblocktrans} %}</p> </div>
<div class="col">
<h4>{% trans "Help the translation efforts!" %}</h4>
<p>{% blocktrans with link="https://crowdin.com/project/inventree" %}Native language translation of the InvenTree web application is <a href="{{link}}">community contributed via crowdin</a>. Contributions are welcomed and encouraged.{% endblocktrans %}</p>
</div>
</div> </div>
{% endblock %} {% endblock %}