Ejemplo n.º 1
0
">
                <button type="submit" class="btn btn-primary btn-block btn-flat"><?php 
echo $widget->getText('button');
?>
</button>
            </div>
        </div>
    <?php 
$form->end();
?>

    <?php 
if ($widget->isShown('social-login')) {
    ?>
        <?php 
    $authAuthChoice = AuthChoice::begin(['baseAuthUrl' => ['auth'], 'options' => ['class' => 'social-auth-links text-center']]);
    ?>
            <h4>--- &nbsp; <?php 
    echo Yii::t('adminlte', 'OR SIGN IN WITH');
    ?>
 &nbsp; ---</h4>
            <div class="social-button-login">
                <div class="row">
                <?php 
    foreach ($authAuthChoice->getClients() as $name => $client) {
        ?>
                    <div class="col-md-6 col-xs-12" style="margin-bottom: 0.5em">
                        <?php 
        $letter = $name === 'yandex' ? 'Я' : '';
        ?>
                        <?php 
Ejemplo n.º 2
0
        <div class="row">
            <div class="col-xs-8">
                <?php 
echo $form->field($SignInForm, 'remember', ['class' => 'cookyii\\widgets\\angular\\material\\ActiveField'])->label(false)->checkbox();
?>
            </div>
            <div class="col-xs-4">
                <?php 
$icon = FA::icon('cog', ['ng-show' => 'in_progress', 'class' => 'wo-animate'])->spin();
echo Html::submitButton($icon . ' ' . Yii::t('account', 'Sign In'), ['class' => 'btn btn-primary btn-block btn-flat', 'ng-disabled' => 'in_progress']);
?>
            </div>
        </div>
        <?php 
\cookyii\widgets\angular\ActiveForm::end();
$authAuthChoice = \yii\authclient\widgets\AuthChoice::begin(['baseAuthUrl' => ['/account/sign/auth'], 'popupMode' => false, 'autoRender' => false]);
$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';
        }
Ejemplo n.º 3
0
            </ul>
        <?php 
}
?>
        <?php 
AuthChoice::end();
?>
        <?php 
if (!empty($services)) {
    ?>
            <h3><?php 
    echo Yii::t('app', 'Detach service');
    ?>
</h3>
            <?php 
    $authChoice = AuthChoice::begin(['baseAuthUrl' => ['/user/user/auth']]);
    ?>
            <ul class="auth-clients clear">
                <?php 
    foreach ($authChoice->clients as $client) {
        ?>
                    <?php 
        if (in_array($client->className(), $services)) {
            ?>
                        <li class="auth-client"><?php 
            echo $authChoice->clientLink($client);
            ?>
</li>
                    <?php 
        }
        ?>
Ejemplo n.º 4
0
echo $form->field($SignUpForm, 'name')->textInput();
echo $form->field($SignUpForm, 'password')->passwordInput();
echo $form->field($SignUpForm, 'password_app')->passwordInput();
echo $form->field($SignUpForm, 'agree')->checkbox(['value' => '1', 'label' => \Yii::t('cookyii.account', 'I agree to the {terms} of use', ['terms' => Html::a(\Yii::t('cookyii.account', 'terms'), ['/site/terms'])])]);
?>
        <div class="row">
            <div class="col-xs-12 text-right">
                <?php 
$icon = FA::icon('cog', ['ng-show' => 'in_progress', 'class' => 'wo-animate'])->spin();
echo Html::submitButton($icon . ' ' . Yii::t('cookyii.account', 'Sign in'), ['class' => 'btn btn-sm btn-primary btn-flat', 'ng-disabled' => 'in_progress']);
?>
            </div>
        </div>
        <?php 
ActiveForm::end();
$authAuthChoice = AuthChoice::begin(['baseAuthUrl' => ['/account/sign/auth'], 'popupMode' => false, 'autoRender' => false]);
$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';
        }
Ejemplo n.º 5
0
<div class="text-center">
    <?php 
echo Html::a(Html::img('/libreria/imagenes/defecto/logo-n.png', ['alt' => Yii::$app->name]), Yii::$app->urlManagerWeb->createUrl('/'));
?>
    <h5 class="text-muted m-t-0 font-600">¿Todavía no te has registrado? ¡Hazlo gratis!</h5>
</div>
<div class="m-t-40 card-box">
    <div class="text-center">
        <h5 class="text-uppercase font-bold m-b-0"><span class="text-primary">1 segundo</span> con tu facebook</h5>
    </div>
    <div class="panel-body">

        <?php 
//Login con facebook
$authAuthChoice = AuthChoice::begin(['baseAuthUrl' => ['default/auth']]);
?>
        <?php 
foreach ($authAuthChoice->getClients() as $client) {
    $authAuthChoice->clientLink($client, '<i class="fa fa-facebook m-r-5"></i> <span>' . Yii::t('app', 'Conectar con Facebook') . '</span>', ['class' => 'btn btn-purple btn-bordred btn-block waves-effect waves-light m-b-0']);
}
AuthChoice::end();
?>

        <div class="text-center">
            <h5 class="text-lowercase text-muted m-b-7 m-t-0">No publicamos nada sin tu consentimiento</h5>
        </div>

        <div class="text-center">
            <p class="separator hr"><span>o</span></p>
        </div>
Ejemplo n.º 6
0
                <?php 
echo Html::a(Yii::t('app', 'Forgot your password?'), ['/main/send-email']);
?>
            </div>
        </div>
        <?php 
ActiveForm::end();
?>
        <div class="row" style="margin-top: 20px;">
            <div class="col-md-4 col-md-offset-4">
                <label class="control-label" for="loginform-email"><?php 
echo Yii::t('app', 'Login with social network.');
?>
</label>
                <?php 
$authAuthChoice = AuthChoice::begin(['baseAuthUrl' => ['site/auth']]);
?>
                <?php 
foreach ($authAuthChoice->getClients() as $client) {
    ?>
                    <div style="width: 40px; float: left; font-size: 0px;"><?php 
    $authAuthChoice->clientLink($client);
    ?>
</div>
                <?php 
}
?>

                <?php 
AuthChoice::end();
?>
foreach ($authAuthChoice->getClients() as $client) {
    ?>
			<li><?php 
    echo Html::a('Register with ' . $client->title, ['site/authfbreg', 'authclient' => $client->name], ['class' => "btn btn-block btn-default {$client->name} "]);
    ?>
</li>
			<?php 
}
?>
			</ul>
			<?php 
AuthChoice::end();
?>
			<!--Login with FB -->
			<?php 
$authAuthChoice = AuthChoice::begin(['baseAuthUrl' => ['site/authfblogin'], 'autoRender' => false, 'popupMode' => false]);
?>
			<ul>
			<?php 
foreach ($authAuthChoice->getClients() as $client) {
    ?>
			<li><?php 
    echo Html::a('Login with ' . $client->title, ['site/authfblogin', 'authclient' => $client->name], ['class' => "btn btn-block btn-default {$client->name} "]);
    ?>
</li>
			<?php 
}
?>
			</ul>
			<?php 
AuthChoice::end();
Ejemplo n.º 8
0
use yii\widgets\ActiveForm;
?>
<style>
    #thirdPartLogin ul li{display: block;line-height: 40px;
        text-align: center;
        color: #fff;
        margin-bottom: 10px;}
    #thirdPartLogin ul li#qq{background:#0873c0;}
    #thirdPartLogin ul li#weibo{background:#df4930;}
    #thirdPartLogin ul li a{color:#fff;font-size: 14px;}
</style>

<div class="login-form">
    <div id="thirdPartLogin">
        <?php 
$authAuthChoice = AuthChoice::begin(['baseAuthUrl' => ['site/auth'], 'popupMode' => false]);
?>
        <ul>
            <?php 
foreach ($authAuthChoice->getClients() as $client) {
    ?>
                <li id="<?php 
    echo $client->getId();
    ?>
"><?php 
    echo Html::a($client->getTitle(), $authAuthChoice->createClientUrl($client), ['class' => 'qq']);
    ?>
</li>
            <?php 
}
?>
Ejemplo n.º 9
0
                    <div class="not-registered-link">
                        Don't have an account?
			&nbsp;
                        <?php 
echo Html::a('Not registered yet?', ['/users/guest/signup']);
?>
                    </div>

                </fieldset>
                <?php 
ActiveForm::end();
?>

                <?php 
$authAuthChoice = AuthChoice::begin(['baseAuthUrl' => ['/security/auth/auth']]);
?>
                <ul>
                    <?php 
foreach ($authAuthChoice->getClients() as $client) {
    ?>
                        <li><?php 
    $authAuthChoice->clientLink($client, 'CONNECT WITH FACEBOOK');
    ?>
</li>
                    <?php 
}
?>
                </ul>
                <?php 
AuthChoice::end();
Ejemplo n.º 10
0
/**
 * Renders steam auth button or logout button
 *
 * f****d up a little bit...
 *
 * @file auth.php
 *
 * @author Denis Alexandrov <*****@*****.**>
 * @date 30.12.2015
 */
?>

<div id="auth">
    <?php 
if (\Yii::$app->user->isGuest) {
    $auth = \yii\authclient\widgets\AuthChoice::begin(['baseAuthUrl' => ['site/auth'], 'popupMode' => false]);
    foreach ($auth->getClients() as $client) {
        $auth->clientLink($client, '<img src="http://steamcommunity-a.akamaihd.net/public/images/signinthroughsteam/sits_large_noborder.png"/>');
    }
    \yii\authclient\widgets\AuthChoice::end();
} else {
    ?>
            <span><?php 
    echo \Yii::$app->user->identity->name;
    ?>
 (<a href="/logout">Выход</a>) </span>
            <img src="<?php 
    echo \Yii::$app->user->identity->avatar;
    ?>
" id="steam_ava"/>
    <?php 
			<?php 
foreach ($authAuthChoice->getClients() as $client) {
    ?>
			<?php 
    echo Html::a('Register with ' . $client->title, ['default/authfbreg', 'authclient' => $client->name], ['class' => "btn btn-primary {$client->name} "]);
    ?>
			<?php 
}
?>
			
			<?php 
AuthChoice::end();
?>
			<!--Login with FB -->
			<?php 
$authAuthChoice = AuthChoice::begin(['baseAuthUrl' => ['loginregister/default/authfblogin'], 'autoRender' => false, 'popupMode' => false]);
?>
			
			<?php 
foreach ($authAuthChoice->getClients() as $client) {
    ?>
			<?php 
    echo Html::a('Login with ' . $client->title, ['default/authfblogin', 'authclient' => $client->name], ['class' => "btn btn-primary {$client->name} "]);
    ?>
			<?php 
}
?>
			
			<?php 
AuthChoice::end();
?>