diff --git a/src/Kunstmaan/NodeBundle/Form/DataTransformer/URLChooserToLinkTransformer.php b/src/Kunstmaan/NodeBundle/Form/DataTransformer/URLChooserToLinkTransformer.php index 302343f5b9..e85166ace6 100644 --- a/src/Kunstmaan/NodeBundle/Form/DataTransformer/URLChooserToLinkTransformer.php +++ b/src/Kunstmaan/NodeBundle/Form/DataTransformer/URLChooserToLinkTransformer.php @@ -25,7 +25,7 @@ public function transform($value): array if ($value === null) { return [ - 'link_type' => URLChooserType::EXTERNAL, + 'link_type' => URLChooserType::INTERNAL, 'link_url' => null, ]; } diff --git a/src/Kunstmaan/NodeBundle/Form/Type/InternalURLSelectorType.php b/src/Kunstmaan/NodeBundle/Form/Type/InternalURLSelectorType.php index f783272c9d..502cadc9bd 100644 --- a/src/Kunstmaan/NodeBundle/Form/Type/InternalURLSelectorType.php +++ b/src/Kunstmaan/NodeBundle/Form/Type/InternalURLSelectorType.php @@ -11,7 +11,7 @@ class InternalURLSelectorType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options) + public function buildForm(FormBuilderInterface $builder, array $options): void { $builder->add('input', HiddenType::class, [ 'label' => false, @@ -23,7 +23,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); } - public function getBlockPrefix() + public function getBlockPrefix(): string { return 'internal_url_selector'; } diff --git a/src/Kunstmaan/NodeBundle/Form/Type/URLTypeType.php b/src/Kunstmaan/NodeBundle/Form/Type/URLTypeType.php index f3b01eff9c..78a66245f8 100644 --- a/src/Kunstmaan/NodeBundle/Form/Type/URLTypeType.php +++ b/src/Kunstmaan/NodeBundle/Form/Type/URLTypeType.php @@ -19,7 +19,7 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setAllowedTypes('choices', 'array'); } - public function buildView(FormView $view, FormInterface $form, array $options) + public function buildView(FormView $view, FormInterface $form, array $options): void { $view->vars['choices'] = $options['choices']; } diff --git a/src/Kunstmaan/NodeBundle/Resources/views/Form/formWidgets.html.twig b/src/Kunstmaan/NodeBundle/Resources/views/Form/formWidgets.html.twig index 4c5b9d5b83..381bbdff56 100644 --- a/src/Kunstmaan/NodeBundle/Resources/views/Form/formWidgets.html.twig +++ b/src/Kunstmaan/NodeBundle/Resources/views/Form/formWidgets.html.twig @@ -60,17 +60,16 @@ - - + + {% else %} {% endif %} - {% else %} {% set linkUrl = form.link_url.vars %}