<div class="product-attribute-form"> <?php $form = ActiveForm::begin(['layout' => 'horizontal']); ?> <?php echo $form->field($model, 'category_id')->dropDownList(ArrayHelper::map(ProductAttributeCategory::getList(), 'id', 'name')); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'type')->dropDownList(ProductAttribute::getTypeLabels()); ?> <?php echo $form->field($model, 'option')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'status')->dropDownList(ActiveRecord::getStatusLabels()); ?> <div class="form-group"> <div class="col-sm-offset-3 col-sm-6"> <?php echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-block btn-success' : 'btn btn-block btn-primary']); ?>