Fixed document sent to and save button loading issue..

This commit is contained in:
Cüneyt Şentürk
2022-07-28 00:42:16 +03:00
parent 612e5b7172
commit 14ebe4e79b
4 changed files with 25 additions and 35 deletions

View File

@ -20,6 +20,10 @@ class Buttons extends Component
public $cancelText;
public $saveDisabled;
public $saveLoading;
/**
* Create a new component instance.
*
@ -27,7 +31,8 @@ class Buttons extends Component
*/
public function __construct(
$groupClass = '',
$cancel = '', $cancelRoute = '', $cancelUrl = '', $cancelClass = '', $cancelText = '', $withoutCancel = false
$cancel = '', $cancelRoute = '', $cancelUrl = '', $cancelClass = '', $cancelText = '', $withoutCancel = false,
$saveDisabled = '', $saveLoading = ''
) {
$this->groupClass = $this->getGroupClass($groupClass);
@ -35,6 +40,9 @@ class Buttons extends Component
$this->cancelClass = $this->getCancelClass($cancelClass);
$this->cancelText = $this->getCancelText($cancelText);
$this->withoutCancel = $withoutCancel;
$this->saveDisabled = ! empty($saveDisabled) ? $saveDisabled : 'form.loading';
$this->saveLoading = ! empty($saveLoading) ? $saveLoading : 'form.loading';
}
/**
@ -62,11 +70,11 @@ class Buttons extends Component
return $cancel;
}
if (!empty($route)) {
if (! empty($route)) {
return $this->getRouteAction($route);
}
if (!empty($url)) {
if (! empty($url)) {
return $this->getUrlAction($url);
}