_vacancy_form.php 1.13 KB
<?php
    /**
     * @var Vacancy $vacancy
     * @var Employment[] $employment
     */
    use common\models\Employment;
    use common\models\Vacancy;
    use common\widgets\FieldEditor;
    use common\widgets\ImageUploader;
    use mihaildev\ckeditor\CKEditor;
    use yii\helpers\Html;
    use yii\widgets\ActiveForm;

    $this->title = 'Мой профиль';
    $this->params[ 'breadcrumbs' ][] = $this->title;
?>
<h1><?= $this->title ?></h1>

<?php
    $form = ActiveForm::begin();
?>

<?= $form->field($vacancy, 'name')
         ->textInput() ?>

<?= $form->field($vacancy, 'link')
         ->textInput() ?>

<?= $form->field($vacancy, 'user_name')
         ->textInput() ?>

<?= $form->field($vacancy, 'city')
         ->textInput() ?>

<?= $form->field($vacancy, 'employmentInput')
         ->checkboxList($employment) ?>

<?= FieldEditor::widget (
    [
        'template' => 'requirements', 'item_id' => $vacancy->vacancy_id, 'model' => 'common\models\Vacancy', 'language' => 'ru',
    ]
); ?>

<?= $form->field($vacancy, 'description')->widget(CKEditor::className()) ?>

<?= Html::submitButton('Добавить') ?>

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