Blame view

views/product-unit/_form.php 1.04 KB
2f25da09   Yarik   first commit
1
2
  <?php
      
8a7e6ecf   Yarik   Namespaces
3
      use artweb\artbox\language\widgets\LanguageForm;
2f25da09   Yarik   first commit
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
      use artweb\artbox\ecommerce\models\ProductUnit;
      use artweb\artbox\ecommerce\models\ProductUnitLang;
      use yii\helpers\Html;
      use yii\web\View;
      use yii\widgets\ActiveForm;
      
      /**
       * @var View              $this
       * @var ProductUnit       $model
       * @var ProductUnitLang[] $modelLangs
       * @var ActiveForm        $form
       */
  ?>
  
  <div class="product-unit-form">
      
      <?php $form = ActiveForm::begin(); ?>
      
      <?= $form->field($model, 'is_default')
               ->checkbox() ?>
      
      <?= LanguageForm::widget([
          'modelLangs' => $modelLangs,
          'form'        => $form,
b7e90569   Yarik   Namespaces
28
          'formView'    => '@artweb/artbox/ecommerce/views/product-unit/_form_language',
2f25da09   Yarik   first commit
29
30
31
32
33
34
35
36
37
      ]) ?>
      
      <div class="form-group">
          <?= Html::submitButton($model->isNewRecord ? Yii::t('product', 'Create') : Yii::t('product', 'Update'), [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ]) ?>
      </div>
      
      <?php ActiveForm::end(); ?>
  
  </div>