Commit 4f1a92bb05acb103a3ef8b79dc1c77e91815fee7
Merge remote-tracking branch 'origin/master'
Showing
2 changed files
with
15 additions
and
8 deletions
Show diff stats
models/Order.php
... | ... | @@ -141,7 +141,10 @@ |
141 | 141 | 'required', |
142 | 142 | ], |
143 | 143 | [ |
144 | - [ 'comment' ], | |
144 | + [ | |
145 | + 'comment', | |
146 | + 'body', | |
147 | + ], | |
145 | 148 | 'string', |
146 | 149 | ], |
147 | 150 | [ |
... | ... | @@ -161,7 +164,6 @@ |
161 | 164 | 'deadline', |
162 | 165 | 'name', |
163 | 166 | 'numbercard', |
164 | - 'body', | |
165 | 167 | 'declaration', |
166 | 168 | 'stock', |
167 | 169 | 'consignment', |
... | ... | @@ -183,7 +185,7 @@ |
183 | 185 | public function afterFind() |
184 | 186 | { |
185 | 187 | parent::afterFind(); |
186 | - $this->deadline = !empty($this->deadline) ? date('d.m.Y', $this->deadline) : ''; | |
188 | + $this->deadline = !empty( $this->deadline ) ? date('d.m.Y', $this->deadline) : ''; | |
187 | 189 | |
188 | 190 | } |
189 | 191 | |
... | ... | @@ -200,7 +202,7 @@ |
200 | 202 | |
201 | 203 | protected function convertDate() |
202 | 204 | { |
203 | - if (!empty($this->deadline)) { | |
205 | + if (!empty( $this->deadline )) { | |
204 | 206 | $date = new \DateTime(); |
205 | 207 | $date->setTimestamp(strtotime($this->deadline)); |
206 | 208 | $date->format("d.m.Y"); |
... | ... | @@ -289,8 +291,8 @@ |
289 | 291 | */ |
290 | 292 | public function getDeliveryString() |
291 | 293 | { |
292 | - if (!empty($this->orderDelivery)) { | |
293 | - if (!empty($this->orderDelivery->parent)) { | |
294 | + if (!empty( $this->orderDelivery )) { | |
295 | + if (!empty( $this->orderDelivery->parent )) { | |
294 | 296 | return $this->orderDelivery->parent->lang->title . ': ' . $this->orderDelivery->lang->title; |
295 | 297 | } else { |
296 | 298 | return $this->orderDelivery->lang->title; |
... | ... | @@ -308,7 +310,7 @@ |
308 | 310 | */ |
309 | 311 | public function getWasted() |
310 | 312 | { |
311 | - if (empty($this->deadline)) { | |
313 | + if (empty( $this->deadline )) { | |
312 | 314 | return false; |
313 | 315 | } else { |
314 | 316 | return time() > strtotime($this->deadline); | ... | ... |
views/category/_form_language.php
1 | 1 | <?php |
2 | 2 | use artweb\artbox\language\models\Language; |
3 | 3 | use artweb\artbox\ecommerce\models\CategoryLang; |
4 | + use mihaildev\ckeditor\CKEditor; | |
4 | 5 | use yii\web\View; |
5 | 6 | use yii\widgets\ActiveForm; |
6 | 7 | |
... | ... | @@ -30,7 +31,11 @@ |
30 | 31 | ->textInput([ 'maxlength' => true ]) ?> |
31 | 32 | |
32 | 33 | <?= $form->field($model_lang, '[' . $language->id . ']seo_text') |
33 | - ->textarea([ 'rows' => 6 ]) ?> | |
34 | + ->widget(CKEditor::className(), [ | |
35 | + 'editorOptions' => [ | |
36 | + 'preset' => 'standard', | |
37 | + ] | |
38 | + ]) ?> | |
34 | 39 | |
35 | 40 | <?= $form->field($model_lang, '[' . $language->id . ']h1') |
36 | 41 | ->textInput([ 'maxlength' => true ]) ?> |
37 | 42 | \ No newline at end of file | ... | ... |