Blame view

frontend/views/road-to-category/_form.php 952 Bytes
984ae8aa   Eugeny Galkovskiy   120716
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
  <?php
  
  use yii\helpers\Html;
  use yii\widgets\ActiveForm;
  
  /**
   * @var yii\web\View $this
   * @var common\models\RoadToCategory $model
   * @var array $regions
   * @var array $roads
   * @var array $road_categories
   * @var yii\widgets\ActiveForm $form
   */
  ?>
  
  <div class="road-to-category-form">
  
      <?php $form = ActiveForm::begin(); ?>
  
      <?= $form->field($model, 'region_id')->dropDownList($regions) ?>
  
      <?= $form->field($model, 'road_id')->dropDownList($roads) ?>
  
      <?= $form->field($model, 'begin')->textInput() ?>
  
      <?= $form->field($model, 'end')->textInput() ?>
  
      <?= $form->field($model, 'distance')->textInput() ?>
  
      <?= $form->field($model, 'road_category_id')->dropDownList($road_categories) ?>
  
      <div class="form-group">
          <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
      </div>
  
      <?php ActiveForm::end(); ?>
  
  </div>