Blame view

frontend/views/accounts/_vacancy_form.php 2.31 KB
ea09d15d   Yarik   test
1
2
3
4
5
6
7
8
9
  <?php
      /**
       * @var Vacancy $vacancy
       * @var Employment[] $employment
       */
      use common\models\Employment;
      use common\models\Vacancy;
      use common\widgets\FieldEditor;
      use common\widgets\ImageUploader;
e8236f44   Yarik   test
10
      use kartik\select2\Select2;
ea09d15d   Yarik   test
11
12
      use mihaildev\ckeditor\CKEditor;
      use yii\helpers\Html;
e8236f44   Yarik   test
13
      use yii\web\JsExpression;
ea09d15d   Yarik   test
14
15
      use yii\widgets\ActiveForm;
  
8e5fa1e8   Виталий   tokar commit
16
      $this->title = 'Вакансии';
ea09d15d   Yarik   test
17
18
      $this->params[ 'breadcrumbs' ][] = $this->title;
  ?>
8e5fa1e8   Виталий   tokar commit
19
  <div class="login-left-column-title"><?= $this->title ?></div>
ea09d15d   Yarik   test
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  
  <?php
      $form = ActiveForm::begin();
  ?>
  
  <?= $form->field($vacancy, 'name')
           ->textInput() ?>
  
  <?= $form->field($vacancy, 'link')
           ->textInput() ?>
  
  <?= $form->field($vacancy, 'user_name')
           ->textInput() ?>
  
e8236f44   Yarik   test
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
  <div class="input-blocks-wrapper">
      <div class="input-blocks">
          <?=
              $form->field($vacancy, 'city')->widget(Select2::classname(), [
                  'options' => ['placeholder' => 'Выбор города ...'],
                  'pluginOptions' => [
                      'allowClear' => true,
                      'minimumInputLength' => 3,
                      'ajax' => [
                          'url' => \yii\helpers\Url::to(['site/city']),
                          'dataType' => 'json',
                          'data' => new JsExpression('function(params) { return {q:params.term}; }')
                      ],
                      'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
                      'templateResult' => new JsExpression('function(city) { return city.text; }'),
                      'templateSelection' => new JsExpression('function (city) { return city.text; }'),
                  ],
              ]);
          ?>
  
      </div>
  </div>
ea09d15d   Yarik   test
56
57
58
59
60
61
62
63
64
  
  <?= $form->field($vacancy, 'employmentInput')
           ->checkboxList($employment) ?>
  
  <?= FieldEditor::widget (
      [
          'template' => 'requirements', 'item_id' => $vacancy->vacancy_id, 'model' => 'common\models\Vacancy', 'language' => 'ru',
      ]
  ); ?>
8e5fa1e8   Виталий   tokar commit
65
66
67
68
69
  <div class="input-blocks-wrapper full-blocks admin-editor-bl">
      <div class="input-blocks">
          <?= $form->field($vacancy, 'description')->widget(CKEditor::className()) ?>
      </div>
  </div>
ea09d15d   Yarik   test
70
  
8e5fa1e8   Виталий   tokar commit
71
72
73
  <div class="admin-save-btn skills-save-btn  style">
      <?= Html::submitButton('Добавить') ?>
  </div>
ea09d15d   Yarik   test
74
  
ea09d15d   Yarik   test
75
76
77
78
  
  <?php
      $form->end();
  ?>