From ea0e766a0577b46413a394c6218b64d22a362ec7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Mon, 28 Dec 2020 08:37:52 +0100 Subject: [PATCH] Add donation and site url --- Form/RegisterType.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Form/RegisterType.php b/Form/RegisterType.php index f7cda54..83c80b5 100644 --- a/Form/RegisterType.php +++ b/Form/RegisterType.php @@ -3,6 +3,7 @@ namespace Rapsys\AirBundle\Form; use Symfony\Component\Form\Extension\Core\Type\TelType; +use Symfony\Component\Form\Extension\Core\Type\UrlType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Validator\Constraints\NotBlank; @@ -12,7 +13,10 @@ class RegisterType extends \Rapsys\UserBundle\Form\RegisterType { */ public function buildForm(FormBuilderInterface $builder, array $options) { return parent::buildForm($builder, $options) - ->add('phone', TelType::class, array('attr' => array('placeholder' => 'Your phone'), 'constraints' => array(new NotBlank(array('message' => 'Please provide your phone'))))); + #TODO: add url ? add text ? + ->add('phone', TelType::class, ['attr' => ['placeholder' => 'Your phone'], 'constraints' => [new NotBlank(['message' => 'Please provide your phone'])]]) + ->add('donation', UrlType::class, ['attr' => ['placeholder' => 'Your donation link']]) + ->add('site', UrlType::class, ['attr' => ['placeholder' => 'Your website']]); } /** -- 2.41.0