fix action btn widger
This commit is contained in:
		| @@ -39,7 +39,7 @@ $table->addAction(function ($row, $url) use ($moduleService) { | ||||
|         ]); | ||||
|  | ||||
|     } else { | ||||
|         ActionButtonWidget::create([ | ||||
|         return ActionButtonWidget::create([ | ||||
|             'label' => "<i class='fa-regular fa-circle-check'></i>", | ||||
|             'url' => "$url/deactivate/?slug=$slug", | ||||
|             'btn_type' => "success" | ||||
|   | ||||
| @@ -6,11 +6,12 @@ use kernel\Widget; | ||||
|  | ||||
| class ActionButtonWidget extends Widget | ||||
| { | ||||
|     public function run(): void | ||||
|     public function run(): string | ||||
|     { | ||||
|         $label = $this->data['label']; | ||||
|         $btn_type = $this->data['btn_type']; | ||||
|         $url = $this->data['url']; | ||||
|         $this->cgView->render('/action_button.php', ['label' => $label, 'btn_type' => $btn_type, 'url' => $url]); | ||||
|  | ||||
|         return $this->cgView->fetch('/action_button.php', ['label' => $label, 'btn_type' => $btn_type, 'url' => $url]); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user