edit.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use yii\widgets\ActiveForm;
  3. use common\enums\StatusEnum;
  4. $this->title = '编辑';
  5. $this->params['breadcrumbs'][] = ['label' => '配置信息', 'url' => ['index']];
  6. $this->params['breadcrumbs'][] = ['label' => $this->title];
  7. ?>
  8. <div class="row">
  9. <div class="col-12">
  10. <div class="box">
  11. <div class="box-header with-border">
  12. <h3 class="box-title">基本信息</h3>
  13. </div>
  14. <?php $form = ActiveForm::begin([
  15. 'fieldConfig' => [
  16. 'template' => "<div class='row'><div class='col-1 text-right'>{label}</div><div class='col-11'>{input}\n{hint}\n{error}</div></div>",
  17. ]
  18. ]); ?>
  19. <div class="box-body">
  20. <?= $form->field($model, 'title')->textInput() ?>
  21. <?= $this->render($model['name'], [
  22. 'model' => $model,
  23. 'dataModel' => $dataModel,
  24. 'form' => $form,
  25. ]) ?>
  26. <?= $form->field($model, 'sort')->textInput() ?>
  27. <?= $form->field($model, 'remark')->textarea() ?>
  28. <?= $form->field($model, 'status')->radioList(StatusEnum::getMap()) ?>
  29. </div>
  30. <div class="box-footer text-center">
  31. <button class="btn btn-primary" type="submit">保存</button>
  32. <span class="btn btn-white" onclick="history.go(-1)">返回</span>
  33. </div>
  34. <?php ActiveForm::end(); ?>
  35. </div>
  36. </div>
  37. </div>
粤ICP备19079148号