1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/resources/views/partials/social_login_buttons.blade.php
2015-10-11 17:41:09 +03:00

16 lines
643 B
PHP

@foreach (App\Services\AuthService::$providers as $provider)
<button type="button" class="btn btn-primary btn-block" onclick="socialSignup('{{ strtolower($provider) }}')" id="{{ strtolower($provider) }}LoginButton">
<i class="fa fa-{{ strtolower($provider) }}"></i> &nbsp;
{{ $provider }}
</button>
@endforeach
<script type="text/javascript">
function socialSignup(provider) {
trackEvent('/account', '/social_{{ $type }}/' + provider);
localStorage.setItem('auth_provider', provider);
setTimeout(function() {
window.location = '{{ SITE_URL }}/auth/' + provider;
}, 150);
}
</script>