From 9254df243ffd9dbb587e540752fac9b9e866c649 Mon Sep 17 00:00:00 2001 From: Lee Evans Date: Sun, 22 Sep 2024 14:49:50 +0100 Subject: [PATCH] Revert "Change template key to be selectable list" This reverts commit 3ddbaa6111c19afbd42d32184910f37073f1c293. --- src/Resources/EmailTemplateResource.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Resources/EmailTemplateResource.php b/src/Resources/EmailTemplateResource.php index 78cbe51..e54c865 100644 --- a/src/Resources/EmailTemplateResource.php +++ b/src/Resources/EmailTemplateResource.php @@ -94,9 +94,10 @@ public static function form(Form $form): Form Grid::make(['default' => 1, 'sm' => 1, 'md' => 2]) ->schema( [ - Select::make('key') - ->options(config('filament-email-templates.template_keys')) - ->searchable() + TextInput::make('key') + ->afterStateUpdated( + fn (Set $set, ?string $state) => $set('key', Str::slug($state)) + ) ->label(__('vb-email-templates::email-templates.form-fields-labels.key')) ->hint(__('vb-email-templates::email-templates.form-fields-labels.key-hint')) ->required()