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
917 B

<?php
use yii\helpers\Html;
use yii\bootstrap4\ActiveForm;
use linyao\widgets\Select2;
use antgoods\models\ars\Category;
/* @var $this yii\web\View */
/* @var $model antgoods\models\ars\Attribute */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="attribute-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'value')->textarea(['rows' => 6]) ?>
<?= $form->field($model, 'sort_order')->textInput() ?>
<?= $form->field($model, 'cat_id')->widget(Select2::className(), ["items" => array_merge([0 => '请选择'], Category::modelColumn()), "promptText" => false]) ?>
<div class="form-group">
<?= Html::submitButton('保存', ['class' => 'btn btn-success']) ?>
<?= Html::a('返回', ['index'], ['class' => 'btn btn-info']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>