<div class="product-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'name'); ?> <?php echo $form->field($model, 'images')->widget(ImageSelector::className()); ?> <?php echo $form->field($model, 'category_id')->widget(EntityDropDown::className(), array('items' => ArrayHelper::map(Category::find()->leaves()->all(), 'id', 'name'))); ?> <?php echo $form->field($model, 'old_price'); ?> <?php echo $form->field($model, 'price'); ?> <?php echo $form->field($model, 'inventory'); ?> <?php
?> <?php echo $form->field($model, 'currency_code')->widget(EntityDropDown::className(), ['items' => ArrayHelper::map(Currency::find()->all(), 'code', 'name')]); ?> <?php echo $form->field($model, 'country_id')->widget(EntityDropDown::className(), array('items' => ArrayHelper::map(Country::find()->all(), 'id', 'name'))); ?> <?php echo $form->field($model, 'user_id')->widget(EntityDropDown::className(), ['items' => ArrayHelper::map(User::find()->all(), 'id', 'name')]); ?> <?php echo $form->field($model, 'status')->widget(EntityDropDown::className(), ['items' => [Yii::t('app', 'New'), Yii::t('app', 'Closed'), Yii::t('app', 'Canceled')]]); ?> <?php echo $form->field($model, 'discount'); ?> <?php echo $form->field($model, 'name'); ?> <?php echo $form->field($model, 'address'); ?> <?php
?> <?php echo $form->field($model, 'user_id')->hiddenInput()->label(false); ?> <?php echo $form->field($model, 'rating')->widget(Rating::className()); ?> <?php echo $form->field($model, 'body')->textarea(); ?> <?php echo $form->field($model, 'status')->widget(EntityDropDown::className(), ['items' => [Yii::t('app', 'Inactive'), Yii::t('app', 'Active')]]); ?> <div class="form-group form-buttons"> <?php echo Html::submitButton(Yii::t('app', 'Update'), ['class' => 'btn btn-primary']); ?> <?php echo Html::a(Yii::t('app', 'Cancel'), Url::to(['list'])); ?> </div> <?php ActiveForm::end(); ?> </div>