| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- {% extends 'HWIOAuthBundle::layout.html.twig' %}
- {% block hwi_oauth_content %}
- {% if error %}
- <div>{{ error }}</div>
- {% endif %}
- {# 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 %}
- <div class="loginForm">
- <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">{{ 'security.login.password'|trans({}, 'FOSUserBundle') }}</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>
- {% if packagist_host and packagist_host in app.request.headers.get('Referer') %}
- <input type="hidden" name="_target_path" value="{{ app.request.headers.get('Referer') }}" />
- {% endif %}
- <input type="submit" id="_submit" name="_submit" value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}" />
- </form>
- <p>
- <a href="{{ path('fos_user_resetting_request') }}">Forgot password?</a>
- {% for owner in hwi_oauth_resource_owners() %}
- <a class="login-{{ owner }}" href="{{ hwi_oauth_login_url(owner) }}">Login with {{ owner | trans({}, 'HWIOAuthBundle') }}</a> <br />
- {% endfor %}
- </p>
- </div>
- {% else %}
- {% for owner in hwi_oauth_resource_owners() %}
- <a class="login-{{ owner }}" href="{{ hwi_oauth_login_url(owner) }}">Login with {{ owner | trans({}, 'HWIOAuthBundle') }}</a> <br />
- {% endfor %}
- {% endif %}
- {% endblock hwi_oauth_content %}
|