mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 08:44:46 +02:00
Remove unsaved changes alert (#778)
* Remove unsaved changes alert * Remove this also * Remove this also...
This commit is contained in:
parent
6b96c9dbda
commit
d908fb9a9d
@ -23,7 +23,6 @@ use Filament\Forms\Form;
|
|||||||
use Filament\Forms\Get;
|
use Filament\Forms\Get;
|
||||||
use Filament\Forms\Set;
|
use Filament\Forms\Set;
|
||||||
use Filament\Notifications\Notification;
|
use Filament\Notifications\Notification;
|
||||||
use Filament\Pages\Concerns\HasUnsavedDataChangesAlert;
|
|
||||||
use Filament\Pages\Concerns\InteractsWithHeaderActions;
|
use Filament\Pages\Concerns\InteractsWithHeaderActions;
|
||||||
use Filament\Pages\Page;
|
use Filament\Pages\Page;
|
||||||
use Filament\Support\Enums\MaxWidth;
|
use Filament\Support\Enums\MaxWidth;
|
||||||
@ -39,7 +38,6 @@ use Illuminate\Support\HtmlString;
|
|||||||
class Settings extends Page implements HasForms
|
class Settings extends Page implements HasForms
|
||||||
{
|
{
|
||||||
use EnvironmentWriterTrait;
|
use EnvironmentWriterTrait;
|
||||||
use HasUnsavedDataChangesAlert;
|
|
||||||
use InteractsWithForms;
|
use InteractsWithForms;
|
||||||
use InteractsWithHeaderActions;
|
use InteractsWithHeaderActions;
|
||||||
|
|
||||||
@ -590,11 +588,6 @@ class Settings extends Page implements HasForms
|
|||||||
return 'data';
|
return 'data';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function hasUnsavedDataChangesAlert(): bool
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function save(): void
|
public function save(): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@ -608,8 +601,6 @@ class Settings extends Page implements HasForms
|
|||||||
Artisan::call('config:clear');
|
Artisan::call('config:clear');
|
||||||
Artisan::call('queue:restart');
|
Artisan::call('queue:restart');
|
||||||
|
|
||||||
$this->rememberData();
|
|
||||||
|
|
||||||
$this->redirect($this->getUrl());
|
$this->redirect($this->getUrl());
|
||||||
|
|
||||||
Notification::make()
|
Notification::make()
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
<x-filament-panels::page
|
<x-filament-panels::page
|
||||||
@class([
|
@class([
|
||||||
'fi-page-settings'
|
'fi-page-settings'
|
||||||
])
|
])
|
||||||
>
|
>
|
||||||
<x-filament-panels::form
|
<x-filament-panels::form
|
||||||
id="form"
|
id="form"
|
||||||
:wire:key="$this->getId() . '.forms.' . $this->getFormStatePath()"
|
:wire:key="$this->getId() . '.forms.' . $this->getFormStatePath()"
|
||||||
wire:submit="save"
|
wire:submit="save"
|
||||||
>
|
>
|
||||||
{{ $this->form }}
|
{{ $this->form }}
|
||||||
</x-filament-panels::form>
|
</x-filament-panels::form>
|
||||||
|
|
||||||
<x-filament-panels::page.unsaved-data-changes-alert />
|
|
||||||
</x-filament-panels::page>
|
</x-filament-panels::page>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user