diff --git a/views/site/index.php b/views/site/index.php index a981f91..dcb288f 100644 --- a/views/site/index.php +++ b/views/site/index.php @@ -6,7 +6,7 @@ $this->title = 'My Yii Application'; ?>
-
+

Congratulations!

You have successfully created your Yii-powered application.

@@ -17,7 +17,7 @@ $this->title = 'My Yii Application';
-
+

Heading

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et @@ -27,7 +27,7 @@ $this->title = 'My Yii Application';

Yii Documentation »

-
+

Heading

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et diff --git a/views/site/login.php b/views/site/login.php index ebb07d9..db003c0 100644 --- a/views/site/login.php +++ b/views/site/login.php @@ -2,6 +2,7 @@ /** @var yii\web\View $this */ /** @var yii\bootstrap5\ActiveForm $form */ + /** @var app\models\LoginForm $model */ use yii\bootstrap5\ActiveForm; @@ -15,35 +16,40 @@ $this->params['breadcrumbs'][] = $this->title;

Please fill out the following fields to login:

- 'login-form', - 'layout' => 'horizontal', - 'fieldConfig' => [ - 'template' => "{label}\n{input}\n{error}", - 'labelOptions' => ['class' => 'col-lg-1 col-form-label mr-lg-3'], - 'inputOptions' => ['class' => 'col-lg-3 form-control'], - 'errorOptions' => ['class' => 'col-lg-7 invalid-feedback'], - ], - ]); ?> +
+
- field($model, 'username')->textInput(['autofocus' => true]) ?> + 'login-form', + 'fieldConfig' => [ + 'template' => "{label}\n{input}\n{error}", + 'labelOptions' => ['class' => 'col-lg-1 col-form-label mr-lg-3'], + 'inputOptions' => ['class' => 'col-lg-3 form-control'], + 'errorOptions' => ['class' => 'col-lg-7 invalid-feedback'], + ], + ]); ?> - field($model, 'password')->passwordInput() ?> + field($model, 'username')->textInput(['autofocus' => true]) ?> - field($model, 'rememberMe')->checkbox([ - 'template' => "
{input} {label}
\n
{error}
", - ]) ?> + field($model, 'password')->passwordInput() ?> -
-
- 'btn btn-primary', 'name' => 'login-button']) ?> + field($model, 'rememberMe')->checkbox([ + 'template' => "
{input} {label}
\n
{error}
", + ]) ?> + +
+
+ 'btn btn-primary', 'name' => 'login-button']) ?> +
+ + + +
+ You may login with admin/admin or demo/demo.
+ To modify the username/password, please check out the code app\models\User::$users. +
+
- - - -
- You may login with admin/admin or demo/demo.
- To modify the username/password, please check out the code app\models\User::$users.
diff --git a/web/css/site.css b/web/css/site.css index cd81ae1..fb300b3 100644 --- a/web/css/site.css +++ b/web/css/site.css @@ -82,3 +82,7 @@ a.desc:after { .nav > li > form > button.logout:focus { outline: none; } + +.form-group { + margin-bottom: 1rem; +} \ No newline at end of file