| @@ 45-55 (lines=11) @@ | ||
| 42 | 'class' => RedirectAction::class, |
|
| 43 | ], |
|
| 44 | ], |
|
| 45 | 'on beforeSave' => function (Event $event) { |
|
| 46 | /** @var \hipanel\actions\Action $action */ |
|
| 47 | $action = $event->sender; |
|
| 48 | $comment = Yii::$app->request->post('comment'); |
|
| 49 | if (!empty($type)) { |
|
| 50 | foreach ($action->collection->models as $model) { |
|
| 51 | $model->setAttribute('comment', $comment); |
|
| 52 | ||
| 53 | } |
|
| 54 | } |
|
| 55 | }, |
|
| 56 | ], |
|
| 57 | 'bulk-approve-modal' => [ |
|
| 58 | 'class' => PrepareBulkAction::class, |
|
| @@ 347-356 (lines=10) @@ | ||
| 344 | 'class' => RedirectAction::class, |
|
| 345 | ], |
|
| 346 | ], |
|
| 347 | 'on beforeSave' => function (Event $event) { |
|
| 348 | /** @var \hipanel\actions\Action $action */ |
|
| 349 | $action = $event->sender; |
|
| 350 | $comment = Yii::$app->request->post('comment'); |
|
| 351 | if (!empty($type)) { |
|
| 352 | foreach ($action->collection->models as $model) { |
|
| 353 | $model->setAttribute('comment', $comment); |
|
| 354 | } |
|
| 355 | } |
|
| 356 | }, |
|
| 357 | ], |
|
| 358 | 'bulk-disable-block-modal' => [ |
|
| 359 | 'class' => PrepareBulkAction::class, |
|