add.ctp 1003 Bytes

<div class="documents form">
    <?= $this->Form->create($document) ?>
    <fieldset>
        <h2><i class="icon-plus"></i> Lier un document</h2>
        <?php
        	if(isset($materiel)) {
        		echo $this->Form->input('materiel_id', ['label' => 'N° materiel labo', 'options' => $materiel, 'default' => $this->passedArgs[0], 'readonly' => true]);
        	}
        	else if(isset($suivi)) {
        		echo $this->Form->input('suivi_id', ['label' => 'N° suivi', 'options' => $suivi, 'default' => $this->passedArgs[0], 'readonly' => true]);	
        	}
        	
            echo $this->Form->input('type_doc');
            echo $this->Form->input('description');
            echo $this->Form->input('chemin');
            
            
        ?>
    </fieldset>
    <?= $this->Form->submit(__('Valider')) ?>
    <?= $this->Form->end() ?>
</div>

<div class="actions">
	<?php 
		echo $this->element('menu');
		echo $this->element('menu_form', [ 'pluralHumanName' => 'Documents' ]);
	?>
</div>