Blame view

artweb/artbox-core/views/page/_form.php 1.7 KB
326af919   mzavalniuk   add artbox-core t...
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
  <?php
      
      use artbox\core\models\Page;
      use artbox\core\models\PageLang;
      use yii\bootstrap\Tabs;
      use yii\helpers\Html;
      use yii\web\View;
      use yii\widgets\ActiveForm;
      
      /**
       * @var View       $this
       * @var Page       $model
       * @var ActiveForm $form
       * @var PageLang[] $modelLangs
       */
  ?>
  
  <div class="page-form">
      
      <?php $form = ActiveForm::begin(); ?>
      
      
      <?php
          echo Tabs::widget(
              [
                  'items'   => [
                      [
                          'label'   => \Yii::t('core', 'Common'),
                          'content' => $this->render(
                              '_form_common',
                              [
                                  'form'       => $form,
                                  'model'      => $model,
                                  'modelLangs' => $modelLangs,
                              ]
                          ),
                      ],
                      [
                          'label'   => \Yii::t('core', 'Gallery'),
                          'content' => $this->render(
                              '_gallery',
                              [
                                  'model' => $model,
                              ]
                          ),
                      ],
                  ],
                  'options' => [
                      'class' => 'bar_tabs',
                  ],
              ]
          );
      ?>
      
      <div class="form-group">
          <?= Html::submitButton(
              $model->isNewRecord ? 'Создать' : 'Обновить',
              [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ]
          ) ?>
      </div>
      
      <?php ActiveForm::end(); ?>
  
  </div>