diff --git a/views/order/_form.php b/views/order/_form.php
index 79eaf5f..781c4c6 100755
--- a/views/order/_form.php
+++ b/views/order/_form.php
@@ -75,7 +75,7 @@
?>
-
+
orderProducts as $index => $orderProduct) {
?>
@@ -182,9 +182,77 @@
+
+
+
+ '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',
+ ]
+ );
+ ?>
+
+
+ 'form-control',
+ 'id' => 'count-to-order',
+ ]
+ );
+ ?>
+
+
+ 'fa fa-',
+ ]
+ ),
+ '#',
+ [
+ 'class' => 'variant-to-order',
+ 'data-id' => $model->id,
+ ]
+ );
+ ?>
+
+
+
+
+
+
= Html::submitButton(
$model->isNewRecord ? Yii::t('order', 'Create') : Yii::t('order', 'Update'),
diff --git a/views/order/index.php b/views/order/index.php
index 9d41cdf..a77fa46 100755
--- a/views/order/index.php
+++ b/views/order/index.php
@@ -54,9 +54,9 @@
},
],
- [ 'class' => 'yii\grid\ActionColumn',
- 'template' => '{view} {update} {delete}{print}',
- 'buttons' => [
+ [ 'class' => 'yii\grid\ActionColumn',
+ 'template' => '{view} {update} {delete} {print}',
+ 'buttons' => [
'print' => function ($url) {
return Html::a(
'',
--
libgit2 0.21.4