Check orga user limits when creating new users, fixing #7

This commit is contained in:
Kumi 2019-02-19 14:59:30 +00:00
parent 4d03bf7427
commit ad3d315e4e

View file

@ -26,7 +26,7 @@
<select multiple required class="custom-select mr-sm-2" id="orga" name="orga">
{% allOrgas as orgas %}
{% for choice in orgas %}
<option value="{{ choice.id }}">{{ choice }}</option>
<option {% if choice.userlimit and choice.userlimit <= choice.users.all|length %}disabled{% endif %} value="{{ choice.id }}">{{ choice }} {% if choice.userlimit %}({{ choice.users.all|length }} / {{ choice.userlimit }}){% endif %}</option>
{% endfor %}
</select>
</div>