@@ 161-170 (lines=10) @@ | ||
158 | 'class' => RedirectAction::class, |
|
159 | ], |
|
160 | ], |
|
161 | 'on beforeSave' => function (Event $event) { |
|
162 | /** @var \hipanel\actions\Action $action */ |
|
163 | $action = $event->sender; |
|
164 | $comment = Yii::$app->request->post('comment'); |
|
165 | if (!empty($type)) { |
|
166 | foreach ($action->collection->models as $model) { |
|
167 | $model->setAttribute('comment', $comment); |
|
168 | } |
|
169 | } |
|
170 | }, |
|
171 | ], |
|
172 | 'bulk-disable-block-modal' => [ |
|
173 | 'class' => PrepareBulkAction::class, |
@@ 169-179 (lines=11) @@ | ||
166 | 'class' => RedirectAction::class, |
|
167 | ], |
|
168 | ], |
|
169 | 'on beforeSave' => function (Event $event) { |
|
170 | /** @var \hipanel\actions\Action $action */ |
|
171 | $action = $event->sender; |
|
172 | $type = Yii::$app->request->post('type'); |
|
173 | $comment = Yii::$app->request->post('comment'); |
|
174 | if (!empty($type)) { |
|
175 | foreach ($action->collection->models as $model) { |
|
176 | $model->setAttribute('comment', $comment); |
|
177 | } |
|
178 | } |
|
179 | }, |
|
180 | ], |
|
181 | 'bulk-disable-block-modal' => [ |
|
182 | 'class' => PrepareBulkAction::class, |