<commit_before>{% extends layout_template  %}

{% block title %}Edit User: {{ user.displayName }}{% endblock %}

{% block content %}

<div class="media">

    <div class="media-user-info">

        <div class="control-group">

            <div class="controls gravatar">
                <img src="{{ image_url }}"/>
            </div>
            
            
        </div>


        <div class="page-header">
        <h1>edit user: {{ user.displayName }}</h1>
        </div>

        <label class="control-label" for="input-name">
            <a href="http://gravatar.com">Change Gravatar image</a>
            </label>

        {% if error %}
        <div class="alert alert-error">{{ error|nl2br }}</div>
        {% endif %}

        <form class="form-horizontal" method="POST">

        
    </div>

        <h2 class="user-information">User informations</h2>


        <div class="control-group">
            <div class="controls">
                <label class="control-label" for="input-name">Name</label>
                <input name="name" type="text" id="input-name" placeholder="Name" value="{{ user.name }}">
                <span class="help-inline">Shown publicly</span>
            </div>
        </div>

        <div class="control-group">
            <div class="controls">       
             <label class="control-label" for="input-email">Email</label>
                <input name="email" type="email" id="input-email" placeholder="Email" required value="{{ user.email }}">
                <span class="help-inline">Never shared</span>
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
                <label class="control-label" for="input-password">New password</label>
                <input name="password" type="password" id="input-password" placeholder="<PASSWORD>">
                <span class="help-inline">Leave blank except to change</span>
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
                <label class="control-label" for="input-confirm-password">Confirm password</label>
                <input name="confirm_password" type="password" id="input-confirm-password" placeholder="<PASSWORD>">
            </div>
        </div>

        {% if is_granted('ROLE_ADMIN') %}
            <div class="controls">
                Admin options:
            </div>

            <div class="control-group">
                <label class="control-label" for="input-roles">Roles</label>
                <div class="controls">
                    <select multiple id="input-roles" name="roles[]">
                        {% for role in available_roles %}
                            <option value="{{ role }}" {% if user.hasRole(role) %}selected{% endif %}>{{ role }}</option>
                        {% endfor %}
                    </select>
                </div>
            </div>
        {% endif %}

        <div class="control-group">
            <div class="controls">
                <button type="submit" class="btn">Save</button>
                <a style="margin-left: 10px;" href="{{ path('user.view', {'id': user.id}) }}">Back to profile</a>
            </div>
        </div>

    </form>
</div>
{% endblock %}<commit_msg>form modif edit user<commit_after>{% extends layout_template  %}

{% block title %}Edit User: {{ user.displayName }}{% endblock %}

{% block content %}

<div class="media">

    <div class="media-user-info">

            <div class="controls gravatar">
                <img src="{{ image_url }}"/>
            </div>

        <div class="page-header">
        <h1>edit user: {{ user.displayName }}</h1>
        </div>

        <label class="control-label" for="input-name">
            <a href="http://gravatar.com">Change Gravatar image</a>
            </label>

        {% if error %}
        <div class="alert alert-error">{{ error|nl2br }}</div>
        {% endif %}

        <form class="form-horizontal" method="POST">

        
    </div>

        <h2 class="user-information">User informations</h2>


        <div class="control-group">
            <div class="controls">
                <label class="control-label" for="input-name">Name</label>
                <input name="name" type="text" id="input-name" placeholder="Name" value="{{ user.name }}">
                <span class="help-inline">Shown publicly</span>
            </div>
        </div>

        <div class="control-group">
            <div class="controls">       
             <label class="control-label" for="input-email">Email</label>
                <input name="email" type="email" id="input-email" placeholder="Email" required value="{{ user.email }}">
                <span class="help-inline">Never shared</span>
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
                <label class="control-label" for="input-password">New password</label>
                <input name="password" type="password" id="input-password" placeholder="<PASSWORD>">
                <span class="help-inline">Leave blank except to change</span>
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
                <label class="control-label" for="input-confirm-password">Confirm password</label>
                <input name="confirm_password" type="password" id="input-confirm-password" placeholder="<PASSWORD>">
            </div>
        </div>

        {% if is_granted('ROLE_ADMIN') %}
            <div class="controls">
                Admin options:
            </div>

            <div class="control-group">
                <label class="control-label" for="input-roles">Roles</label>
                <div class="controls">
                    <select multiple id="input-roles" name="roles[]">
                        {% for role in available_roles %}
                            <option value="{{ role }}" {% if user.hasRole(role) %}selected{% endif %}>{{ role }}</option>
                        {% endfor %}
                    </select>
                </div>
            </div>
        {% endif %}

        <div class="control-group">
            <div class="controls">
                <button type="submit" class="btn save-info">save new informations</button>
                <a style="margin-left: 10px;" href="{{ path('user.view', {'id': user.id}) }}">or back to profile</a>
            </div>
        </div>

    </form>
</div>
{% endblock %}
{'fraction_non_alphanumeric': 0.1673832923832924, 'fraction_numerical': 0.00214987714987715, 'mean_word_length': 1.8170415224913494, 'pattern_counts': {'":': 0, '<': 159, '<?xml version=': 0, '>': 159, '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': '2989378', 'n_tokens_mistral': 1859, 'n_tokens_neox': 1724, 'n_words': 380}