2018-10-11 11:15:09 +03:00
|
|
|
<?php
|
|
|
|
|
2021-06-25 13:24:32 +03:00
|
|
|
use asmoday74\ckeditor5\EditorClassic;
|
2019-09-05 17:36:54 +03:00
|
|
|
use common\classes\Debug;
|
2021-09-09 13:12:37 +03:00
|
|
|
use common\models\Achievement;
|
2018-10-12 14:52:08 +03:00
|
|
|
use kartik\select2\Select2;
|
2018-10-11 11:15:09 +03:00
|
|
|
use mihaildev\elfinder\InputFile;
|
|
|
|
use unclead\multipleinput\MultipleInput;
|
|
|
|
use yii\helpers\Html;
|
|
|
|
use yii\widgets\ActiveForm;
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
|
|
/* @var $model backend\modules\card\models\UserCard */
|
|
|
|
/* @var $form yii\widgets\ActiveForm */
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="user-card-form">
|
|
|
|
|
|
|
|
<?php $form = ActiveForm::begin(); ?>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<?= $form->field($model, 'fio')->textInput(['maxlength' => true]) ?>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<?= $form->field($model, 'passport')->textInput(['maxlength' => true]) ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row" style="padding-bottom: 15px">
|
|
|
|
<div class="imgUpload col-xs-6">
|
2021-08-12 13:57:00 +03:00
|
|
|
<div class="media__upload_img"><img src="<?= $model->photo; ?>" width="100px"/></div>
|
2018-10-11 11:15:09 +03:00
|
|
|
<?php
|
|
|
|
echo InputFile::widget([
|
|
|
|
'language' => 'ru',
|
|
|
|
'controller' => 'elfinder',
|
|
|
|
// вставляем название контроллера, по умолчанию равен elfinder
|
|
|
|
'filter' => 'image',
|
|
|
|
// фильтр файлов, можно задать массив фильтров https://github.com/Studio-42/elFinder/wiki/Client-con..
|
|
|
|
'name' => 'UserCard[photo]',
|
|
|
|
'id' => 'usercard-photo',
|
|
|
|
'template' => '<label>Аватар</label><div class="input-group">{input}<span class="span-btn">{button}</span></div>',
|
|
|
|
'options' => ['class' => 'form-control itemImg', 'maxlength' => '255'],
|
|
|
|
'buttonOptions' => ['class' => 'btn btn-primary'],
|
|
|
|
'value' => $model->photo,
|
|
|
|
'buttonName' => 'Выбрать изображение',
|
|
|
|
]);
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-6">
|
2021-08-12 13:57:00 +03:00
|
|
|
<!--<div class="media__upload_img"><img src="<? /*= $model->photo; */ ?>" width="100px"/></div>-->
|
2018-10-11 11:15:09 +03:00
|
|
|
<?php
|
|
|
|
echo InputFile::widget([
|
|
|
|
'language' => 'ru',
|
|
|
|
'controller' => 'elfinder',
|
|
|
|
// вставляем название контроллера, по умолчанию равен elfinder
|
2020-05-22 16:42:24 +03:00
|
|
|
//'filter' => ['image', 'application/zip', 'application/csv', 'application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
|
2018-10-11 11:15:09 +03:00
|
|
|
// фильтр файлов, можно задать массив фильтров https://github.com/Studio-42/elFinder/wiki/Client-con..
|
|
|
|
'name' => 'UserCard[resume]',
|
|
|
|
'id' => 'usercard-resume',
|
|
|
|
'template' => '<label>Резюме</label><div class="input-group">{input}<span class="span-btn">{button}</span></div>',
|
|
|
|
'options' => ['class' => 'form-control itemImg', 'maxlength' => '255'],
|
|
|
|
'buttonOptions' => ['class' => 'btn btn-primary'],
|
2019-09-05 17:36:54 +03:00
|
|
|
'value' => $model->resume,
|
2018-10-11 11:15:09 +03:00
|
|
|
'buttonName' => 'Выбрать резюме',
|
|
|
|
]);
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-12-09 10:54:39 +03:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<?= $form->field($model, 'city')->textInput(['maxlength' => true]) ?>
|
|
|
|
</div>
|
2020-08-05 15:34:23 +03:00
|
|
|
<div class="col-xs-3">
|
|
|
|
<?= $form->field($model, 'link_vk')->textInput(['maxlength' => true]) ?>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-3">
|
|
|
|
<?= $form->field($model, 'link_telegram')->textInput(['maxlength' => true]) ?>
|
|
|
|
</div>
|
2019-12-09 10:54:39 +03:00
|
|
|
</div>
|
|
|
|
|
2018-10-11 11:15:09 +03:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-xs-6">
|
2019-11-14 17:21:34 +03:00
|
|
|
<?= $form->field($model, 'gender')->dropDownList(
|
|
|
|
$model->genders,
|
|
|
|
[
|
|
|
|
'prompt' => 'Выберите'
|
|
|
|
]
|
|
|
|
) ?>
|
2018-10-11 11:15:09 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
2019-11-14 17:21:34 +03:00
|
|
|
<?= $form->field($model, 'dob')->input(
|
|
|
|
'date',
|
2018-10-11 11:15:09 +03:00
|
|
|
[
|
2019-11-14 17:21:34 +03:00
|
|
|
'placeholder' => 'Zadejte svůj Datum narození',
|
|
|
|
'language' => 'en',
|
|
|
|
"data-format" => "DD MMMM YYYY",
|
|
|
|
|
2018-10-11 11:15:09 +03:00
|
|
|
]
|
|
|
|
) ?>
|
|
|
|
</div>
|
2019-11-14 17:21:34 +03:00
|
|
|
<div class="col-xs-6">
|
|
|
|
<?= $form->field($model, 'status')
|
|
|
|
->dropDownList(
|
|
|
|
\common\models\Status::getStatusesArray(\common\models\UseStatus::USE_PROFILE),
|
|
|
|
[
|
|
|
|
'prompt' => 'Выберите'
|
|
|
|
]
|
|
|
|
) ?>
|
|
|
|
</div>
|
2018-10-11 11:15:09 +03:00
|
|
|
</div>
|
2018-10-11 17:45:35 +03:00
|
|
|
|
|
|
|
<div class="row">
|
2021-08-12 13:57:00 +03:00
|
|
|
<?php if (Yii::$app->user->can('confidential_information')): ?>
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<?= $form->field($model, 'salary')->textInput(['maxlength' => true]) ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2018-10-12 14:52:08 +03:00
|
|
|
<div class="col-xs-6">
|
|
|
|
<?= $form->field($model, 'position_id')->dropDownList(
|
|
|
|
\yii\helpers\ArrayHelper::map(\backend\modules\settings\models\Position::find()->all(), 'id', 'name'),
|
|
|
|
['prompt' => '...']
|
|
|
|
) ?>
|
2018-10-11 17:45:35 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2021-06-30 17:30:53 +03:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<?= $form->field($model, 'level')->dropDownList(
|
|
|
|
\common\models\UserCard::getLevelList(),
|
|
|
|
['prompt' => '...']
|
|
|
|
) ?>
|
|
|
|
</div>
|
2021-08-11 17:21:18 +03:00
|
|
|
<div class="col-xs-6">
|
|
|
|
<?= $form->field($model, 'specification')->textInput(['maxlength' => true]) ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<?= $form->field($model, 'years_of_exp')->input('number') ?>
|
|
|
|
</div>
|
2021-06-30 17:30:53 +03:00
|
|
|
</div>
|
2018-10-11 17:45:35 +03:00
|
|
|
|
|
|
|
|
2018-10-12 14:52:08 +03:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
2019-11-14 17:21:34 +03:00
|
|
|
<?= $form->field($model, 'skill')->widget(
|
|
|
|
Select2::class,
|
2018-10-12 14:52:08 +03:00
|
|
|
[
|
2019-11-14 17:21:34 +03:00
|
|
|
'data' => \yii\helpers\ArrayHelper::map(\common\models\Skill::find()->all(), 'id', 'name'),
|
|
|
|
'options' => ['placeholder' => '...', 'class' => 'form-control', 'multiple' => true],
|
2018-10-12 14:52:08 +03:00
|
|
|
'pluginOptions' => [
|
|
|
|
'allowClear' => true
|
|
|
|
],
|
|
|
|
]
|
|
|
|
)->label('Навыки'); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-07-13 13:45:44 +03:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<?= $form->field($model, 'vc_text_short')->textarea() ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-08-12 13:57:00 +03:00
|
|
|
<?= $form->field($model, 'vc_text')->widget(EditorClassic::className(), [
|
2021-06-25 13:24:32 +03:00
|
|
|
'clientOptions' => [
|
|
|
|
'language' => 'ru',
|
|
|
|
]
|
|
|
|
]); ?>
|
2021-09-09 13:12:37 +03:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<?= $form->field($model, 'achievements')->widget(Select2::class,
|
|
|
|
[
|
|
|
|
'data' => \yii\helpers\ArrayHelper::map(Achievement::find()->where(['status' => Achievement::STATUS_ACTIVE])->all(),'id', 'title'),
|
|
|
|
'options' => ['placeholder' => '...','class' => 'form-control', 'multiple' => true],
|
|
|
|
'pluginOptions' => [
|
|
|
|
'allowClear' => true
|
|
|
|
],
|
|
|
|
]
|
|
|
|
); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-25 13:24:32 +03:00
|
|
|
|
2018-10-11 11:15:09 +03:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
2019-11-14 17:21:34 +03:00
|
|
|
<?= $form->field($model, 'fields')->widget(MultipleInput::class, [
|
|
|
|
'cloneButton' => true,
|
|
|
|
'columns' => [
|
|
|
|
[
|
2021-08-12 13:57:00 +03:00
|
|
|
'name' => 'field_id',
|
|
|
|
'type' => 'dropDownList',
|
2019-11-14 17:21:34 +03:00
|
|
|
'title' => 'Поле',
|
|
|
|
'defaultValue' => null,
|
|
|
|
'items' => \yii\helpers\ArrayHelper::map(
|
|
|
|
\backend\modules\settings\models\AdditionalFields::find()
|
|
|
|
->joinWith('useFields')
|
|
|
|
->where(['`use_field`.`use`' => \common\models\UseStatus::USE_PROFILE])
|
|
|
|
->all(),
|
|
|
|
'id',
|
|
|
|
'name'
|
|
|
|
),
|
|
|
|
'options' => ['prompt' => 'Выберите']
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'value',
|
|
|
|
'title' => 'Значение',
|
|
|
|
'type' => InputFile::className(),
|
|
|
|
'options' => [
|
|
|
|
'language' => 'ru',
|
|
|
|
'controller' => 'elfinder',
|
|
|
|
// вставляем название контроллера, по умолчанию равен elfinder
|
|
|
|
// фильтр файлов, можно задать массив фильтров https://github.com/Studio-42/elFinder/wiki/Client-con..
|
|
|
|
'name' => 'fields[value]',
|
|
|
|
'id' => 'fields-value',
|
|
|
|
'options' => ['class' => 'form-control itemImg', 'maxlength' => '255'],
|
|
|
|
'buttonOptions' => ['class' => 'btn btn-primary'],
|
|
|
|
'value' => $model->fields[0]['value'],
|
|
|
|
'buttonName' => 'Выбрать файл',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
[
|
2021-08-12 13:57:00 +03:00
|
|
|
'name' => 'order',
|
2019-11-14 17:21:34 +03:00
|
|
|
'title' => 'Приоритет',
|
|
|
|
'enableError' => true,
|
|
|
|
'options' => [
|
|
|
|
'class' => 'input-priority'
|
|
|
|
]
|
2019-07-26 15:31:39 +03:00
|
|
|
],
|
2018-10-11 11:15:09 +03:00
|
|
|
],
|
2019-11-14 17:21:34 +03:00
|
|
|
])->label('Дополнительно');
|
|
|
|
?>
|
2018-10-11 11:15:09 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
|
2019-11-14 17:21:34 +03:00
|
|
|
</div>
|