예제 #1
0
$AuthAuthChoiceClients = $authAuthChoice->getClients();
if (!empty($AuthAuthChoiceClients)) {
    ?>
            <div class="social-auth-links text-center">
                <p>- OR -</p>
                <?php 
    foreach ($authAuthChoice->getClients() as $Client) {
        $name = $Client->getName();
        $icon = $name;
        if ($icon === 'live') {
            $icon = 'windows';
        }
        if ($icon === 'vkontakte') {
            $icon = 'vk';
        }
        if ($icon === 'yandex') {
            $icon = 'yahoo';
        }
        $icon = FA::icon($icon);
        echo Html::a(sprintf('%s Sign in using %s', $icon, $Client->getName()), $authAuthChoice->createClientUrl($Client), ['class' => sprintf('btn btn-block btn-flat btn-social btn-%s', $name)]);
    }
    ?>
            </div>
            <?php 
}
\yii\authclient\widgets\AuthChoice::end();
?>

        <a href="#">I forgot my password</a><br>
    </div>
</div>
예제 #2
0
        $class = $name === 'live' ? 'windows' : $name;
        ?>
                        <?php 
        $text = sprintf('<i class="%s">%s</i>&nbsp;%s', "fa fa-{$class}", $letter, $client->getTitle());
        ?>
                        <?php 
        echo $authAuthChoice->clientLink($client, $text, ['class' => "btn btn-block btn-social btn-{$class}"]);
        ?>
                    </div>
                <?php 
    }
    ?>
                </div>
            </div>
        <?php 
    AuthChoice::end();
    ?>
    <?php 
}
?>

    <?php 
foreach (['restore-password', 'signup', 'login'] as $action) {
    ?>
        <?php 
    if ($widget->isShown($action)) {
        ?>
            <br/>
            <?php 
        echo Html::a($widget->getText($action), $widget->getPage($action));
        ?>