3 namespace Rapsys\AirBundle\Form
;
5 use Symfony\Component\Form\Extension\Core\Type\TelType
;
6 use Symfony\Component\Form\Extension\Core\Type\UrlType
;
7 use Symfony\Component\Form\FormBuilderInterface
;
8 use Symfony\Component\Validator\Constraints\NotBlank
;
10 class RegisterType
extends \Rapsys\UserBundle\Form\RegisterType
{
14 public function buildForm(FormBuilderInterface
$builder, array $options) {
15 return parent
::buildForm($builder, $options)
16 #TODO: add url ? add text ?
17 ->add('phone', TelType
::class, ['attr' => ['placeholder' => 'Your phone'], 'constraints' => [new NotBlank(['message' => 'Please provide your phone'])]])
18 ->add('donation', UrlType
::class, ['attr' => ['placeholder' => 'Your donation link']])
19 ->add('site', UrlType
::class, ['attr' => ['placeholder' => 'Your website']]);
25 public function getName() {
26 return 'rapsys_air_register';