| @@ 76-83 (lines=8) @@ | ||
| 73 | 'class' => RedirectAction::class, |
|
| 74 | ], |
|
| 75 | ], |
|
| 76 | 'on beforeSave' => function (Event $event) { |
|
| 77 | /** @var \hipanel\actions\Action $action */ |
|
| 78 | $action = $event->sender; |
|
| 79 | $comment = Yii::$app->request->post('comment'); |
|
| 80 | foreach ($action->collection->models as $model) { |
|
| 81 | $model->setAttribute('comment', $comment); |
|
| 82 | } |
|
| 83 | }, |
|
| 84 | ], |
|
| 85 | 'bulk-approve-modal' => [ |
|
| 86 | 'class' => PrepareBulkAction::class, |
|
| @@ 104-111 (lines=8) @@ | ||
| 101 | 'class' => RedirectAction::class, |
|
| 102 | ], |
|
| 103 | ], |
|
| 104 | 'on beforeSave' => function (Event $event) { |
|
| 105 | /** @var \hipanel\actions\Action $action */ |
|
| 106 | $action = $event->sender; |
|
| 107 | $comment = Yii::$app->request->post('comment'); |
|
| 108 | foreach ($action->collection->models as $model) { |
|
| 109 | $model->setAttribute('comment', $comment); |
|
| 110 | } |
|
| 111 | }, |
|
| 112 | ], |
|
| 113 | 'bulk-reject-modal' => [ |
|
| 114 | 'class' => PrepareBulkAction::class, |
|