Skip to content

Commit

Permalink
fix: Connect via Facebook should not be visible
Browse files Browse the repository at this point in the history
Closes #848
  • Loading branch information
kumy committed Sep 17, 2023
1 parent d3240b1 commit 53c34ea
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions website/app-templates/smarty/blocks/user/oauth.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@
</p>
<div class="row">
{foreach from=$socialProviders item=provider}
{if $user->isConnectedWithProvider($provider)}
<div class="col-sm-12">
<button type="button" class="btn btn-danger btn-block" title="{t provider=$provider->name}Disconnect from %1{/t}" data-toggle="modal" data-target="#modal" data-type="user-oauth-connect" data-oauth-provider-name="{strtolower($provider->name)}">
{fa icon="{strtolower($provider->name)}"} {t}Disconnect{/t}
</button>
</div>
{else}
<div class="col-sm-12">
<a class="btn btn-default btn-block" href="{'opauth_login'|alias:sprintf('strategy=%s', strtolower($provider->name))}" title="{t provider=$provider->name}Connect with %1{/t}">{fa icon="{strtolower($provider->name)}"} {t}Connect{/t}</a>
</div>
{assign "GK_OPAUTH_CLIENT_ID" sprintf("GK_OPAUTH_%s_CLIENT_ID", strtoupper($provider->name))}
{if (defined($GK_OPAUTH_CLIENT_ID) and constant($GK_OPAUTH_CLIENT_ID) !== false)}
{if $user->isConnectedWithProvider($provider)}
<div class="col-sm-12">
<button type="button" class="btn btn-danger btn-block" title="{t provider=$provider->name}Disconnect from %1{/t}" data-toggle="modal" data-target="#modal" data-type="user-oauth-connect" data-oauth-provider-name="{strtolower($provider->name)}">
{fa icon="{strtolower($provider->name)}"} {t}Disconnect{/t}
</button>
</div>
{else}
<div class="col-sm-12">
<a class="btn btn-default btn-block" href="{'opauth_login'|alias:sprintf('strategy=%s', strtolower($provider->name))}" title="{t provider=$provider->name}Connect with %1{/t}">{fa icon="{strtolower($provider->name)}"} {t}Connect{/t}</a>
</div>
{/if}
{/if}
{/foreach}
</div>
Expand Down

0 comments on commit 53c34ea

Please sign in to comment.