Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Форма:
- $builder
- ->add('email', 'email', array('label' => 'form.email', 'translation_domain' => 'FOSUserBundle'))
- ->add('username', null, array('label' => 'form.username', 'translation_domain' => 'FOSUserBundle'))
- ->add('plainPassword', 'repeated', array(
- 'type' => 'password',
- 'options' => array('translation_domain' => 'FOSUserBundle'),
- 'first_options' => array('label' => 'form.password'),
- 'second_options' => array('label' => 'form.password_confirmation'),
- 'invalid_message' => 'fos_user.password.mismatch',
- ))
- Вьюшка:
- {{ form_start(form, {'method': 'post', 'action': path('fos_user_registration_register'), 'attr': {'class': 'fos_user_registration_register'}}) }}
- <div class="form-group">
- {{ form_label(form.email, null, {'label_attr': {'class': ''}}) }}
- {{ form_widget(form.email, {'attr': {'class': 'form-control'}}) }}
- </div>
- <div class="form-group">
- {{ form_label(form.username, null, {'label_attr': {'class': ''}}) }}
- {{ form_widget(form.username, {'attr': {'class': 'form-control'}}) }}
- </div>
- <div class="form-group">
- {{ form_label(form.plainPassword, null, {'label_attr': {'class': ''}}) }}
- {{ form_widget(form.plainPassword, {'attr': {'class': 'form-control'}}) }}
- </div>
- <div>
- <input class="btn btn-primary" type="submit" value="{{ 'registration.submit'|trans }}" />
- </div>
- {{ form_end(form) }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement