@@ -174,23 +174,23 @@ protected static function getTitleFormComponent()
174174
175175 $ components [] =
176176 TextInput::make ($ locale )
177- ->label (__ ('inspirecms::resources/content.title.label ' ))
178- ->validationAttribute (__ ('inspirecms::resources/content.title.validation_attribute ' ))
179- ->placeholder (__ ('inspirecms::resources/content.title.placeholder ' ))
180- ->helperText (__ ('inspirecms::resources/content.title.instructions ' ))
181- ->live (true , 5000 )->afterStateUpdated (function ($ state , $ get , $ set , $ operation , ContractsContentForm $ livewire , $ locale ) {
182- // Fill slug if empty / operation is create
183- if ($ operation === 'create ' || empty ($ get ('slug ' ))) {
184- $ set ('slug ' , ContentSlugFactory::create ()->generate ($ state ));
185- }
186- $ set ("webSetting.seo.meta_title. {$ locale }" , $ state );
187- })
188- ->autofocus ()
189- ->required ()
190- ->limitLengthWithHint (60 )
191- ->formatStateUsing (fn ($ record ) => $ record ?->getTranslations('title ' )[$ locale ] ?? null )
192- ->visible (fn (ContractsContentForm $ livewire ) => $ livewire ->getActiveActionsLocale () == $ locale )
193- ->translatable ();
177+ ->label (__ ('inspirecms::resources/content.title.label ' ))
178+ ->validationAttribute (__ ('inspirecms::resources/content.title.validation_attribute ' ))
179+ ->placeholder (__ ('inspirecms::resources/content.title.placeholder ' ))
180+ ->helperText (__ ('inspirecms::resources/content.title.instructions ' ))
181+ ->live (true , 5000 )->afterStateUpdated (function ($ state , $ get , $ set , $ operation , ContractsContentForm $ livewire , $ locale ) {
182+ // Fill slug if empty / operation is create
183+ if ($ operation === 'create ' || empty ($ get ('slug ' ))) {
184+ $ set ('slug ' , ContentSlugFactory::create ()->generate ($ state ));
185+ }
186+ $ set ("webSetting.seo.meta_title. {$ locale }" , $ state );
187+ })
188+ ->autofocus ()
189+ ->required ()
190+ ->limitLengthWithHint (60 )
191+ ->formatStateUsing (fn ($ record ) => $ record ?->getTranslations('title ' )[$ locale ] ?? null )
192+ ->visible (fn (ContractsContentForm $ livewire ) => $ livewire ->getActiveActionsLocale () == $ locale )
193+ ->translatable ();
194194 }
195195
196196 return $ components ;
0 commit comments