Blame view

src/Template/Documents/add.ctp 1.57 KB
64fba1a2   Alexandre   Base du projet : ...
1

4fd23929   Alexandre   Version: 2.5.0
2
<div class="documents form">
9b4da83b   Alexandre   Version: 2.5.0.0
3
    <?= $this->Form->create($document, ['type' => 'file']) ?>
6c4edfa3   Alexandre   First Commit LabI...
4
    <fieldset>
4dae83a2   Alexandre   Version: 2.5.1.0
5
6
7
8
9
10
    <?php 
    	if(isset($photo)) {
    		echo '<h2><i class="icon-plus"></i> Lier une photo</h2>';
    	}else {
    		echo '<h2><i class="icon-plus"></i> Lier un document</h2>';
    	}
4fd23929   Alexandre   Version: 2.5.0
11
        	if(isset($materiel)) {
440caf8f   Alexandre   Version: 2.4.3.0
12
        		echo $this->Form->input('materiel_id', ['label' => 'N° materiel labo', 'options' => $materiel, 'default' => $this->passedArgs[0], 'readonly' => true]);
4fd23929   Alexandre   Version: 2.5.0
13
14
        	}
        	else if(isset($suivi)) {
440caf8f   Alexandre   Version: 2.4.3.0
15
        		echo $this->Form->input('suivi_id', ['label' => 'N° suivi', 'options' => $suivi, 'default' => $this->passedArgs[0], 'readonly' => true]);	
4fd23929   Alexandre   Version: 2.5.0
16
17
        	}
        	
9b4da83b   Alexandre   Version: 2.5.0.0
18
19
        	echo $this->Form->input('nom');
        	echo $this->Form->input('type_document_id', ['label' => 'Type', 'options' => $typesD, 'default' => 1]);
4fd23929   Alexandre   Version: 2.5.0
20
            echo $this->Form->input('description');
4dae83a2   Alexandre   Version: 2.5.1.0
21
22
23
24
25
26
27
28
29
30
            echo $this->Form->input('chemin_file', ['label' => 'Fichier ('.substr($configuration->taille_max_doc/(1024*1024), 0, 4).' Mo max)', 'type' => 'file']);
            
            
            if(isset($photo)) {
            	echo $this->Form->hidden('photo', ['default' => 1]);
            }
            else {
            	echo $this->Form->hidden('photo', ['default' => 0]);
            }
           
4fd23929   Alexandre   Version: 2.5.0
31
32
            
            
6c4edfa3   Alexandre   First Commit LabI...
33
34
        ?>
    </fieldset>
4fd23929   Alexandre   Version: 2.5.0
35
    <?= $this->Form->submit(__('Valider')) ?>
6c4edfa3   Alexandre   First Commit LabI...
36
37
    <?= $this->Form->end() ?>
</div>
4fd23929   Alexandre   Version: 2.5.0
38
39
40
41
42
43
44

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