['enctype' => 'multipart/form-data'] ]); ?> field($model, 'name')->textInput(['maxlength' => true]) ?> field($model, 'is_top')->checkbox(['label' => 'ТОП']) ?> field($model, 'is_new')->checkbox(['label' => 'Новинка']) ?> field($model, 'akciya')->checkbox(['label' => 'Акционный']) ?> field($model, 'description')->widget(\mihaildev\ckeditor\CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ], ]); ?> field($model, 'video')->textarea(); ?> field($model, 'brand_id')->dropDownList( ArrayHelper::map(ProductHelper::getBrands()->all(), 'brand_id', 'name'), [ 'prompt' => Yii::t('product', 'Select brand') ] ) ?> field($model, 'categories')->widget(Select2::className(), [ 'data' => ArtboxTreeHelper::treeMap(ProductHelper::getCategories(), 'category_id', 'name'), 'language' => 'ru', 'options' => [ 'placeholder' => Yii::t('product', 'Select categories'), 'multiple' => true, ], 'pluginOptions' => [ 'allowClear' => true ], ] ) ?> field($model, 'imagesUpload[]')->widget(\kartik\file\FileInput::classname(), [ 'language' => 'ru', 'options' => [ 'accept' => 'image/*', 'multiple' => true, ], 'pluginOptions' => [ 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'initialPreview' => !empty($model->imagesHTML) ? $model->imagesHTML : [], 'initialPreviewConfig' => $model->imagesConfig, 'overwriteInitial' => false, 'showRemove' => false, 'showUpload' => false, 'uploadAsync' => !empty($model->product_id), 'previewFileType' => 'image', ], ]); ?> all() as $group) :?> field($model, 'options')->checkboxList( ArrayHelper::map($group->options, 'tax_option_id', 'value'), [ 'multiple' => true, 'unselect' => null, ] )->label($group->name);?>
isNewRecord ? Yii::t('product', 'Create') : Yii::t('product', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>