<commit_before>{% extends 'HWIOAuthBundle::layout.html.twig' %}

{% block hwi_oauth_content %}
    {% if error %}
        <div>{{ error }}</div>
    {% endif %}
    {% for owner in hwi_oauth_resource_owners() %}
    <a class="submit" href="{{ hwi_oauth_login_url(owner) }}">Login with {{ owner | trans({}, 'HWIOAuthBundle') }}</a> <br />
    {% endfor %}

    <form action="{{ path('login_check') }}" method="post">
        <div>
            <label for="username">{{ 'security.login.username'|trans({}, 'FOSUserBundle') }}</label>
            <input type="text" id="username" name="_username" />
        </div>

        <div>
            <label for="password">{{ '<PASSWORD>'|trans({}, '<PASSWORD>') }}</label>
            <input type="password" id="password" name="_password" />
        </div>

        <div>
            <input type="checkbox" id="remember_me" name="_remember_me" value="on" checked="checked" />
            <label for="remember_me">{{ 'security.login.remember_me'|trans({}, 'FOSUserBundle') }}</label>
        </div>

        <input type="submit" id="_submit" name="_submit" value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}" />
    </form>

    <a href="{{ path('fos_user_resetting_request') }}">Forgot password?</a>
{% endblock hwi_oauth_content %}<commit_msg>Added a check to hide the login form when connection an existing account<commit_after>{% extends 'HWIOAuthBundle::layout.html.twig' %}

{% block hwi_oauth_content %}
    {% if error %}
        <div>{{ error }}</div>
    {% endif %}
    {% for owner in hwi_oauth_resource_owners() %}
    <a class="submit" href="{{ hwi_oauth_login_url(owner) }}">Login with {{ owner | trans({}, 'HWIOAuthBundle') }}</a> <br />
    {% endfor %}

    {# HWIOAuthBundle uses the same template for the login and the connect functionality currently
       so we need to check if the user is already authenticated. #}
    {% if not app.user %}
    <form action="{{ path('login_check') }}" method="post">
        <div>
            <label for="username">{{ 'security.login.username'|trans({}, 'FOSUserBundle') }}</label>
            <input type="text" id="username" name="_username" />
        </div>

        <div>
            <label for="password">{{ '<PASSWORD>'|trans({}, '<PASSWORD>') }}</label>
            <input type="password" id="password" name="_password" />
        </div>

        <div>
            <input type="checkbox" id="remember_me" name="_remember_me" value="on" checked="checked" />
            <label for="remember_me">{{ 'security.login.remember_me'|trans({}, 'FOSUserBundle') }}</label>
        </div>

        <input type="submit" id="_submit" name="_submit" value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}" />
    </form>

    <a href="{{ path('fos_user_resetting_request') }}">Forgot password?</a>
    {% endif %}
{% endblock hwi_oauth_content %}
{'fraction_non_alphanumeric': 0.1994401679496151, 'fraction_numerical': 0.0, 'mean_word_length': 3.2927927927927927, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, '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': '4937270', 'n_tokens_mistral': 937, 'n_tokens_neox': 879, 'n_words': 202}