Blame view

backend/views/site/login.php 3.39 KB
1755c393   Yarik   Basic template in...
1
  <?php
b66c9c5a   Alexey Boroda   -Admin template s...
2
3
4
5
      
      /**
       * @var string        $content
       * @var \yii\web\View $this
543b9b1c   Yarik   Composer ready
6
       * @var LoginForm     $model
b66c9c5a   Alexey Boroda   -Admin template s...
7
8
       */
      
543b9b1c   Yarik   Composer ready
9
      use common\models\LoginForm;
b66c9c5a   Alexey Boroda   -Admin template s...
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
      use hiqdev\assets\icheck\iCheckAsset;
      use yii\helpers\Html;
      use yii\web\View;
      use yii\widgets\ActiveForm;
      
      $bundle = yiister\gentelella\assets\Asset::register($this);
      
      $this->title = 'Логин';
      
      iCheckAsset::register($this);
      $js = <<< JS
  $('input').iCheck({
  checkboxClass: 'icheckbox_square-blue',
  increaseArea: '20%' // optional
  });
  JS;
      $this->registerJs($js, View::POS_READY);
1755c393   Yarik   Basic template in...
27
  ?>
b66c9c5a   Alexey Boroda   -Admin template s...
28
29
30
  <?php $this->beginPage(); ?>
  <!DOCTYPE html>
  <html lang="<?= Yii::$app->language ?>">
543b9b1c   Yarik   Composer ready
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
      <head>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
          <meta charset="<?= Yii::$app->charset ?>"/>
          <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
          <meta name="viewport" content="width=device-width, initial-scale=1"/>
          <?= Html::csrfMetaTags() ?>
          <title><?= Html::encode($this->title) ?></title>
          <?php $this->head() ?>
      </head>
      <body>
          <?php $this->beginBody(); ?>
          <div class="container" style="background-color: #F7F7F7; height: 100%">
              <div class="row" style="margin-top: 10%">
                  <div class="col-md-4 col-md-offset-4">
                      
                      
                      <div class="site-login x_panel">
                          <div class="x_title">
                              <h1><?= Html::encode($this->title) ?></h1>
                              
                              <p>Please fill out the following fields to login:</p>
                          </div>
                          <div class="row">
                              <div>
                                  <?php $form = ActiveForm::begin(
                                      [
                                          'id'             => 'login-form',
                                          'validateOnBlur' => false,
                                      ]
                                  ); ?>
                                  
                                  <?= $form->field($model, 'username')
                                           ->textInput([ 'autofocus' => true ]) ?>
                                  
                                  <?= $form->field($model, 'password')
                                           ->passwordInput() ?>
                                  
                                  <?= $form->field($model, 'rememberMe')
                                           ->checkbox() ?>
                                  
                                  <div class="form-group">
                                      <?= Html::submitButton(
                                          'Login',
                                          [
                                              'class' => 'btn btn-default',
                                              'name'  => 'login-button',
                                          ]
                                      ) ?>
                                  </div>
                                  
                                  <?php ActiveForm::end(); ?>
                              </div>
                          </div>
                      </div>
                  
                  
                  </div>
b66c9c5a   Alexey Boroda   -Admin template s...
88
              </div>
543b9b1c   Yarik   Composer ready
89
          
b66c9c5a   Alexey Boroda   -Admin template s...
90
          </div>
543b9b1c   Yarik   Composer ready
91
92
          <?php $this->endBody(); ?>
      </body>
b66c9c5a   Alexey Boroda   -Admin template s...
93
94
  </html>
  <?php $this->endPage(); ?>