<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\authclient\widgets\AuthChoice;


/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model app\models\LoginForm */

$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="pageContainer">
            <div class="headingCont">
                <div class="pageHeadingz">
                    <span class="headingLine"></span>
                    <h1>LOGIN</h1>
                    <span class="headingLine moveRight"></span>
                </div>
            </div>
        	<div class="loginContainer">
            	<div class="loginName">
                Login
                </div>
                    <div class="leftSideLogin">
                    <?php $form = ActiveForm::begin(); ?>    
                        <?= $form->field($model, 'username', [
        'inputOptions' => [
            'placeholder' => $model->getAttributeLabel('Email'),
            'class' => 'loginInput'
        ],
    ])->textInput()->label(false) ?>
                         <?= $form->field($model,'password',['inputOptions'=>[
            'placeholder'=>$model->getAttributeLabel('Password'),
            'class' => 'loginInput'                 
        ]])->passwordInput()->label(false) ?>

        <div class="checkboxFive">
                <input type="hidden" name="LoginForm[rememberMe]" value="0">
                <input type="checkbox" id="checkboxFiveInput" name="LoginForm[rememberMe]" value="1" checked="">
	  	<label for="checkboxFiveInput"></label>
  	</div><span>Remember me</span>
<p class="help-block help-block-error"></p>
<div class="btnBorder">
    <?= Html::submitButton('Login', ['name' => 'login-button']) ?>
</div>
                        
                        </div>
                  <?php ActiveForm::end(); ?>      
                    
                    <div class="rightSideLogin">
                    	<p class="signUpText">Sign Up for Free</p>
                        <p class="socialBtnText">Login via Social Connect</p>
                 <?php $authAuthChoice = AuthChoice::begin([
    'baseAuthUrl' => ['user/auth']
]); ?>

    
<?php 
$counter=0;
$class='';
foreach ($authAuthChoice->getClients() as $client): 
    if($counter ==0)
    {
        $class='blue';
    }
    if($counter ==1)
    {
        $class='lightBlue';
    }
    if($counter ==2)
    {
        $class='brown';
    }

    ?>
    <div class="btnBorderSocial">                    
        <div class="loginVia <?php echo $class; ?>"><?php $authAuthChoice->clientLink($client) ?></div>
    </div>
<?php $counter++; endforeach; ?>
<?php AuthChoice::end(); ?>
<!--                        <div class="btnBorderSocial"><button class="loginVia blue">Login Via Facebook</button></div>-->
<!--                        <div class="btnBorderSocial"><button class="loginVia lightBlue">Login Via Twiiter</button></div>
                        <div class="btnBorderSocial"><button class="loginVia brown">Login Via Google</button></div>-->
                        <p class="signUpText">Are you a new here? Get Register Free</p>
                    </div>
                    </div>
                
            </div>
        </div>