This commit is contained in:
Bozhidar 2024-09-19 13:34:09 +03:00
parent 6af4550aa0
commit a6a451a726
3 changed files with 39 additions and 5 deletions

View file

@ -2,9 +2,12 @@
namespace Modules\Email\App\Filament\Pages;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\TextInput;
use Filament\Pages\Page;
use Outerweb\FilamentSettings\Filament\Pages\Settings as BaseSettings;
class EmailSettings extends Page
class EmailSettings extends BaseSettings
{
protected static ?string $navigationIcon = 'heroicon-o-cog';
@ -16,4 +19,24 @@ class EmailSettings extends Page
protected static ?int $navigationSort = 4;
public function schema(): array
{
return [
Section::make('Settings')
->schema([
TextInput::make('email.hostname')
->label('Hostname')
->helperText('The hostname of the SMTP server. Example: mail.yourdomain.com')
->required(),
TextInput::make('email.domain')
->label('Domain')
->helperText('The domain of the SMTP server. Example: yourdomain.com')
->required(),
]),
];
}
}

View file

@ -1,7 +1,18 @@
<x-filament-panels::page>
<div>
Email settings
</div>
<form wire:submit="save">
<div class="mb-4">
{{ $this->form }}
</div>
<x-filament::button
type="submit"
wire:loading.attr="disabled"
>
<span wire:loading.remove>Save</span>
<span wire:loading>Saving...</span>
</x-filament::button>
</form>
</x-filament-panels::page>