public function getForm(array $default_status)
 {
     if (!$this->form) {
         $hidId = new Element\Hidden();
         $hidId->setName('userId');
         $txtName = new Element\Text();
         $txtName->setLabel('User Name')->setName("userName")->setAttribute('class', 'form-control');
         $password = new Element\Password();
         $password->setLabel('Password')->setName('password')->setAttribute('class', 'form-control');
         $confirmPassword = new Element\Password();
         $confirmPassword->setName('confirmPassword')->setLabel('Retype Password')->setAttribute('class', 'form-control');
         $selectRole = new Element\Hidden('userRole');
         $description = new Element\Textarea();
         $description->setName('description')->setLabel('Description')->setAttribute('class', 'form-control');
         $status = new Element\Select();
         $status->setName('status')->setLabel('Status')->setAttribute('class', 'form-control')->setValueOptions($default_status);
         $image = new Element\File();
         $image->setName('image')->setLabel('Profile image');
         $form = new Form();
         $form->setAttribute('class', 'form-horizontal');
         $form->setAttribute('enctype', 'multipart/form-data');
         $form->add($hidId);
         $form->add($txtName);
         $form->add($password);
         $form->add($confirmPassword);
         $form->add($selectRole);
         $form->add($description);
         $form->add($status);
         $form->add($image);
         $this->form = $form;
     }
     return $this->form;
 }
Esempio n. 2
0
 public function __construct($name = null)
 {
     parent::__construct('registration');
     $this->setAttribute('method', 'post');
     /*
             $this->add(array(
                 'name' => 'file',
                 'attributes' => array(
                     'type'  => 'Zend\Form\Element\File',
                 ),
                 'options' => array(
                     'label' => 'Single file input',
                 ),
             ));
     */
     // Single file upload
     $file = new Element\File('file');
     $file->setLabel('Single file input');
     // HTML5 multiple file upload
     $multiFile = new Element\File('multi-file');
     $multiFile->setLabel('Multi file input')->setAttribute('multiple', true);
     // $form = new Form('my-file');
     $this->add($file)->add($multiFile);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Upload', 'id' => 'submitbutton')));
 }
Esempio n. 3
0
 public function __construct(EntityManager $objectManager)
 {
     parent::__construct('ligue');
     $this->setAttributes(array('method' => 'post', 'id' => 'auth', 'role' => 'form'));
     $this->setInputFilter(new LigueFilter($objectManager));
     $this->setHydrator(new DoctrineObject($objectManager));
     // Id
     $id = new Hidden('id');
     $this->add($id);
     // Nom
     $nom = new Text('nom');
     $nom->setLabel('Nom')->setLabelAttributes(array('class', 'control-label'));
     $nom->setAttributes(array('id' => 'nom', 'class' => 'form-control', 'placeholder' => 'Nom', 'required' => true));
     $this->add($nom);
     // Image
     $image = new File('image');
     $image->setLabel('Image')->setLabelAttributes(array('class', 'control-label'));
     $image->setAttributes(array('id' => 'image', 'class' => 'form-control', 'placeholder' => 'Image'));
     $this->add($image);
     // Date début
     $dateDebut = new Text('dateDebut');
     $dateDebut->setLabel('Début de la ligue')->setLabelAttributes(array('class', 'control-label'));
     $dateDebut->setAttributes(array('id' => 'dateDebut', 'class' => 'form-control'));
     //$this->add($dateDebut);
     // Date fin
     $dateFin = new Text('dateFin');
     $dateFin->setLabel('Fin de la ligue')->setLabelAttributes(array('class', 'control-label'));
     $dateFin->setAttributes(array('id' => 'dateFin', 'class' => 'form-control'));
     //$this->add($dateFin);
     // Submit
     $submit = new Submit('submit');
     $submit->setValue('Enregistrer');
     $submit->setAttributes(array('class' => 'btn btn-primary'));
     $this->add($submit);
 }
Esempio n. 4
0
 public function addElements()
 {
     // File Input
     $file = new Element\File('image');
     $file->setLabel('Zdjęcia')->setAttribute('id', 'image-file')->setAttribute('multiple', true)->setAttribute('class', 'button round blue image-right');
     $this->add($file);
 }
Esempio n. 5
0
 public function __construct()
 {
     parent::__construct(null);
     $this->setInputFilter(new ReuniaoFilter());
     $this->setAttribute('method', 'POST')->setAttribute('enctype', 'multipart/form-data');
     $id = new \Zend\Form\Element\Hidden('id');
     $this->add($id);
     $data = new Text('data');
     $data->setLabel('Data')->setAttribute('autofocus', 'autofocus');
     $this->add($data);
     $eventos = new Text('eventos');
     $eventos->setLabel('Evento')->setAttribute('placeholder', 'Entre com o evento')->setAttribute('maxlength', 255)->setAttribute('size', 50);
     $this->add($eventos);
     $pauta = new Text('pauta');
     $pauta->setLabel('Pauta')->setAttribute('maxlength', 255)->setAttribute('size', 50);
     $this->add($pauta);
     $cardapio = new Textarea('cardapio');
     $cardapio->setLabel('Cardápio')->setAttribute('cols', '60')->setAttribute('rows', '5');
     $this->add($cardapio);
     $listaPresente = new Textarea('lista_presente');
     $listaPresente->setLabel('Lista de Presente')->setAttribute('cols', '60')->setAttribute('rows', '5');
     $this->add($listaPresente);
     $ata = new Text('ata');
     $ata->setLabel('Ata')->setAttribute('maxlength', 255)->setAttribute('size', 50);
     $this->add($ata);
     $imagnes = new File('imagens');
     $imagnes->setLabel('Imagens')->setAttribute('id', 'imagnes');
     $this->add($imagnes);
     $button = new Button('submit');
     $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-success'));
     $this->add($button);
 }
Esempio n. 6
0
 public function testWillAddFileEnctypeAttributeToForm()
 {
     $file = new FileElement('foo');
     $formMock = $this->getMock('Zend\\Form\\Form');
     $formMock->expects($this->exactly(1))->method('setAttribute')->with($this->stringContains('enctype'), $this->stringContains('multipart/form-data'));
     $file->prepareElement($formMock);
 }
Esempio n. 7
0
 public function __construct(EntityManager $entityManager)
 {
     parent::__construct();
     $this->entityManager = $entityManager;
     $this->setAttributes(array("method" => "post", "enctype" => "multipart/form-data", "class" => "form"));
     $this->setInputFilter(new HomeBannersFilters());
     // Campo de titulo
     $titulo = new Text('titulo');
     $titulo->setLabel("* Título")->setAttributes(array("maxLength" => "400", "class" => "form-control", "required" => "required"));
     // Campo tipo de midia
     $tipo = new Radio('tipo_banner');
     $tipo->setLabel('Tipo de mídia');
     $tipo->setValueOptions(array('IMAGEM' => 'Imagem', 'VIDEO' => 'Vídeo'))->setOptions(array('label_attributes' => array('class' => 'radio-inline')))->setAttribute("value", "IMAGEM");
     // Campo de midia
     $file = new File("midia");
     $file->setLabel('*Imagem (Tamanho exato de ' . \Base\Constant\Upload::BANNER_WIDTH . 'x' . \Base\Constant\Upload::BANNER_HEIGTH . ' px | ' . \Base\Constant\Upload::BANNER_MAX_SIZE . ')')->setAttribute('name', 'midia')->setAttribute('id', 'image');
     // Campo de midia2
     $file2 = new File("midia2");
     $file2->setLabel('*Video (' . \Base\Constant\Upload::BANNER_MAX_SIZE . ')')->setAttribute('id', 'video');
     // Botão de Submit
     $botao = new Submit("submit");
     $botao->setAttributes(array("value" => "Salvar"));
     // Adiciona campos
     $this->add($titulo)->add($tipo)->add($file)->add($file2)->add($botao);
 }
Esempio n. 8
0
 public function addElements()
 {
     $id = new Element\Text('id');
     $id->setLabel('ID')->setAttribute('class', 'form-control')->setAttribute('type', 'hidden');
     $this->add($id);
     $name = new Element\Text('name');
     $name->setLabel('catalog name')->setAttribute('class', 'form-control')->setAttribute('required', 'true')->setAttribute('onchange', 'get_alias();')->setAttribute('id', 'name');
     $this->add($name);
     $alias = new Element\Text('alias');
     $alias->setLabel('catalog alias')->setAttribute('required', 'true')->setAttribute('class', 'form-control')->setAttribute('id', 'alias');
     $this->add($alias);
     $description = new Element\Textarea('description');
     $description->setLabel('Description')->setAttribute('class', 'materialize-textarea form-control')->setAttribute('id', 'description');
     $this->add($description);
     $hot = new Element\Radio('hot');
     $hot->setLabel('Choice hot')->setValueOptions(array('0' => 'No Hot', '1' => 'Hot'))->setAttribute('id', 'hot')->setAttribute('class', 'radio_style');
     $this->add($hot);
     $new = new Element\Radio('new');
     $new->setLabel('Choice new')->setValueOptions(array('0' => 'No New', '1' => 'New'))->setAttribute('id', 'new')->setAttribute('class', 'radio_style');
     $this->add($new);
     $status = new Element\Radio('status');
     $status->setLabel('status');
     //->setAttribute('required', 'true')
     $status->setValueOptions(array('0' => 'Pause', '1' => 'Active'))->setAttribute('id', 'status')->setAttribute('class', 'radio_style');
     $this->add($status);
     $show_index = new Element\Radio('show_index');
     $show_index->setLabel('show_index');
     //->setAttribute('required', 'true')
     $show_index->setValueOptions(array('0' => 'No', '1' => 'Yes'))->setAttribute('id', 'show_index')->setAttribute('class', 'radio_style');
     $this->add($show_index);
     $img = new Element\File('img');
     $img->setLabel('file img (* not support .png , .gif)')->setAttribute('class', 'form-control')->setAttribute('type', 'file')->setAttribute('accept', '.jpg, .jpeg, .JPG, .JPEG')->setAttribute('id', 'img');
     $this->add($img);
 }
Esempio n. 9
0
 public function addElements()
 {
     // File Input
     $file = new Element\File('image-file');
     $file->setLabel('Avatar Image Upload')->setAttribute('id', 'image-file');
     $this->add($file);
 }
Esempio n. 10
0
 public function addElements()
 {
     // File Input
     $file = new Element\File('image-file');
     $file->setLabel('Avatar Image Upload')->setAttribute('id', 'image-file');
     $this->add($file);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Upload', 'id' => 'submitbutton')));
 }
Esempio n. 11
0
 /**
  * {@inheritDoc}
  */
 public function form(PhpRenderer $view, array $options = [])
 {
     $fileInput = new File('file[__index__]');
     $fileInput->setOptions(['label' => $view->translate('Upload File')]);
     $fileInput->setAttributes(['id' => 'media-file-input-__index__']);
     $field = $view->formRow($fileInput);
     return $field . '<input type="hidden" name="o:media[__index__][file_index]" value="__index__">';
 }
Esempio n. 12
0
 public function addElements()
 {
     // File Input
     $file = new Element\File('file');
     $file->setLabel('File Input')->setAttributes(['id' => 'file', 'multiple' => true]);
     $this->add($file);
     // Progress ID hidden input is only added with a view helper,
     // not as an element to the form.
 }
Esempio n. 13
0
 public function addElements()
 {
     // File Input
     $file = new Element\File('file');
     $file->setLabel('Image Upload')->setAttribute('id', 'file')->setAttribute('multiple', true);
     // That's it
     $this->add($file);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Upload', 'id' => 'submitbutton')));
 }
Esempio n. 14
0
 public function addElements()
 {
     // File Input
     $file = new Element\File('file');
     $file->setLabel('File Input')->setAttributes(array('id' => 'file', 'class' => 'form-control'));
     $this->add($file);
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'id'));
     $this->add(array('type' => 'Zend\\Form\\Element\\Select', 'name' => 'file_type', 'attributes' => array('id' => 'file_type', 'options' => \Application\Form\OptionsConfig::getFormOption('file_upload_type'), 'class' => 'form-control', 'required' => true), 'options' => array('label' => 'Datei-Typ')));
 }
Esempio n. 15
0
 public function __construct($name = null, array $classificacoes = null)
 {
     parent::__construct($name);
     $this->classificacoes = $classificacoes;
     $this->setInputFilter(new PessoaFilter());
     $this->setAttribute('method', 'POST');
     $this->setAttribute('enctype', 'multipart/form-data');
     $id = new \Zend\Form\Element\Hidden('id');
     $this->add($id);
     $titulo = new Text('nome');
     $titulo->setLabel('Nome  :  ')->setAttribute('placeholder', 'Entre com o nome')->setAttribute('maxlength', 100)->setAttribute('size', 50)->setAttribute('autofocus', 'autofocus');
     $this->add($titulo);
     $classificacao = new Select();
     $classificacao->setLabel("Classificacao ")->setName("classification")->setOptions(array('value_options' => $classificacoes));
     $this->add($classificacao);
     $dataAdmissao = new Text('data_admissao');
     $dataAdmissao->setLabel('Data Admissão');
     $this->add($dataAdmissao);
     $enderecoResidencial = new Text('endereco_residencial');
     $enderecoResidencial->setLabel('End. Residencial:')->setAttribute('placeholder', 'Entre com o endereço residencial')->setAttribute('maxlength', 255)->setAttribute('size', 50);
     $this->add($enderecoResidencial);
     $telefoneResidencial = new Text('telefone_residencial');
     $telefoneResidencial->setLabel('Tel. Residencial');
     $this->add($telefoneResidencial);
     $celular = new Text('celular');
     $celular->setLabel('Celular');
     $this->add($celular);
     $emailPessoal = new Text('email_pessoal');
     $emailPessoal->setLabel('Email Pessoal');
     $this->add($emailPessoal);
     $enderecoComercial = new Text('endereco_comercial');
     $enderecoComercial->setLabel('End. Comercial:')->setAttribute('placeholder', 'Entre com o endereço comercial')->setAttribute('maxlength', 255)->setAttribute('size', 50);
     $this->add($enderecoComercial);
     $telefoneComercial = new Text('telefone_comercial');
     $telefoneComercial->setLabel('Tel. Comercial');
     $this->add($telefoneComercial);
     $emailComercial = new Text('email_comercial');
     $emailComercial->setLabel('Email Comercial');
     $this->add($emailComercial);
     $conjuge = new Text('conjuge');
     $conjuge->setLabel('Nome do Conjuge')->setAttribute('maxlength', 100)->setAttribute('size', 50);
     $this->add($conjuge);
     $celularConjuge = new Text('celular_conjuge');
     $celularConjuge->setLabel('Celular do Conjuge');
     $this->add($celularConjuge);
     /*===========================================================================================*/
     $fotografia = new File('fotografia');
     $fotografia->setLabel('Fotografia')->setAttribute('id', 'fotografia');
     $this->add($fotografia);
     /*===========================================================================================*/
     $ativo = new Checkbox('ativo');
     $ativo->setLabel('Ativo : ');
     $this->add($ativo);
     $button = new Button('submit');
     $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-success'));
     $this->add($button);
 }
 public function addElements($multi)
 {
     $file = new Element\File('upload');
     $file->setLabel('Bild hinzufügen:')->setAttribute('id', 'file');
     if ($multi !== null) {
         $file->setAttribute('multiple', true);
     }
     $this->add($file);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Hochladen')));
 }
Esempio n. 17
0
 public function __construct($name = null, $options = array())
 {
     parent::__construct($name, $options);
     // Staff Id
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'staff_id'));
     // File Input
     $file = new Element\File('image-file');
     $file->setLabel('Avatar Image Upload')->setAttribute('id', 'image-file');
     $this->add($file);
 }
 public function addElements()
 {
     $imageupload = new Element\File('imageupload');
     $imageupload->setLabel('Image Upload')->setAttribute('id', 'imageupload')->setAttribute('multiple', true);
     //Enables multiple file uploads
     $this->add($imageupload);
     $submit = new Element\Submit('submit');
     $submit->setValue('Upload Now');
     $this->add($submit);
 }
 public function addElements()
 {
     // File Input
     $file = new Element\File('file');
     $file->setLabel('Multi-File Input')->setAttributes(array('multiple' => true));
     $this->add($file);
     // Text Input
     $text = new Element\Text('text');
     $text->setLabel('Text Entry');
     $this->add($text);
 }
Esempio n. 20
0
 public function addElements()
 {
     $file = new Element\File('image-file');
     $file->setLabel('Edit Your Image')->setAttribute('id', 'image-file')->setAttribute('multiple', true);
     $this->add($file);
     $submit = new Element\Submit('submit');
     $submit->setValue('Validation');
     $submit->setAttribute('class', 'btn btn-primary');
     $submit->setAttribute('id', 'submit');
     $this->add($submit);
 }
 public function addElements()
 {
     // File Input
     $file = new Element\File('file');
     $file->setLabel('File Input');
     $this->add($file);
     // Text Input
     $text = new Element\Text('text');
     $text->setLabel('Text Entry');
     $this->add($text);
 }
Esempio n. 22
0
 public function __construct($name = null)
 {
     parent::__construct('category');
     $this->setAttribute('method', 'post');
     $this->setAttribute('enctype', 'multipart/form-data');
     $this->add(array('name' => 'ctgr_name', 'attributes' => array('type' => 'text'), 'options' => array('label' => 'Username')));
     // Image Category
     $titleField = new Element\File('ctgr_image_filename');
     $titleField->setLabel('Image catégroy');
     $this->add($titleField);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Envoyer', 'id' => 'submitbutton', 'class' => 'btn waves-effect waves-light')));
 }
Esempio n. 23
0
 public function __construct($name = null, $options = array())
 {
     parent::__construct(isset($name) ? $name : 'personal');
     $id_hidden = new Element\Hidden('id');
     $id_hidden->setName('id');
     $firstname_text = new Element\Text('firstname');
     $firstname_text->setLabel('First name');
     $firstname_text->setLabelAttributes(array('class' => 'type_text'));
     $firstname_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...'));
     $lastname_text = new Element\Text('lastname');
     $lastname_text->setLabel('Last name');
     $lastname_text->setLabelAttributes(array('class' => 'type_text'));
     $lastname_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => true));
     $country_select = new Element\Select('country_id');
     $country_select->setLabel('Country');
     $country_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $country_select->setAttributes(array('class' => 'sel_chosen'));
     $country_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your country'));
     $state_select = new Element\Select('state_id');
     $state_select->setLabel('Province/State');
     $state_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $state_select->setAttributes(array('class' => 'sel_chosen', 'required' => true));
     $state_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your state'));
     $city_select = new Element\Select('city_id');
     $city_select->setLabel('City');
     $city_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $city_select->setAttributes(array('class' => 'sel_chosen', 'required' => true));
     $city_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your city'));
     $adress_text = new Element\Text('adress');
     $adress_text->setLabel('Adress');
     $adress_text->setLabelAttributes(array('class' => 'type_text'));
     $adress_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type adress in format (наш формат)'));
     $languages_select = new Element\Select('languages');
     $languages_select->setLabel('Languages');
     $languages_select->setLabelAttributes(array('class' => 'select', 'style' => 'float:left;'));
     $languages_select->setAttributes(array('class' => 'sel_chosen', 'multiple' => 'multiple', 'required' => true));
     $languages_select->setOptions(array('disable_inarray_validator' => true));
     $logo = new Element\Image('logo');
     $logo->setAttributes(array('src', '/images/11.jpg', 'style' => 'float:left;'));
     $file = new Element\File('file');
     $file->setLabelAttributes(array('style' => 'float:left;clear:both'));
     $this->add($id_hidden);
     $this->add($firstname_text);
     $this->add($lastname_text);
     $this->add($country_select);
     $this->add($state_select);
     $this->add($city_select);
     $this->add($adress_text);
     $this->add($languages_select);
     $this->add($logo);
     $this->add($file);
 }
 public function addElements()
 {
     // File Input
     $file = new Element\File('file');
     $file->setLabel('Multi File');
     $fileCollection = new Element\Collection('file-collection');
     $fileCollection->setOptions(array('count' => $this->numFileElements, 'allow_add' => false, 'allow_remove' => false, 'target_element' => $file));
     $this->add($fileCollection);
     // Text Input
     $text = new Element\Text('text');
     $text->setLabel('Text Entry');
     $this->add($text);
 }
Esempio n. 25
0
 public function init()
 {
     $id = new Element\Hidden('id');
     $this->add($id);
     $label = new Element\Text('label');
     $label->setLabel("label");
     $this->add($label);
     $fileupload = new Element\File('fileupload');
     $fileupload->setLabel("fileupload");
     $this->add($fileupload);
     $submit = new Element\Submit('submit');
     $submit->setValue("submit")->setLabel("submit");
     $this->add($submit);
 }
Esempio n. 26
0
 public function __construct($name = null)
 {
     // we want to ignore the name passed
     parent::__construct('person');
     $this->add(array('name' => 'id', 'type' => 'Hidden'));
     $this->add(array('name' => 'name', 'type' => 'Text', 'options' => array('label' => 'Name')));
     $this->add(array('name' => 'description', 'type' => 'Text', 'options' => array('label' => 'Description')));
     // File Input
     $file = new Element\File('image');
     $file->setLabel('Image')->setAttribute('id', 'image-file');
     $this->add($file);
     $this->add(array('name' => 'tags', 'type' => 'Hidden', 'attributes' => array('required' => 'required', 'id' => 'tags-input')));
     $this->add(array('name' => 'submit', 'type' => 'Submit', 'attributes' => array('value' => 'Go', 'id' => 'submitbutton'), 'options' => array('label' => 'Create')));
 }
 public function getForm(array $currencies, array $companies, array $contacts, array $statusList)
 {
     if (!$this->form) {
         $hidId = new Element\Hidden();
         $hidId->setName('proposalId');
         $txtCompanyId = new Element\Select();
         $txtCompanyId->setLabel('Company Name')->setName("companyId")->setAttribute('class', 'form-control')->setEmptyOption("--Choose Company--")->setValueOptions($companies);
         $txtContactId = new Element\Select();
         $txtContactId->setLabel('Contact Name')->setName('contactId')->setAttribute('class', 'form-control')->setEmptyOption("--Choose Contact--")->setValueOptions($contacts);
         $txtCode = new Element\Text();
         $txtCode->setLabel('Code')->setName('code')->setAttribute('class', 'form-control');
         $txtName = new Element\Text();
         $txtName->setLabel('Name')->setName('name')->setAttribute('class', 'form-control');
         $txtAmount = new Element\Number();
         $txtAmount->setName("amount")->setLabel('Amount')->setAttribute('class', 'form-control')->setAttributes(array('min' => '100', 'max' => '99999999999', 'step' => '100'));
         $selectCurrency = new Element\Select();
         $selectCurrency->setName('currencyId')->setLabel('Currency')->setAttribute('class', 'form-control')->setValueOptions($currencies);
         $txtProposalDate = new Element\Date('proposalDate');
         $txtProposalDate->setLabel('Date')->setAttributes(array('class' => 'form-control', 'allowPastDates' => true, 'momentConfig' => array('format' => 'YYYY-MM-DD')));
         $txtProposalFile = new Element\File();
         $txtProposalFile->setName('proposalFile')->setLabel('Upload file');
         $txtNodes = new Element\Textarea();
         $txtNodes->setLabel('Notes')->setName('notes')->setAttribute('class', 'form-control');
         $txtProposalBy = new Element\Text();
         $txtProposalBy->setName('proposalBy')->setLabel('Proposal By')->setAttribute('class', 'form-control');
         $txtGroupCode = new Element\Text();
         $txtGroupCode->setLabel('Group Code')->setName('group_code')->setAttribute('class', 'form-control');
         $txtStatus = new Element\Select();
         $txtStatus->setName('status')->setLabel('Status')->setAttribute('class', 'form-control')->setValueOptions($statusList);
         $form = new Form();
         $form->setAttribute('class', 'form-horizontal');
         $form->setAttribute('enctype', 'multipart/form-data');
         $form->add($hidId);
         $form->add($txtCompanyId);
         $form->add($txtContactId);
         $form->add($txtCode);
         $form->add($txtName);
         $form->add($txtAmount);
         $form->add($selectCurrency);
         $form->add($txtProposalDate);
         $form->add($txtProposalFile);
         $form->add($txtNodes);
         $form->add($txtProposalBy);
         $form->add($txtGroupCode);
         $form->add($txtStatus);
         $this->form = $form;
     }
     return $this->form;
 }
Esempio n. 28
0
 public function addElements()
 {
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'id', 'attributes' => array('type' => 'hidden')));
     $element = new Element\Text('title');
     $element->setAttributes(array('class' => 'username', 'size' => '30', 'class' => 'form-control', 'placeholder' => 'title'));
     $this->add($element);
     $element = new Element\Textarea('body');
     $element->setAttributes(array('size' => '30', 'class' => 'form-control editor', 'placeholder' => 'body'));
     $this->add($element);
     $element = new Element\File('thumb');
     $element->setLabel('Preview')->setAttributes(array('required' => false, 'class' => 'form-control', 'placeholder' => 'preview'));
     $this->add($element);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Send', 'id' => 'submitbutton', 'class' => 'form-control btn btn-primary')));
 }
Esempio n. 29
0
 public function __construct($name = null, $categories)
 {
     // we want to ignore the name passed
     parent::__construct('article');
     $this->add(array('name' => 'id', 'type' => 'Hidden'));
     $this->add(array('name' => 'title', 'required' => true, 'type' => 'Text', 'options' => array('label' => 'Title'), 'attributes' => array('class' => 'form-control')));
     $file = new Element\File('image');
     $file->setLabel('Image')->setAttribute('id', 'image');
     $this->add($file);
     $this->add(array('type' => 'Zend\\Form\\Element\\Select', 'required' => true, 'name' => 'category_id', 'options' => array('label' => 'Category', 'value_options' => $categories)));
     $this->add(array('name' => 'slug', 'required' => true, 'type' => 'Text', 'options' => array('label' => 'Slug'), 'attributes' => array('class' => 'form-control')));
     $this->add(array('name' => 'content', 'required' => true, 'type' => 'Textarea', 'options' => array('label' => 'Contenu'), 'attributes' => array('class' => 'form-control')));
     $this->add(array('name' => 'state', 'type' => 'Checkbox', 'options' => array('label' => 'Actif')));
     $this->add(array('name' => 'submit', 'type' => 'Submit', 'attributes' => array('value' => 'Ajouter', 'id' => 'submitbutton', 'class' => 'btn btn-success')));
     //        $this->addInputFilter();
 }
Esempio n. 30
0
File: File.php Progetto: coolms/file
 /**
  * {@inheritDoc}
  */
 public function getInputSpecification()
 {
     if (null === $this->inputSpecification) {
         $this->setInputSpecification(parent::getInputSpecification());
     }
     return $this->inputSpecification;
 }