<?

class Produto_Form_Tiposolo extends Agro_Form {
	
	public function init() {
		$this->id = $this->createElement('hidden', 'id');
		$this->id->setDecorators($this->buttonDecorator);
		$this->addElement($this->id);
		
		$this->ds_tipo_solo = $this->createElement('text', 'ds_tipo_solo');
		$this->ds_tipo_solo->setDecorators($this->elementDecorator);
		$this->ds_tipo_solo->setAttrib('size', '30');
		$this->ds_tipo_solo->setRequired(true);
		$this->ds_tipo_solo->setAttrib('maxlength', '255');
		$this->ds_tipo_solo->setLabel('Nome');
		$this->addElement($this->ds_tipo_solo);
		
		$this->ds_chave = $this->createElement('text', 'ds_chave');
		$this->ds_chave->setDecorators($this->elementDecorator);
		$this->ds_chave->setRequired(true);
		$this->ds_chave->setAttrib('size', '30');
		$this->ds_chave->setAttrib('maxlength', '100');
		$this->ds_chave->setLabel('Chave');
		$this->addElement($this->ds_chave);
		
		$this->ds_descricao_solo = $this->createElement('text', 'ds_descricao_solo');
		$this->ds_descricao_solo->setDecorators($this->elementDecorator);
		$this->ds_descricao_solo->setRequired(true);
		$this->ds_descricao_solo->setAttrib('size', '30');
		$this->ds_descricao_solo->setAttrib('maxlength', '100');
		$this->ds_descricao_solo->setLabel('Descrição');
		$this->addElement($this->ds_descricao_solo);
		
		$this->save = $this->createElement('button', 'salvar', array('type'=>'submit'));
		$this->save->setDecorators($this->buttonDecorator);
		$this->save->setDecorators($this->buttonDecorator);
		$this->save->setLabel('Salvar');
		$this->addElement($this->save);
		
		$this->cancel = $this->createElement('button', 'cancelar', array('onclick'=>"location.href='/produto/tiposolo'"));
		$this->cancel->setDecorators($this->buttonDecorator);
		$this->cancel->setLabel('Cancelar');
		$this->addElement($this->cancel);
	}

}