protected function buildUserForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildUserForm($builder, $options);
     $builder->add('current_password', 'password', array('label' => 'form.current_password', 'translation_domain' => 'FOSUserBundle', 'attr' => array('class' => 'form-control', 'id' => 'username', 'placeholder' => 'ActualPassword'), 'mapped' => false));
     $builder->add('description', 'textarea', array('label' => 'Description :', 'attr' => array('class' => 'form-control', 'id' => 'username', 'placeholder' => 'Description')));
     $builder->add('file', 'file');
 }
Пример #2
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildUserForm($builder, $options);
     // Charge les champs d'origine
     $builder->add('email', 'email', array('label' => 'form.email', 'translation_domain' => 'FOSUserBundle'))->add('firstname', null, array('required' => false))->add('name', null, array('required' => false))->add('phone', 'text', array('required' => false))->add('showphone', 'checkbox', array('required' => false))->add('finalword', null, array('attr' => array('class' => 'form-control input-sm', 'placeholder' => 'Laisser un mot à ceux qui visite votre profile...')))->add('age', 'birthday', array('required' => false, 'label' => 'Date de naissance:', 'years' => range(2000, 1920), 'attr' => array('class' => 'form-group'), 'empty_value' => array('year' => 'Année', 'month' => 'Mois', 'day' => 'Jour')))->remove('city')->remove('username', null, array('label' => 'form.username', 'translation_domain' => 'FOSUserBundle'));
 }
Пример #3
0
 protected function buildUserForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildUserForm($builder, $options);
     $builder->add('profilePictureFile')->add('first_name', null, array('label' => 'firstName', 'translation_domain' => 'FOSUserBundle'))->add('last_name', null, array('label' => 'lastName', 'translation_domain' => 'FOSUserBundle'))->add('ddn', null, array('label' => 'ddn', 'translation_domain' => 'FOSUserBundle'))->add('current_password', null, array('label' => 'Mot de passe', 'translation_domain' => 'FOSUserBundle'));
     $builder->remove('username');
 }
Пример #4
0
 /**
  * Builds the embedded form representing the user.
  *
  * @param FormBuilderInterface $builder
  * @param array                $options
  */
 protected function buildUserForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildUserForm($builder, $options);
     $builder->add('firstname')->add('lastname')->add('country', 'country_custom')->add('language', 'language_custom')->add('professional', 'professional', array('required' => false))->add('companyName')->add('newsletter');
 }
 protected function buildUserForm(FormBuilder $builder, array $options)
 {
     parent::buildUserForm($builder, $options);
 }
Пример #6
0
 protected function buildUserForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildUserForm($builder, $options);
     $builder->add('firstName', 'text', ['label' => 'First Name', 'property_path' => 'profile.firstName'])->add('lastName', 'text', ['label' => 'Last Name', 'required' => false, 'property_path' => 'profile.lastName']);
 }
 protected function buildUserForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildUserForm($builder, $options);
     $builder->add('nom', 'text', array('required' => false, 'label' => 'Nom'))->add('prenom', 'text', array('required' => false, 'label' => 'Prénom'));
 }