_main_tab.php
1.66 KB
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
<?php
use artbox\core\admin\widgets\ImageInput;
use common\models\Settings;
use yii\bootstrap\ActiveForm;
use yii\web\View;
/**
* @var View $this
* @var Settings $model
* @var ActiveForm $form
*/
echo '<div class="wrapp-blocks-edit-page">';
echo $form->field($model, 'name')
->textInput();
echo '</div>';
echo '<div class="wrapp-blocks-edit-page">';
echo $form->field($model, 'logo')
->widget(
ImageInput::className(),
[
'showPreview' => true,
'showDeletePickedImageConfirm' => false,
]
);
echo '</div>';
echo '<div class="style">';
foreach ($model->getVariationModels() as $index => $variationModel){
echo '<div style="display: none" class="">';
echo $form->field($variationModel, '[' . $index . ']' . 'language_id')
->hiddenInput()->label(false);
echo $form->field($variationModel, '[' . $index . ']' . 'settings_id')
->hiddenInput()->label(false);
echo $form->field($variationModel, '[' . $index . ']' . 'id')
->hiddenInput(['value' => $index])->label(false);
echo '</div>';
echo '<div class="tabs-lang" '.($index > 0 ? 'style="display:none"' : '').'>';
echo $form->field($variationModel, '[' . $index . ']' . 'about')
->textarea()->label(\Yii::t('core', 'About us' ).' ('.$variationModel->language->url.')');
echo '</div>';
}
echo '</div>';
?>