Auto-select active orga in object creators

This commit is contained in:
Kumi 2019-03-08 15:39:13 +00:00
parent 8123042305
commit 9ff34c5199
2 changed files with 2 additions and 2 deletions

View file

@ -25,7 +25,7 @@
<select required class="custom-select mr-sm-2" id="organization" name="organization"> <select required class="custom-select mr-sm-2" id="organization" name="organization">
{% userOrgas as orgas %} {% userOrgas as orgas %}
{% for choice in orgas %} {% for choice in orgas %}
<option value="{{ choice.id }}">{{ choice.name }}</option> <option {% if user.userstatus.orga == choice %}selected{% endif %} value="{{ choice.id }}">{{ choice.name }}</option>
{% endfor %} {% endfor %}
</select> </select>
</div> </div>

View file

@ -21,7 +21,7 @@
<select class="custom-select mr-sm-2" id="organization" name="organization"> <select class="custom-select mr-sm-2" id="organization" name="organization">
{% userOrgas as organizations %} {% userOrgas as organizations %}
{% for choice in organizations %} {% for choice in organizations %}
<option value="{{ choice.id }}">{{ choice.name }}</option> <option {% if user.userstatus.orga == choice %}selected{% endif %} value="{{ choice.id }}">{{ choice.name }}</option>
{% endfor %} {% endfor %}
</select> </select>
</div> </div>