<?php

class Safra13_Form_Lf001 extends Sinistro_Form_LaudoFinal {
       
    public function init($idLaudoFinal = null) {

    	parent::init($idLaudoFinal);
    	
        $this->addElement('radio', 'fl_acompanhado_chuva', array(
            'MultiOptions' => array(1=>'Sim',0=>'Não'),
            'decorators' => $this->elementDecorator,
            'disableLoadDefaultDecorators' => true,
            'separator'=>'',
            'label' => 'Acompanhado de Chuva',
    		'order' => 501,
        	'required' => true,
        	'ignore' => $this->getReadOnly(),
			'readonly' => $this->getReadOnly()
        ));
        
        $this->addElement('radio', 'fl_acompanhado_vento', array(
            'MultiOptions' => array(1=>'Sim',0=>'Não'),
            'decorators' => $this->elementDecorator,
            'disableLoadDefaultDecorators' => true,
            'separator'=>'',
            'label' => 'Acompanhado de Vento',
    		'order' => 502,
        	'required' => true,
        	'ignore' => $this->getReadOnly(),
			'readonly' => $this->getReadOnly()
        ));
        
		$this->addElement('text', 'ds_direcao_evento', array(
			'decorators' => $this->elementDecorator,
			'disableLoadDefaultDecorators' => true,
			'label' => 'Direção do evento',
    		'order' => 503,
    		'required' => true,
			'ignore' => $this->getReadOnly(),
			'readonly' => $this->getReadOnly()
		));
		
		$this->addElement('text', 'ds_diametro_medio_granizo', array(
			'decorators' => $this->elementDiametroDecorator,
			'disableLoadDefaultDecorators' => true,
			'label' => 'Diâmetro médio do Granizo',
			'class' => 'integer',
    		'order' => 504,
    		'description' => 'mm',
			'required' => true,
			'ignore' => $this->getReadOnly(),
			'readonly' => $this->getReadOnly()
		));
        
        $this->addDisplayGroup(
            array(
            	'fl_evento_nao_constatado',
                'ds_coordenadas', 
                'fl_acompanhado_chuva',
                'fl_acompanhado_vento',
                'ds_direcao_evento',
                'ds_diametro_medio_granizo',
                'fl_area_atingida'
            ), 
            'informacoes-basicas',
            array(
                'legend'=>'Informações Básicas',
                'order'=>505,
                'disableLoadDefaultDecorators' => true,
                'decorators'=>$this->fieldsetDecorator
            )
        );
    }

    public $elementDiametroDecorator = array (
        'ViewHelper',
        array(
            array(
            	'unidadeMM'=>'Description'
            ),
            array(
                'tag'=>'span'
            )
        ),
        'Errors',
        'Label'
    );
}