Skip to content

Commit

Permalink
Merge pull request #104 from SURFnet/feature/sms-prove-posession-lini…
Browse files Browse the repository at this point in the history
…ng-out-buttons

Format SMS posession proving form
  • Loading branch information
Boy Baukema authored Jun 14, 2016
2 parents 381e442 + 625407d commit bd42d58
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,18 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$builder->add('challenge', 'text', [
'label' => 'ss.form.ss_verify_sms_challenge.text.challenge',
'required' => true,
'attr' => array(
'autofocus' => true,
)
'attr' => ['autofocus' => true],
'label_attr' => ['class' => 'pull-right'],
]);
$builder->add('verify-challenge', 'submit', [
'label' => 'ss.form.ss_verify_sms_challenge.button.verify_challenge',
'attr' => [ 'class' => 'btn btn-primary pull-right' ],
]);
$builder->add('resend-challenge', 'anchor', [
$builder->add('resendChallenge', 'anchor', [
'label' => 'ss.form.ss_verify_sms_challenge.button.resend_challenge',
'attr' => [ 'class' => 'btn btn-default' ],
'route' => 'ss_registration_sms_send_challenge',
]);
$builder->add('verifyChallenge', 'submit', [
'label' => 'ss.form.ss_verify_sms_challenge.button.verify_challenge',
'attr' => [ 'class' => 'btn btn-primary pull-right' ],
]);
}

public function configureOptions(OptionsResolver $resolver)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@

<hr>

{{ form(form) }}
{{ form_start(form) }}
<div class="row">
{{ form_errors(form) }}
<div class="col-xs-4">
{{ form_label(form.challenge) }}
</div>
<div class="col-xs-8">
{{ form_widget(form.challenge) }}
</div>
</div>
<div class="row">&nbsp;</div>
<div class="row offset-top">
<div class="col-xs-4">&nbsp;</div>
<div class="col-xs-4">
{{ form_row(form.resendChallenge) }}
</div>
<div class="col-xs-4">
{{ form_row(form.verifyChallenge) }}
</div>
</div>
{{ form_rest(form) }}

{% endblock %}

0 comments on commit bd42d58

Please sign in to comment.