Blame view

frontend/views/accounts/_job_form.php 4.59 KB
14a09168   Alex Savenko   init 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
103
104
105
106
107
  <?php

      /**

       * @var integer $index

       */

      use common\models\Job;

      use mihaildev\ckeditor\CKEditor;

      use yii\helpers\Html;

      use yii\jui\DatePicker;

      use yii\widgets\ActiveForm;

  

      $model = new Job([

          'user_id' => \Yii::$app->user->getId(),

          'current' => 0,

      ]);

      $form = ActiveForm::begin();

  ?>

  <div class='ajax-loaded'>

      <div class='prev_job_inputs'>

          <div class="input-blocks-wrapper">

              <div class="input-blocks">

                  <?= $form->field($model, '[' . $index . ']name')

                           ->label('Название')

                           ->textInput([ 'class' => 'custom-input-2' ]); ?>

              </div>

          </div>

          <div class="input-blocks-wrapper hint-link">

              <div class="input-blocks">

                  <?= $form->field($model, '[' . $index . ']link')

                           ->label('Ссылка на компанию на сайте МФП')

                           ->hint('Пример: ' . $_SERVER[ 'HTTP_HOST' ] . '/company/common/1')

                           ->textInput([ 'class' => 'custom-input-2' ]); ?>

              </div>

          </div>

          <div class="input-blocks-wrapper">

              <div class="input-blocks">

                  <?= $form->field($model, '[' . $index . ']date_start')

                           ->label('Дата начала работы')

                           ->widget(DatePicker::className(), [

                               'options'       => [ 'class' => 'custom-input-2' ],

                               'language'      => 'ru',

                               'dateFormat'    => 'dd-MM-yyyy',

                               'clientOptions' => [

                                   'changeYear'  => true,

                                   'yearRange'   => 'c-20:c',

                                   'changeMonth' => true,

                               ],

                           ]); ?>

              </div>

          </div>

  

          <div class="input-blocks-wrapper">

              <div class="input-blocks">

                  <?= $form->field($model, '[' . $index . ']date_end')

                           ->label('Дата окончания работы')

                           ->widget(DatePicker::className(), [

                               'options'       => [ 'class' => 'custom-input-2' ],

                               'language'      => 'ru',

                               'dateFormat'    => 'dd-MM-yyyy',

                               'clientOptions' => [

                                   'changeYear'  => true,

                                   'yearRange'   => 'c-20:c',

                                   'changeMonth' => true,

                               ],

                           ]); ?>

              </div>

          </div>

  

          <div class="input-blocks-wrapper">

              <div class="input-blocks">

                  <?= $form->field($model, '[' . $index . ']position')

                           ->label('Должность')

                           ->textInput([ 'class' => 'custom-input-2' ]); ?>

              </div>

          </div>

  

          <div class="input-blocks-wrapper">

              <div class="input-blocks">

                  <?= $form->field($model, '[' . $index . ']achievement')

                           ->label('Достижения')

                           ->widget(CKEditor::className(), [ 'editorOptions' => [ 'preset' => 'basic' ] ]); ?>

              </div>

          </div>

  

          <div class="input-blocks-wrapper admin-quantity-project">

              <div class="input-blocks">

                  <?= $form->field($model, '[' . $index . ']total_count')

                           ->label('Количество проектов, в которых принимали участие')

                           ->textInput([

                               'class' => 'custom-input-2 custom-input-2-date',

                               'type'  => 'number',

                           ]); ?>

  

                  <div class="fix-quantity-project">

                      <?= $form->field($model, '[' . $index . ']complete_count', [ 'enableClientValidation' => false ])

                               ->label('из них реализовано')

                               ->textInput([

                                   'class' => 'custom-input-2 custom-input-2-date no-client-validation',

                                   'type'  => 'number',

                               ]); ?>

                  </div>

              </div>

          </div>

  

          <?= Html::button('', [ 'class' => 'remove_job_button' ]); ?>

      </div>

  </div>

  <?php $form->end(); ?>