2016-09-22 13:56:57 +02:00
|
|
|
{% extends 'JotunheimrUserBundle::layout.html.twig' %}
|
|
|
|
|
|
|
|
|
|
{% trans_default_domain 'FOSUserBundle' %}
|
|
|
|
|
|
|
|
|
|
{% block fos_user_content %}
|
2016-11-04 15:30:29 +01:00
|
|
|
<script>
|
|
|
|
|
window.fbAsyncInit = function() {
|
|
|
|
|
FB.init({
|
|
|
|
|
appId : '320599508311862',
|
|
|
|
|
xfbml : true,
|
|
|
|
|
version : 'v2.8'
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
(function(d, s, id){
|
|
|
|
|
var js, fjs = d.getElementsByTagName(s)[0];
|
|
|
|
|
if (d.getElementById(id)) {return;}
|
|
|
|
|
js = d.createElement(s); js.id = id;
|
|
|
|
|
js.src = "//connect.facebook.net/en_US/sdk.js";
|
|
|
|
|
fjs.parentNode.insertBefore(js, fjs);
|
|
|
|
|
}(document, 'script', 'facebook-jssdk'));
|
|
|
|
|
|
|
|
|
|
function fb_login() {
|
|
|
|
|
FB.getLoginStatus(function(response) {
|
|
|
|
|
if (response.status === 'connected') {
|
|
|
|
|
document.location = "{{ url("hwi_oauth_service_redirect", {service: "facebook"}) }}";
|
|
|
|
|
} else {
|
|
|
|
|
FB.login(function(response) {
|
|
|
|
|
if (response.authResponse) {
|
|
|
|
|
document.location = "{{ url("hwi_oauth_service_redirect", {service: "facebook"}) }}";
|
|
|
|
|
}
|
|
|
|
|
}, {scope: 'email'});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<a href="#" onclick="fb_login();">Facebook Connect Button (Dialog)</a>
|
|
|
|
|
|
2016-11-02 18:35:03 +01:00
|
|
|
{% if error %}
|
|
|
|
|
{{ error.messageKey|trans(error.messageData, 'security') }}
|
|
|
|
|
{% endif %}
|
2016-09-22 13:56:57 +02:00
|
|
|
|
2016-11-02 18:35:03 +01:00
|
|
|
<form action="{{ path("fos_user_security_check") }}" method="post">
|
|
|
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token }}"/>
|
2016-09-22 13:56:57 +02:00
|
|
|
|
2016-11-02 18:35:03 +01:00
|
|
|
<input type="text" id="username" name="_username" value="{{ last_username }}"
|
|
|
|
|
placeholder="{{ 'security.login.username'|trans }}"
|
2016-11-04 15:30:29 +01:00
|
|
|
autofocus/>
|
2016-09-22 13:56:57 +02:00
|
|
|
|
2016-11-02 18:35:03 +01:00
|
|
|
<input type="password" id="password" name="_password"
|
|
|
|
|
placeholder="{{ 'security.login.password'|trans }}"
|
2016-11-04 15:30:29 +01:00
|
|
|
/>
|
2016-11-02 18:35:03 +01:00
|
|
|
|
|
|
|
|
<input type="checkbox" id="remember_me" name="_remember_me" value="on"/>
|
|
|
|
|
<label for="remember_me">{{ 'security.login.remember_me'|trans }}</label>
|
|
|
|
|
|
|
|
|
|
<input type="submit" id="_submit" name="_submit"
|
|
|
|
|
value="{{ 'security.login.submit'|trans }}"/>
|
|
|
|
|
</form>
|
2016-09-22 13:56:57 +02:00
|
|
|
{% endblock fos_user_content %}
|