_job_form.php
1.68 KB
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
<?php
/**
* @var integer $index
*/
use common\models\Job;
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 ();
echo "<div class='ajax-loaded'><div class='prev_job_inputs'>";
echo $form->field ($model, '[' . $index . ']name')
->label ('Название')
->textInput ();
echo $form->field ($model, '[' . $index . ']link')
->label ('Ссылка на компанию на сайте МФП')
->textInput ();
echo $form->field ($model, '[' . $index . ']date_start')
->label ('Дата начала работы')
->widget (DatePicker::className (), ['language' => 'ru', 'dateFormat' => 'dd-MM-yyyy']);
echo $form->field ($model, '[' . $index . ']date_end')
->label ('Дата окончания работы')
->widget (DatePicker::className (), ['language' => 'ru', 'dateFormat' => 'dd-MM-yyyy']);
echo $form->field ($model, '[' . $index . ']position')
->label ('Должность')
->textInput ();
echo $form->field ($model, '[' . $index . ']total_count')
->label ('Количество проектов, в которых принимали участие')
->input ('number');
echo $form->field ($model, '[' . $index . ']complete_count')
->label ('из них реализовано')
->input ('number');
echo Html::button('Удалить', ['class' => 'remove_job_button']);
echo "</div></div>";
$form->end ();
?>