PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/views/default/reset.php

https://gitlab.com/yoage/yii2-user-1
PHP | 54 lines | 34 code | 12 blank | 8 comment | 1 complexity | e393a07157334ef7e9e4518148f56bb9 MD5 | raw file
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\ActiveForm;
  4. use yii\captcha\Captcha;
  5. /**
  6. * @var yii\web\View $this
  7. * @var yii\widgets\ActiveForm $form
  8. * @var amnah\yii2\user\models\forms\ResetForm $model
  9. * @var bool $success
  10. * @var bool $invalidKey
  11. */
  12. $this->title = 'Reset';
  13. $this->params['breadcrumbs'][] = $this->title;
  14. ?>
  15. <div class="site-reset">
  16. <h1><?= Html::encode($this->title) ?></h1>
  17. <?php if (!empty($success)): ?>
  18. <div class="alert alert-success">
  19. <p>Password reset</p>
  20. <p><?= Html::a("Log in here", ["/user/login"]) ?></p>
  21. </div>
  22. <?php elseif (!empty($invalidKey)): ?>
  23. <div class="alert alert-danger">
  24. <p>Invalid key</p>
  25. </div>
  26. <?php else: ?>
  27. <div class="row">
  28. <div class="col-lg-5">
  29. <?php $form = ActiveForm::begin(['id' => 'reset-form']); ?>
  30. <?php /*
  31. <?= $form->field($model, 'email') ?>
  32. */ ?>
  33. <?= $form->field($model, 'newPassword')->passwordInput() ?>
  34. <?= $form->field($model, 'newPasswordConfirm')->passwordInput() ?>
  35. <div class="form-group">
  36. <?= Html::submitButton('Reset', ['class' => 'btn btn-primary']) ?>
  37. </div>
  38. <?php ActiveForm::end(); ?>
  39. </div>
  40. </div>
  41. <?php endif; ?>
  42. </div>