edit.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. use yii\widgets\ActiveForm;
  3. use common\widgets\webuploader\Files;
  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-lg-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-sm-1 text-right'>{label}</div><div class='col-sm-11'>{input}{hint}{error}</div></div>",
  17. ]
  18. ]); ?>
  19. <div class="box-body">
  20. <?= $form->field($model, 'title')->textInput() ?>
  21. <?= $form->field($model, 'cover')->widget(Files::class, [
  22. 'config' => [
  23. 'pick' => [
  24. 'multiple' => false,
  25. ]
  26. ]
  27. ]); ?>
  28. <?= $form->field($model, 'synopsis')->textarea() ?>
  29. <?= $form->field($model, 'content')->widget(\common\widgets\ueditor\UEditor::class) ?>
  30. </div>
  31. <!-- /.box-body -->
  32. <div class="box-footer">
  33. <div class="col-sm-12 text-center">
  34. <button class="btn btn-primary" type="submit">保存</button>
  35. <span class="btn btn-white" onclick="history.go(-1)">返回</span>
  36. </div>
  37. </div>
  38. <?php ActiveForm::end(); ?>
  39. </div>
  40. </div>
  41. </div>
粤ICP备19079148号