<commit_before>{% extends "FOSUserBundle::layout.html.twig" %}

{% block body %}
    <div class="grid fluid">
        <h1>
            <a href="{{ path('users') }}"><i class="icon-arrow-left-3 fg-darker smaller"></i> </a>
            New User
        </h1>

        {{ form_start(form, {attr: {class:'form-horizontal'} }) }}
        <fieldset>
            {{ form_errors(form) }}
            <br />
            <label>Name</label>
            <div class="input-control text" data-role="input-control">
                {{ form_widget(form.name, {attr: {class:'size4'} }) }}
                {% for errorItem in form.name.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.name.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            <label>Username</label>
            <div class="input-control text" data-role="input-control">
                {{ form_widget(form.username, {attr: {class:'size4'} }) }}
                {% for errorItem in form.username.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.username.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            <label>Email</label>
            <div class="input-control text" data-role="input-control">
                {{ form_widget(form.email, {attr: {class:'size4'} }) }}
                {% for errorItem in form.email.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.email.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            {% if is_granted('ROLE_SUPER_ADMIN') %}
                <label>Organizations</label>
                <div class="input-control select" data-role="input-control">
                    {{ form_widget(form.organizations, {attr: {class:'size4'} }) }}
                    {% for errorItem in form.organizations.vars.errors %}
                        <span class="has-error text-danger" for="{{ form.organizations.vars.id }}">{{ errorItem.message }}</span>
                    {% endfor %}
                </div>
            {% endif %}
            <label>Password</label>
            <div class="input-control text" data-role="input-control">
                {{ form_widget(form.plainPassword.first, {attr: {class:'size4'} }) }}
                {% for errorItem in form.plainPassword.first.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.plainPassword.first.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            <label>Confirm Password</label>
            <div class="input-control text" data-role="input-control">
                {{ form_widget(form.plainPassword.second, {attr: {class:'size4'} }) }}
                {% for errorItem in form.plainPassword.second.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.plainPassword.second.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            <label>Roles</label>
            <div class="input-control select" data-role="input-control">
                {{ form_widget(form.roles, {attr: {class:'size4',id:'roles'} }) }}
                {% for errorItem in form.roles.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.roles.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            <label>Projects</label>
            <div class="input-control select" data-role="input-control">
                {{ form_widget(edit_form.userProjects, {attr: {class:'size4'} }) }}
                {% for errorItem in edit_form.userProjects.vars.errors %}
                    <span class="has-error text-danger" for="{{ edit_form.userProjects.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            {{ form_widget(form.submit, {attr: {class:'button primary'} }) }}
            or
            <a class="button"   href="{{ path('users') }}">Cancel</a>

        </fieldset>
        {{ form_end(form) }}

    </div>

    <script src="{{ asset('bundles/applicationfront/js/users.js') }}"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var user = new Users();
            user.onChangeRole();
            user.applyChosen();
        });
    </script>
{% endblock body %}<commit_msg>projects dropdown added in users<commit_after>{% extends "FOSUserBundle::layout.html.twig" %}

{% block body %}
    <div class="grid fluid">
        <h1>
            <a href="{{ path('users') }}"><i class="icon-arrow-left-3 fg-darker smaller"></i> </a>
            New User
        </h1>

        {{ form_start(form, {attr: {class:'form-horizontal'} }) }}
        <fieldset>
            {{ form_errors(form) }}
            <br />
            <label>Name</label>
            <div class="input-control text" data-role="input-control">
                {{ form_widget(form.name, {attr: {class:'size4'} }) }}
                {% for errorItem in form.name.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.name.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            <label>Username</label>
            <div class="input-control text" data-role="input-control">
                {{ form_widget(form.username, {attr: {class:'size4'} }) }}
                {% for errorItem in form.username.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.username.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            <label>Email</label>
            <div class="input-control text" data-role="input-control">
                {{ form_widget(form.email, {attr: {class:'size4'} }) }}
                {% for errorItem in form.email.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.email.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            {% if is_granted('ROLE_SUPER_ADMIN') %}
                <label>Organizations</label>
                <div class="input-control select" data-role="input-control">
                    {{ form_widget(form.organizations, {attr: {class:'size4'} }) }}
                    {% for errorItem in form.organizations.vars.errors %}
                        <span class="has-error text-danger" for="{{ form.organizations.vars.id }}">{{ errorItem.message }}</span>
                    {% endfor %}
                </div>
            {% endif %}
            <label>Password</label>
            <div class="input-control text" data-role="input-control">
                {{ form_widget(form.plainPassword.first, {attr: {class:'size4'} }) }}
                {% for errorItem in form.plainPassword.first.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.plainPassword.first.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            <label>Confirm Password</label>
            <div class="input-control text" data-role="input-control">
                {{ form_widget(form.plainPassword.second, {attr: {class:'size4'} }) }}
                {% for errorItem in form.plainPassword.second.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.plainPassword.second.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            <label>Roles</label>
            <div class="input-control select" data-role="input-control">
                {{ form_widget(form.roles, {attr: {class:'size4',id:'roles'} }) }}
                {% for errorItem in form.roles.vars.errors %}
                    <span class="has-error text-danger" for="{{ form.roles.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            <label>Projects</label>
            <div class="input-control select" data-role="input-control">
                {{ form_widget(edit_form.userProjects, {attr: {class:'size4'} }) }}
                {% for errorItem in edit_form.userProjects.vars.errors %}
                    <span class="has-error text-danger" for="{{ edit_form.userProjects.vars.id }}">{{ errorItem.message }}</span>
                {% endfor %}
            </div>
            {{ form_widget(form.submit, {attr: {class:'button primary'} }) }}
            or
            <a class="button"   href="{{ path('users') }}">Cancel</a>

        </fieldset>
        {{ form_end(form) }}

    </div>

    <script src="{{ asset('bundles/applicationfront/js/users.js') }}"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var obj = new Users();
            obj.bindAll();
        });
    </script>
{% endblock body %}
{'fraction_non_alphanumeric': 0.17324069923800986, 'fraction_numerical': 0.002465262214253698, 'mean_word_length': 1.8541733290693956, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 0, '>': 133, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4045885', 'n_tokens_mistral': 2619, 'n_tokens_neox': 2437, 'n_words': 457}