a61ab7a7
Anastasia
stock
|
1
|
<?php
|
a6ba0937
Alexey Boroda
-Stocks prettified
|
2
3
4
5
6
|
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use artbox\core\widgets\LanguageForm;
use kartik\select2\Select2;
|
a2b52eb4
Anastasia
artbox-stock
|
7
|
use artbox\core\components\imagemanager\components\ImageManagerInputWidget;
|
a6ba0937
Alexey Boroda
-Stocks prettified
|
8
9
10
11
|
/* @var $this yii\web\View */
/* @var $model artbox\stock\models\Shop */
/* @var $form yii\widgets\ActiveForm */
|
77d77c34
Anastasia
stock
|
12
|
/* @var $modelLangs artbox\stock\models\ShopLang */
|
a6ba0937
Alexey Boroda
-Stocks prettified
|
13
|
$days = [
|
77d77c34
Anastasia
stock
|
14
15
16
17
18
19
20
|
\Yii::t('stock', 'Mon'),
\Yii::t('stock', 'Tue'),
\Yii::t('stock', 'Wed'),
\Yii::t('stock', 'Thu'),
\Yii::t('stock', 'Fri'),
\Yii::t('stock', 'Sat'),
\Yii::t('stock', 'Sun'),
|
a6ba0937
Alexey Boroda
-Stocks prettified
|
21
22
23
|
];
\artbox\stock\assets\StockAsset::register($this);
|
7def290f
Anastasia
stock map
|
24
|
\artbox\stock\assets\MapAsset::register($this);
|
a61ab7a7
Anastasia
stock
|
25
26
27
28
29
30
31
32
33
34
35
|
?>
<div class="shop-form">
<?php $form = ActiveForm::begin(); ?>
<?= LanguageForm::widget(
[
'modelLangs' => $modelLangs,
'formView' => '@artbox/stock/views/shop/_form_language',
'form' => $form,
]
) ?>
|
a6ba0937
Alexey Boroda
-Stocks prettified
|
36
|
|
1b334a54
Anastasia
bug fix artbox-order
|
37
38
|
<?= $form->field($model, 'mode')
->textarea() ?>
|
a6ba0937
Alexey Boroda
-Stocks prettified
|
39
40
41
42
|
<?= Select2::widget(
[
|
6aee6837
Anastasia
city_id in admin
|
43
44
|
'model' => $model,
'attribute' => 'city_id',
|
a6ba0937
Alexey Boroda
-Stocks prettified
|
45
46
47
48
49
|
'value' => array_keys($model->cities),
'data' => $model->cities,
'options' => [ 'placeholder' => 'Выберите город ...' ],
]
); ?>
|
a2b52eb4
Anastasia
artbox-stock
|
50
51
52
53
54
55
56
57
58
59
60
61
|
<?= $form->field($model, 'image_id')
->widget(
ImageManagerInputWidget::className(),
[
'aspectRatio' => ( 16 / 9 ),
//set the aspect ratio
'showPreview' => true,
//false to hide the preview
'showDeletePickedImageConfirm' => false,
//on true show warning before detach image
]
); ?>
|
a6ba0937
Alexey Boroda
-Stocks prettified
|
62
63
64
65
66
|
<?= $form->field($model, 'sort')
->textInput() ?>
<?= $form->field($model, 'status')
->checkbox() ?>
|
5baec053
Anastasia
stock
|
67
68
|
<?= $form->field($model, 'shop')
->checkbox() ?>
|
a6ba0937
Alexey Boroda
-Stocks prettified
|
69
70
71
72
73
74
75
76
|
<div class="form-group">
<?= Html::submitButton(
$model->isNewRecord ? \Yii::t('stock', 'Create') : \Yii::t('stock', 'Update'),
[ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ]
) ?>
</div>
|
a61ab7a7
Anastasia
stock
|
77
78
|
<?php ActiveForm::end(); ?>
</div>
|
77d77c34
Anastasia
stock
|
|
|