Blame view

app/modules/admin/views/catalog/_form.php 1.74 KB
bf807468   Alex Savenko   first commit
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
  <?php

  use yii\helpers\Html;

  use yii\helpers\ArrayHelper;

  use yii\bootstrap\ActiveForm;

  use app\components\ckeditor\CKEditor;

  use app\mihaildev\elfinder\ElFinder;

  use app\modules\admin\models\Catalog;

  ?>

  

      <?php $form = ActiveForm::begin([

          'id' => 'form',

          'options' => ['enctype' => 'multipart/form-data'],

  

      ]); ?>

  

  <?= $form->field($model, 'parent_id')->dropDownList(

        ArrayHelper::map(Catalog::find()->where('parent_id=0')->orderBy('id')->all(), 'id', 'name'),['prompt'=>'Корневой раздел','value'=>0]) ?>

  

      <?= $form->field($model, 'sort') ?>

  

      <?= $form->field($model, 'name') ?>

  

      <? /*$form->field($model, 'translit', [

              'addon' => ['prepend' => ['content'=>'@']]

          ]);*/?>

      <?= $form->field($model, 'translit',[

          'inputTemplate' => '<div class="input-group"><span class="input-group-addon">catalog/</span>{input}</div>',

      ]);?>

          

      <?= $form->field($model, 'image')->fileInput() ?>

          

      <?= $form->field($model, 'old_image')->hiddenInput(['value'=>$model->image])->label(false); ?>    

  

      <?=$form->field($model, 'body')->widget(CKEditor::className(),[

      'editorOptions' => ElFinder::ckeditorOptions('elfinder',[/* Some CKEditor Options */]),

      ]);

      ?>

  <hr />

      <?= $form->field($model, 'fasovka_name') ?>

      <?= $form->field($model, 'type_name') ?>

      <?= $form->field($model, 'brends_name') ?>

  <hr />

      <?= $form->field($model, 'meta_title') ?>

  

      <?= $form->field($model, 'meta_keywords') ?>

  

      <?= $form->field($model, 'meta_description') ?>

  <hr />

  

      <?= Html::submitButton('Сохранить', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>

  

  

  

      <?php ActiveForm::end(); ?>