예제 #1
0
 public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('intCreditAmount', 'hidden', array('data' => $this->getCredit()->getCreditAmount()));
     $builder->add('intRepaymentTime', 'hidden', array('data' => $this->getCredit()->getReplaymentTime()));
     $builder->add('intRepaymentMethod', 'choice', array('choices' => \App\FrontendBundle\Utils\Session\CreditCreator::GetReplaymentMethodsToDropDown(), 'placeholder' => 'Sposób spłaty pożyczki', 'data' => $this->getCredit()->getReplaymentMethod()));
     $builder->add('strPurpose', 'text', array('attr' => array('placeholder' => 'Cel pożyczki'), 'data' => $this->getCredit()->getPurpose()));
     $builder->add('strTypeOfSecurity', 'text', array('attr' => array('placeholder' => 'Rodzaj zabezpieczenia'), 'data' => $this->getCredit()->getTypeOfSecurity()));
     $builder->add('strTypeOfSecurityDescription', 'textarea', array('attr' => array('placeholder' => 'Szczegółowy opis zabezpieczenia pożyczki'), 'data' => $this->getCredit()->getTypeOfSecurityDescription()));
 }
예제 #2
0
 public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('amount', 'hidden', array('data' => $this->getCredit()->getCreditAmount()));
     $builder->add('replaymentTime', 'hidden', array('data' => $this->getCredit()->getReplaymentTime()));
     $builder->add('interest', 'text', array('attr' => array('placeholder' => 'Oprocentowanie', 'regex' => '\\d+')));
     $builder->add('typeOfSecurity', 'text', array('attr' => array('placeholder' => 'Rodzaj zabezpieczenia', 'regex' => '.{1,255}'), 'data' => $this->getCredit()->getTypeOfSecurity()));
     $builder->add('replaymentMethod', 'choice', array('choices' => \App\FrontendBundle\Utils\Session\CreditCreator::GetReplaymentMethodsToDropDown(), 'placeholder' => 'Sposób spłaty pożyczki', 'data' => $this->getCredit()->getReplaymentMethod()));
     $builder->add('description', 'textarea', array('attr' => array('placeholder' => 'Uwagi', 'regex' => '.+')));
     $builder->add('expiredAt', 'text', array('attr' => array('placeholder' => 'Ważność oferty', 'regex' => '\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d')));
 }
예제 #3
0
 public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('intTypeOfPerson', 'choice', array('choices' => CreditCreator::GetTypesOfPersonToDropDown(), 'expanded' => true, 'multiple' => false));
     /**
      * LEWA STRONA
      */
     $builder->add('strFirstName', 'text', array('required' => false, 'attr' => array('placeholder' => 'Imię', 'data-required' => 'true')));
     $builder->add('strSecondName', 'text', array('required' => false, 'attr' => array('placeholder' => 'Drugie imię', 'data-required' => 'false')));
     $builder->add('strLastName', 'text', array('required' => false, 'attr' => array('placeholder' => 'Nazwisko', 'data-required' => 'true')));
     $builder->add('strPesel', 'text', array('required' => false, 'attr' => array('placeholder' => 'PESEL', 'data-required' => 'true')));
     $builder->add('strEdg', 'text', array('required' => false, 'attr' => array('placeholder' => 'EDG dla działalności gosp.', 'data-required' => 'false')));
     $builder->add('strIdNumber', 'text', array('required' => false, 'attr' => array('placeholder' => 'Nr dowodu osobistego', 'data-required' => 'true')));
     $builder->add('strAddress', 'text', array('required' => false, 'attr' => array('placeholder' => 'Adres zamieszkania', 'data-required' => 'true')));
     $builder->add('strPostCode', 'text', array('required' => false, 'attr' => array('placeholder' => 'Kod pocztowy', 'data-required' => 'true')));
     $builder->add('strCity', 'text', array('required' => false, 'attr' => array('placeholder' => 'Miescowość', 'data-required' => 'true')));
     $builder->add('strPhone', 'text', array('required' => false, 'attr' => array('placeholder' => 'Telefon', 'data-required' => 'true')));
     $builder->add('strFacebookAddress', 'text', array('required' => false, 'attr' => array('placeholder' => 'Adres profilu na Facebook', 'data-required' => 'true')));
     /**
      * PRAWA STRONA
      */
     $builder->add('strFirstName2', 'text', array('required' => false, 'attr' => array('placeholder' => 'Imię', 'data-required' => 'true')));
     $builder->add('strSecondName2', 'text', array('required' => false, 'attr' => array('placeholder' => 'Drugie imię', 'data-required' => 'false')));
     $builder->add('strLastName2', 'text', array('required' => false, 'attr' => array('placeholder' => 'Nazwisko', 'data-required' => 'true')));
     $builder->add('strPesel2', 'text', array('required' => false, 'attr' => array('placeholder' => 'PESEL', 'data-required' => 'true')));
     $builder->add('strEdg2', 'text', array('required' => false, 'attr' => array('placeholder' => 'EDG dla działalności gosp.', 'data-required' => 'false')));
     $builder->add('strIdNumber2', 'text', array('required' => false, 'attr' => array('placeholder' => 'Nr dowodu osobistego', 'data-required' => 'true')));
     $builder->add('strAddress2', 'text', array('required' => false, 'attr' => array('placeholder' => 'Adres zamieszkania', 'data-required' => 'true')));
     $builder->add('strPostCode2', 'text', array('required' => false, 'attr' => array('placeholder' => 'Kod pocztowy', 'data-required' => 'true')));
     $builder->add('strCity2', 'text', array('required' => false, 'attr' => array('placeholder' => 'Miescowość', 'data-required' => 'true')));
     $builder->add('strPhone2', 'text', array('required' => false, 'attr' => array('placeholder' => 'Telefon', 'data-required' => 'true')));
     $builder->add('strFacebookAddress2', 'text', array('required' => false, 'attr' => array('placeholder' => 'Adres profilu na Facebook', 'data-required' => 'true')));
     if (!$this->getUser() instanceof GuardUser) {
         $builder->add('username', 'text', array('attr' => array('placeholder' => 'Nick', 'data-required' => 'true')));
         $builder->add('email', 'text', array('attr' => array('placeholder' => 'e-mail', 'data-required' => 'true')));
         $builder->add('password', 'password', array('attr' => array('placeholder' => 'hasło', 'data-required' => 'true')));
     }
     $this->setDefault($builder);
 }