<?php

class Seguro_Form_Cliente extends Agro_Form {
	
	public function init() {
		$this->addElement('hidden', 'id', array(
			'decorators' => $this->buttonDecorator));
		
		$this->addElement('text', 'ds_nome_cliente', array(
			'decorators' => $this->elementDecorator,
			'label' => 'Nome',
			'maxlength' => 100,
			'size' => 70,
			'class' => 'upper',
			'required' => true
		));
		
		$this->addElement('select', 'tp_pessoa', array(
			'MultiOptions' => array('F'=>'FÍSICA','J'=>'JURÍDICA'),
			'decorators' => $this->elementDecorator,
			'label' => 'Tipo Pessoa',
			'required' => false
		));
		
		$this->addElement('text', 'cpf_cnpj', array(
			'decorators' => $this->elementDecorator,
			'label' => 'CPF/CNPJ',
			'required' => false,
			'maxlength' => 20,
			'class' => 'cpf_cnpj',
			'size' => 20
		));
		
		
		
		$this->addElement('text', 'ds_descricao_cliente', array(
			'decorators' => $this->elementDecorator,
			'label' => 'Descrição',
			'required' => false,
			'maxlength' => 100,
			'size' => 70
		));

		$this->save = $this->createElement('button', 'salvar', array('type'=>'submit'));
		$this->save->setDecorators($this->buttonDecorator);
		$this->save->setLabel('Salvar');
		$this->addElement($this->save);
		
		$this->cancel = $this->createElement('button', 'cancelar', array('onclick'=>"location.href='/seguro/cliente'"));
		$this->cancel->setDecorators($this->buttonDecorator);
		$this->cancel->setLabel('Cancelar');
		$this->addElement($this->cancel);
		
	}
}

