fix(dgsi/user-list): Disable VLAN allocation when no kanidm account exists

This commit is contained in:
Tom Hubrecht 2025-02-06 11:24:04 +01:00
parent b810fa8a67
commit dd3e62e30a
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc

View file

@ -10,10 +10,12 @@
<a hx-post="{% url "dgsi:user_deassign_vlan" person.pk %}"
hx-target="#user-{{ person.pk }}"
class="button is-fullwidth is-light is-warning">{% trans "Désallouer" %}</a>
{% else %}
{% elif person.kanidm %}
<a hx-post="{% url "dgsi:user_assign_vlan" person.pk %}"
hx-target="#user-{{ person.pk }}"
class="button is-fullwidth is-light is-primary">{% trans "Allouer" %}</a>
{% else %}
<button class="button is-fullwidth is-static">{% trans "Pas de compte" %}</button>
{% endif %}
</td>
</tr>