|
1 | 1 | <?php |
2 | 2 |
|
| 3 | +declare(strict_types=1); |
| 4 | + |
3 | 5 | /** @var yii\web\View $this */ |
4 | 6 | /** @var yii\bootstrap5\ActiveForm $form */ |
5 | 7 | /** @var \common\models\LoginForm $model */ |
6 | 8 |
|
7 | 9 | use yii\bootstrap5\ActiveForm; |
8 | 10 | use yii\bootstrap5\Html; |
9 | 11 |
|
10 | | -$this->title = 'Login'; |
| 12 | +$this->title = 'Sign in to your account'; |
11 | 13 | $htmlIcon = <<<HTML |
12 | | -<div class="input-group"><span class="input-group-text" aria-hidden="true">%s</span>{input}</div>{error}{hint} |
| 14 | +{label}<div class="input-group"><span class="input-group-text" aria-hidden="true">%s</span>{input}</div>{error}{hint} |
13 | 15 | HTML; |
| 16 | +$labelOptions = ['class' => 'form-label fw-semibold small']; |
14 | 17 | ?> |
15 | 18 | <div class="card border-0 overflow-hidden login-split-card"> |
16 | 19 | <div class="row g-0"> |
|
54 | 57 | ], |
55 | 58 | ) ?> |
56 | 59 | </div> |
57 | | - <h1 class="h3 fw-bold mb-1">Sign in to your account</h1> |
| 60 | + <h1 class="h3 fw-bold mb-1"><?= Html::encode($this->title) ?></h1> |
58 | 61 | <p class="text-body-secondary small">Enter your credentials to access the admin panel</p> |
59 | 62 | </div> |
60 | 63 |
|
61 | 64 | <?php $form = ActiveForm::begin(['id' => 'login-form']); ?> |
62 | 65 |
|
63 | 66 | <div class="mb-3"> |
64 | | - <label class="form-label fw-semibold small" for="loginform-username">Your Username</label> |
65 | 67 | <?= $form->field($model, 'username', [ |
66 | 68 | 'options' => ['class' => 'mb-0'], |
67 | 69 | 'template' => sprintf($htmlIcon, '👤'), |
|
70 | 72 | 'placeholder' => 'username', |
71 | 73 | 'autofocus' => true, |
72 | 74 | ], |
73 | | - ])->textInput() ?> |
| 75 | + ])->textInput()->label('Your Username', $labelOptions) ?> |
74 | 76 | </div> |
75 | 77 |
|
76 | 78 | <div class="mb-3"> |
77 | | - <label class="form-label fw-semibold small" for="loginform-password">Your Password</label> |
78 | 79 | <?= $form->field($model, 'password', [ |
79 | 80 | 'options' => ['class' => 'mb-0'], |
80 | 81 | 'template' => sprintf($htmlIcon, '🔒'), |
81 | 82 | 'inputOptions' => [ |
82 | 83 | 'class' => 'form-control', |
83 | 84 | 'placeholder' => 'Password', |
84 | 85 | ], |
85 | | - ])->passwordInput() ?> |
| 86 | + ])->passwordInput()->label('Your Password', $labelOptions) ?> |
86 | 87 | </div> |
87 | 88 |
|
88 | 89 | <div class="mb-4"> |
|
0 commit comments