<?php

class Sistema_Form_AssessoriaEndereco 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',
			'required' => true
		));

		$this->addElement('select', 'id_municipio', array(
			'decorators' => $this->elementDecorator,
			'RegisterInArrayValidator' => false,
			'label' => 'Município',
			'required' => true
		));

		$this->addElement('text', 'ds_endereco_rua', array(
			'decorators' => $this->elementDecorator,
			'label' => 'Endereço',
			'required' => true,
			'maxlength' => 100,
			'size' => 40
		));

		$this->addElement('text', 'ds_endereco_nro', array(
			'decorators' => $this->elementDecorator,
			'label' => 'Número',
			'required' => true,
			'maxlength' => 100,
			'size' => 10
		));

		$this->addElement('text', 'ds_endereco_bairro', array(
			'decorators' => $this->elementDecorator,
			'label' => 'Bairro',
			'required' => true,
			'maxlength' => 100,
			'size' => 40
		));

		$this->addElement('text', 'ds_endereco_cep', array(
			'decorators' => $this->elementDecorator,
			'label' => 'CEP',
			'class' => 'cep',
			'required' => true,
			'maxlength' => 9,
			'placeholder' => 'CEP',
			'size' => 9
		));

		$this->addElement('text', 'ds_endereco_complemento', array(
			'decorators' => $this->elementDecorator,
			'label' => 'Comp.',
			'maxlength' => 100,
			'size' => 10
		));
	}
}