These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of the 2amigos/yii2-usuario project. |
||
5 | * |
||
6 | * (c) 2amigOS! <http://2amigos.us/> |
||
7 | * |
||
8 | * For the full copyright and license information, please view |
||
9 | * the LICENSE file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | use yii\helpers\Html; |
||
13 | use yii\widgets\ActiveForm; |
||
14 | |||
15 | /** |
||
16 | * @var yii\web\View $this |
||
17 | * @var \Da\User\Form\RegistrationForm $model |
||
18 | * @var \Da\User\Model\User $user |
||
19 | * @var \Da\User\Module $module |
||
20 | */ |
||
21 | |||
22 | $this->title = Yii::t('usuario', 'Sign up'); |
||
23 | $this->params['breadcrumbs'][] = $this->title; |
||
24 | ?> |
||
25 | <div class="row"> |
||
26 | <div class="col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3"> |
||
27 | <div class="panel panel-default"> |
||
28 | <div class="panel-heading"> |
||
29 | <h3 class="panel-title"><?= Html::encode($this->title) ?></h3> |
||
30 | </div> |
||
31 | <div class="panel-body"> |
||
32 | <?php $form = ActiveForm::begin( |
||
33 | [ |
||
34 | 'id' => $model->formName(), |
||
35 | 'enableAjaxValidation' => true, |
||
36 | 'enableClientValidation' => false, |
||
37 | ] |
||
38 | ); ?> |
||
39 | |||
40 | <?= $form->field($model, 'email')->textInput(['autofocus' => true]) ?> |
||
41 | |||
42 | <?= $form->field($model, 'username') ?> |
||
43 | |||
44 | <?php if ($module->generatePasswords == false): ?> |
||
0 ignored issues
–
show
|
|||
45 | <?= $form->field($model, 'password')->passwordInput() ?> |
||
46 | <?php endif ?> |
||
47 | |||
48 | <?php if ($module->enableGdprCompliance): ?> |
||
49 | <?= $form->field($model, 'gdpr_consent')->checkbox(['value' => 1]) ?> |
||
50 | <?php endif ?> |
||
51 | |||
52 | <?= Html::submitButton(Yii::t('usuario', 'Sign up'), ['class' => 'btn btn-success btn-block']) ?> |
||
53 | |||
54 | <?php ActiveForm::end(); ?> |
||
55 | </div> |
||
56 | </div> |
||
57 | <p class="text-center"> |
||
58 | <?= Html::a(Yii::t('usuario', 'Already registered? Sign in!'), ['/user/security/login']) ?> |
||
59 | </p> |
||
60 | </div> |
||
61 | </div> |
||
62 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.