Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions src/Filament/Pages/Settings/ManageLocalization.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
namespace Cachet\Filament\Pages\Settings;

use Cachet\Settings\AppSettings;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;
use Illuminate\Support\Str;

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

public function form(Form $form): Form
public function form(Schema $schema): Schema
{
return $form
->schema([
Forms\Components\Section::make()->columns(2)->schema([
Forms\Components\Select::make('locale')
return $schema
->components([
Section::make()->columns(2)->schema([
Select::make('locale')
->label(__('cachet::settings.manage_localization.locale_label'))
->options(
config('cachet.supported_locales', [
Expand All @@ -35,7 +37,7 @@ public function form(Form $form): Form
)->searchable()
->suffixIcon('heroicon-o-language'),

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

Forms\Components\Toggle::make('show_timezone')
Toggle::make('show_timezone')
->label(__('cachet::settings.manage_localization.toggles.show_timezone')),
]),
]);
Expand Down