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

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

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

revision 569 by nhaye, Wed Oct 31 14:58:44 2012 UTC revision 591 by nhaye, Mon Nov 5 10:05:15 2012 UTC
# Line 15  class consultation extends consultation_ Line 15  class consultation extends consultation_
15                  $form->setVal("dossier", $idxformulaire);                  $form->setVal("dossier", $idxformulaire);
16                  $form->setVal("date_envoi",date('d/m/Y'));                  $form->setVal("date_envoi",date('d/m/Y'));
17              }              }
18                if($maj == 1) {
19                     $form->setVal("date_retour",date('d/m/Y'));
20                }
21            }
22        }
23        
24        function setVal(&$form, $maj, $validation, &$db) {
25            if($maj == 1) {
26                 $form->setVal("date_retour",date('d/m/Y'));
27          }          }
28      }      }
29    
30      function setvalF($val) {      function setvalF($val) {
31          parent::setValF($val);          parent::setValF($val);
32            if($this->maj==0) {
33                $this->valF["date_reception"]=$this->valF["date_envoi"];
34            }
35          // Si un retour d'avis est modifie on passe "lu" a false          // Si un retour d'avis est modifie on passe "lu" a false
36          if($this->val[array_search("avis_consultation",$this->champs)] != $val["avis_consultation"] OR          if($this->maj==1 AND ($this->val[array_search("avis_consultation",$this->champs)] != $val["avis_consultation"] OR
37             $this->val[array_search("date_retour",$this->champs)] != $val["date_retour"] OR             $this->val[array_search("date_retour",$this->champs)] != $val["date_retour"] OR
38             $this->val[array_search("motivation",$this->champs)] != $val["motivation"] OR             $this->val[array_search("motivation",$this->champs)] != $val["motivation"] OR
39             $this->val[array_search("fichier",$this->champs)] != $val["fichier"]) {             $this->val[array_search("fichier",$this->champs)] != $val["fichier"])) {
40              $this->valF["lu"]=FALSE;              $this->valF["lu"]=FALSE;
41              $this->valF["date_retour"]=$this->dateDB(date('d/m/Y'));              $this->valF["date_retour"]=$this->dateDB(date('d/m/Y'));
42          }          }
# Line 45  class consultation extends consultation_ Line 57  class consultation extends consultation_
57                  $form->setType('lu', 'hidden');                  $form->setType('lu', 'hidden');
58                  $form->setType('date_reception', 'hidden');                  $form->setType('date_reception', 'hidden');
59              }else{   // modify              }else{   // modify
60                  $form->setType('date_envoi', 'hiddenstaticdate');                  if($this->f->isAccredited('consultation_retour_avis_service')) {
61                  $form->setType('date_limite', 'hiddenstaticdate');                      $form->setType('dossier', 'hidden');
62                  $form->setType('service', 'selecthiddenstatic');                      $form->setType('service', 'hidden');
63                  $form->setType('date_retour', 'date2');                      $form->setType('date_envoi', 'hidden');
64                  $form->setType('avis_consultation', 'select');                      $form->setType('date_retour', 'hidden');
65                  $form->setType('motivation', 'textarea');                      $form->setType('date_reception', 'hidden');
66                  $form->setType('fichier', 'upload2');                      $form->setType('date_limite', 'hidden');
                   
                 //Affichage du champ en modification pour le prifil instructeur  
                 if(!$this->f->isAccredited('consultation_modifier_lu')) {  
67                      $form->setType('lu', 'hidden');                      $form->setType('lu', 'hidden');
68                        $form->setType('fichier', 'upload2');
69                    } else {
70                        $form->setType('dossier', 'hiddenstatic');
71                        $form->setType('date_envoi', 'hiddenstaticdate');
72                        $form->setType('date_limite', 'hiddenstaticdate');
73                        $form->setType('date_reception', 'hiddenstaticdate');
74                        $form->setType('service', 'selecthiddenstatic');
75                        $form->setType('date_retour', 'date2');
76                        $form->setType('avis_consultation', 'select');
77                        $form->setType('motivation', 'textarea');
78                        if(!isset($this->parameters['retourformulaire'])) {
79                            $form->setType('fichier', 'upload');
80                        } else {
81                            $form->setType('fichier', 'upload2');
82                        }
83                        //Affichage du champ en modification pour le prifil instructeur
84                        if(!$this->f->isAccredited('consultation_modifier_lu')) {
85                            $form->setType('lu', 'hidden');
86                        }
87                  }                  }
88              }              }
             $form->setType('dossier', 'hiddenstatic');  
89          }          }
90          $form->setType('consultation', 'hidden');          $form->setType('consultation', 'hidden');
91          //setType pour  profil service          //setType pour  profil service
         if($this->f->isAccredited('consultation_retour_avis_service')) {  
             $form->setType('dossier', 'hidden');  
             $form->setType('service', 'hidden');  
             $form->setType('date_envoi', 'hidden');  
             $form->setType('date_retour', 'hidden');  
             $form->setType('date_reception', 'hidden');  
             $form->setType('date_limite', 'hidden');  
             $form->setType('lu', 'hidden');  
         }  
92    
93      }      }
94    

Legend:
Removed from v.569  
changed lines
  Added in v.591

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26