Blame view

views/label/_form.php 1.54 KB
2a050410   Yarik   Order
1
2
3
  <?php
      
      use artbox\core\widgets\LanguageForm;
63fd6495   Alexey Boroda   -Cabinet started
4
      use kartik\color\ColorInput;
2a050410   Yarik   Order
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
39
      use yii\helpers\Html;
      use yii\widgets\ActiveForm;
      
      /**
       * @var \yii\web\View                    $this
       * @var \artbox\order\models\Label       $model
       * @var \artbox\order\models\LabelLang[] $modelLangs
       * @var ActiveForm                       $form
       */
  ?>
  
  <div class="label-form">
      
      <?php $form = ActiveForm::begin(); ?>
      
      <?= LanguageForm::widget(
          [
              'modelLangs' => $modelLangs,
              'formView'   => '@artbox/order/views/label/_form_language',
              'form'       => $form,
          ]
      ) ?>
      
      <?= $form->field($model, 'sort')
               ->textInput() ?>
      
      <?= $form->field($model, 'value')
               ->textInput() ?>
      
      <?= $form->field($model, 'status')
               ->checkbox(
                   [
                       'class' => 'flat',
                   ]
               ) ?>
63fd6495   Alexey Boroda   -Cabinet started
40
41
42
43
44
45
46
47
48
49
      
      <?php
          echo $form->field($model, 'color')
                    ->widget(
                        ColorInput::classname(),
                        [
                            'options' => [ 'placeholder' => \Yii::t('app', 'Select color ...') ],
                        ]
                    );
      ?>
2a050410   Yarik   Order
50
51
52
53
54
55
56
57
58
59
60
    
    <div class="form-group">
        <?= Html::submitButton(
            $model->isNewRecord ? Yii::t('order', 'Create') : Yii::t('order', 'Update'),
            [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ]
        ) ?>
    </div>
      
      <?php ActiveForm::end(); ?>
  
  </div>