@@ 10-42 (lines=33) @@ | ||
7 | use Symfony\Component\Form\AbstractType; |
|
8 | use Symfony\Component\Form\FormBuilderInterface; |
|
9 | ||
10 | class EmailResendType extends AbstractType |
|
11 | { |
|
12 | /** |
|
13 | * @var Confirmation |
|
14 | */ |
|
15 | protected $confirmation; |
|
16 | ||
17 | public function __construct(Confirmation $confirmation) |
|
18 | { |
|
19 | $this->confirmation = $confirmation; |
|
20 | } |
|
21 | ||
22 | public function buildForm(FormBuilderInterface $builder, array $options = array()) |
|
23 | { |
|
24 | $builder |
|
25 | ->add('email', 'email', array( |
|
26 | 'required' => true, |
|
27 | 'error_bubbling' => true, |
|
28 | 'label' => 'ui.trans.user.confirmation_resend.form.email', |
|
29 | )) |
|
30 | ; |
|
31 | ||
32 | $builder->addEventSubscriber(new SubjectAdderListener($this->confirmation)); |
|
33 | } |
|
34 | ||
35 | /** |
|
36 | * {@inheritdoc} |
|
37 | */ |
|
38 | public function getName() |
|
39 | { |
|
40 | return 'dos_resend_confirmation_email'; |
|
41 | } |
|
42 | } |
|
43 |
@@ 10-42 (lines=33) @@ | ||
7 | use Symfony\Component\Form\AbstractType; |
|
8 | use Symfony\Component\Form\FormBuilderInterface; |
|
9 | ||
10 | class OtpResendType extends AbstractType |
|
11 | { |
|
12 | /** |
|
13 | * @var Confirmation |
|
14 | */ |
|
15 | protected $confirmation; |
|
16 | ||
17 | public function __construct(Confirmation $confirmation) |
|
18 | { |
|
19 | $this->confirmation = $confirmation; |
|
20 | } |
|
21 | ||
22 | public function buildForm(FormBuilderInterface $builder, array $options = array()) |
|
23 | { |
|
24 | $builder |
|
25 | ->add('mobile', 'tel', array( |
|
26 | 'required' => true, |
|
27 | 'error_bubbling' => true, |
|
28 | 'label' => 'ui.trans.user.confirmation_resend.form.mobile', |
|
29 | )) |
|
30 | ; |
|
31 | ||
32 | $builder->addEventSubscriber(new SubjectAdderListener($this->confirmation)); |
|
33 | } |
|
34 | ||
35 | /** |
|
36 | * {@inheritdoc} |
|
37 | */ |
|
38 | public function getName() |
|
39 | { |
|
40 | return 'dos_resend_confirmation_otp'; |
|
41 | } |
|
42 | } |
|
43 |