_form.php 758 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\ActiveForm;
  4. /* @var $this yii\web\View */
  5. /* @var $model app\models\Posts */
  6. /* @var $form yii\widgets\ActiveForm */
  7. ?>
  8. <div class="posts-form">
  9. <?php $form = ActiveForm::begin(); ?>
  10. <?= $form->field($model, 'page')->textInput() ?>
  11. <!-- <?= $form->field($model, 'text')->textarea(['rows' => 6]) ?> --!>
  12. <?= $form->field($model, 'text')->widget(\yii\redactor\widgets\Redactor::className()) ?>
  13. <!-- <?= $form->field($model, 'status')->textInput() ?> --!>
  14. <div class="form-group">
  15. <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  16. </div>
  17. <?php ActiveForm::end(); ?>
  18. </div>