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