Blame view

frontend/views/ajax/registration_for_person.php 2.62 KB
c6152cd6   Administrator   VItaliy 25.11.2015
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
  <?php
  use yii\widgets\ActiveForm;
  use \common\models\AccountsForm;
  use \common\models\DicCities;
  use \yii\helpers\ArrayHelper;
  use \common\models\Deliveries;
  use yii\captcha\Captcha;
  ?>
  <div class="registration_for_person">
      <?php $form = ActiveForm::begin(['options' => ['enctype'=> 'multipart/form-data'], 'method'=>'post','action' => 'site/signup']); ?>
      <?= $form->field(new AccountsForm(), 'is_firm')->hiddenInput(['value'=>'0'])->label(false) ?>
      <?= $form->field(new AccountsForm(), 'company')->hiddenInput(['value'=>'Частное лицо'])->label(false) ?>
      <?= $form->field(new AccountsForm(), 'name')->textInput(['maxlength' => 45,'placeholder'=>'Имя'])->label(false) ?>
      <?= $form->field(new AccountsForm(), 'surname')->textInput(['maxlength' => 45,'placeholder'=>'Фамилия'])->label(false) ?>
      <?= $form->field(new AccountsForm(), 'phones')->textInput(['maxlength' => 45,'placeholder'=>'Телефон'])->label(false) ?>
  
      <?= $form->field(new AccountsForm(), 'email')->textInput(['maxlength' => 45,'placeholder'=>'E-mail','class'=>'form-control telephone_registration'])->label(false) ?>
  
      <?= $form->field(new AccountsForm(), 'pass')->passwordInput(['maxlength' => 45,'placeholder'=>'Пароль','class'=>'form-control telephone_registration'])->label(false) ?>
  
      <?= $form->field(new AccountsForm(), 're_pass')->passwordInput(['maxlength' => 45,'placeholder'=>'Пароль','class'=>'form-control telephone_registration'])->label(false) ?>
  
      <?= $form->field(new AccountsForm(), 'country',['options'=>['class'=>'selectize_item2' ]])->dropDownList(
          ArrayHelper::map(DicCities::find()->where(['parent' => 0])->all(), 'id', 'name'),
          ['prompt' => 'Выберите область']
      )->label(false);
      ?>
  
      <?= $form->field(new AccountsForm(), 'city',['options'=>['class'=>'selectize_item2' ]])->dropDownList(
          [],
          ['prompt' => 'Выберите город']
      )->label(false);
      ?>
  
      <?= $form->field(new AccountsForm(), 'deliveries',['options'=>['class'=>'selectize_item2' ]])->dropDownList(
          ArrayHelper::map(Deliveries::find()->all(), 'id', 'name'),
          ['prompt' => 'Выберите тип перевозки']
      )->label(false);
      ?>
  
      <?= $form->field(new AccountsForm(), 'verifyCode')->widget(Captcha::className(), [
          'options'=>['placeholder'=>'Введите код' ],
          'template' => '<div>{input}</div><div class="row"><div class="col-lg-3">{image}</div></div>',
      ])->label(false); ?>
  
      <button class="purple" type="submit" value="Submit">Зарегистрироваться</button>
      <?php ActiveForm::end(); ?>
  </div>