_form.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\ActiveForm;
  4. /* @var $this yii\web\View */
  5. /* @var $model common\models\VipPrice */
  6. /* @var $form yii\widgets\ActiveForm */
  7. ?>
  8. <div class="box box-success">
  9. <div class="box-body">
  10. <?php $form = ActiveForm::begin(); ?>
  11. <?= $form->field($model, 'type')->dropDownList(\common\enums\VipEnum::$list ,['maxlength' => true]) ?>
  12. <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
  13. <?= $form->field($model, 'price')->textInput(['maxlength' => true]) ?>
  14. <!-- --><?//= $form->field($model, 'origin_price')->textInput(['maxlength' => true]) ?>
  15. <?= $form->field($model, 'month')->textInput(['type' => 'number']) ?>
  16. <div class="form-group">
  17. <?= Html::submitButton($model->isNewRecord ? Yii::t('common', 'Create') : Yii::t('common', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success btn-flat' : 'btn btn-primary btn-flat']) ?>
  18. </div>
  19. <?php ActiveForm::end(); ?>
  20. </div>
  21. </div>