Commit bb6098299ddcf2454cd7da76edd4b1ceb975da92
1 parent
4584991b
- order
- binotel widget
Showing
2 changed files
with
29 additions
and
23 deletions
Show diff stats
controllers/OrderController.php
@@ -97,22 +97,6 @@ | @@ -97,22 +97,6 @@ | ||
97 | ]; | 97 | ]; |
98 | } | 98 | } |
99 | 99 | ||
100 | - /** | ||
101 | - * Displays a single Order model. | ||
102 | - * | ||
103 | - * @param integer $id | ||
104 | - * | ||
105 | - * @return mixed | ||
106 | - */ | ||
107 | - public function actionView($id) | ||
108 | - { | ||
109 | - return $this->render( | ||
110 | - 'view', | ||
111 | - [ | ||
112 | - 'model' => $this->findModel($id), | ||
113 | - ] | ||
114 | - ); | ||
115 | - } | ||
116 | 100 | ||
117 | /** | 101 | /** |
118 | * Creates a new Order model. | 102 | * Creates a new Order model. |
@@ -148,8 +132,7 @@ | @@ -148,8 +132,7 @@ | ||
148 | 132 | ||
149 | return $this->redirect( | 133 | return $this->redirect( |
150 | [ | 134 | [ |
151 | - 'view', | ||
152 | - 'id' => $model->id, | 135 | + 'index', |
153 | ] | 136 | ] |
154 | ); | 137 | ); |
155 | } else { | 138 | } else { |
@@ -231,8 +214,7 @@ | @@ -231,8 +214,7 @@ | ||
231 | OrderProduct::saveItems(\Yii::$app->request->post('OrderProduct'), $id); | 214 | OrderProduct::saveItems(\Yii::$app->request->post('OrderProduct'), $id); |
232 | return $this->redirect( | 215 | return $this->redirect( |
233 | [ | 216 | [ |
234 | - 'view', | ||
235 | - 'id' => $model->id, | 217 | + 'index', |
236 | ] | 218 | ] |
237 | ); | 219 | ); |
238 | } else { | 220 | } else { |
views/order/_form.php
@@ -57,15 +57,39 @@ | @@ -57,15 +57,39 @@ | ||
57 | </div> | 57 | </div> |
58 | <div class="wrapp-blocks-edit-page"> | 58 | <div class="wrapp-blocks-edit-page"> |
59 | <?= $form->field($model, 'label_id') | 59 | <?= $form->field($model, 'label_id') |
60 | - ->dropDownList($labels) ?> | 60 | + ->widget(Select2::className(),[ |
61 | + 'options' => [ | ||
62 | + 'placeholder' => \Yii::t('app', 'Выберите вариант метки'), | ||
63 | + ], | ||
64 | + 'data' => $labels, | ||
65 | + 'pluginOptions' => [ | ||
66 | + 'allowClear' => true, | ||
67 | + ], | ||
68 | + ]) ?> | ||
61 | </div> | 69 | </div> |
62 | <div class="wrapp-blocks-edit-page"> | 70 | <div class="wrapp-blocks-edit-page"> |
63 | <?= $form->field($model, 'delivery_id') | 71 | <?= $form->field($model, 'delivery_id') |
64 | - ->dropDownList($deliveries) ?> | 72 | + ->widget(Select2::className(),[ |
73 | + 'options' => [ | ||
74 | + 'placeholder' => \Yii::t('app', 'Выберите вариант доставки'), | ||
75 | + ], | ||
76 | + 'data' => $deliveries, | ||
77 | + 'pluginOptions' => [ | ||
78 | + 'allowClear' => true, | ||
79 | + ], | ||
80 | + ]) ?> | ||
65 | </div> | 81 | </div> |
66 | <div class="wrapp-blocks-edit-page"> | 82 | <div class="wrapp-blocks-edit-page"> |
67 | <?= $form->field($model, 'payment_id') | 83 | <?= $form->field($model, 'payment_id') |
68 | - ->dropDownList($payments) ?> | 84 | + ->widget(Select2::className(),[ |
85 | + 'options' => [ | ||
86 | + 'placeholder' => \Yii::t('app', 'Выберите вариант оплаты'), | ||
87 | + ], | ||
88 | + 'data' => $payments, | ||
89 | + 'pluginOptions' => [ | ||
90 | + 'allowClear' => true, | ||
91 | + ], | ||
92 | + ]) ?> | ||
69 | </div> | 93 | </div> |
70 | </div> | 94 | </div> |
71 | 95 |