Skip to content

Commit 848bf79

Browse files
committed
update item form
1 parent 0848490 commit 848bf79

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/views/item/_form.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
/* @var $this yii\web\View */
1111
/* @var $model zacksleo\yii2\cms\models\Item */
1212
/* @var $form yii\widgets\ActiveForm */
13+
14+
$css = <<<CSS
15+
img.file-preview-image{width:100%};
16+
CSS;
17+
$this->registerCss($css);
1318
?>
1419

1520
<div class="item-form">
@@ -39,6 +44,19 @@
3944

4045
<?= $form->field($model, 'price')->textInput() ?>
4146

47+
<?= \nemmo\attachments\components\AttachmentsInput::widget([
48+
'id' => 'file-input', // Optional
49+
'model' => $model,
50+
'options' => [ // Options of the Kartik's FileInput widget
51+
'multiple' => true, // If you want to allow multiple upload, default to false
52+
],
53+
'pluginOptions' => [ // Plugin options of the Kartik's FileInput widget
54+
'maxFileCount' => 10, // Client max files
55+
'resizeImage' => true
56+
]
57+
]) ?>
58+
59+
4260
<?= $form->field($model, 'description')->widget('kucha\ueditor\UEditor', []); ?>
4361

4462
<?= $form->field($model, 'status')->textInput()->radioList(

0 commit comments

Comments
 (0)