_form.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\ActiveForm;
  4. /** @var yii\web\View $this */
  5. /** @var manager\models\Comments $model */
  6. /** @var yii\widgets\ActiveForm $form */
  7. ?>
  8. <div class="card card-primary">
  9. <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]) ?>
  10. <div class="card-body">
  11. <?= $form->field($model, 'id')->textInput(['readonly'=>true]) ?>
  12. <?= $form->field($model, 'news_id')->textInput(['readonly'=>true]) ?>
  13. <?= $form->field($model, 'visible')->dropDownList([ 'Y' => 'Y', 'N' => 'N', ], ['prompt' => '']) ?>
  14. <?= $form->field($model, 'message')->textarea(['rows' => 6]) ?>
  15. <?= $form->field($model, 'ip_address')->textInput(['maxlength' => true, 'readonly'=>true]) ?>
  16. <?= $form->field($model, 'user_agent')->textarea(['rows' => 6, 'readonly'=>true]) ?>
  17. <?= $form->field($model, 'created_by_user_id')->textInput(['maxlength' => true]) ?>
  18. <?= $form->field($model, 'created_at')->textInput() ?>
  19. <div class="form-group">
  20. <?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
  21. </div>
  22. </div>
  23. <?php ActiveForm::end(); ?>
  24. </div>