| @@ 154-163 (lines=10) @@ | ||
| 151 | 'class' => RedirectAction::class, |
|
| 152 | ], |
|
| 153 | ], |
|
| 154 | 'on beforeSave' => function (Event $event) { |
|
| 155 | /** @var \hipanel\actions\Action $action */ |
|
| 156 | $action = $event->sender; |
|
| 157 | $comment = Yii::$app->request->post('comment'); |
|
| 158 | if (!empty($type)) { |
|
| 159 | foreach ($action->collection->models as $model) { |
|
| 160 | $model->setAttribute('comment', $comment); |
|
| 161 | } |
|
| 162 | } |
|
| 163 | }, |
|
| 164 | ], |
|
| 165 | 'bulk-disable-block-modal' => [ |
|
| 166 | 'class' => PrepareBulkAction::class, |
|
| @@ 200-210 (lines=11) @@ | ||
| 197 | 'class' => RedirectAction::class, |
|
| 198 | ], |
|
| 199 | ], |
|
| 200 | 'on beforeSave' => function (Event $event) { |
|
| 201 | /** @var \hipanel\actions\Action $action */ |
|
| 202 | $action = $event->sender; |
|
| 203 | $type = Yii::$app->request->post('type'); |
|
| 204 | $comment = Yii::$app->request->post('comment'); |
|
| 205 | if (!empty($type)) { |
|
| 206 | foreach ($action->collection->models as $model) { |
|
| 207 | $model->setAttribute('comment', $comment); |
|
| 208 | } |
|
| 209 | } |
|
| 210 | }, |
|
| 211 | ], |
|
| 212 | 'bulk-disable-block-modal' => [ |
|
| 213 | 'class' => PrepareBulkAction::class, |
|