Blame view

frontend/modules/user/widgets/views/registration-popup.php 2.96 KB
d1f8bd40   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
  <?php
  use yii\helpers\{
      Html, Url
  };
  use yii\widgets\ActiveForm;
  ?>
  <div class="popup registration-popup" id="registrationPopup">
      <div class="popup-container">
          <button class="close-popup"></button>
          <div class="form-tittle">
              <?= Yii::t('front', 'Registration form') ?>
          </div>
          <?php $form = ActiveForm::begin([
              'id' => 'register-form',
              'action' => Url::toRoute(['/user/register/index']),
              'validationUrl' => Url::toRoute(['/user/register/validate']),
              'options' => ['class' => 'registration-form inner-form'],
              'fieldConfig' => [
                  'template' => "<div class=\"input-field\">{input}\n<div class=\"help-block\">{error}</div></div>",
                  'inputOptions' => ['class' => 'collaps-inp form-control']
              ]
          ]);
          echo $form->field($model, 'first_name', ['inputOptions' => [
                  'placeholder' => $model->getAttributeLabel('first_name') . '*'
              ]])
              . $form->field($model, 'last_name', ['inputOptions' => [
                  'placeholder' => $model->getAttributeLabel('last_name') . '*'
              ]])
              . $form->field($model, 'company', ['inputOptions' => [
                  'placeholder' => $model->getAttributeLabel('company')
              ]])
              . $form->field($model, 'website', ['inputOptions' => [
                  'placeholder' => $model->getAttributeLabel('website')
              ]])
              . $form->field($model, 'email', ['enableAjaxValidation' => true, 'inputOptions' => [
                  'placeholder' => $model->getAttributeLabel('email') . '*'
              ]])
              . $form->field($model, 'phone', ['inputOptions' => [
                  'placeholder' => $model->getAttributeLabel('phone')
              ]])
              . $form->field($model, 'password', ['inputOptions' => [
                  'placeholder' => $model->getAttributeLabel('password') . '*'
              ]])->passwordInput()
              . $form->field($model, 'password_confirmation', ['inputOptions' => [
                  'placeholder' => $model->getAttributeLabel('password_confirmation') . '*'
              ]])->passwordInput();
          ?>
          <div class="text-center text-info">
              <?= Yii::t('front', 'Required field to fill') ?>
          </div>
          <div class="text-center">
              <div class="label-info">
                  <?= Yii::t('front', 'You are already registered') ?>
              </div>
              <div class="authorization-btn-container">
                  <?= Html::a(Yii::t('front', 'Sign In'), '#',
                      ['class' => 'authorization-popup-link open-popup',
                          'data-id' => 'authorizationPopup']) ?>
              </div>
              <div>
                  <?= Html::submitButton(Yii::t('front', 'Registration'),
                      ['class' => 'btn btn-sm btn-primary', 'id-form' => 'register-form']); ?>
              </div>
          </div>
          <?php ActiveForm::end(); ?>
      </div>
  </div>