7f07c94f
Виталий
categories create
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
<div class="wrapp-blocks-edit-page">
<?= $form->field($model, 'email')
->textInput([ 'maxlength' => true ]) ?>
</div>
<div class="wrapp-blocks-edit-page">
<?= $form->field($model, 'city')
->textInput([ 'maxlength' => true ]) ?>
</div>
<div class="wrapp-blocks-edit-page">
<?= $form->field($model, 'address')
->textInput([ 'maxlength' => true ]) ?>
</div>
<div class="wrapp-blocks-edit-page">
<?= $form->field($model, 'comment')
->textarea() ?>
</div>
<div class="wrapp-blocks-edit-page">
<?= $form->field($model, 'label_id')
->dropDownList($labels) ?>
</div>
<div class="wrapp-blocks-edit-page">
<?= $form->field($model, 'delivery_id')
->dropDownList($deliveries) ?>
</div>
<div class="wrapp-blocks-edit-page">
<?= $form->field($model, 'payment_id')
->dropDownList($payments) ?>
</div>
</div>
<div class="x_panel">
<div class="order-product-container wrapp-blocks-edit-page">
<div class="row">
<div class="col-xs-12">
<div class="row">
<div class="col-md-9">
<label>Добавить еще товар</label>
<?php
echo Select2::widget(
[
'name' => 'add-to-order',
'options' => [
'placeholder' => \Yii::t('order', 'Select product'),
],
'pluginOptions' => [
'allowClear' => true,
'minimumInputLength' => 3,
'language' => [
'errorLoading' => new JsExpression(
"function() {return '" . \Yii::t('order', 'Waiting for results') . "'; }"
),
],
'ajax' => [
'url' => Url::to([ 'product-list' ]),
'dataType' => 'json',
'data' => new JsExpression('function(params) { return {q:params.term}; }'),
],
'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
'templateResult' => new JsExpression('function(city) { return city.text; }'),
'templateSelection' => new JsExpression('function (city) { return city.text; }'),
],
'id' => 'add-to-order',
]
);
?>
</div>
<div class="col-md-2">
<?php
$idInput = 'count-to-order';
echo '<label for="'.$idInput.'">КОЛ-ВО</label>';
echo Html::textInput(
'count-to-order',
1,
[
'class' => 'form-control',
'id' => $idInput,
]
);
?>
</div>
<a class="variant-to-order btn btn-success add-goods-order" href="#">
<i class="fa fa-plus"></i>
</a>
</div>
</div>
</div>
<div id="order-product-pjax" class="row">
<div class="col-xs-12 order-goods-th"<?=$isCreate ? ' style="display: none;"' : ''?>>
<div class="row">
<div class="col-md-7">
<?php
echo Html::tag('label', \Yii::t('order', 'Product'));
?>
</div>
<div class="col-md-2">
<?php
echo Html::tag('label', \Yii::t('order', 'Price'));
?>
</div>
<div class="col-md-2">
<?php
echo Html::tag('label', \Yii::t('order', 'Count'));
?>
</div>
</div>
</div>
<div id="product-rows" class="col-xs-12">
|
543a6adb
Anastasia
order
|
157
158
159
160
161
162
163
164
165
166
167
|
echo $this->render(
'_order_product',
[
'orderProduct' => $orderProduct,
'price' => $orderProduct->price,
'index' => $index,
'variant' => $orderProduct->variant,
'form' => $form,
]
);
}
|
7f07c94f
Виталий
categories create
|
178
179
180
181
182
183
184
185
186
187
|
</div>
<div class="style buttons-page-wr">
<?= Html::submitButton(
$model->isNewRecord ? Yii::t('order', 'Create') : Yii::t('order', 'Update'),
[ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-success' ]
) ?>
</div>
|