Пример #1
0
<?php

use yii\bootstrap\ActiveForm;
use yii\bootstrap\Html;
$this->title = 'Administration Module';
$form = ActiveForm::begin(['id' => 'login-form', 'options' => ['class' => 'form-signin']]);
?>

    <h2 class="form-signin-heading">Please sign in</h2>
    <?php 
echo $form->errorSummary($model);
?>
    <label for="inputEmail" class="sr-only">Username</label>
    <?php 
echo Html::activeTextInput($model, 'username', ['id' => 'inputEmail', 'class' => 'form-control', 'placeholder' => 'Username', 'required' => '', 'autofocus' => '']);
?>
    <label for="inputPassword" class="sr-only">Password</label>
    <?php 
echo Html::activePasswordInput($model, 'password', ['id' => 'inputPassword', 'class' => 'form-control', 'placeholder' => 'Password', 'required' => '']);
?>
    <div class="checkbox">
        <label>
            <?php 
echo Html::activeCheckbox($model, 'rememberMe');
?>
        </label>
    </div>
    <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>

    <?php 
ActiveForm::end();