Skip to content

Commit 5f43d50

Browse files
authored
Fix ManageLocalization form method signature compatibility with SettingsPage (#294)
1 parent bdfc1ad commit 5f43d50

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/Filament/Pages/Settings/ManageLocalization.php

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
namespace Cachet\Filament\Pages\Settings;
44

55
use Cachet\Settings\AppSettings;
6-
use Filament\Forms;
7-
use Filament\Forms\Form;
6+
use Filament\Forms\Components\Select;
7+
use Filament\Forms\Components\Toggle;
8+
use Filament\Schemas\Components\Section;
9+
use Filament\Schemas\Schema;
810
use Illuminate\Support\Str;
911

1012
class ManageLocalization extends SettingsPage
@@ -21,12 +23,12 @@ public static function getNavigationLabel(): string
2123
return __('cachet::navigation.settings.items.manage_localization');
2224
}
2325

24-
public function form(Form $form): Form
26+
public function form(Schema $schema): Schema
2527
{
26-
return $form
27-
->schema([
28-
Forms\Components\Section::make()->columns(2)->schema([
29-
Forms\Components\Select::make('locale')
28+
return $schema
29+
->components([
30+
Section::make()->columns(2)->schema([
31+
Select::make('locale')
3032
->label(__('cachet::settings.manage_localization.locale_label'))
3133
->options(
3234
config('cachet.supported_locales', [
@@ -35,7 +37,7 @@ public function form(Form $form): Form
3537
)->searchable()
3638
->suffixIcon('heroicon-o-language'),
3739

38-
Forms\Components\Select::make('timezone')
40+
Select::make('timezone')
3941
->label(__('cachet::settings.manage_localization.timezone_label'))
4042
->options(fn () => collect(timezone_identifiers_list())
4143
->mapToGroups(
@@ -49,7 +51,7 @@ public function form(Form $form): Form
4951
->searchable()
5052
->suffixIcon('heroicon-o-globe-alt'),
5153

52-
Forms\Components\Toggle::make('show_timezone')
54+
Toggle::make('show_timezone')
5355
->label(__('cachet::settings.manage_localization.toggles.show_timezone')),
5456
]),
5557
]);

0 commit comments

Comments
 (0)