/[openfoncier]/trunk/obj/document_numerise.class.php
ViewVC logotype

Diff of /trunk/obj/document_numerise.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1894 by softime, Tue May 21 13:48:45 2013 UTC revision 1895 by nhaye, Thu May 23 14:58:09 2013 UTC
# Line 12  class document_numerise extends document Line 12  class document_numerise extends document
12    
13      function setType(&$form,$maj) {      function setType(&$form,$maj) {
14          parent::setType($form,$maj);          parent::setType($form,$maj);
15            //type
16          //Champs cachés          if ($maj==0){ //ajout
17          $form->setType('document_numerise','hidden');              $form->setType('nom_fichier','hidden');
18          $form->setType('dossier','hidden');              if($this->retourformulaire == "") {
19          $form->setType('nom_fichier','hidden');                  $form->setType('uid','upload');
20                } else {
21          //                  $form->setType('uid','upload2');
22          if ($maj == 0) {              }
23              $form->setType('uid', 'upload2');              if($this->retourformulaire=='dossier_instruction'
24                   and $form->val['dossier'] == $this->getParameter('idxformulaire')) {
25                    $form->setType('dossier','hidden');
26                } else {
27                    $form->setType('dossier','select');
28                }
29            }// fin ajout
30            if ($maj==1){ //modifier
31                $form->setType('nom_fichier','hiddenstatic');
32                if($this->retourformulaire == "") {
33                    $form->setType('uid','upload');
34                } else {
35                    $form->setType('uid','upload2');
36                }
37                if($this->retourformulaire=='dossier_instruction'
38                   and $form->val['dossier'] == $this->getParameter('idxformulaire')) {
39                    $form->setType('dossier','hidden');
40                } else {
41                    $form->setType('dossier','select');
42                }
43            }// fin modifier
44    
45            // Mode supprimer
46            if ($maj==2){
47                $form->setType('nom_fichier','filestatic');
48          }          }
49    
50            if ($maj==3){ //modifier
51                $form->setType('nom_fichier','hiddenstatic');
52            }
53      }      }
54    
     /**  
      * Méthode de traitement des données retournées par le formulaire  
      */  
     function setvalF($val) {  
         parent::setvalF($val);  
   
         //Génération automatique nom du fichier  
         $this->valF['nom_fichier'] = $this->generateFilename($this->valF["date_creation"], $this->get_document_numerise_type_code_by_id($this->valF["document_numerise_type"]));  
   
     }  
   
     /**  
      * Permet de définir les valeurs des champs du sous-formulaire  
      */  
55      function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){      function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
56          parent::setValsousformulaire($form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,$db,$DEBUG);          parent::setValsousformulaire($form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,$db,$DEBUG);
   
57          $this->retourformulaire = $retourformulaire;          $this->retourformulaire = $retourformulaire;
   
         //  
58          if($validation == 0) {          if($validation == 0) {
59              $form->setVal('dossier', $idxformulaire);              if($retourformulaire =='dossier' OR $retourformulaire =='dossier_instruction') {
60          }                  $form->setVal('dossier', $idxformulaire);
61                }
62            }// fin validation
63      }// fin setValsousformulaire      }// fin setValsousformulaire
64    
65    
66      /**      /**
67       * Permet d’effectuer des actions avant l’insertion des données dans la base       * Méthode de traitement des données retournées par le formulaire
68       */       */
69      function triggerajouter($id, &$db = NULL, $val = array(), $DEBUG = false) {      function setvalF($val) {
70            parent::setvalF($val);
71    
72            //Génération automatique nom du fichier
73            $this->valF['nom_fichier'] = $this->generateFilename($this->valF["date_creation"], $this->get_document_numerise_type_code_by_id($this->valF["document_numerise_type"]));
74    
         //Création du fichier sur la GED  
           
75      }      }
76    
77      /**      /**
# Line 152  class document_numerise extends document Line 166  class document_numerise extends document
166      }      }
167    
168  }// fin classe  }// fin classe
 ?>  
169    ?>

Legend:
Removed from v.1894  
changed lines
  Added in v.1895

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26