Display the OAuth association only in "account" page.

Improved the template to show only when pertinent.
This commit is contained in:
2015-07-16 15:49:14 +02:00
parent 3c0122d98f
commit 769c14caf8
3 changed files with 18 additions and 16 deletions

View File

@@ -1,12 +1,11 @@
<hr>
{unless isempty="$oauth_associated"}
<h4>Un-Associate Account with Oauth Consumer</h4>
<div>
{foreach item="consumer" from="$oauth_associated"}
<div>
<form method="post" action="{$site_url/}account/oauth-un-associate">
<div>
<input type="hidden" name="consumer" value="{$consumer/}"/>
</div>
<input type="hidden" name="consumer" value="{$consumer/}"/>
<div>
<button type="submit">Unlink {$consumer/}</button>
</div>
@@ -14,14 +13,14 @@
</div>
{/foreach}
</div>
{/unless}
{unless isempty="$oauth_not_associated"}
<h4>Associate Account with Oauth Consumer</h4>
<div>
{foreach item="consumer" from="$oauth_not_associated"}
<div>
<form method="post" action="{$site_url/}account/oauth-associate">
<div>
<input type="hidden" name="consumer" value="{$consumer/}"/>
</div>
<input type="hidden" name="consumer" value="{$consumer/}"/>
<div>
<input type="email" id="email" name="email" value="{$email/}" required/>
<button type="submit">Link with {$consumer/}</button>
@@ -29,4 +28,5 @@
</form>
</div>
{/foreach}
</div>
</div>
{/unless}