Blame view

frontend/views/iam/edit_person.php 3.28 KB
4253cbec   root   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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
  <?php
  use yii\helpers\Html;
  use yii\helpers\Url;
  use yii\web\View;
  use yii\bootstrap\ActiveForm;
  use yii\captcha\Captcha;
  use yii\widgets\Breadcrumbs;
  
  
  
  $this->title = 'Редактирование профиля';
  $this->params['breadcrumbs'][] = ['label'=>'Профиль','url'=>['/iam/index']];
  $this->params['breadcrumbs'][] = $this->title;
  
  $this->registerJsFile(Yii::$app->request->baseUrl.'/js/jquery.mask.js',['position'=>View::POS_END,'depends'=>['yii\web\YiiAsset']]);
  
  $this->registerJs("
  $('#user-phone').mask('(000) 000-0000');
  ", View::POS_READY, 'mask');
  ?>
  <nav class="bread-crumbs">
      <?= Breadcrumbs::widget([
          'links' => ['Мой кабинет'],
      ]) ?>
      <div class="both"></div>
  </nav>
  <div class="lay_title">
      <h1 class="uppercase center">Редактировать личные данные</h1>
  </div>
  <div class="layout">
      <div class="leftbar">
          <div class="mycabinet">
              <div class="begin">Мой кабинет</div>
              <?= $this->render('_tabs')?>
          </div>
      </div>
  
      <div class="content">
  
      <?php $form = ActiveForm::begin([
          'id' => 'reg-form',
          'options' => ['class' => 'form-vertical','enctype' => 'multipart/form-data'],
          'fieldConfig' => [
              //'template' => "{label}\n<div class=\"col-lg-5\">{input}</div>\n<div class=\"col-lg-8\">{error}</div>",
              //'labelOptions' => ['class' => 'col-lg-2 control-label'],
          ],
      ]); ?>
  
  
      <?= $form->field($model, 'password')->passwordInput() ?>
  	
  	<?= $form->field($model, 'password_repeat')->passwordInput(['value'=>$model->password]) ?>
  	
  	<?= $form->field($model, 'name') ?>
  	
  	<?= $form->field($model, 'surname') ?>
      
      <label class="control-label">Дата рождения</label>
      <div class="form-inline">    
          <?php$day = [];
              for($i=1;$i<=31;$i++){
              $day[$i] = $i;
              }
              
              echo $form->field($model, 'birth_day')->dropDownList($day,['prompt'=>'День'])->label(false); 
              ?>
  
          <?php
              echo $form->field($model, 'birth_mouth')->dropDownList(['1'=>'Январь','2'=>'Февраль','3'=>'Март','4'=>'Апрель','5'=>'Май','6'=>'Июнь','7'=>'Июль','8'=>'Август','9'=>'Сентябрь','10'=>'Октябрь','11'=>'Ноябрь','12'=>'Декабрь'],['prompt'=>'Месяц'])->label(false); 
              ?>
              
              
          <?php$year = [];
              for($i=date('Y');$i>=1920;$i--){
              $year[$i] = $i;
              }
              
              echo $form->field($model, 'birth_year')->dropDownList($year,['prompt'=>'Год'])->label(false); 
              ?>
              <div class="both"></div>
      </div><div class="both"></div>    
  	<?= $form->field($model, 'phone') ?>
  	
  	<?=$form->field($model, 'sex')->dropDownList(['мужской' => 'мужской', 'женский' => 'женский'],['prompt'=>'...']); ?>
  
  	
  	<?= $form->field($model, 'body')->textArea(['rows' => '6']) ?>
  	
  	
  	<?= $form->field($model, 'role')->hiddenInput(['value'=>'person'])->label(false); ?>
          <div>
              <center>
  
              <?= Html::submitButton(' Сохранить ', ['class' => 'submit4 bottom3', 'name' => 'login-button']) ?>
  
                  </center>
      </div>
  
      <?php ActiveForm::end(); ?>
  
  </div></div>