<?

class Produto_Form_Ramo extends Agro_Form {
	public $id;
	public $ds_nome_ramo;
	
	public function init() {
		$this->id = $this->createElement('hidden', 'id');
		$this->id->setDecorators($this->buttonDecorator);
		$this->addElement($this->id);
		
		$this->ds_nome_ramo = $this->createElement('text', 'ds_nome_ramo');
		$this->ds_nome_ramo->setDecorators($this->elementDecorator);
		$this->ds_nome_ramo->setRequired(true);
		$this->ds_nome_ramo->setAttrib('size', '50');
		$this->ds_nome_ramo->setAttrib('maxlength', '40');
		$this->ds_nome_ramo->setLabel('Nome');
		$this->addElement($this->ds_nome_ramo);
		
		$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='/produto/ramo'"));
		$this->cancel->setDecorators($this->buttonDecorator);
		$this->cancel->setLabel('Cancelar');
		$this->addElement($this->cancel);
		
		//$this->addDisplayGroup(array('salvar', 'cancelar'), 'buttons');
	}
}