public static function getStatusLabels() { return ArrayHelper::merge(parent::getStatusLabels(), [self::STATUS_CREATED => '已创建', self::STATUS_PAID => '已支付', self::STATUS_DELIVERY => '已发货', self::STATUS_SUCCESS => '已完成', self::STATUS_SUCCESS => '已退款']); }
?> <?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']); ?> </div> </div> <?php ActiveForm::end(); ?> </div>