_form.php 816 B

1234567891011121314151617181920212223242526
  1. <?php
  2. use yii\bootstrap\ActiveForm;
  3. use yii\helpers\Html;
  4. /* @var $this yii\web\View */
  5. /* @var $model common\models\NavItem */
  6. /* @var $form yii\bootstrap\ActiveForm */
  7. ?>
  8. <div class="Nav-item-form">
  9. <?php $form = ActiveForm::begin(); ?>
  10. <?= $form->field($model, 'title') ?>
  11. <?= $form->field($model, 'url')->textarea(['maxlength' => 1024]) ?>
  12. <?= $form->field($model, 'target')->checkbox() ?>
  13. <?= $form->field($model, 'status')->checkbox() ?>
  14. <div class="form-group form-submit">
  15. <?= Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  16. </div>
  17. </div>
  18. <?php ActiveForm::end(); ?>