Blame view

frontend/views/accounts/_portfolio_form.php 1.5 KB
7eb29439   Yarik   test
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
  <?php
      /**
       * @var Portfolio $portfolio
       */
      use common\models\Option;
      use common\models\Portfolio;
      use common\widgets\ImageUploader;
      use mihaildev\ckeditor\CKEditor;
      use yii\helpers\Html;
      use yii\widgets\ActiveForm;
      use \common\widgets\MultiLangForm;
  
      $this->title = 'Мой профиль';
      $this->params[ 'breadcrumbs' ][] = $this->title;
  ?>
  <h1><?= $this->title ?></h1>
  
  <?php
      $form = ActiveForm::begin();
  ?>
  
  <?= $form->field($portfolio, 'date_add')
           ->textInput([ 'disabled' => 'disabled' ]) ?>
  
  <?= $form->field($portfolio, 'name')
           ->textInput() ?>
  
  <?= $form->field($portfolio, 'link')
           ->textInput() ?>
  
  <?= $form->field($portfolio, 'specializationInput')
           ->checkboxList($specialization) ?>
  
  <?= ImageUploader::widget([
      'model'=> $portfolio,
      'field'=>'cover',
      'width'=>100,
      'height'=>100,
      'multi'=>false,
      'gallery' =>$portfolio->cover,
      'name' => 'Загрузить главное фото'
  ]);
  ?>
  
  <div class="form-inline">
      Адрес:
      <?= $form->field($portfolio, 'city', ['template' => "{input}{label}{hint}{error}"])->textInput() ?>
      <?= $form->field($portfolio, 'street', ['template' => "{input}{label}{hint}{error}"])->textInput() ?>
      <?= $form->field($portfolio, 'house', ['template' => "{input}{label}{hint}{error}"])->textInput() ?>
  </div>
  
  <?= $form->field($portfolio, 'description')->widget(CKEditor::className()) ?>
  
  <?= Html::submitButton('Добавить') ?>
  
  <?php
      $form->end();
  ?>