<?

class Produto_Form_AtributoTipo extends Agro_Form {
	public $id;
	public $ds_chave_tipo_atributo;
	
	public function init() {
		$this->id = $this->createElement('hidden', 'id');
		$this->id->setDecorators($this->buttonDecorator);
		$this->addElement($this->id);
		
		$this->ds_chave_tipo_atributo = $this->createElement('text', 'ds_chave_tipo_atributo');
		$this->ds_chave_tipo_atributo->setDecorators($this->elementDecorator);
		$this->ds_chave_tipo_atributo->setRequired(true);
		$this->ds_chave_tipo_atributo->setAttrib('size', '50');
		$this->ds_chave_tipo_atributo->setAttrib('maxlength', '40');
		$this->ds_chave_tipo_atributo->setLabel('Tipo');
		$this->addElement($this->ds_chave_tipo_atributo);
		
		$this->ds_descricao_tipo_atributo = $this->createElement('textarea', 'ds_descricao_tipo_atributo');
		$this->ds_descricao_tipo_atributo->setDecorators($this->elementDecorator);
		$this->ds_descricao_tipo_atributo->setRequired(true);
		$this->ds_descricao_tipo_atributo->setAttrib('rows', '5');
		$this->ds_descricao_tipo_atributo->setAttrib('cols', '48');
		$this->ds_descricao_tipo_atributo->setAttrib('maxlength', '200');
		$this->ds_descricao_tipo_atributo->setLabel('Descrição');
		$this->addElement($this->ds_descricao_tipo_atributo);
		
		$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/atributotipo'"));
		$this->cancel->setDecorators($this->buttonDecorator);
		$this->cancel->setLabel('Cancelar');
		$this->addElement($this->cancel);
		
	}
}