<?

class Produto_Form_Validacoesdensidade extends Agro_Form {
	public $id;
	public $ds_nome_grupo_variedade;
	
	public function init() {
		$this->id = $this->createElement('hidden', 'id');
		$this->id->setDecorators($this->buttonDecorator);
		$this->addElement($this->id);
		
		$this->id_validacao = $this->createElement('hidden', 'id_validacao');
		$this->id_validacao->setDecorators($this->buttonDecorator);
		$this->addElement($this->id_validacao);
		
		$PortaEnxerto = new Produto_Model_Validacoesportaenxerto();
		$this->id_grupo_portaenxerto = $this->createElement('select', 'id_grupo_portaenxerto');
		$this->id_grupo_portaenxerto->setDecorators($this->elementDecorator);
		$this->id_grupo_portaenxerto->addMultiOptions($PortaEnxerto->getCombo());
		$this->id_grupo_portaenxerto->setRequired(true);
		$this->id_grupo_portaenxerto->setLabel('Grupo de Portaenxerto');
		$this->addElement($this->id_grupo_portaenxerto);

  		$this->vl_densidade_minima = $this->createElement('text', 'vl_densidade_minima');
		$this->vl_densidade_minima->setDecorators($this->elementDecorator);
		$this->vl_densidade_minima->setRequired(true);
		$this->vl_densidade_minima->setAttrib('size', '20');
		$this->vl_densidade_minima->setAttrib('class', 'integer');
		$this->vl_densidade_minima->setAttrib('maxlength', '40');
		$this->vl_densidade_minima->setLabel('Densidade Mínima');
		$this->addElement($this->vl_densidade_minima);
  
		
		$this->vl_densidade_maxima = $this->createElement('text', 'vl_densidade_maxima');
		$this->vl_densidade_maxima->setDecorators($this->elementDecorator);
		$this->vl_densidade_maxima->setRequired(true);
		$this->vl_densidade_maxima->setAttrib('size', '20');
		$this->vl_densidade_maxima->setAttrib('class', 'integer');
		$this->vl_densidade_maxima->setAttrib('maxlength', '40');
		$this->vl_densidade_maxima->setLabel('Densidade Máxima');
		$this->addElement($this->vl_densidade_maxima);
  
  
  		$this->ds_nome_grupo_densidade = $this->createElement('text', 'ds_nome_grupo_densidade');
		$this->ds_nome_grupo_densidade->setDecorators($this->elementDecorator);
		$this->ds_nome_grupo_densidade->setRequired(true);
		$this->ds_nome_grupo_densidade->setAttrib('size', '50');
		$this->ds_nome_grupo_densidade->setAttrib('maxlength', '40');
		$this->ds_nome_grupo_densidade->setLabel('Nome');
		$this->addElement($this->ds_nome_grupo_densidade);
		
		$this->addElement('select', 'fl_ativo', array(
			'MultiOptions' => array(0=>'Não',1=>'Sim'),
			'decorators' => $this->elementDecorator,
			'label' => 'Ativo'
		));
		
		$this->save = $this->createElement('button', 'salvar', array('type'=>'submit'));
		$this->save->setDecorators($this->buttonDecorator);
		$this->save->setLabel('Salvar');
		$this->addElement($this->save);
	}
}
