@@ -52,16 +52,16 @@ public static function form(Form $form): Form
5252 ->schema ([
5353 static ::getCategoryFormComponent (),
5454 static ::getParentFormComponent (),
55- static ::getIsActiveFormComponent (),
55+ static ::getIsActiveFormComponent ()-> inlineLabel () ,
5656 ]),
5757 Forms \Components \Section::make ()
5858 ->columns (2 )
5959 ->schema ([
6060 static ::getTitleFormComponent ()->columnSpanFull (),
6161 static ::getTypeFormComponent (),
6262 static ::getContentFormComponent (),
63- static ::getUrlFormComponent (),
64- static ::getTargetFormComponent (),
63+ static ::getUrlFormComponent ()-> columnSpanFull () ,
64+ static ::getTargetFormComponent ()-> inlineLabel () ,
6565 ]),
6666 ]);
6767 }
@@ -218,7 +218,10 @@ protected static function getUrlFormComponent()
218218 return Forms \Components \TextInput::make ('url ' )
219219 ->label (__ ('inspirecms::resources/navigation.url.label ' ))
220220 ->validationAttribute (__ ('inspirecms::resources/navigation.url.validation_attribute ' ))
221- ->columnSpanFull ();
221+ ->visible (function ($ get ) {
222+ return $ get ('type ' ) == NavigationType::Link ||
223+ $ get ('type ' ) == NavigationType::Link->value ;
224+ });
222225 }
223226
224227 /**
@@ -367,7 +370,6 @@ protected static function getTargetFormComponent()
367370 return Forms \Components \TextInput::make ('target ' )
368371 ->label (__ ('inspirecms::resources/navigation.target.label ' ))
369372 ->validationAttribute (__ ('inspirecms::resources/navigation.target.validation_attribute ' ))
370- ->inlineLabel ()
371373 ->datalist ([
372374 '_self ' ,
373375 '_blank ' ,
@@ -382,7 +384,6 @@ protected static function getTitleFormComponent()
382384 return Forms \Components \TextInput::make ('title ' )
383385 ->label (__ ('inspirecms::resources/navigation.title.label ' ))
384386 ->validationAttribute (__ ('inspirecms::resources/navigation.title.validation_attribute ' ))
385- ->inlineLabel ()
386387 ->required ();
387388 }
388389
@@ -394,7 +395,6 @@ protected static function getIsActiveFormComponent()
394395 return Forms \Components \Toggle::make ('is_active ' )
395396 ->label (__ ('inspirecms::resources/navigation.is_active.label ' ))
396397 ->validationAttribute (__ ('inspirecms::resources/navigation.is_active.validation_attribute ' ))
397- ->inlineLabel ()
398398 ->default (true )
399399 ->disabled (function ($ get , null | Model | Navigation $ record , $ operation ) {
400400 $ type = $ operation == 'create ' ? $ get ('type ' ) : $ record ?->type;
0 commit comments