{% from 'include/input_macros.html' import input, checkbox %} {% if not adding %} {% if g.user_params['role'] == 2 %} {% else %} {% endif %} {% endif %} {% for user in users %} {% set disable_superAdmin = {'disabled': ''} %} {% if g.user_params['role'] == 2 %} {% for user_role in users_roles %} {% if user_role.user_role_id == 1 and user.user_id == user_role.user_id %} {% if disable_superAdmin.update({'disabled': 'disabled'}) %} {% endif %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% if not adding %}
{{lang.words.login|title()}} {{lang.words.password|title()}} {{lang.words.active|title()}} {{lang.words.email|title()}}{{lang.words.role|title()}}{{lang.words.groups|title()}} {{lang.words.and}} {{lang.words.roles|title()}}{{lang.words.services|title()}}
{% set login_id = 'login-' + user.user_id|string() %} {% if user.ldap_user == 1 %} {{ input(login_id, value=user.username, readonly='readonly', disabled=disable_superAdmin['disabled']) }} {% else %} {{ input(login_id, value=user.username, disabled=disable_superAdmin['disabled']) }} {% endif %} {% if user.ldap_user != 1 and not disable_superAdmin['disabled'] %} {% endif %} {% set activeuser_id = 'activeuser-' + user.user_id|string() %} {% if user.activeuser == 1 %} {{ checkbox(activeuser_id, checked='checked', disabled=disable_superAdmin['disabled']) }} {% else %} {{ checkbox(activeuser_id, disabled=disable_superAdmin['disabled']) }} {% endif %} {% set email_id = 'email-' + user.user_id|string() %} {% if user.ldap_user == 1%} {{ input(email_id, value=user.email, readonly='readonly', disabled=disable_superAdmin['disabled']) }} {% else %} {{ input(email_id, value=user.email, type='email', disabled=disable_superAdmin['disabled']) }} {% endif %} {% if g.user_params['role'] == 2 %} {% else %} {% endif %}

+ {{lang.words.add|title()}}

{% endif %}