<?

class Sistema_Form_CorretorEndereco extends Agro_Form {
	
	
	public function init() {
		
		$Estados = new Sistema_Model_Estados();
		$this->addElement('select', 'id_estado', array(
			'MultiOptions' => $Estados->fetchPairs('id', 'ds_nome_estado'),
			'decorators' => $this->elementDecorator,
			'label' => 'Estado'
		));
		
		$this->addElement('select', 'id_municipio', array(
			'decorators' => $this->elementDecorator,
			'RegisterInArrayValidator' => false,
			'label' => 'Município'
		));
		
		$this->addElement('text', 'ds_endereco_rua', array(
			'decorators' => $this->elementDecorator,
			'label' => 'Endereço',
			'maxlength' => 100,
			'size' => 40
		));
		
		$this->addElement('text', 'ds_endereco_nro', array(
			'decorators' => $this->elementDecorator,
			'label' => 'Número',
			'maxlength' => 100,
			'size' => 10
		));
		
		$this->addElement('text', 'ds_endereco_bairro', array(
			'decorators' => $this->elementDecorator,
			'label' => 'Bairro',
			'maxlength' => 100,
			'size' => 40
		));
		
		$this->addElement('text', 'ds_endereco_cep', array(
			'decorators' => $this->elementDecorator,
			'label' => 'CEP',
			'class' => 'cep',
			'maxlength' => 9,
			'size' => 9
		));
		
		$this->addElement('text', 'ds_endereco_complemento', array(
			'decorators' => $this->elementDecorator,
			'label' => 'Comp.',
			'maxlength' => 100,
			'size' => 10
		));
	}
}