diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/AmendRegistrationAuthorityInformationType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/AmendRegistrationAuthorityInformationType.php index 20eb4f2e..05e0c10d 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/AmendRegistrationAuthorityInformationType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/AmendRegistrationAuthorityInformationType.php @@ -39,15 +39,11 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'label' => 'ra.management.form.amend_ra_info.label.amend_ra_info', 'attr' => ['class' => 'btn btn-primary pull-right'] ]) - ->add( - 'cancel', - 'anchor', - [ - 'label' => 'ra.management.form.amend_ra_info.label.cancel', - 'route' => 'ra_management_manage', - 'attr' => ['class' => 'btn btn-link pull-right cancel'] - ] - ) + ->add('cancel', AnchorType::class, [ + 'label' => 'ra.management.form.amend_ra_info.label.cancel', + 'route' => 'ra_management_manage', + 'attr' => ['class' => 'btn btn-link pull-right cancel'] + ]) ; } diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/AnchorType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/AnchorType.php index e9b9d77a..3fe829af 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/AnchorType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/AnchorType.php @@ -47,10 +47,8 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setRequired(['route']); - $resolver->setAllowedTypes([ - 'route' => 'string', - 'route_parameters' => 'array', - ]); + $resolver->setAllowedTypes('route', 'string'); + $resolver->setAllowedTypes('route_parameters', 'array'); } public function buildView(FormView $view, FormInterface $form, array $options) diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/ChangeRaLocationType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/ChangeRaLocationType.php index 361cab53..b7f9996d 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/ChangeRaLocationType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/ChangeRaLocationType.php @@ -42,15 +42,11 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'label' => 'ra.management.form.change_ra_location.label.change_ra_location', 'attr' => ['class' => 'btn btn-primary pull-right change-ra-location'] ]) - ->add( - 'cancel', - 'anchor', - [ - 'label' => 'ra.management.form.change_ra_location.label.cancel', - 'route' => 'ra_locations_manage', - 'attr' => ['class' => 'btn btn-link pull-right cancel'] - ] - ) + ->add('cancel', AnchorType::class, [ + 'label' => 'ra.management.form.change_ra_location.label.cancel', + 'route' => 'ra_locations_manage', + 'attr' => ['class' => 'btn btn-link pull-right cancel'], + ]) ; } diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/ChangeRaRoleType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/ChangeRaRoleType.php index 22c3b0a1..7f255d69 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/ChangeRaRoleType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/ChangeRaRoleType.php @@ -39,7 +39,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'label' => 'ra.management.form.change_ra_role.label.save', 'attr' => ['class' => 'btn btn-primary pull-right change-ra-role'] ]) - ->add('cancel', 'anchor', [ + ->add('cancel', AnchorType::class, [ 'label' => 'ra.management.form.create_ra.label.cancel', 'route' => 'ra_management_ra_candidate_search', 'attr' => ['class' => 'btn btn-link pull-right cancel'] diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaLocationType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaLocationType.php index 3c0d4f85..49f793a3 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaLocationType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaLocationType.php @@ -42,15 +42,11 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'label' => 'ra.form.ra_create_ra_location.label.create_ra_location', 'attr' => ['class' => 'btn btn-primary pull-right create-ra-location'] ]) - ->add( - 'cancel', - 'anchor', - [ - 'label' => 'ra.form.ra_create_ra_location.label.cancel', - 'route' => 'ra_locations_manage', - 'attr' => ['class' => 'btn btn-link pull-right cancel'] - ] - ) + ->add('cancel', AnchorType::class, [ + 'label' => 'ra.form.ra_create_ra_location.label.cancel', + 'route' => 'ra_locations_manage', + 'attr' => ['class' => 'btn btn-link pull-right cancel'] + ]) ; } diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php index c363279d..e838f816 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php @@ -46,15 +46,11 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'label' => 'ra.management.form.create_ra.label.create_ra', 'attr' => ['class' => 'btn btn-primary pull-right create-ra'] ]) - ->add( - 'cancel', - 'anchor', - [ - 'label' => 'ra.management.form.create_ra.label.cancel', - 'route' => 'ra_management_ra_candidate_search', - 'attr' => ['class' => 'btn btn-link pull-right cancel'] - ] - ) + ->add('cancel', AnchorType::class, [ + 'label' => 'ra.management.form.create_ra.label.cancel', + 'route' => 'ra_management_ra_candidate_search', + 'attr' => ['class' => 'btn btn-link pull-right cancel'] + ]) ; } diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyPhoneNumberType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyPhoneNumberType.php index e5472e08..e1a22672 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyPhoneNumberType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyPhoneNumberType.php @@ -39,7 +39,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'label' => 'ra.form.ra_verify_phone_number.button.verify_challenge', 'attr' => [ 'class' => 'btn btn-primary pull-right' ], ]); - $builder->add('resendChallenge', 'anchor', [ + $builder->add('resendChallenge', AnchorType::class, [ 'label' => 'ra.form.ra_verify_phone_number.button.resend_challenge', 'attr' => [ 'class' => 'btn btn-default' ], 'route' => 'ra_vetting_sms_send_challenge',