Exemplo n.º 1
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     //第一步:设置表单的基本属性,从控制器中中设置变成在这里设置
     $builder->setMethod('post');
     $builder->setAction($this->router->generate('web_user_register_check'));
     //$builder->setAttribute('class', 'form-horizontal');
     //第二步:添加表单的相关元素
     //1.添加电子邮箱
     $builder->add('email', 'text', array('attr' => array('class' => 'form-control', 'placeholder' => '请输入您的电子邮箱', 'wx-validator-rule' => 'required|email'), 'label' => '电子邮箱', 'label_attr' => array('class' => 'col-md-3 control-label')));
     //add end
     //2.添加密码
     $builder->add('password', 'text', array('attr' => array('class' => 'form-control', 'placeholder' => '请输入密码', 'wx-validator-rule' => 'required'), 'label' => '密码', 'label_attr' => array('class' => 'col-md-3 control-label')));
     //add end
     //3.添加确认密码
     $builder->add('confirm_password', 'text', array('attr' => array('class' => 'form-control', 'placeholder' => '请输入确认密码', 'wx-validator-rule' => 'required'), 'label' => '确认密码', 'label_attr' => array('class' => 'col-md-3 control-label')));
     //add end
     //4.添加用户昵称
     $builder->add('nickname', 'text', array('attr' => array('class' => 'form-control', 'placeholder' => '请输入昵称', 'wx-validator-rule' => 'required'), 'label' => '昵称', 'label_attr' => array('class' => 'col-md-3 control-label')));
     //add end
     //5.添加手机号码
     $builder->add('cellphone', 'text', array('attr' => array('class' => 'form-control', 'placeholder' => '请输入手机号', 'wx-validator-rule' => 'required|mobile'), 'label' => '手机号', 'label_attr' => array('class' => 'col-md-3 control-label')));
     //add end
     //6.添加手机验证码
     $builder->add('capcha', 'text', array('attr' => array('class' => 'form-control', 'placeholder' => '请输入验证码', 'wx-validator-rule' => 'required|email'), 'label' => '验证码', 'label_attr' => array('class' => 'col-md-3 control-label')));
     //add end
 }
Exemplo n.º 2
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setAction($this->urlGenerator->generate($options['route'], $options['route_parameters']));
     $builder->setMethod('POST');
     $builder->add('locale', 'choice', ['label' => false, 'required' => true, 'widget_addon_prepend' => ['icon' => 'language'], 'choices' => $this->localeChoiceList->create(), 'choices_as_values' => true]);
     $builder->add('switch', 'submit', ['label' => 'stepup_middleware_client.form.switch_locale.switch', 'attr' => ['class' => 'btn btn-default']]);
 }
Exemplo n.º 3
0
 public function buildForm( FormBuilderInterface $builder, array $options )
 {
     $builder
         ->setMethod( 'GET' )
         ->add( 'searchText', 'search' )
         ->add( 'save', 'submit' );
 }
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('username', 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType', array('required' => false, 'label' => 'sugg.username'));
     $builder->add('dateini', 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateType', array('required' => false, 'format' => 'dd/MM/yyyy', 'widget' => 'single_text', 'years' => range(date('Y'), 1898), 'label' => 'sugg.dateini', 'attr' => array('pattern' => '[0-9/]*', 'class' => 'date')));
     $builder->add('dateend', 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateType', array('required' => false, 'format' => 'dd/MM/yyyy', 'widget' => 'single_text', 'years' => range(date('Y'), 1898), 'label' => 'sugg.dateend', 'attr' => array('pattern' => '[0-9/]*', 'class' => 'date')));
     $builder->add('text', 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType', array('required' => false, 'label' => 'sugg.text'));
     $builder->setMethod('GET');
 }
Exemplo n.º 5
0
 /**
  * {@inheritDoc}
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('GET');
     $builder->add('teamName', 'text', array('label' => 'lg.friendly_match.fields.teamName'));
     $builder->add('status', 'choice', array('label' => 'lg.friendly_match.fields.status', 'empty_value' => 'lg.core.all', 'choices' => \CoreBundle\Entity\FriendlyMatch::getAvailableStatus()));
     $builder->add('type', 'choice', array('label' => 'lg.friendly_match.fields.type', 'empty_value' => 'lg.core.all', 'choices' => \CoreBundle\Entity\FriendlyMatch::getAvailableTypes()));
     $builder->add('submit', 'submit', array('label' => 'lg.core.search'));
 }
Exemplo n.º 6
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     // this assumes that the entity manager was passed in as an optio
     $em = ServiceUtil::getService('doctrine.entitymanager');
     // $entityManager = $options['em'];
     $transformer = new UserToIdTransformer($em);
     $builder->setMethod('POST')->add('online', 'choice', array('choices' => array('0' => 'Offline', '1' => 'Online'), 'multiple' => false, 'expanded' => true, 'required' => true))->add('depot', 'choice', array('choices' => array('0' => 'Depot', '1' => 'Allowed'), 'multiple' => false, 'expanded' => true, 'required' => true))->add('inmenu', 'choice', array('choices' => array('0' => 'Not in menus', '1' => 'In menus'), 'multiple' => false, 'expanded' => true, 'required' => true))->add('inlist', 'choice', array('choices' => array('0' => 'Not in list', '1' => 'In List'), 'multiple' => false, 'expanded' => true, 'required' => true))->add('title', 'text', array('required' => false))->add('urltitle', 'text', array('required' => false))->add($builder->create('author', 'text', ['attr' => ['class' => 'author_search']])->addModelTransformer($transformer))->add('views', 'text', array('required' => false))->add('publishedAt', 'datetime', array('format' => \IntlDateFormatter::SHORT, 'input' => 'datetime', 'required' => false, 'widget' => 'single_text'))->add('expiredAt', 'datetime', array('format' => \IntlDateFormatter::SHORT, 'input' => 'datetime', 'required' => false, 'widget' => 'single_text'))->add('images', 'collection', array('type' => new ImageType(), 'allow_add' => true, 'required' => false, 'delete_empty' => true, 'by_reference' => false, 'allow_delete' => true, 'prototype' => true))->add('layout', 'choice', array('choices' => array('default' => 'Default', 'slider' => 'Slider'), 'preferred_choices' => array('default'), 'required' => false))->add('language', 'choice', array('choices' => array('any' => 'Any', 'en' => 'English', 'pl' => 'Polish')))->add('content', 'textarea', array('required' => false, 'attr' => array('class' => 'tinymce')))->add('description', 'textarea', array('required' => false, 'attr' => array('class' => 'tinymc')))->add('save', 'submit', array('label' => 'Save'));
 }
Exemplo n.º 7
0
 public function createForm(FormBuilderInterface $formBuilder)
 {
     $formBuilder->setMethod('GET');
     $formBuilder->add('status', ChoiceType::class, ['label' => 'Status', 'choices' => $this->translateStatus(AreaRequest::statusList()), 'required' => false]);
     $formBuilder->add('territory', ChoiceType::class, ['label' => 'Territory', 'choices' => $this->territoryRepository->getFormChoices(), 'required' => false]);
     $formBuilder->add('submit', SubmitType::class, ['label' => 'Filter']);
     $formBuilder->get('territory')->addModelTransformer(new EntityTransformer($this->territoryRepository));
     return $formBuilder->getForm();
 }
Exemplo n.º 8
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setAction($this->targetUrl);
     $builder->setMethod('POST');
     foreach ($this->configs as $key => $config) {
         $builder->add($key, 'text', array('label' => $config['label'], 'data' => $config['default']));
     }
     $builder->add('save', 'submit', array('label' => 'Générer le segment'));
 }
Exemplo n.º 9
0
 /**
  * @param FormBuilderInterface $builder
  * @param array $options
  * {@inheritdoc}
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST');
     $builder->setAttribute('role', 'form');
     $builder->add('username', 'text', array('label' => false, 'attr' => array('placeholder' => 'Enter username', 'class' => 'form-control')));
     $builder->add('password', 'password', array('label' => false, 'attr' => array('placeholder' => 'Enter password', 'class' => 'form-control')));
     $builder->add('target_path', 'hidden', array('label' => false, 'attr' => array('value' => "/")));
     $builder->add('recaptcha', 'captcha', array('label' => false, 'width' => 270, 'height' => 60, 'length' => 5));
     $builder->add('login', 'submit', array('label' => "Login", 'attr' => array('class' => 'btn btn-default')));
 }
Exemplo n.º 10
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('GET');
     $builder->add('search', TextType::class, ['attr' => ['class' => 'form-control', 'placeholder' => 'placeholder.search']]);
     $builder->add('send', SubmitType::class, ['label' => 'send', 'attr' => ['class' => 'btn btn-primary']]);
     # advanced search
     $builder->add('inside_dir', TextType::class, ['label' => 'inside_dir', 'attr' => ['class' => 'form-control', 'placeholder' => 'placeholder.inside_dir'], 'required' => false]);
     $builder->add('file_name', TextType::class, ['label' => 'file_name', 'attr' => ['class' => 'form-control', 'placeholder' => 'placeholder.file_name'], 'required' => false]);
     $builder->add('rows_per_page', TextType::class, ['label' => 'rows_per_page', 'attr' => ['class' => 'form-control'], 'required' => false, 'data' => $options['data']['rowsPerPage']]);
     $builder->add('ignore_cache', CheckboxType::class, ['label' => 'ignore.cache.dir', 'required' => false, 'data' => true]);
     $builder->add('ignore_vendor', CheckboxType::class, ['label' => 'ignore.vendor.dir', 'required' => false, 'data' => true]);
     $builder->add('ignore_log', CheckboxType::class, ['label' => 'ignore.log.dir', 'required' => false, 'data' => true]);
 }
Exemplo n.º 11
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('GET');
     $builder->add('limit', ChoiceType::class, ['choices' => ['5' => '5', '10' => '10', '25' => '25', '50' => '50', '100' => '100', '250' => '250', '500' => '500'], 'required' => false, 'placeholder' => 'LIMIT LOGS']);
     $builder->add('level', ChoiceType::class, ['choices' => ['EMERGENCY' => 'EMERGENCY', 'ALERT' => 'ALERT', 'CRITICAL' => 'CRITICAL', 'ERROR' => 'ERROR', 'WARNING' => 'WARNING', 'NOTICE' => 'NOTICE', 'INFO' => 'INFO', 'DEBUG' => 'DEBUG'], 'required' => false, 'placeholder' => 'ALL LEVEL']);
     $builder->add('date', ChoiceType::class, ['choices' => ['LAST 1 HOURS' => '-1 hour', 'LAST 3 HOURS' => '-3 hour', 'LAST 6 HOURS' => '-6 hour', 'LAST 12 HOURS' => '-12 hour', 'LAST 1 DAYS' => '-1 day', 'LAST 3 DAYS' => '-3 day', 'LAST 7 DAYS' => '-7 day', 'LAST 30 DAYS' => '-30 day', 'LAST 60 DAYS' => '-60 day', 'LAST 90 DAYS' => '-90 day'], 'required' => false, 'placeholder' => 'ALL DATE']);
     $builder->get('date')->addModelTransformer(new CallbackTransformer(function () {
         return null;
     }, function ($dateAsString) {
         if (!$dateAsString) {
             return null;
         }
         $date = new \DateTime();
         $date->modify($dateAsString);
         return $date;
     }));
     $builder->add('message', TextType::class, ['attr' => ['placeholder' => 'SEARCH IN MESSAGES'], 'required' => false]);
     $builder->add('save', SubmitType::class, array('label' => 'FILTER'));
 }
Exemplo n.º 12
0
 /**
  * (non-PHPdoc)
  * @see \Symfony\Component\Form\AbstractType::buildForm()
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('GET')->add('url', 'text', ['label' => 'URL address', 'attr' => ['placeholder' => $this->host . '/']])->add('frames', 'checkbox', ['label' => 'Upload frames', 'required' => false]);
 }
Exemplo n.º 13
0
 /**
  * Buildform function
  *
  * @param FormBuilderInterface $builder the formBuilder
  * @param array                $options the options for this form
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST')->add('password', 'repeated', ['type' => 'password', 'first_options' => ['label' => 'store.recovery.form.fields.password.label'], 'second_options' => ['label' => 'store.recovery.form.fields.repeat_password.label'], 'required' => true])->add('send', 'submit', ['label' => 'store.recovery.form.fields.send.label']);
 }
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST')->add('libelle', TextType::class, ['label' => "Choisir un nom de produit : ", 'constraints' => [new NotBlank(), new Length(['min' => 3])]])->add('save', SubmitType::class, ['label' => "Créer"]);
 }
Exemplo n.º 15
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('PUT')->add('title')->add('classLevel', 'choice', array('choices' => array('1' => 'Première S', '2' => 'Terminale S'), 'required' => true))->add('questions', 'collection', array('type' => new QuestionsType(), 'allow_add' => true, 'allow_delete' => true, 'by_reference' => false))->add('status', 'choice', array('choices' => array('publish' => 'Publié', 'unpublish' => 'Non Publié')))->add('publish', 'checkbox', array('required' => false, 'mapped' => false))->add('valider', 'submit');
 }
Exemplo n.º 16
0
 /**
  * Buildform function
  *
  * @param FormBuilderInterface $builder the formBuilder
  * @param array                $options the options for this form
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST')->add('email', 'email', ['required' => true])->add('password', 'password', ['constraints' => [new UserPassword()], 'mapped' => false, 'required' => false])->add('new_password', 'repeated', ['mapped' => false, 'required' => false, 'type' => 'password'])->add('firstname', 'text', ['required' => false])->add('lastname', 'text', ['required' => false])->add('gender', 'choice', ['choices' => [ElcodiUserProperties::GENDER_MALE => 'admin.user.field.gender.options.male', ElcodiUserProperties::GENDER_FEMALE => 'admin.user.field.gender.options.female'], 'required' => true])->add('birthday', 'date', ['required' => false, 'widget' => 'single_text', 'format' => 'yyyy-MM-dd'])->add('enabled', 'checkbox', ['required' => false]);
 }
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('GET')->add('start', 'date', array('widget' => 'single_text', 'format' => 'dd-MM-y', 'data' => new DateTime('-3 month')))->add('end', 'date', array('widget' => 'single_text', 'format' => 'dd-MM-y', 'data' => new DateTime()))->add('category', 'entity', array('class' => 'Accountant\\Entity\\Category', 'empty_value' => 'Category (optional)', 'required' => false))->add('watch', 'submit');
 }
Exemplo n.º 18
0
 /**
  * @param FormBuilderInterface $builder
  * @param array $options
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST')->add('sessionTitle', 'text', ['label' => 'Titel der Session'])->add('caption', 'text', ['label' => 'Untertitel', 'required' => false])->add('fullDescription', 'textarea', ['label' => 'Beschreibung deiner Session'])->add('counterparts', 'collection', ["type" => new CounterpartType(), "allow_add" => true, "allow_delete" => true, "label" => "Ansprechpartner", "required" => true])->add('Senden', 'submit');
 }
Exemplo n.º 19
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST')->add('email', 'email', array('label' => 'E-Mail', 'required' => true, 'attr' => array('placeholder' => '*****@*****.**')))->add('name', 'text', array('label' => 'Name', 'required' => true, 'attr' => array('placeholder' => 'Max Musterman')))->add('twitter', 'text', array('label' => 'Twitter-Handle', 'required' => false, 'attr' => array('placeholder' => '@max_mustermann', 'pattern' => '@[a-zA-Z0-9_]{1,15}')))->add('tags', 'text', array('label' => 'Beschreibe deine Interesse in maximal 3 Tags (je 15 Zeichen)', 'required' => false, 'attr' => array('placeholder' => '#foo #bar', 'pattern' => '#[^\\s]{1,15}( #[^\\s]{1,15}){0,2}')))->add('days', 'choice', array('label' => 'An welchen Tagen möchtest Du am BarCamp teilnehmen?', 'required' => true, 'choices' => array(3 => 'beide Tage', 1 => 'Samstag', 2 => 'Sonntag'), 'expanded' => true))->add('food', 'choice', array('label' => 'Möchtest Du veganes Essen?', 'required' => true, 'choices' => array('default' => 'nein', 'vegan' => 'ja'), 'expanded' => true))->add('arrival', 'choice', array('label' => 'Wie wirst Du anreisen?', 'required' => true, 'choices' => array('public' => 'ÖPNV', 'private' => 'Privat'), 'expanded' => true))->add('participantList', 'choice', array('label' => 'Auf der Teilnehmerliste anzeigen?', 'required' => true, 'choices' => array(1 => 'ja', 0 => 'nein'), 'expanded' => true))->add('save', 'submit', array('label' => 'Absenden'));
 }
Exemplo n.º 20
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST')->add('email', 'text', array('attr' => array('placeholder' => 'Email address')))->add('password', 'password', array('attr' => array('placeholder' => 'Password')))->add('confirm_password', 'password', array('attr' => array('placeholder' => 'Confirm password')))->add('register', 'submit', array('label' => 'Register'));
 }
Exemplo n.º 21
0
 /**
  * @param FormBuilderInterface $builder
  * @param array $options
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST')->add('idpets', 'hidden', array('required' => false))->add('reference', 'text', array('required' => false, 'label' => 'Numéro du box ou de médaille', 'error_bubbling' => false))->add('type', 'choice', array('choices' => array(0 => 'Chien', 1 => 'Chat', 2 => 'Autre'), 'multiple' => false, 'expanded' => false))->add('racesraces', EntityType::class, array('label' => 'Race', 'class' => 'SpaSpaBundle:Races', 'choice_label' => 'name', 'multiple' => false, 'empty_value' => ''))->add('sex', 'choice', array('required' => true, 'choices' => array(0 => 'Mâle', 1 => 'Femelle'), 'multiple' => false, 'expanded' => false, 'label' => "Sexe"))->add('size', 'choice', array('required' => true, 'choices' => array(0 => 'Petit', 1 => 'Moyen', 2 => 'Grand'), 'multiple' => false, 'expanded' => false, 'label' => "Taille"))->add('birthdate', 'birthday', array('label' => 'Date de naissance', 'widget' => 'choice', 'input' => 'timestamp', 'format' => 'd/M/y', 'empty_value' => array('year' => 'Année', 'month' => 'Mois', 'day' => 'Jour'), 'pattern' => "{{ day }}/{{ month }}/{{ year }}"))->add('arrivaldate', 'date', array('label' => 'Date d\'arrivée', 'widget' => 'choice', 'input' => 'timestamp', 'format' => 'd/M/y', 'empty_value' => array('year' => 'Année', 'month' => 'Mois', 'day' => 'Jour'), 'pattern' => "{{ day }}/{{ month }}/{{ year }}"))->add('petofmonth', 'checkbox', array('label' => "Animal du mois ?", 'required' => false))->add('description', 'textarea', array('required' => true, 'label' => 'Description', 'error_bubbling' => false))->add('filePicture', FileType::class, array('data_class' => null, 'multiple' => true, 'label' => 'Photos'))->add('fileVideo', FileType::class, array('data_class' => null, 'multiple' => true, 'label' => 'Vidéos'))->add('save', SubmitType::class, array('label' => "Créer"))->getForm();
 }
Exemplo n.º 22
0
 /**
  * @param FormBuilderInterface $builder
  * @param array $options
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST')->setAction($this->action);
     $builder->add($builder->create('checkinDate', 'hidden', array('attr' => array('id' => 'booking-checkin-date')))->addViewTransformer(new DateTimeToStringTransformer()))->add($builder->create('checkoutDate', 'hidden', array('attr' => array('id' => 'booking-checkout-date')))->addViewTransformer(new DateTimeToStringTransformer()))->add('guestsCount', 'hidden', array('attr' => array('id' => 'booking-checkout-date')))->add('pageId', 'hidden')->add('priceString', 'hidden', array('attr' => array('id' => 'booking-price')))->add('firstName', 'text', array('attr' => array('placeholder' => "First name", 'class' => "decorative-input inspectletIgnore"), 'required' => false, 'label' => false))->add('lastName', 'text', array('attr' => array('placeholder' => "Last name", 'class' => "decorative-input inspectletIgnore"), 'required' => false, 'label' => false))->add('email', 'email', array('attr' => array('placeholder' => "Email address", 'class' => "decorative-input inspectletIgnore"), 'required' => false, 'label' => false))->add('address', 'text', array('attr' => array('placeholder' => "Address", 'class' => "decorative-input inspectletIgnore"), 'required' => false, 'label' => false))->add('city', 'text', array('attr' => array('placeholder' => "City", 'class' => "decorative-input inspectletIgnore"), 'required' => false, 'label' => false))->add('zip', 'text', array('attr' => array('placeholder' => "Postal code", 'class' => "decorative-input inspectletIgnore"), 'required' => false, 'label' => false))->add('country', 'text', array('attr' => array('placeholder' => "Country", 'class' => "decorative-input inspectletIgnore"), 'required' => false, 'label' => false))->add('phone', 'text', array('attr' => array('placeholder' => "Phone number", 'class' => "decorative-input inspectletIgnore"), 'required' => false, 'label' => false))->add('submit', 'submit', array('attr' => array('class' => 'btn btn-primary btn-block btn-large'), 'label' => 'Confirm'));
 }
Exemplo n.º 23
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('GET')->add('searchInput', 'search', array('attr' => array('placeholder' => 'Ieškoti parduotuvių'), 'label' => false))->add('searchButton', 'submit', array('label' => 'Ieškoti'));
 }
Exemplo n.º 24
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST')->add('email', 'email', array('label' => 'E-Mail', 'required' => true, 'attr' => array('placeholder' => '*****@*****.**')))->add('days', 'choice', array('label' => 'Welche Tagen möchtest Du stornieren?', 'required' => true, 'choices' => array(3 => 'beide Tage', 1 => 'Samstag', 2 => 'Sonntag'), 'expanded' => true))->add('save', 'submit', array('label' => 'Absenden'));
 }
Exemplo n.º 25
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('username', 'text', array('required' => false, 'label' => 'security.login.username'));
     $builder->setMethod('GET');
 }
Exemplo n.º 26
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('PUT')->add('nombre', 'text')->add('logotipo', 'text')->add('categoria', 'entity', array('class' => 'MyRecipesBundle:Categoria', 'choice_label' => 'nombre', 'label' => 'Categoria'))->add('usuario', 'entity', array('class' => 'MyRecipesBundle:Usuario', 'choice_label' => 'nombre', 'label' => 'Propietario'))->add('descripcion', TextareaType::class, array('attr' => array('class' => 'tinymce'), 'label' => 'Descripción'))->add('Guardar', 'submit');
 }
Exemplo n.º 27
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST')->add('data_compra', 'date', array('widget' => 'single_text', 'label' => 'Data Compra:', 'label_attr' => array('class' => 'col-sm-3 control-label'), 'attr' => array('class' => 'form-control datepicker'), 'format' => 'dd/MM/yyyy', 'required' => true, 'invalid_message' => 'Este campo é obrigatório'))->add('titulo', 'entity', array('class' => 'RafaelSantiago\\TesouroDiretoBundle\\Entity\\TituloTesouro', 'property' => 'descricao', 'label' => 'Título:', 'label_attr' => array('class' => 'col-sm-3 control-label'), 'attr' => array('class' => 'form-control'), 'required' => false, 'invalid_message' => 'Este campo é obrigatório'))->add('data_vencimento', 'date', array('widget' => 'single_text', 'label' => 'Data Vencimento:', 'label_attr' => array('class' => 'col-sm-3 control-label'), 'attr' => array('class' => 'form-control datepicker'), 'format' => 'dd/MM/yyyy', 'invalid_message' => 'Data inválida', 'required' => true))->add('taxa', 'text', array('label' => 'Taxa % (a.a):', 'label_attr' => array('class' => 'col-sm-3 control-label'), 'attr' => array('class' => 'form-control'), 'required' => false))->add('valor_titulo', 'text', array('label' => 'Valor Título:', 'label_attr' => array('class' => 'col-sm-3 control-label'), 'attr' => array('class' => 'form-control'), 'required' => true))->add('quantidade', 'text', array('label' => 'Quantidade:', 'label_attr' => array('class' => 'col-sm-3 control-label'), 'attr' => array('class' => 'form-control'), 'required' => true))->add('salvar', 'submit', array('attr' => array('class' => 'btn btn-primary', 'icon' => 'icon-ok')));
 }
Exemplo n.º 28
0
 /**
  * Buildform function
  *
  * @param FormBuilderInterface $builder the formBuilder
  * @param array                $options the options for this form
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('POST')->add('firstname', 'text', ['required' => true, 'label' => 'store.user.form.fields.firstname.label'])->add('lastname', 'text', ['required' => true, 'label' => 'store.user.form.fields.lastname.label'])->add('email', 'email', ['required' => true, 'label' => 'store.user.form.fields.email.label'])->add('password', 'repeated', ['type' => 'password', 'first_options' => ['label' => 'store.user.form.fields.password.label'], 'second_options' => ['label' => 'store.user.form.fields.repeat_password.label'], 'required' => false])->add('send', 'submit', ['label' => 'store.user.form.fields.send.label']);
 }
Exemplo n.º 29
0
 /**
  * @param FormBuilderInterface $builder
  * @param array $options
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('GET')->add('url', 'text', ['label' => 'URL address', 'attr' => ['placeholder' => $this->host . '/']]);
 }
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('username', 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType', array('required' => false, 'label' => 'security.login.username'));
     $builder->setMethod('GET');
 }