Skip to content

Instantly share code, notes, and snippets.

@ingliths
Created April 14, 2020 16:37
Show Gist options
  • Select an option

  • Save ingliths/9b1b9d9f6a6af495bf11953e0d7827e4 to your computer and use it in GitHub Desktop.

Select an option

Save ingliths/9b1b9d9f6a6af495bf11953e0d7827e4 to your computer and use it in GitHub Desktop.
<div class="row divDeclaracaoMedica">
<div class="col-md-5">
<?php
// file[] => declaracao_medica[]
echo
$this->Form->input('declaracao_medica[]', [
'div' => ['class' => 'form-group withHelper' ],
'class' => 'form-control',
'type' => 'file',
'label' => 'Declaração Medica / Exame *',
'disabled' => $formDisabled || $formDisabledHomologa,
'multiple' => true]);
?>
<div id="helperDeclaracaoMedica" style="margin: 23px 0 0 5px; float: left; cursor: help;">
<?= $this->Html->image(('question_mark_blue.png')); ?>
</div>
</div>
<div class="col-md-5" style="margin-top: 24px;">
<?php
$existFile = (isset($this->data['Agendamento']['declaracao_medica_path']) && isset($this->data['Agendamento']['id']));
if($existFile){?>
<div class="btn-group">
<button data-toggle="dropdown" class="btn btn-info dropdown-toggle btn-sm" type="button"><?php echo __('label_arquivo') ?> <span class="caret"></span></button>
<ul role="menu" class="dropdown-menu listaAcoes">
<li><?php echo $this->Html->link(__('bt_file'),$this->data['Agendamento']['declaracao_medica_path'], array('class' => 'fa fa-file', 'title' => __('bt_file'),'target'=>'_blank','escape'=>false)); ?></li>
<?if(!$formExtra){?>
<li><?php echo $this->Html->link(__('bt_excluir'), array('action' => 'deleteFile',$id,'ppp') , array('class' => 'fa fa-trash-o','confirm' => 'Deseja realmente excluir esse arquivo?', 'title' => __('bt_excluir'))); ?></li>
<?}?>
</ul>
</div>
<? }?>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment