-
Notifications
You must be signed in to change notification settings - Fork 0
/
_form.php
49 lines (33 loc) · 1.37 KB
/
_form.php
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
38
39
40
41
42
43
44
45
46
47
48
49
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\modules\kp\models\MKpUploads */
/* @var $form yii\widgets\ActiveForm */
$module = "vacancy";
?>
<div class="mkp-uploads-form">
<?php $form = ActiveForm::begin(); ?>
<?= (aIfModuleControllerAction($module, "upload", "view") &&
aUserMyId() == 1) ? $form->field($model, 'kp_id')->textInput() : null ?>
<?= (aIfModuleControllerAction($module, "upload", "view") &&
aUserMyId() == 1) ? $form->field($model, 'filename_original')->textInput(['maxlength' => true]) : null ?>
<?= aIfModuleControllerAction($module, "upload", "create") ?
$form->field($model, 'files[]')
->fileInput(['multiple' => true])
//->fileInput(['multiple' => true])
: null ?>
<?= aIfModuleControllerAction($module, "upload", "update") ?
$form->field($model, 'type_screenshot')->checkbox()
: null ?>
<?= aIfModuleControllerAction($module, "upload", "update") ?
$form->field($model, 'type_goods_photo')->checkbox()
: null ?>
<?= aIfModuleControllerAction($module, "upload", "update") ?
$form->field($model, 'type_customer_photo')->checkbox()
: null ?>
<div class="form-group">
<?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>