<form class="formDefault" id="formDefault" name="formDefault" method="post">
	<div id="tabs">
		<ul>
			<li><a href="#tabs-aba1">Formulário de Aviso de Sinistro</a></li>
		</ul>
		
		<div class="geral">
			<div id="tabs-aba1">
				<?=$this->title('Informações do Sinistro');?>				
				
				<div class="padding-10">
					<div class="row">
						<div class="field">
							<label>Pessoa de Contato</label>
							<input type="texto" name="pessoa_contato" size="50" value="<? echo $this->post['pessoa_contato']; ?>" />
						</div>
						
						<div class="field">
							<label for="hr_sinistro">Telefone</label>
							<input type="text" name="telefone_contato" class="telefone" value="<? echo $this->post['telefone_contato']; ?>" /> 
						</div>
					</div>
					
					<div class="row">
						<div class="field">
							<label class="required">Dt. Sinistro</label>
							<input type="texto" name="data_sinistro" class="data" value="<? echo $this->post['data_sinistro']; ?>" />
						</div>
						
						<div class="field">
							<label for="hr_sinistro">Hora</label>
							<input type="text" name="hora_sinistro" class="hora" value="<? echo $this->post['hora_sinistro']; ?>" /> 
						</div>
						
						<? if ($this->proposta->checkCobertura('COB_QUEDA_PARREIRAL')): ?>
							<div class="field">
								<label for="fl_ocorrencia_queda_parreiral">Ocorreu Queda de Parreiral?</label>
								<select name="fl_ocorrencia_queda_parreiral">
									<option value="0">Não</option>
									<option value="1">Siml</option>
								</select> 
							</div>
						<? endif; ?>
						
						<? if ($this->proposta->checkCobertura('COB_REPLANTIO')): ?>
							<div class="field">
								<label for="fl_ocorrencia_replantio">Ocorreu Replantio?</label>
								<select name="fl_ocorrencia_replantio">
									<option value="0">Não</option>
									<option value="1">Siml</option>
								</select> 
							</div>
						<? endif; ?>
						
					</div>
				</div>
				
				<div class="padding-10">
					<div class="row">
						<div class="field">
							<label class="required">Eventos</label>
							<table width="100%">
								<? foreach($this->eventos as $evento): ?>
									<? $checked = (is_array($this->post['eventos']) ? (in_array($evento['id'], $this->post['eventos']) ? ' checked' : '') : '');?>
									<tr>
										<td nowrap="nowrap"><input type="checkbox" name="eventos[]" value="<?=$evento['id']?>" id="evento<?=$evento['id']?>" <?=$checked?> /></td>
										<td><label for="evento<?=$evento['id']?>"><?=$evento['ds_nome_evento']?></label></td>
									</tr>
								<? endforeach; ?>
							</table>
						</div>
					</div>
				</div>
				
				<br style="clear: both;" />
				
				<?=$this->title('Observações do Sinistro');?>
				<div class="padding-10">
					<div class="row">
						<textarea name="observacao" rows="5" style="width: 100%"><? echo $this->post['observacao']?></textarea>
					</div>
				</div>
				
				<br style="clear: both;" />
			</div>
		</div>
		
		<ul id="buttons" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
			<li><button name="salvar" id="salvar" type="submit">Salvar</button></li>
		</ul>
	</div>
	
</form>