login.php 789 B

123456789101112131415161718192021222324252627
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\ActiveForm;
  4. /**
  5. * @var yii\base\View $this
  6. * @var yii\widgets\ActiveForm $form
  7. * @var app\models\LoginForm $model
  8. */
  9. $this->title = 'Login';
  10. $this->params['breadcrumbs'][] = $this->title;
  11. ?>
  12. <h1><?php echo Html::encode($this->title); ?></h1>
  13. <p>Please fill out the following fields to login:</p>
  14. <?php $form = ActiveForm::begin(array(
  15. 'model' => $model,
  16. 'options' => array('class' => 'form-horizontal'),
  17. )); ?>
  18. <?php echo $form->field('username')->textInput(); ?>
  19. <?php echo $form->field('password')->passwordInput(); ?>
  20. <?php echo $form->field('rememberMe')->checkbox(); ?>
  21. <div class="form-actions">
  22. <?php echo Html::submitButton('Login', null, null, array('class' => 'btn btn-primary')); ?>
  23. </div>
  24. <?php ActiveForm::end(); ?>