| Current Path : /var/www/html/sprm/backend/views/iframe/ |
| Current File : /var/www/html/sprm/backend/views/iframe/login.php |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\captcha\Captcha;
use yii\helpers\Url;
use yii\bootstrap\Alert;
//use backend\assets\AppAsset;
//AppAsset::register($this); // $this represents the view object
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */
$this->title = Yii::t('app', 'form-login');
$fieldOptions1 = [
'options' => ['class' => 'form-group has-feedback'],
'inputTemplate' => "{input}<span class='glyphicon glyphicon-user form-control-feedback'></span>"
];
$fieldOptions2 = [
'options' => ['class' => 'form-group has-feedback'],
'inputTemplate' => "{input}<span class='glyphicon glyphicon-lock form-control-feedback'></span>"
];
$fieldOptions3 = [
'options' => ['class' => 'form-group has-feedback'],
'inputTemplate' => "{input}<span class='glyphicon glyphicon-envelope form-control-feedback'></span>"
];
?>
<!----------------------- LOGIN SECTION START ----------------------->
<div class="login-box" id="login-box">
<div class="middle-box text-center loginscreen animated fadeInDown" style="padding-bottom: 2em;">
</div>
<div class="container" style="border-radius: 25px; max-width: 500px; padding-bottom: 3em; background-color: #ffffff;">
<div class="middle-box text-center loginscreen animated fadeInDown" style="padding-bottom: 2em;">
<h3 style="color:#000000;font-weight:bold;">Log Masuk</h3><br><br>
<?php
if (Yii::$app->session->hasFlash('success')) {
echo Alert::widget([
'options' => [
'class' => 'alert-success',
],
'body' => Yii::$app->session->getFlash('success')
]);
}
?>
<?php
$form = ActiveForm::begin([
'id' => 'login-form',
'enableClientValidation' => true,
'options'=>['target'=>'_blank']]);
?>
<?php
echo $form->field($model, 'username', $fieldOptions1)
->textInput(['placeholder' => 'Nama Pengguna'])
->label(false);
?>
<?php
echo $form->field($model, 'password', $fieldOptions2)
->passwordInput(['placeholder' => 'Kata Laluan'])
->label(false);
?>
</div>
<div class="text-center animated fadeInDown">
<?= Html::submitButton("<i class=\"fa fa-arrow-circle-right\"></i> " . Yii::t('app', 'Log Masuk'), ['class' => 'btn btn-primary', 'target'=>'_blank']) ?>
<?= Html::resetButton("<i class=\"fa fa-refresh\"></i> " . Yii::t('app', 'Set Semula'), ['class' => 'btn btn-primary btn-warning']) ?>
<button class="btn btn-primary btn-danger" id="forgotBtn" name="login-button" type="button"><i class="glyphicon glyphicon-lock"></i> Lupa Kata Laluan</button>
<!-- <button class="btn btn-primary btn-success" id="signupBtn" name="login-button" type="button"><i class="fa fa-user"></i> Log Masuk Kali Pertama</button>
-->
</div>
<?php ActiveForm::end(); ?>
</div>
<!-- /.login-box-body -->
</div><!-- /.login-box -->
<!----------------------- LOGIN SECTION END ----------------------->
<!----------------------- FORGOT PASSWORD SECTION START ----------------------->
<div class="login-box" id="forgot-box" style="display: none">
<div class="middle-box text-center loginscreen animated fadeInDown" style="padding-bottom: 2em;">
</div>
<div class="container" style="border-radius: 25px; max-width: 700px; padding-bottom: 3em; background-color: #ffffff;">
<div class="middle-box text-center loginscreen animated fadeInDown" style="padding-bottom: 2em;">
<h3 style="color:#bf4c4c;font-weight:bold;">Sila masukkan emel anda. Pautan untuk set semula kata laluan akan di hantar melalui emel. Sila periksa emel anda</h3>
<?php
$form = ActiveForm::begin([
'action' => Url::to(['site/request-password-reset']),
'method' => 'post'
]);
?>
<?php
echo $form->field($modelForgotPass, 'email', $fieldOptions3)
->textInput(['placeholder' => 'Emel'])
->label(false);
?>
</div>
<div class="text-center animated fadeInDown">
<!--<button type="button" id="backBtn" class="btn btn-primary btn-success"><i class="fa fa-arrow-left"></i> Kembali</button> -->
<?= Html::submitButton("<i class=\"glyphicon glyphicon-send\"></i> " . Yii::t('app', 'Hantar Emel'), ['class' => 'btn btn-primary']) ?>
</div>
<?php
ActiveForm::end();
?>
</div>
</div>
<!----------------------- FORGOT PASSWORD SECTION END ----------------------->
<!----------------------- RESET PASSWORD SECTION START ----------------------->
<div class="login-box" id="signup-box" style="display: none">
<div class="login-box-body">
<div class="container" style="border-radius: 25px; max-width: 700px; padding-bottom: 3em; background-color: #ffffff;">
<div class="middle-box text-center loginscreen animated fadeInDown" style="padding-bottom: 2em;">
<h3 style="color:#bf4c4c;font-weight:bold;">Sila Masukkan Kata Laluan yang baru: </h3>
<?php $form = ActiveForm::begin(['action' => Url::to(['site/reset-password&token']), 'method' => 'post']);
?>
<?= $form->field($model, 'password')->passwordInput(['autofocus' => true]) ?>
<div class="form-group">
<?= Html::submitButton("<i class=\"glyphicon glyphicon-floppy-save\"></i> " . Yii::t('app', 'Simpan'), ['class' => 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>
</div>
<!----------------------- RESET PASSWORD SECTION END ----------------------->
<script>
$("#forgotBtn").click(function () {
$("#login-box").hide('slow', function () {
});
$("#signup-box").hide('slow', function () {
});
$("#forgot-box").show('slow', function () {
});
});
$("#backBtn").click(function () {
$("#forgot-box").hide('slow', function () {
});
$("#signup-box").hide('slow', function () {
});
$("#login-box").show('slow', function () {
});
});
$("#signupBtn").click(function () {
$("#forgot-box").hide('slow', function () {
});
$("#login-box").hide('slow', function () {
});
$("#signup-box").show('slow', function () {
});
});
</script>