02524a34
Yarik
test
|
1
2
3
4
5
6
|
<?php
/**
* @var Team $team
* @var string[] $department
* @var string[] $country
*/
|
3f7185f2
Yarik
test
|
7
|
use common\components\Request;
|
02524a34
Yarik
test
|
8
9
|
use common\models\Team;
use common\widgets\ImageUploader;
|
b16ed95f
Yarik
test
|
10
|
use kartik\select2\Select2;
|
02524a34
Yarik
test
|
11
12
13
|
use mihaildev\ckeditor\CKEditor;
use yii\helpers\Html;
use yii\jui\DatePicker;
|
b16ed95f
Yarik
test
|
14
|
use yii\web\JsExpression;
|
02524a34
Yarik
test
|
15
16
|
use yii\widgets\ActiveForm;
|
7fe508fb
Виталий
tokar commit
|
17
|
$this->title = 'Команда';
|
02524a34
Yarik
test
|
18
19
|
$this->params[ 'breadcrumbs' ][] = $this->title;
?>
|
7fe508fb
Виталий
tokar commit
|
20
21
|
<div class="login-left-column-title"><?= $this->title ?></div>
<div class="login-left-column-title-two style">Редактирование:</div>
|
02524a34
Yarik
test
|
22
|
|
7fe508fb
Виталий
tokar commit
|
23
24
25
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
<?php
|
a81136e7
Виталий
tokar commit
|
26
|
$form = ActiveForm::begin();
|
7fe508fb
Виталий
tokar commit
|
27
28
29
|
?>
</div>
</div>
|
02524a34
Yarik
test
|
30
|
|
7fe508fb
Виталий
tokar commit
|
31
32
33
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
<?= $form->field($team, 'lastname')
|
a81136e7
Виталий
tokar commit
|
34
|
->textInput([ 'class' => 'custom-input-2' ]) ?>
|
7fe508fb
Виталий
tokar commit
|
35
36
|
</div>
</div>
|
02524a34
Yarik
test
|
37
|
|
7fe508fb
Виталий
tokar commit
|
38
39
40
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
<?= $form->field($team, 'firstname')
|
a81136e7
Виталий
tokar commit
|
41
|
->textInput([ 'class' => 'custom-input-2' ]) ?>
|
7fe508fb
Виталий
tokar commit
|
42
43
|
</div>
</div>
|
02524a34
Yarik
test
|
44
|
|
7fe508fb
Виталий
tokar commit
|
45
46
47
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
<?= $form->field($team, 'middlename')
|
a81136e7
Виталий
tokar commit
|
48
|
->textInput([ 'class' => 'custom-input-2' ]) ?>
|
7fe508fb
Виталий
tokar commit
|
49
50
|
</div>
</div>
|
02524a34
Yarik
test
|
51
|
|
7fe508fb
Виталий
tokar commit
|
52
53
54
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
<?= $form->field($team, 'link')
|
a81136e7
Виталий
tokar commit
|
55
|
->textInput([ 'class' => 'custom-input-2' ]) ?>
|
7fe508fb
Виталий
tokar commit
|
56
57
|
</div>
</div>
|
02524a34
Yarik
test
|
58
|
|
7fe508fb
Виталий
tokar commit
|
59
60
61
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
<?= $form->field($team, 'position')
|
a81136e7
Виталий
tokar commit
|
62
|
->textInput([ 'class' => 'custom-input-2' ]) ?>
|
7fe508fb
Виталий
tokar commit
|
63
64
|
</div>
</div>
|
02524a34
Yarik
test
|
65
|
|
7fe508fb
Виталий
tokar commit
|
66
67
68
|
<div class="input-blocks-wrapper admn-select-company">
<div class="input-blocks">
<?= $form->field($team, 'department_id')
|
a81136e7
Виталий
tokar commit
|
69
|
->dropDownList($department) ?>
|
7fe508fb
Виталий
tokar commit
|
70
71
|
</div>
</div>
|
02524a34
Yarik
test
|
72
|
|
7fe508fb
Виталий
tokar commit
|
73
74
75
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
<?= $form->field($team, 'experience_from', [ 'template' => "{label},<span style='font-weight: 700;font-size: 13px'>лет</span><br /><span class='admn-input-txt' style='margin-right: 10px'>с</span>{input}<span class='admn-input-txt' style='margin-left: 10px'>года</span> \n{hint}\n{error}" ])
|
a81136e7
Виталий
tokar commit
|
76
77
78
79
80
81
|
->textInput([
'class' => 'custom-input-2 custom-input-2-date',
'type' => 'number',
'min' => 1950,
'max' => date('Y'),
]) ?>
|
7fe508fb
Виталий
tokar commit
|
82
83
|
</div>
</div>
|
02524a34
Yarik
test
|
84
|
|
7fe508fb
Виталий
tokar commit
|
85
86
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
|
a81136e7
Виталий
tokar commit
|
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
<?= $form->field($team, 'country_id')
->widget(Select2::classname(), [
'options' => [ 'placeholder' => 'Выбор страны ...' ],
'pluginOptions' => [
'allowClear' => true,
'minimumInputLength' => 3,
'ajax' => [
'url' => \yii\helpers\Url::to([ 'site/country' ]),
'dataType' => 'json',
'data' => new JsExpression('function(params) { return {q:params.term}; }'),
],
'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
'templateResult' => new JsExpression('function(country) { return country.text; }'),
'templateSelection' => new JsExpression('function (country) { return country.text; }'),
],
]); ?>
|
7fe508fb
Виталий
tokar commit
|
103
104
|
</div>
</div>
|
02524a34
Yarik
test
|
105
|
|
7fe508fb
Виталий
tokar commit
|
106
107
108
109
110
111
112
113
114
115
116
|
<div class="input-blocks-wrapper admin-avatar amin-team-foto">
<?= ImageUploader::widget([
'model' => $team,
'field' => 'photo',
'width' => 100,
'height' => 100,
'multi' => false,
'gallery' => $team->photo,
'name' => 'Загрузить фото',
]); ?>
</div>
|
02524a34
Yarik
test
|
117
|
|
7fe508fb
Виталий
tokar commit
|
118
|
<div class="input-blocks-wrapper">
|
04b478b9
Виталий
tokar commit
|
119
|
<div class="admin-save-btn skills-save-btn admin-add-remove-wr style">
|
c13979e2
Yarik
test
|
120
|
<?= Html::submitButton($team->isNewRecord?'Добавить':'Обновить', [ 'class' => 'input-blocks-wrapper button' ]) ?>
|
04b478b9
Виталий
tokar commit
|
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
<div class="admin-remove-note">
<?php
if(!$team->isNewRecord) {
echo Html::a('Удалить', [
'accounts/team-delete',
'id' => $team->team_id,
], [
'title' => 'Удалить',
'aria-label' => 'Удалить',
'data-confirm' => 'Вы уверены, что хотите удалить этот элемент?',
'data-method' => 'post',
'data-pjax' => 0,
]);
}
?>
</div>
<div class="admin-back-note">
|
1c67655e
Yarik
test
|
138
|
<?= Html::a('вернуться', Request::getIsLocal(\Yii::$app->request->referrer)?\Yii::$app->request->referrer:['accounts/team' ]) ?>
|
04b478b9
Виталий
tokar commit
|
139
|
</div>
|
7fe508fb
Виталий
tokar commit
|
140
141
|
</div>
</div>
|
02524a34
Yarik
test
|
142
143
144
145
|
<?php
$form->end();
?>
|
37cb2820
Виталий
tokar commit
|
146
|
<script>
|
3a1bbfcc
Yarik
test
|
147
148
149
150
151
152
153
154
155
156
157
|
$(document).ready(
function()
{
$('.input-blocks-wrapper.admn-select-company select').change(
function()
{
$(this).blur()
}
);
}
)
|
37cb2820
Виталий
tokar commit
|
158
|
</script>
|