<commit_before><div class='box'>
    <h3>{{ 'Edit Users'|trans }}</h3>
    <hr>
    <ul class='list-group'>

        {% for user in usersArr %}
        <li><p>Team: {{ user.teamname|raw }}</p></li>
        <li>
            <form method='post' action='app/controllers/UsersController.php'>
                <input type='hidden' value='true' name='usersUpdate' />
                {% if fromSysconfig %}
                    <input type='hidden' value='1' name='fromSysconfig' />
                {% endif %}
                <input type='hidden' value='{{ user.userid }}' name='userid' />
                <ul class='list-inline'>

                    <!-- FIRSTNAME -->
                    <li>
                        {# add the userid in the for and id to prevent having more than one id on the page. Label wrapping wouldn't display nice #}
                        <label class='block' for='usersUpdateFirstname_{{ user.userid }}'>{{ 'Firstname'|trans }}</label>
                        <input class='clean-form' id='usersUpdateFirstname_{{ user.userid }}' type='text' value='{{ user.firstname|raw }}' name='firstname' />
                    </li>

                    <!-- LASTNAME -->
                    <li>
                        <label class='block' for='usersUpdateLastname_{{ user.userid }}'>{{ 'Lastname'|trans }}</label>
                        <input class='clean-form' id='usersUpdateLastname_{{ user.userid }}' type='text' value='{{ user.lastname|raw }}' name='lastname' />
                    </li>

                    <!-- EMAIL -->
                    <li>
                        <label class='block' for='usersUpdateEmail_{{ user.userid }}'>{{ 'Email'|trans }}</label>
                        <input class='clean-form' id='usersUpdateEmail_{{ user.userid }}' type='email' value='{{ user.email }}' name='email' />
                    </li>

                    <!-- PERMISSION GROUP -->
                    <li>
                        <label class='block' for='usersUpdateUsergroup_{{ user.userid }}'>{{ 'Group'|trans }}</label>
                        <select class='clean-form' name='usergroup' id='usersUpdateUsergroup_{{ user.userid }}'>
                            {% if App.Session.get('is_sysadmin') %}
                                <option value='1' {{ user.usergroup == '1' ? " selected='selected'" }}>Sysadmins</option>
                            {% endif %}
                            <option value='2' {{ user.usergroup == '2' ? " selected='selected'" }}>Admins</option>
                            <option value='3' {{ user.usergroup == '3' ? " selected='selected'" }}>Admins + Lock power</option>
                            <option value='4' {{ user.usergroup == '4' ? " selected='selected'" }}>Users</option>

                        </select>
                    </li>

                    <!-- RESET PASSWORD -->
                    <li>
                        <label class='block' for='usersUpdatePassword'>{{ 'Reset user password'|trans }}
                            <span class='smallgray'>({{ constant('MIN_PASSWORD_LENGTH', App.Users.Auth) }} {{ 'characters minimum'|trans }})</span>
                        </label>
                        {# add empty input to prevent FF from putting password in field because autocomplete doesn't work. from http://stackoverflow.com/questions/17781077/autocomplete-off-is-not-working-on-firefox #}
                        <input type='text' style='display:none'>
                        <input type='password' style='display:none'>
                        {% set pattern = '.{' ~ constant('MIN_PASSWORD_LENGTH', App.Users.Auth) ~ ',}' %}
                        <input autocomplete='new-password' class='clean-form' id='usersUpdatePassword' type='password' pattern='{{ pattern }}' value='' name='password' />
                    </li>

                    <!-- ACTIVE ACCOUNT -->
                    <li>
                        <label class='block' for='usersUpdateValidated_{{ user.userid }}'>{{ 'Has an active account?'|trans }}</label>
                        <select class='clean-form' name='validated' id='usersUpdateValidated_{{ user.userid }}'>
                            <option value='1' {{ user.validated ? " selected='selected'" }}>{{ 'Yes'|trans }}</option>
                            <option value='0' {{ not user.validated ? " selected='selected'" }}>{{ 'No'|trans }}</option>
                        </select>
                    </li>

                    <!-- ARCHIVE USER -->
                    <li>
                        <button class='button button-delete archive-user' data-userid='{{ user.userid }}'>{{ 'Archive user'|trans }}</button>
                    </li>

                    <li>
                        <button type='submit' class='button'>{{ 'Save'|trans }}</button>
                    </li>
                </ul>
            </form>
        </li>
        <hr>
        {% endfor %}
    </ul>
</div><commit_msg>don't show archive button if user is archived<commit_after><div class='box'>
    <h3>{{ 'Edit Users'|trans }}</h3>
    <hr>
    <ul class='list-group'>

        {% for user in usersArr %}
        <li><p>Team: {{ user.teamname|raw }}</p></li>
        <li>
            <form method='post' action='app/controllers/UsersController.php'>
                <input type='hidden' value='true' name='usersUpdate' />
                {% if fromSysconfig %}
                    <input type='hidden' value='1' name='fromSysconfig' />
                {% endif %}
                <input type='hidden' value='{{ user.userid }}' name='userid' />
                <ul class='list-inline'>

                    <!-- FIRSTNAME -->
                    <li>
                        {# add the userid in the for and id to prevent having more than one id on the page. Label wrapping wouldn't display nice #}
                        <label class='block' for='usersUpdateFirstname_{{ user.userid }}'>{{ 'Firstname'|trans }}</label>
                        <input class='clean-form' id='usersUpdateFirstname_{{ user.userid }}' type='text' value='{{ user.firstname|raw }}' name='firstname' />
                    </li>

                    <!-- LASTNAME -->
                    <li>
                        <label class='block' for='usersUpdateLastname_{{ user.userid }}'>{{ 'Lastname'|trans }}</label>
                        <input class='clean-form' id='usersUpdateLastname_{{ user.userid }}' type='text' value='{{ user.lastname|raw }}' name='lastname' />
                    </li>

                    <!-- EMAIL -->
                    <li>
                        <label class='block' for='usersUpdateEmail_{{ user.userid }}'>{{ 'Email'|trans }}</label>
                        <input class='clean-form' id='usersUpdateEmail_{{ user.userid }}' type='email' value='{{ user.email }}' name='email' />
                    </li>

                    <!-- PERMISSION GROUP -->
                    <li>
                        <label class='block' for='usersUpdateUsergroup_{{ user.userid }}'>{{ 'Group'|trans }}</label>
                        <select class='clean-form' name='usergroup' id='usersUpdateUsergroup_{{ user.userid }}'>
                            {% if App.Session.get('is_sysadmin') %}
                                <option value='1' {{ user.usergroup == '1' ? " selected='selected'" }}>Sysadmins</option>
                            {% endif %}
                            <option value='2' {{ user.usergroup == '2' ? " selected='selected'" }}>Admins</option>
                            <option value='3' {{ user.usergroup == '3' ? " selected='selected'" }}>Admins + Lock power</option>
                            <option value='4' {{ user.usergroup == '4' ? " selected='selected'" }}>Users</option>

                        </select>
                    </li>

                    <!-- RESET PASSWORD -->
                    <li>
                        <label class='block' for='usersUpdatePassword'>{{ 'Reset user password'|trans }}
                            <span class='smallgray'>({{ constant('MIN_PASSWORD_LENGTH', App.Users.Auth) }} {{ 'characters minimum'|trans }})</span>
                        </label>
                        {# add empty input to prevent FF from putting password in field because autocomplete doesn't work. from http://stackoverflow.com/questions/17781077/autocomplete-off-is-not-working-on-firefox #}
                        <input type='text' style='display:none'>
                        <input type='password' style='display:none'>
                        {% set pattern = '.{' ~ constant('MIN_PASSWORD_LENGTH', App.Users.Auth) ~ ',}' %}
                        <input autocomplete='new-password' class='clean-form' id='usersUpdatePassword' type='password' pattern='{{ pattern }}' value='' name='password' />
                    </li>

                    <!-- ACTIVE ACCOUNT -->
                    <li>
                        <label class='block' for='usersUpdateValidated_{{ user.userid }}'>{{ 'Has an active account?'|trans }}</label>
                        <select class='clean-form' name='validated' id='usersUpdateValidated_{{ user.userid }}'>
                            <option value='1' {{ user.validated ? " selected='selected'" }}>{{ 'Yes'|trans }}</option>
                            <option value='0' {{ not user.validated ? " selected='selected'" }}>{{ 'No'|trans }}</option>
                        </select>
                    </li>

                    <!-- ARCHIVE USER -->
                    <li>
                    {% if user.archived %}
                        <p>{{ 'User is archived'|trans }}</p>
                    {% else %}
                        <button class='button button-delete archive-user' data-userid='{{ user.userid }}'>{{ 'Archive user'|trans }}</button>
                    {% endif %}
                    </li>

                    <li>
                        <button type='submit' class='button'>{{ 'Save'|trans }}</button>
                    </li>
                </ul>
            </form>
        </li>
        <hr>
        {% endfor %}
    </ul>
</div>
{'fraction_non_alphanumeric': 0.16477837408069967, 'fraction_numerical': 0.0041741204531902205, 'mean_word_length': 1.520160280490859, 'pattern_counts': {'":': 0, '<': 173, '<?xml version=': 0, '>': 173, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3356424', 'n_tokens_mistral': 2754, 'n_tokens_neox': 2506, 'n_words': 555}