You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
911 B

  1. <?php
  2. use yii\helpers\Html;
  3. use yii\bootstrap4\ActiveForm;
  4. use linyao\widgets\Select2;
  5. use goods\models\ars\Category;
  6. /* @var $this yii\web\View */
  7. /* @var $model goods\models\ars\Attribute */
  8. /* @var $form yii\widgets\ActiveForm */
  9. ?>
  10. <div class="attribute-form">
  11. <?php $form = ActiveForm::begin(); ?>
  12. <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
  13. <?= $form->field($model, 'value')->textarea(['rows' => 6]) ?>
  14. <?= $form->field($model, 'sort_order')->textInput() ?>
  15. <?= $form->field($model, 'cat_id')->widget(Select2::className(), ["items" => array_merge([0 => '请选择'], Category::modelColumn()), "promptText" => false]) ?>
  16. <div class="form-group">
  17. <?= Html::submitButton('保存', ['class' => 'btn btn-success']) ?>
  18. <?= Html::a('返回', ['index'], ['class' => 'btn btn-info']) ?>
  19. </div>
  20. <?php ActiveForm::end(); ?>
  21. </div>