Fix yet another action (#2230)

This commit is contained in:
Charles
2026-02-12 21:00:26 -05:00
committed by GitHub
parent 8c475ed95f
commit 33660f635f

View File

@@ -8,6 +8,7 @@ use App\Models\Schedule;
use App\Models\Server;
use App\Traits\Filament\CanCustomizeHeaderActions;
use App\Traits\Filament\CanCustomizeHeaderWidgets;
use Filament\Actions\Action;
use Filament\Facades\Filament;
use Filament\Resources\Pages\CreateRecord;
@@ -20,6 +21,17 @@ class CreateSchedule extends CreateRecord
protected static bool $canCreateAnother = false;
protected function getCreateFormAction(): Action
{
$hasFormWrapper = $this->hasFormWrapper();
return Action::make('exclude_create')
->label(__('filament-panels::resources/pages/create-record.form.actions.create.label'))
->submit($hasFormWrapper ? $this->getSubmitFormLivewireMethodName() : null)
->action($hasFormWrapper ? null : $this->getSubmitFormLivewireMethodName())
->keyBindings(['mod+s']);
}
protected function afterCreate(): void
{
/** @var Schedule $schedule */