Exemplo n.º 1
1
 /**
  * Class constructor.
  */
 public function __construct(ProjectService $projectService)
 {
     parent::__construct();
     $this->setAttribute('method', 'post');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('id', 'create-report');
     /*
      * Create an array with possible periods. This will trigger a date but display a period (semester)
      */
     $semesterOptions = [];
     foreach ($projectService->parseYearRange() as $year) {
         /*
          * Use the Report object to parse the data
          */
         $report = new Report();
         $report->setDatePeriod(\DateTime::createFromFormat('Y-m-d', $year . '-03-01'));
         $semesterOptions[$year . '-1'] = $report->parseName();
         $report->setDatePeriod(\DateTime::createFromFormat('Y-m-d', $year . '-09-01'));
         $semesterOptions[$year . '-2'] = $report->parseName();
     }
     $this->add(['type' => 'Zend\\Form\\Element\\Select', 'name' => 'period', 'options' => ['label' => _("txt-report-period"), 'help-block' => _("txt-report-period-explanation"), 'value_options' => $semesterOptions], 'attributes' => ['class' => "form-control", 'id' => "period"]]);
     $this->add(['type' => 'Zend\\Form\\Element\\Text', 'name' => 'item', 'options' => ['label' => _("txt-document-name"), 'help-block' => _("txt-document-name-explanation")], 'attributes' => ['placeholder' => _("txt-please-give-a-document-name")]]);
     $this->add(['type' => '\\Zend\\Form\\Element\\File', 'name' => 'file', 'options' => ["label" => "txt-file", "help-block" => _("txt-file-requirements")]]);
     $this->add(['type' => 'Zend\\Form\\Element\\Submit', 'name' => 'submit', 'attributes' => ['class' => "btn btn-primary", 'value' => _("txt-create")]]);
     $this->add(['type' => 'Zend\\Form\\Element\\Submit', 'name' => 'cancel', 'attributes' => ['class' => "btn btn-warning", 'value' => _("txt-cancel")]]);
 }
 public function __construct($name = null)
 {
     parent::__construct('bibtex');
     $this->setAttribute('id', 'form_bibtex');
     $this->add(array('name' => 'bibtex', 'type' => 'File', 'required' => true, 'attributes' => array('id' => 'upload'), 'options' => array('label' => 'Importer fichier Bibtex')));
     $this->add(array('name' => 'submit', 'type' => 'Submit', 'attributes' => array('value' => 'Valider', 'id' => 'submitBibtex')));
 }
Exemplo n.º 3
0
 public function __construct($name = null)
 {
     parent::__construct('registration');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'usr_email', 'attributes' => array('type' => 'email'), 'options' => array('label' => 'E-mail')));
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Send', 'id' => 'submitbutton')));
 }
Exemplo n.º 4
0
 public function __construct($placeholder)
 {
     parent::__construct('busca');
     $this->setAttribute('method', 'post');
     $this->setAttribute('action', '');
     $this->add(array('name' => 'search', 'type' => 'Text', 'options' => array('label' => ''), 'attributes' => array('id' => 'search', 'class' => 'form-control input-sm', 'placeholder' => $placeholder)));
 }
Exemplo n.º 5
0
 public function __construct($name = 'mailchimp-sub-form', $options = array())
 {
     parent::__construct($name, $options);
     $firstName = new Element\Text('firstName');
     $firstName->setLabel('First Name');
     $lastName = new Element\Text('lastName');
     $lastName->setLabel('Last Name');
     $email = new Element\Email('email');
     $email->setLabel('Email Address');
     $emailValidator = new Validator\EmailAddress(array('allow' => Validator\Hostname::ALLOW_DNS, 'domain' => true));
     $email->setValidator($emailValidator);
     $privacyPolicy = new Element\Checkbox('privacyPolicy');
     $privacyPolicy->setLabel('I accept the privacy policy and the terms of use');
     $csrf = new Element\Csrf('mcSubCSRF');
     $submit = new Element\Submit('submit');
     $submit->setValue('Subscribe');
     $this->add($firstName);
     $this->add($lastName);
     $this->add($email);
     $this->add($privacyPolicy);
     $this->add($csrf);
     $this->add($submit);
     $inputFilter = $this->getInputFilter();
     $inputFilter->get($firstName->getName())->setAllowEmpty(false)->setRequired(true);
     $inputFilter->get($lastName->getName())->setAllowEmpty(false)->setRequired(true);
 }
Exemplo n.º 6
0
 public function __construct()
 {
     parent::__construct(__CLASS__);
     $this->add(array('name' => 'email'));
     $this->add(array('name' => 'password'));
     $this->add(array('name' => 'rememberme'));
 }
Exemplo n.º 7
0
 /**
  * @inheritdoc
  */
 public function __construct($name = null, $options = array())
 {
     parent::__construct($name, $options);
     $this->add(array('name' => 'title', 'type' => 'Text', 'options' => array('label' => '* Nome'), 'attributes' => array('required' => 'required', 'placeholder' => 'Titolo...', 'title' => 'Inserisci il titolo', 'id' => 'title')));
     $this->add(array('name' => 'messageText', 'type' => 'Textarea', 'options' => array('label' => 'Testo'), 'attributes' => array('id' => 'messageText', 'required' => 'required', 'rows' => 10)));
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'id', 'attributes' => array("class" => 'hiddenField')));
 }
Exemplo n.º 8
0
 public function __construct()
 {
     parent::__construct('venda');
     $this->setHydrator(new ClassMethods());
     $this->add(array('name' => 'id', 'type' => 'hidden'));
     $this->add(array('name' => 'submit', 'type' => 'submit', 'attributes' => array('value' => 'Nova venda', 'id' => 'btnSubmit', 'class' => 'btn btn-primary')));
 }
Exemplo n.º 9
0
 public function __construct($name = null, array $departamentos = null)
 {
     parent::__construct('usuario');
     $this->departamentos = $departamentos;
     $this->setAttribute('method', 'post');
     $this->setInputFilter(new UsuarioFilter());
     $this->setAttribute('enctype', 'multipart/form-data');
     $this->add(array('name' => 'id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'matricula', 'options' => array('type' => 'text'), 'attributes' => array('id' => 'matricula', 'placeholder' => 'Número da matricula', 'class' => 'form-control input-lg')));
     $this->add(array('name' => 'admissao', 'options' => array('type' => 'text'), 'attributes' => array('id' => 'admissao', 'placeholder' => 'Data de Admissao', 'class' => 'form-control input-lg')));
     $this->add(array('name' => 'nome', 'options' => array('type' => 'text'), 'attributes' => array('id' => 'nome', 'placeholder' => 'Nome', 'class' => 'form-control input-lg')));
     $departamento = new Select();
     $departamento->setName('departamento')->setOptions(array('empty_option' => 'Departamento do usuario', 'value_options' => $this->departamentos))->setAttributes(array('class' => 'form-control input-lg'));
     $this->add($departamento);
     $this->add(array('name' => 'foto', 'attributes' => array('type' => 'file', 'id' => 'foto')));
     $this->add(array('name' => 'dataNascimento', 'options' => array('type' => 'text'), 'attributes' => array('id' => 'dataNascimento', 'placeholder' => 'Data de Nascimento', 'class' => 'form-control input-lg')));
     $this->add(array('name' => 'email', 'options' => array('type' => 'email'), 'attributes' => array('id' => 'email', 'placeholder' => 'E-mail', 'class' => 'form-control input-lg')));
     $this->add(array('name' => 'password', 'options' => array('type' => 'Password'), 'attributes' => array('id' => 'password', 'placeholder' => 'Senha', 'class' => 'form-control input-lg', 'type' => 'password')));
     $status = new Select();
     $status->setName('status')->setOptions(array('empty_option' => 'Tipo de Usuario', 'value_options' => array('0' => 'Administrador', '1' => 'Colaborador', '2' => 'Visitante')))->setAttributes(array('class' => 'form-control input-lg'));
     $this->add($status);
     /*$ativo = new \Zend\Form\Element\Checkbox("ativo");
       $ativo->setLabel("Desativar?: ");
       $ativo->setCheckedValue("0");
       $this->add($ativo);*/
     $this->add(array('type' => 'Zend\\Form\\Element\\Checkbox', 'name' => 'ativo', 'options' => array('label' => 'Desativar?:', 'use_hidden_element' => true, 'checked_value' => 0, 'unchecked_value' => 1)));
     $this->add(array('name' => 'submit', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('value' => 'Salvar', 'class' => 'btn btn-primary')));
 }
Exemplo n.º 10
0
 public function __construct()
 {
     parent::__construct('login');
     $this->add(array('name' => 'nick', 'type' => 'Text'));
     $this->add(array('name' => 'heslo', 'type' => 'Password'));
     $this->add(array('name' => 'submit', 'type' => 'Submit', 'attributes' => array('value' => 'Přihlásit', 'class' => 'btn btn-info')));
 }
Exemplo n.º 11
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     //id
     $this->add(array('name' => 'id', 'attributes' => array('type' => 'hidden')));
     //titolo
     $this->add(array('name' => 'titolo', 'options' => array('label' => 'Titolo'), 'attributes' => array('type' => 'text', 'class' => 'form-control')));
     //contenuto
     $nota = new Element\Textarea('contenuto');
     $nota->setLabel('Contenuto');
     $nota->setAttribute('class', 'ckeditor form-control');
     $this->add($nota);
     //Background
     $this->add(array('name' => 'background', 'attributes' => array('type' => 'Zend\\Form\\Element\\File'), 'options' => array('label' => 'Background')));
     // Posterlab
     $this->add(array('type' => 'Zend\\Form\\Element\\Select', 'name' => 'posterlab', 'options' => array('label' => 'Posterlab', 'empty_option' => 'Scegli un posterlab =>'), 'attributes' => array('class' => 'form-control', 'onChange' => 'javascript:caricaPosizioni()', 'id' => 'posterlabs')));
     // Posizione
     $this->add(array('type' => 'Zend\\Form\\Element\\Select', 'name' => 'posizione', 'options' => array('label' => 'posizione', 'empty_option' => 'Scegli una posizione =>', 'disable_inarray_validator' => true), 'attributes' => array('class' => 'form-control', 'id' => 'posizioni')));
     // tipo
     $this->add(array('type' => 'Zend\\Form\\Element\\Select', 'name' => 'tipo', 'options' => array('label' => 'Tipo', 'empty_option' => 'Scegli tipo =>'), 'attributes' => array('class' => 'form-control')));
     //stato
     $stato = new Element\Checkbox('stato');
     $stato->setLabel('Stato');
     $stato->setAttribute('class', 'make-switch');
     $this->add($stato);
     $this->add(array('name' => 'send', 'attributes' => array('type' => 'submit', 'value' => 'Salva', 'class' => 'btn green-haze pull-right')));
 }
Exemplo n.º 12
0
 public function __construct($name, $options = [])
 {
     parent::__construct($name, $options);
     $this->add(array('type' => 'Zend\\Form\\Element\\Csrf', 'name' => 'csrf', 'attributes' => array('id' => 'csrf')));
     $this->add(array('name' => 'submit', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('type' => 'submit', 'value' => 'Batch Submit', 'id' => 'listsubmit', 'class' => 'btn btn-primary')));
     $this->setInputFilter(new InputFilter());
 }
Exemplo n.º 13
0
 public function __construct($name = null, array $comissoes = null)
 {
     parent::__construct($name);
     $this->comissoes = $comissoes;
     $this->setInputFilter(new MembroFilter());
     $this->setAttribute('method', 'POST');
     $id = new Hidden('id');
     $this->add($id);
     $comissao = new Select();
     $comissao->setLabel("Comissão ")->setName("comissao")->setOptions(array('value_options' => $this->comissoes));
     $this->add($comissao);
     $membro = new Textarea('membro');
     $membro->setLabel('Membros')->setAttribute('placeholder', 'Entre com os membros')->setAttribute('cols', '60')->setAttribute('rows', '5')->setAttribute('autofocus', 'autofocus');
     $this->add($membro);
     $cargo = new Textarea('cargo');
     $cargo->setLabel('Cargos')->setAttribute('placeholder', 'Entre com os cargos')->setAttribute('cols', '60')->setAttribute('rows', '5');
     $this->add($cargo);
     $dataInicio = new Text('data_inicio');
     $dataInicio->setLabel('Data Inicio');
     $this->add($dataInicio);
     $dataFim = new Text('data_fim');
     $dataFim->setLabel('Data Fim');
     $this->add($dataFim);
     $button = new Button('submit');
     $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-success'));
     $this->add($button);
 }
Exemplo n.º 14
0
 public function __construct($name = null)
 {
     parent::__construct('news-form');
     $this->setAttribute('method', 'post');
     $this->setAttribute('enctype', 'multipart/form-data');
     //         $this->add(array(
     //             'name' => 'news_name',
     //             'attributes' => array(
     //                 'type' => 'text',
     //                 'maxlength' => 250,
     //                 'class' => 'form-control',
     //                 //'required' => 'true',
     //             	'onchange','get_static()',
     //             ),
     //             'options' => array(
     //                 'label' => 'Title',
     //             ),
     //         ));
     $news_name = new Element\Text('news_name');
     $news_name->setLabel('Title:')->setAttribute('class', 'Title')->setAttribute('id', 'news_name')->setAttribute('type', 'text')->setAttribute('maxlength', 250)->setAttribute('class', 'form-control')->setAttribute('onchange', 'get_static();')->setAttribute('type', 'text');
     $this->add($news_name);
     $this->add(array('name' => 'url_static', 'attributes' => array('type' => 'text', 'id' => 'url_static', 'maxlength' => 250, 'class' => 'form-control'), 'options' => array('label' => 'Static-url')));
     $this->add(array('name' => 'news_thumbnail', 'attributes' => array('type' => 'file', 'class' => '', 'accept' => '.jpg, .png, .gif, .jpeg, .JPG, .PNG, .GIF, .JPEG'), 'options' => array('label' => 'Thumbnail')));
     $this->add(array('name' => 'news_content', 'type' => 'Zend\\Form\\Element\\Textarea', 'attributes' => array('class' => 'form-control', 'rows' => 5), 'options' => array('label' => 'Content')));
     $this->add(array('type' => 'Zend\\Form\\Element\\Csrf', 'name' => 'security', 'options' => array('csrf_options' => array('timeout' => 600))));
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Save changes', 'class' => 'btn btn-primary')));
 }
Exemplo n.º 15
0
 public function __construct($name = null)
 {
     parent::__construct('SarePrices-form');
     $this->setAttribute('method', 'post');
     $this->setAttribute('enctype', 'multipart/form-data');
     $this->setAttribute('class', 'client-form');
     $this->add(array('name' => 'email', 'required' => true, 'attributes' => array('type' => 'email', 'placeholder' => 'Ваш email*', 'id' => 'form-email')));
     //        $this->add(array(
     //            'type' => 'Zend\Form\Element\Captcha',
     //            'name' => 'captcha',
     //            'attributes' => array(
     //                'class' => 'form-control',
     //                'placeholder' => 'Введите текст*'
     //            ),
     //            'options' => array(
     //                'captcha' => new Captcha\Figlet(array(
     //                    'name' => 'foo',
     //                    'wordLen' => 4,
     //                    'timeout' => 300,
     //                    'messages' => array(
     //                        'badCaptcha' => 'Неправильно введена каптча!'
     //                    )
     //                        )),
     //            ),
     //        ));
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'УЗНАТЬ СТОИМОСТЬ ПО АКЦИИ', 'id' => 'form-submit', 'data-form' => 'Form2')));
 }
Exemplo n.º 16
0
 public function __construct()
 {
     parent::__construct();
     $this->setHydrator(new ClassMethods());
     $this->inputFilterForm = new InputFilter();
     $this->setInputFilter($this->inputFilterForm);
 }
Exemplo n.º 17
0
 /**
  * @inheritdoc
  */
 public function __construct($name = null, $options = array())
 {
     parent::__construct($name, $options);
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'id', 'attributes' => array("class" => 'hiddenField')));
     $this->add(array('name' => 'cig', 'type' => 'Text', 'options' => array('label' => '* <abbr title="Codice Identificativo di Gara">CIG</abbr>'), 'attributes' => array('id' => 'cig', 'title' => 'Inserisci Codice Identificativo di Gara', 'placeholder' => 'CIG...', 'required' => 'required', 'maxlength' => 10)));
     $this->add(array('name' => 'titolo', 'type' => 'Text', 'options' => array('label' => '* Oggetto del bando'), 'attributes' => array('id' => 'titolo', 'title' => "Inserisci l'oggetto del bando", 'placeholder' => 'Oggetto...', 'required' => 'required', 'maxlength' => 230)));
 }
Exemplo n.º 18
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     //ID field
     $this->add(array('name' => 'id', 'attributes' => array('type' => 'hidden')));
     //Name field
     if ('ShareForm' == $name) {
         $this->add(array('name' => 'name', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('label' => 'Select User Name')));
     } else {
         $this->add(array('name' => 'name', 'attributes' => array('type' => 'text'), 'options' => array('label' => 'Full Name')));
     }
     //Email field
     $this->add(array('name' => 'email', 'attributes' => array('type' => 'email', 'required' => 'required'), 'options' => array('label' => 'Email'), 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'EmailAddress', 'options' => array('messages' => array(\Zend\Validator\EmailAddress::INVALID_FORMAT => 'Email address is not valid'))))));
     //Password field
     $this->add(array('name' => 'password', 'attributes' => array('type' => 'password', 'required' => 'password'), 'options' => array('label' => 'Password')));
     //Confirm Password field
     $this->add(array('name' => 'confirm_password', 'attributes' => array('type' => 'password', 'required' => 'required'), 'options' => array('label' => 'Confirm Password')));
     //Register button
     $this->add(array('name' => 'register', 'attributes' => array('type' => 'submit', 'value' => 'Register')));
     //Login button
     $this->add(array('name' => 'login', 'attributes' => array('type' => 'submit', 'value' => 'Login')));
     //Update button
     $this->add(array('name' => 'update', 'attributes' => array('type' => 'submit', 'value' => 'Update')));
     //Submit button
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Submit')));
     //File element
     $this->add(array('name' => 'filename', 'attributes' => array('type' => 'file'), 'options' => array('label' => 'File Upload')));
     //File label
     $this->add(array('name' => 'label', 'attributes' => array('type' => 'text'), 'options' => array('label' => 'File Description')));
 }
Exemplo n.º 19
0
 public function __construct()
 {
     parent::__construct('Investor');
     $this->setAttribute('method', 'post');
     $this->setAttribute('class', 'form-member');
     $this->add(array('name' => 'member_id', 'type' => 'text', 'options' => array('label' => 'Member ID'), 'attributes' => array('class' => 'form-control', 'id' => 'member_id')));
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'branch_id', 'attributes' => array('value' => '1', 'id' => 'branch_id')));
     $this->add(array('name' => 'employee_code', 'type' => 'text', 'options' => array('label' => 'Employee Code'), 'attributes' => array('class' => 'form-control', 'id' => 'employee_code')));
     $this->add(array('name' => 'name', 'type' => 'text', 'options' => array('label' => 'Name'), 'attributes' => array('class' => 'form-control', 'id' => 'name', 'disabled' => true)));
     $this->add(array('type' => 'text', 'name' => 'gardian_name', 'options' => array('label' => 'Gardian Name'), 'attributes' => array('class' => 'form-control', 'id' => 'gardian_name', 'disabled' => true)));
     $this->add(array('name' => 'emailid', 'type' => 'text', 'options' => array('label' => 'Email Id'), 'attributes' => array('class' => 'form-control', 'id' => 'emailid', 'disabled' => true)));
     $this->add(array('name' => 'mobile_number', 'type' => 'text', 'options' => array('label' => 'Mobile Number'), 'attributes' => array('class' => 'form-control', 'id' => 'mobile_number', 'disabled' => true)));
     $this->add(array('name' => 'nominee_name', 'type' => 'text', 'options' => array('label' => 'Nominee Name'), 'attributes' => array('class' => 'form-control', 'id' => 'nominee_name', 'disabled' => true)));
     $this->add(array('name' => 'nominee_relation', 'type' => 'text', 'options' => array('label' => 'Nominee Relation'), 'attributes' => array('class' => 'form-control', 'id' => 'nominee_relation', 'disabled' => true)));
     $this->add(array('name' => 'address', 'type' => 'Zend\\Form\\Element\\Textarea', 'options' => array('label' => 'Address'), 'attributes' => array('class' => 'form-control', 'id' => 'address', 'cols' => '50', 'rows' => '4', 'disabled' => true)));
     $this->add(array('name' => 'plan_id', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('label' => 'Paln', 'empty_option' => '-Choose Plan-', 'value_options' => array('1' => 'FD', '2' => 'RD', '3' => 'DDS')), 'attributes' => array('class' => 'form-control', 'id' => 'plan_id')));
     $this->add(array('name' => 'duration', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('label' => 'Duration', 'empty_option' => '-Choose Plan Maturity Time-'), 'attributes' => array('class' => 'form-control', 'id' => 'duration')));
     $this->add(array('name' => 'installment_type', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('label' => 'Installment', 'empty_option' => '-Choose Installment Type-'), 'attributes' => array('class' => 'form-control', 'id' => 'installment_type')));
     $this->add(array('name' => 'start_ammount', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('label' => 'Amount', 'value_options' => array(' ' => '-Choose Deposite Amount-')), 'attributes' => array('class' => 'form-control', 'id' => 'start_ammount')));
     $this->add(array('name' => 'custom_ammount', 'type' => 'text', 'options' => array('label' => 'Custom Amount'), 'attributes' => array('class' => 'form-control', 'id' => 'custom_ammount')));
     $this->add(array('name' => 'interest_rate', 'type' => 'text', 'options' => array('label' => 'Interest Rate'), 'attributes' => array('class' => 'form-control', 'id' => 'interest_rate', 'readonly' => true)));
     $this->add(array('name' => 'installment_ammount', 'type' => 'text', 'options' => array('label' => 'Installment Amount'), 'attributes' => array('class' => 'form-control', 'id' => 'installment_ammount', 'readonly' => true)));
     $this->add(array('name' => 'installment_date', 'type' => 'text', 'options' => array('label' => 'Installment Date'), 'attributes' => array('class' => 'form-control', 'id' => 'installment_date', 'readonly' => true)));
     $this->add(array('name' => 'final_ammount', 'type' => 'text', 'options' => array('label' => 'Ammount'), 'attributes' => array('class' => 'form-control', 'id' => 'final_ammount', 'readonly' => true)));
     $this->add(array('name' => 'end_date', 'type' => 'text', 'options' => array('label' => 'Maturity Date'), 'attributes' => array('class' => 'form-control', 'id' => 'end_date', 'readonly' => true)));
     $this->add(array('type' => 'Zend\\Form\\Element\\Text', 'name' => 'start_date', 'attributes' => array('class' => 'form-control', 'value' => date('Y-m-d'), 'id' => 'start_date', 'readonly' => true)));
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'formula_id', 'attributes' => array('value' => date('Y-m-d H:i:s'), 'id' => 'formula_id')));
     $this->add(array('name' => 'save', 'attributes' => array('type' => 'submit', 'class' => 'btn btn-success', 'value' => 'Save', 'id' => 'save-member')));
 }
Exemplo n.º 20
0
 public function __construct($name = null, $menuOptionsArr = array(), $menuOptionsSelectedArr = array())
 {
     parent::__construct($name);
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'screenname_add_arr', 'type' => 'Zend\\Form\\Element\\MultiCheckbox', 'attributes' => array('value' => $menuOptionsSelectedArr), 'options' => array('label' => '', 'value_options' => $menuOptionsArr)));
     /*
     		$this->add(array(
     			'name' => 'blvd_id',
     			'type' => 'Zend\Form\Element\Hidden',
     			'attributes' => array(
     				'required' => 'required',
     				'value' => $blvdId
     			),
     			'options' => array(
     				'label' => 'undefined',
     			),
     		));
     */
     $this->add(array('type' => 'radio', 'name' => 'addtoblvd', 'attributes' => array('required' => 'required', 'value' => $menuOptionsSelectedArr), 'options' => array('label' => 'Primary Category', 'value_options' => $menuOptionsArr)));
     /*
      $this->add(array(
      		'name' => 'csrf',
      		'type' => 'Zend\Form\Element\Csrf',
      ));
     */
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Submit', 'id' => 'submitbutton')));
 }
Exemplo n.º 21
0
 public function __construct()
 {
     parent::__construct('contact-form');
     $this->setAttribute("method", "post")->setAttribute("action", "/contactUs");
     $this->addElement();
     $this->addInputFilter();
 }
Exemplo n.º 22
0
 /**
  * Constructor
  *
  * @param null|string|int $name Optional name for the element
  */
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setAttribute('method', 'post');
     $this->setUseInputFilterDefaults(false);
     $this->init();
 }
Exemplo n.º 23
0
 public function __construct(ObjectManager $objectManager)
 {
     $this->setObjectManager($objectManager);
     parent::__construct(null);
     $this->setAttributes(array('method' => 'POST', 'accept-charset' => 'UTF-8', 'class' => 'form-horizontal'));
     //input Titulo
     $titulo = new Text('titulo');
     $titulo->setLabel('Titulo')->setAttributes(array('id' => 'nome', 'maxlength' => 80, 'class' => 'form-control'));
     $this->add($titulo);
     //input descri��o
     $descricao = new Textarea('descricao');
     $descricao->setLabel("Descricao")->setAttributes(array('id' => 'descricao', 'maxlength' => 150, 'class' => 'form-control'));
     $this->add($descricao);
     //input texto
     $texto = new Textarea('texto');
     $texto->setLabel('Texto')->setAttributes(array('id' => 'texto', 'class' => 'form-control'));
     $this->add($texto);
     //input Ativo
     $ativo = new Checkbox('ativo');
     $ativo->setLabel('Ativo')->setLabelAttributes(array('class' => 'checkbox-inline'))->setOptions(array('use_hidden_element' => true));
     $this->add($ativo);
     //Categoria
     $categoria = new ObjectSelect('category');
     $categoria->setLabel('Categoria')->setOptions(array('object_manager' => $this->getObjectManager(), 'target_class' => 'Categoria\\Entity\\Category', 'property' => 'nome', 'empty_option' => '--Selecione--', 'is_method' => true, 'find_method' => array('name' => 'findBy', 'params' => array('criteria' => array(), 'orderBy' => array('nome' => 'ASC')))))->setAttributes(array('id' => 'category', 'class' => 'form-control'));
     $this->add($categoria);
     //botao submit
     $button = new Button('submit');
     $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-default'));
     $this->add($button);
     $this->setInputFilter(new PostFilter($categoria->getValueOptions()));
 }
Exemplo n.º 24
0
 public function __construct(ServiceLocatorInterface $sl)
 {
     parent::__construct('form-categoria');
     // instanciando o entity manager do doctrine
     $em = $sl->get('Doctrine\\ORM\\EntityManager');
     // definindo variáveis
     $arrPerfil = array('' => 'Selecione');
     $repoPerfil = $em->getRepository('Admin\\Entity\\Perfil');
     $arrPerfil += $repoPerfil->findPairs();
     $perfil = new Select('perfil');
     $perfil->setLabel('Perfil')->setAttributes(array('id' => 'perfil', 'class' => 'form-control', 'options' => $arrPerfil));
     $this->add($perfil);
     $nome = new Text('nome');
     $nome->setLabel('Nome')->setAttributes(array('id' => 'nome', 'class' => 'form-control'));
     $this->add($nome);
     $email = new Text('email');
     $email->setLabel('Email')->setAttributes(array('id' => 'email', 'class' => 'form-control'));
     $this->add($email);
     $senha = new Text('senha');
     $senha->setLabel('Senha')->setAttributes(array('id' => 'senha', 'class' => 'form-control'));
     $this->add($senha);
     $status = new Select('status');
     $status->setLabel('Status')->setAttributes(array('id' => 'status', 'class' => 'form-control', 'options' => array('1' => 'Ativo', '0' => 'Inativo')));
     $this->add($status);
 }
Exemplo n.º 25
0
 public function __construct()
 {
     parent::__construct();
     $this->setAttributes(array("action" => "check-login.html", "method" => "GET", "class" => "form-horizontal", "role" => "form", "name" => "login-form", "id" => "login-form"));
     $this->add(new \Form\Form\UserFieldset());
     //text box cách 2
     //<label class="col-sm-3 control-label" for="card-holder-name">Name on Card</label>
     // <div class="col-sm-9">
     // 	<input type="text" class="form-control" name="card-holder-name" id="card-holder-name" placeholder="Card Holder's Name">
     // </div>
     $this->add(array("type" => "text", "name" => "card-holder-name", "attributes" => array("class" => "form-control", "id" => "card-holder-name", "placeholder" => "Card Holder's Name"), "options" => array("label" => "Name on Card", "label_attributes" => array("class" => "col-sm-3 control-label"))));
     //<label class="col-sm-3 control-label" for="card-number">Card Number</label>
     // <div class="col-sm-9">
     // 	<input type="text" class="form-control" name="card-number" id="card-number" placeholder="Debit/Credit Card Number">
     // </div>
     $this->add(array("type" => "text", "name" => "card-number", "attributes" => array("class" => "form-control", "id" => "card-number", "placeholder" => "Debit/Credit Card Number"), "options" => array("label" => "Card Number", "label_attributes" => array("class" => "col-sm-3 control-label"))));
     //<div class="form-group">
     // 	<label class="col-sm-3 control-label" for="cvv">Card CVV</label>
     // 	<div class="col-sm-3">
     // 		<input type="text" class="form-control" name="cvv" id="cvv" placeholder="Security Code">
     // 	</div>
     // </div>
     $this->add(array("type" => "text", "name" => "cvv", "attributes" => array("class" => "form-control", "id" => "cvv", "placeholder" => "Security Code"), "options" => array("label" => "Card CVV", "label_attributes" => array("class" => "col-sm-3 control-label"))));
     // <div class="form-group">
     // 	<div class="col-sm-offset-3 col-sm-9">
     // 		<button type="button" class="btn btn-success">Pay Now</button>
     // 	</div>
     // </div>
     $this->add(array("type" => "button", "name" => "pay-now", "attributes" => array("class" => "btn btn-success"), "options" => array("label" => "Pay now")));
     $this->add(array("type" => "select", "name" => "expiry-month", "attributes" => array("class" => "form-control col-sm-2", "id" => "expiry-month"), "options" => array("empty_option" => "month", "value_options" => array("01" => "Jan (01)", "02" => "Feb (02)", "03" => "Mar (03)", "04" => "Apr (04)", "05" => "May (05)", "06" => "June (06)", "07" => "July (07)", "08" => "Aug (08)", "09" => "Sep (09)", "10" => "Oct (10)", "11" => "Nov (11)", "12" => "Dev (12)"), "label" => "Expiration Date", "label_attributes" => array("class" => "col-sm-3 control-label"))));
     $this->add(array("type" => "select", "name" => "expiry-year", "attributes" => array("class" => "form-control"), "options" => array("value_options" => array("13" => "2013", "14" => "2014", "15" => "2015", "16" => "2016", "17" => "2017", "18" => "2018", "19" => "2019", "20" => "2020", "21" => "2021", "22" => "2022", "23" => "2023", "24" => "2024"))));
 }
Exemplo n.º 26
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     //Input type=hidden pk table
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'nombre', 'attributes' => array('value' => 'Fondo Operacional')));
     //Input type=hidden/////////////////////id Banco
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'idbanco', 'attributes' => array('id' => 'idbanco')));
     //Input type=hidden ////////////////////pk table
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'id_pk', 'attributes' => array('value' => '0')));
     //Input type=text///////////////////// Titular
     $this->add(array('type' => 'text', 'attributes' => array('name' => 'titular', 'id' => 'titular', 'class' => 'form-control', 'required' => 'true', 'style' => 'max-width: 80%;')));
     //Input /////////////////////////////  RUT
     $this->add(array('type' => 'text', 'attributes' => array('id' => 'rut', 'name' => 'rut', 'class' => 'form-control', 'required' => 'true', 'style' => 'max-width: 80%;')));
     //Input Cuenta /////////////////////////// Numero
     $this->add(array('type' => 'text', 'name' => 'numero', 'attributes' => array('class' => 'form-control', 'onkeypress' => 'return isNumber(event);', 'id' => 'numero', 'required' => 'true', 'style' => 'max-width: 80%;')));
     //Input Banco//////////////////////// Banco
     $this->add(array('type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('name' => 'banco', 'id' => 'bancooper', 'class' => 'form-control', 'required' => 'true', 'style' => 'max-width: 80%;')));
     //Input Banco//////////////////////// correo
     $this->add(array('type' => 'text', 'attributes' => array('name' => 'correo', 'id' => 'emailfinanciera', 'class' => 'form-control', 'required' => 'true', 'style' => 'max-width: 80%;')));
     //Input Banco//////////////////////// saldo
     $this->add(array('type' => 'text', 'name' => 'saldo', 'attributes' => array('id' => 'saldooper', 'class' => 'form-control', 'onblur' => 'formatMonto()', 'onkeypress' => 'return isNumber(event);', 'required' => 'true', 'style' => 'max-width: 80%;')));
     //Input Banco//////////////////////// Ultimo Cheque
     $this->add(array('type' => 'text', 'attributes' => array('name' => 'cheque', 'id' => 'ultimocheque', 'onkeypress' => 'return isNumber(event);', 'class' => 'form-control', 'style' => 'max-width: 80%;')));
     //Input Cuenta type=text************detalles
     $this->add(array('type' => 'textarea', 'name' => 'detalle', 'attributes' => array('class' => 'form-control', 'placeholder' => 'Escriba aqui', 'id' => 'detallefoper', 'rows' => '4', 'style' => 'width: max;')));
     //Boton Enviar
     $this->add(array('name' => 'sendfin', 'attributes' => array('type' => 'submit', 'id' => 'guardarfinanciera', 'value' => 'Guardar', 'class' => 'btn btn-success')));
     //Boton Cancelar
     $this->add(array('name' => 'reset', 'attributes' => array('type' => 'reset', 'value' => 'Cancelar', 'title' => 'Cancelar', 'class' => 'btn btn-danger')));
 }
 public function __construct($name = null)
 {
     parent::__construct('registration');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'usernameOrEmail', 'attributes' => array('type' => 'text', 'placeholder' => 'Username or e-mail'), 'options' => array('label' => ' ')));
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Go', 'id' => 'submitbutton', 'class' => 'btn btn-success btn-lg')));
 }
Exemplo n.º 28
0
 /**
  * @inheritdoc
  */
 public function __construct($name = 'formData', $options = array())
 {
     parent::__construct($name, $options);
     $this->add(array('name' => 'nome', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('id' => 'nome', 'placeholder' => 'Nome...', 'title' => 'Inserisci nome sezione', 'required' => 'required', 'maxlength' => 250), 'options' => array('label' => '* Nome')));
     $this->add(array('type' => 'Zend\\Form\\Element\\Select', 'name' => 'attivo', 'options' => array('label' => '* Stato', 'empty_option' => 'Seleziona', 'value_options' => array('1' => 'Attivo', '0' => 'Nascosto')), 'attributes' => array('required' => 'required', 'id' => 'attivo', 'title' => 'Seleziona stato')));
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'id', 'attributes' => array("class" => 'hiddenField')));
 }
Exemplo n.º 29
0
 /**
  * Import constructor.
  *
  * @param ContactService   $contactService
  * @param SelectionService $selectionService
  */
 public function __construct(ContactService $contactService, SelectionService $selectionService)
 {
     parent::__construct();
     $this->setAttribute('method', 'post');
     $this->setAttribute('action', '');
     $this->setAttribute('class', 'form-horizontal');
     $selections = [];
     foreach ($selectionService->findAll('selection') as $selection) {
         /** @var $selection Selection */
         if (is_null($selection->getSql())) {
             $selections[$selection->getId()] = $selection->getSelection();
         }
     }
     asort($selections);
     $this->add(['type' => '\\Zend\\Form\\Element\\Select', 'name' => 'selection_id', 'options' => ["value_options" => $selections, 'empty_option' => '-- Append to existing selection', "label" => "txt-append-to-selection", "help-block" => _("txt-contact-import-append-to-selection-name-help-block")]]);
     $optins = [];
     foreach ($contactService->findAll('optIn') as $optin) {
         /** @var $optin OptIn */
         $optins[$optin->getId()] = $optin->getOptIn();
     }
     asort($optins);
     $this->add(['type' => '\\Zend\\Form\\Element\\MultiCheckbox', 'name' => 'optIn', 'options' => ["value_options" => $optins, "label" => "txt-select-opt-in", "help-block" => _("txt-contact-import-select-opt-in-help-block")]]);
     $this->add(['type' => '\\Zend\\Form\\Element\\Text', 'name' => 'selection', 'options' => ["label" => "txt-selection", "help-block" => _("txt-contact-import-selection-name-help-block")]]);
     $this->add(['type' => '\\Zend\\Form\\Element\\File', 'name' => 'file', 'options' => ["label" => "txt-file", "help-block" => _("txt-contact-import-file-requirements")]]);
     $this->add(['type' => 'Zend\\Form\\Element\\Submit', 'name' => 'upload', 'attributes' => ['class' => "btn btn-primary", 'value' => _("txt-verify-data")]]);
     $this->add(['type' => 'Zend\\Form\\Element\\Submit', 'name' => 'import', 'attributes' => ['class' => "btn btn-primary", 'value' => _("txt-import")]]);
 }
Exemplo n.º 30
0
 public function __construct($name = 'workflowform')
 {
     //         $this->setDbAdapter($dbAdapter);
     // we want to ignore the name passed
     parent::__construct($name);
     $dbAdapter = GlobalAdapterFeature::getStaticAdapter();
     if ($dbAdapter != null) {
         $this->setDbAdapter($dbAdapter);
     } else {
         throw new \Exception('no dbAdapter loaded');
     }
     //         $workflowElement = new Collection('workflow');
     //         $workflowElement->setOptions(array(
     //             'label' => 'Workflow',
     //             'target_element' => array(
     //                 'type' => 'CookingAssist\Form\WorkflowFieldset')
     //         ));
     //         $this->add($workflowElement);
     $this->add(array('name' => 'Id', 'type' => 'Hidden'));
     $this->add(array('name' => 'Title', 'type' => 'Text', 'options' => array('label' => 'Titel')));
     $this->add(array('name' => 'Tipp', 'type' => 'Text', 'options' => array('label' => 'Tipp')));
     $submitElement = new Submit('Submit');
     $submitElement->setValue('Hinzufügen');
     $this->add($submitElement);
 }