edit.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. use yii\widgets\ActiveForm;
  3. $addon = <<< HTML
  4. <div class="input-group-append">
  5. <span class="input-group-text">
  6. <i class="fas fa-calendar-alt"></i>
  7. </span>
  8. </div>
  9. HTML;
  10. $this->title = $model->isNewRecord ? '创建' : '编辑';
  11. $this->params['breadcrumbs'][] = ['label' => '弹出广告', 'url' => ['index']];
  12. $this->params['breadcrumbs'][] = $this->title;
  13. ?>
  14. <div class="row">
  15. <div class="col-12 col-lg-12">
  16. <div class="box">
  17. <div class="box-header with-border">
  18. <h3 class="box-title">基本信息</h3>
  19. </div>
  20. <?php $form = ActiveForm::begin([
  21. 'fieldConfig' => [
  22. 'template' => "<div class='row'><div class='col-lg-1 col-sm-12 text-right'>{label}</div><div class='col-lg-11'>{input}{hint}{error}</div></div>",
  23. ]
  24. ]); ?>
  25. <div class="box-body">
  26. <div class="col-lg-12">
  27. <?= $form->field($model, 'title')->textInput([
  28. 'readonly' => true
  29. ]); ?>
  30. <div class="hide">
  31. <?= $form->field($model, 'name')->hiddenInput()->label(false); ?>
  32. </div>
  33. <?= $form->field($model, 'version')->textInput()->hint('格式要求(必须):xxxx.xxxx.xxxx, 这个 x 必须为数字前面 0 可忽略,例如:1.0.1') ?>
  34. <?= $form->field($model, 'content')->widget(\common\widgets\ueditor\UEditor::class) ?>
  35. </div>
  36. </div>
  37. <div class="box-footer text-center">
  38. <button class="btn btn-primary" type="submit">保存</button>
  39. <span class="btn btn-white" onclick="history.go(-1)">返回</span>
  40. </div>
  41. <?php ActiveForm::end(); ?>
  42. </div>
  43. </div>
  44. </div>
粤ICP备19079148号