Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use yii\helpers\Html;
- use yii\widgets\ActiveForm;
- use common\models\User;
- use mihaildev\ckeditor\CKEditor;
- use kartik\file\FileInput;
- use yii\web\NotFoundHttpException;
- use yii\web\Controller;
- use yii\helpers\FileHelper;
- use yii\helpers\Url;
- use yii\web\UploadedFile;
- use \yii\helpers\VarDumper;
- /* @var $this yii\web\View */
- /* @var $model backend\models\Product */
- /* @var $form yii\widgets\ActiveForm */
- ?>
- <div class="product-form">
- <?php $form = ActiveForm::begin([
- 'options'=>['enctype'=>'multipart/form-data'],
- ]); ?>
- <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'price_roz')->textInput(['maxlength' => true]) ?>
- <?php foreach ($images as $image) {
- \yii\helpers\VarDumper::dump($image, 10, true);
- } ?>
- <?= $form->field($model, 'price_opt')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'category_id')->textInput() ?>
- <?php echo $form->field($model, 'status')->dropDownList(User::statuses()) ?>
- <?= \kartik\file\FileInput::widget([
- 'name' => 'ImagesManager[attachment]',
- 'options'=>[
- 'multiple'=>true
- ],
- 'pluginOptions' => [
- 'uploadUrl' => 'http://localhost/mobile-go/backend/web/index.php?r=site/save-img',
- 'uploadExtraData' => [
- 'ImagesManager[class]' => $model->formName(),
- 'ImagesManager[product_id]' => $model->id
- ],
- 'maxFileCount' => 10
- ]
- ]);
- ?>
- <?php echo $form->field($model, 'description')->widget(CKEditor::className(),[
- 'editorOptions' => [
- 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать
- 'inline' => false, //по умолчанию false
- ],
- ]); ?>
- <?= $form->field($model, 'meta_title')->textInput() ?>
- <?= $form->field($model, 'meta_keyword')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'meta_description')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'hit')->checkbox(['0','1']) ?>
- <?= $form->field($model, 'new')->checkbox(['0','1']) ?>
- <?= $form->field($model, 'sale')->checkbox(['0','1']) ?>
- <div class="form-group">
- <?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
- </div>
- <?php ActiveForm::end(); ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement