<?php 
use \yii\helpers\Html;
use \yii\widgets\ActiveForm;
use app\models\Admins; 
use yii\helpers\Url;

?>
<div class="col-md-offset-4 col-md-4">

    <div class="div-logo-login">
            <img src="<?= Url::base()?>/<?= $logo->value != null ? $logo->value : 'home-icon/blank-logo.jpg' ?>" alt="" class="img-responsive logo-login">
        </div>

        <?php $form = ActiveForm::begin(); ?>

        <?= $form->field($user, 'username')->textInput(['placeholder' => Yii::t('app', 'Username'), 'class' => 'form-control rounded-input'])->label(false) ?>

        <?= $form->field($user, 'password')->passwordInput(['placeholder' => Yii::t('app', 'Password'), 'class' => 'form-control rounded-input'])->label(false) ?>

        <?= Html::submitButton(Yii::t('app', 'Login'), ['class' => 'btn login-btn submit-btn']) ?>

        <?= Html::a(Yii::t('app','Forgot password'), ['forget-password'], ['class' => 'profile-link', 'style' => 'display:block; text-align: center;']) ?>

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

   
<?php

    if($user->hasErrors('failed_login')){
        echo '<div class="alert alert-danger">';
        echo $user->getErrors()['failed_login'][0];
        echo '</div>';
    }

    if(Yii::$app->session->hasFlash('passwordChanged')){
        echo "<div class='alert alert-success'>";
        echo Yii::$app->session->getFlash('passwordChanged');
        echo "</div>";
    }

    if(Yii::$app->session->hasFlash('unauthenticated')){
        echo "<div class='alert alert-danger'>";
        echo Yii::$app->session->getFlash('unauthenticated');
        echo "</div>";
    }

?>
</div>