A
A
Alexander Ivanov2015-05-14 17:57:56
Yii
Alexander Ivanov, 2015-05-14 17:57:56

Where can I change password and username in Yii2 on the standard login.php page?

<?= $form->field($model, 'username') ?>

    <?= $form->field($model, 'password')->passwordInput() ?>

    <?= $form->field($model, 'rememberMe', [
        'template' => "<div class=\"col-lg-offset-1 col-lg-3\">{input}</div>\n<div class=\"col-lg-8\">{error}</div>",
    ])->checkbox() ?>

    <div class="form-group">
        <div class="col-lg-offset-1 col-lg-11">
            <?= Html::submitButton('Login', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
        </div>
    </div>

How to Russify Password and Username in login.php on YII?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Ivanov, 2015-05-14
@cimonlebedev

Solved the problem like this:

public function attributeLabels()
  {
    return [
      'username' => 'Имя пользователя',
      'password' => 'Пароль',
            'rememberMe' => 'Запомнить меня'
        ];
  }

Thanks to this channel: phpNT

A
Alexander N++, 2015-05-14
@sanchezzzhak

Model app\models\User
There is also a form model in the same folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question