87 lines
2.8 KiB
PHP
87 lines
2.8 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Pages;
|
|
|
|
use App\Settings\ContactSettings;
|
|
use Filament\Forms\Components\Section;
|
|
use Filament\Forms\Components\Textarea;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Form;
|
|
use Filament\Pages\SettingsPage;
|
|
use Illuminate\Contracts\Support\Htmlable;
|
|
|
|
class ContactPageSettings extends SettingsPage
|
|
{
|
|
protected static ?string $navigationGroup = 'CMS';
|
|
|
|
protected static ?string $navigationIcon = 'heroicon-o-phone';
|
|
|
|
protected static string $settings = ContactSettings::class;
|
|
|
|
public function form(Form $form): Form
|
|
{
|
|
return $form
|
|
->schema([
|
|
Section::make('Contact Section')
|
|
->description('Manage the contact page content.')
|
|
->schema([
|
|
TextInput::make('contact_subtitle')
|
|
->label('Subtitle')
|
|
->maxLength(100)
|
|
->required(),
|
|
TextInput::make('contact_header')
|
|
->label('Header')
|
|
->maxLength(100)
|
|
->required(),
|
|
Textarea::make('contact_paragraph')
|
|
->label('Paragraph')
|
|
->rows(3)
|
|
->maxLength(65535)
|
|
->required(),
|
|
TextInput::make('phone_number')
|
|
->label('Phone Number')
|
|
->tel()
|
|
->required(),
|
|
TextInput::make('email_address')
|
|
->label('Email Address')
|
|
->email()
|
|
->required(),
|
|
TextInput::make('location_address')
|
|
->label('Location Address')
|
|
->maxLength(255)
|
|
->required(),
|
|
TextInput::make('map_embed_url')
|
|
->label('Google Maps Embed URL')
|
|
->url()
|
|
->required(),
|
|
])
|
|
])
|
|
->columns(1)
|
|
->statePath('data');
|
|
}
|
|
|
|
public static function getNavigationGroup(): ?string
|
|
{
|
|
return __('CMS');
|
|
}
|
|
|
|
public static function getNavigationLabel(): string
|
|
{
|
|
return __('Contact Page Settings');
|
|
}
|
|
|
|
public function getTitle(): string|Htmlable
|
|
{
|
|
return 'Contact Page';
|
|
}
|
|
|
|
public function getHeading(): string|Htmlable
|
|
{
|
|
return 'Edit contact page text and information from here';
|
|
}
|
|
|
|
public function getSubheading(): string|Htmlable|null
|
|
{
|
|
return 'Manage the contact form details, contact information, and map embed.';
|
|
}
|
|
}
|