extranet/library/Web/Forms/RechercheEntreprise.php

122 lines
3.2 KiB
PHP
Raw Normal View History

2011-01-07 17:16:07 +00:00
<?php
2011-01-11 09:17:28 +00:00
class Form_RechercheEntreprise extends Zend_Form
{
2011-01-07 17:16:07 +00:00
2011-01-11 09:17:28 +00:00
public $elementDecorators = array(
'ViewHelper',
'Errors',
2011-04-01 12:14:40 +00:00
array('HtmlTag', array('tag' => 'div', 'class' => 'field')),
array('Label'),
2011-01-11 09:17:28 +00:00
);
public $buttonDecorators = array(
'ViewHelper'
);
2011-01-07 17:16:07 +00:00
public function init()
{
$this->setName('recherche');
2011-04-11 14:20:26 +00:00
$this->setAction('/recherche/liste');
2011-01-07 17:16:07 +00:00
$this->setMethod('post');
2011-04-14 13:22:15 +00:00
$this->addElement('text', 'siret', array(
2011-01-07 17:16:07 +00:00
'filters' => array('StringTrim'),
'label' => 'SIREN',
'required' => 'true',
2011-01-11 09:17:28 +00:00
'decorators' => $this->elementDecorators,
2011-04-01 12:14:40 +00:00
'attribs' => array(
'size' => 30,
'maxlength' => 20,
),
2011-01-11 09:17:28 +00:00
));
2011-04-11 14:20:26 +00:00
$this->addElement('hidden', 'type', array(
'value' => 'ent',
'decorators' => array('ViewHelper'),
));
2011-01-07 17:16:07 +00:00
$this->addElement('text', 'raisonSociale', array(
'filters' => array('StringTrim'),
'label' => 'RAISON SOCIALE / ENSEIGNE / SIGLE ',
'required' => 'true',
2011-01-11 09:17:28 +00:00
'decorators' => $this->elementDecorators,
2011-04-01 12:14:40 +00:00
'attribs' => array(
'size' => 30,
'maxlength' => 20,
),
2011-01-11 09:17:28 +00:00
));
2011-01-07 17:16:07 +00:00
$this->addElement('text', 'numero', array(
'filters' => array('StringTrim'),
2011-04-01 12:14:40 +00:00
'label' => 'N° & Voie',
2011-01-07 17:16:07 +00:00
'required' => 'true',
2011-01-11 09:17:28 +00:00
'decorators' => $this->elementDecorators,
2011-04-01 12:14:40 +00:00
'attribs' => array(
'size' => 2,
'maxlength' => 4,
),
2011-01-11 09:17:28 +00:00
));
2011-01-07 17:16:07 +00:00
$this->addElement('text', 'voie', array(
'filters' => array('StringTrim'),
2011-04-01 12:14:40 +00:00
'label' => '',
2011-01-07 17:16:07 +00:00
'required' => 'true',
2011-01-11 09:17:28 +00:00
'decorators' => $this->elementDecorators,
2011-04-01 12:14:40 +00:00
'attribs' => array(
'size' => 20,
'maxlength' => 100,
),
2011-01-11 09:17:28 +00:00
));
2011-01-07 17:16:07 +00:00
$this->addElement('text', 'cpVille', array(
'filters' => array('StringTrim'),
'label' => 'CP OU DÉP. / VILLE',
'required' => 'true',
2011-01-11 09:17:28 +00:00
'decorators' => $this->elementDecorators,
2011-04-01 12:14:40 +00:00
'attribs' => array(
'size' => 30,
'maxlength' => 30,
),
));
$this->addElement('text', 'telFax', array(
'filters' => array('StringTrim'),
'label' => 'TÉL / FAX',
'required' => 'true',
'decorators' => $this->elementDecorators,
'attribs' => array(
'size' => 30,
'maxlength' => 30,
),
2011-01-11 09:17:28 +00:00
));
2011-04-01 12:14:40 +00:00
$this->addElement('text', 'naf', array(
2011-01-07 17:16:07 +00:00
'filters' => array('StringTrim'),
2011-04-01 12:14:40 +00:00
'label' => 'NAF',
2011-01-07 17:16:07 +00:00
'required' => 'true',
2011-01-11 09:17:28 +00:00
'decorators' => $this->elementDecorators,
2011-04-01 12:14:40 +00:00
'attribs' => array(
'size' => 30,
'maxlength' => 30,
),
2011-01-11 09:17:28 +00:00
));
2011-04-15 12:27:48 +00:00
$this->addElement('select', 'pays', array(
'decorators' => $this->elementDecorators,
'label' => 'Pays',
'required' => true,
'multiOptions' => array(
'' => '',
'FR' => 'France',
'BE' => 'Belgique',
'ES' => 'Espagne',
'UK' => 'United Kingdom',
'NL' => 'Pays-Bas'),
));
2011-01-11 09:17:28 +00:00
$this->addElement('submit', 'submit', array(
2011-01-07 17:16:07 +00:00
'label' => 'Recherche',
'ignore' => true,
2011-04-04 11:27:20 +00:00
'class' => 'button',
2011-01-11 09:17:28 +00:00
'decorators' => $this->buttonDecorators,
2011-01-07 17:16:07 +00:00
));
2011-01-11 09:17:28 +00:00
$this->addElement('reset', 'reset', array(
2011-01-07 17:16:07 +00:00
'label' => 'Effacer',
'ignore' => true,
2011-04-04 11:27:20 +00:00
'class' => 'button',
'decorators' => $this->buttonDecorators,
2011-01-07 17:16:07 +00:00
));
}
}