70 lines
2.5 KiB
PHP
70 lines
2.5 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\MailAdressens\Schemas;
|
|
|
|
use Filament\Forms\Components\DatePicker;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Toggle;
|
|
use Filament\Schemas\Components\Section;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
|
|
class MailAdressenForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
Section::make('Newsletter')
|
|
->columns(2)
|
|
->columnSpanFull()
|
|
->schema([
|
|
TextInput::make('company')
|
|
->label('Firma')
|
|
->required(),
|
|
TextInput::make('email')
|
|
->prefixIcon(Heroicon::OutlinedEnvelope)
|
|
->required(),
|
|
Toggle::make('im_newsletter')->label('Im Newsletter'),
|
|
]),
|
|
Section::make('Persönliche Anrede')
|
|
->columns(2)
|
|
->columnSpanFull()
|
|
->schema([
|
|
Select::make('gender')
|
|
->label('Geschlecht')
|
|
->options([
|
|
'0' => 'Herr',
|
|
'1' => 'Frau',
|
|
'2' => 'Diverse',
|
|
]),
|
|
DatePicker::make('vereidigung')->required()
|
|
->prefixIcon('heroicon-o-calendar')
|
|
->native(false),
|
|
TextInput::make('first_name')
|
|
->label('Vorname')
|
|
->required(),
|
|
TextInput::make('last_name')
|
|
->label('Nachname')
|
|
->required(),
|
|
]),
|
|
Section::make('Adresse')
|
|
->columns(3)
|
|
->columnSpanFull()
|
|
->schema([
|
|
TextInput::make('address')
|
|
->label('Straße'),
|
|
TextInput::make('zip')
|
|
->label('Zip'),
|
|
TextInput::make('city')
|
|
->label('Ort'),
|
|
]),
|
|
]);
|
|
}
|
|
}
|
|
// `address` varchar(255) DEFAULT NULL,
|
|
// `zip` varchar(255) DEFAULT NULL,
|
|
// `city` varchar(255) DEFAULT NULL,
|
|
// `vereidigung` t
|