Blame view

common/modules/product/views/manage/export.php 1.58 KB
96410438   Yarik   Project admin com...
1
2
3
  <?php
      
      use common\modules\language\models\Language;
5c2eb7c8   Yarik   Big commit almost...
4
      use common\modules\product\models\Export;
96410438   Yarik   Project admin com...
5
      use yii\helpers\Html;
5c2eb7c8   Yarik   Big commit almost...
6
      use yii\web\View;
96410438   Yarik   Project admin com...
7
      use yii\widgets\ActiveForm;
5c2eb7c8   Yarik   Big commit almost...
8
9
10
11
12
      
      /**
       * @var View   $this
       * @var Export $model
       */
96410438   Yarik   Project admin com...
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
  ?>
  
  <div class="product-import-form">
      <?php $form = ActiveForm::begin([
          'enableClientValidation' => false,
          'options'                => [ 'enctype' => 'multipart/form-data' ],
      ]); ?>
      
      <?php if($model->errors) : ?>
          <div class="error">
              <?= implode("<br>\n", $model->errors); ?>
          </div>
      <?php endif ?>
      
      <?php if($model->output) : ?>
          <h2>Лог операции</h2>
          <div class="success" style="height: 10em;overflow: auto;border: 1px solid #000">
              <?= implode("<br>\n", $model->output); ?>
          </div>
      <?php endif ?>
      
      <?= $form->field($model, 'lang')
               ->dropDownList(Language::find()
                                      ->select([
                                          'name',
8af13427   Yarik   For leha commit.
38
                                          'id',
96410438   Yarik   Project admin com...
39
40
41
42
                                      ])
                                      ->where([ 'status' => 1 ])
                                      ->orderBy([ 'default' => SORT_DESC ])
                                      ->asArray()
8af13427   Yarik   For leha commit.
43
                                      ->indexBy('id')
96410438   Yarik   Project admin com...
44
45
                                      ->column()) ?>
      
96410438   Yarik   Project admin com...
46
      <div class="form-group">
6fdc7b5a   Yarik   Another one admin...
47
          <?= Html::submitButton(Yii::t('product', 'Export'), [ 'class' => 'btn btn-success' ]) ?>
96410438   Yarik   Project admin com...
48
49
50
51
      </div>
      
      <?php ActiveForm::end(); ?>
  </div>