/[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 562 by nhaye, Wed Oct 31 10:20:27 2012 UTC revision 569 by nhaye, Wed Oct 31 14:58:44 2012 UTC
# Line 4  Line 4 
4  require_once ("../gen/obj/consultation.class.php");  require_once ("../gen/obj/consultation.class.php");
5    
6  class consultation extends consultation_gen {  class consultation extends consultation_gen {
7          var $maj;      var $maj;
8      function consultation($id,&$db,$debug) {      function consultation($id,&$db,$debug) {
9          $this->constructeur($id,$db,$debug);          $this->constructeur($id,$db,$debug);
10      }// fin constructeur      }// fin constructeur
# Line 12  class consultation extends consultation_ Line 12  class consultation extends consultation_
12      function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire){      function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire){
13          if ($validation==0) {          if ($validation==0) {
14              if ($maj == 0){              if ($maj == 0){
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              }              }
                         else  
                                 if ( $maj == 1 )  
                                         $form->setVal("date_retour",date('d/m/Y'));  
18          }          }
19      }      }
20    
# Line 29  class consultation extends consultation_ Line 26  class consultation extends consultation_
26             $this->val[array_search("motivation",$this->champs)] != $val["motivation"] OR             $this->val[array_search("motivation",$this->champs)] != $val["motivation"] OR
27             $this->val[array_search("fichier",$this->champs)] != $val["fichier"]) {             $this->val[array_search("fichier",$this->champs)] != $val["fichier"]) {
28              $this->valF["lu"]=FALSE;              $this->valF["lu"]=FALSE;
29                $this->valF["date_retour"]=$this->dateDB(date('d/m/Y'));
30          }          }
31                    
32      }      }
# Line 63  class consultation extends consultation_ Line 61  class consultation extends consultation_
61              $form->setType('dossier', 'hiddenstatic');              $form->setType('dossier', 'hiddenstatic');
62          }          }
63          $form->setType('consultation', 'hidden');          $form->setType('consultation', 'hidden');
64            //setType pour  profil service
65            if($this->f->isAccredited('consultation_retour_avis_service')) {
66                $form->setType('dossier', 'hidden');
67                $form->setType('service', 'hidden');
68                $form->setType('date_envoi', 'hidden');
69                $form->setType('date_retour', 'hidden');
70                $form->setType('date_reception', 'hidden');
71                $form->setType('date_limite', 'hidden');
72                $form->setType('lu', 'hidden');
73            }
74    
75      }      }
76    
# Line 157  class consultation extends consultation_ Line 165  class consultation extends consultation_
165          return $annee."-".$mois."-".$jour ;          return $annee."-".$mois."-".$jour ;
166      }      }
167    
168          // =============================================      // =============================================
169      // Ajout du fielset      // Ajout du fielset
170      // Add fieldset      // Add fieldset
171      // =============================================      // =============================================
172          function setLayout(&$form, $maj){      function setLayout(&$form, $maj){
173                  if ( $maj < 2 OR $maj == 3 ) {          if ( $maj < 2 OR $maj == 3 ) {
174                          //Champs sur lequel s'ouvre le fieldset              if(!$this->f->isAccredited('consultation_retour_avis_service')) {
175                          $form->setBloc('dossier','D',"");                  //Champs sur lequel s'ouvre le fieldset
176                          $form->setFieldset('dossier','D',_('Consultation'));                  $form->setBloc('dossier','D',"");
177                            $form->setFieldset('dossier','D',_('Consultation'));
178                          //Champs sur lequel se ferme le fieldset      
179                          $form->setFieldset('date_envoi','F','');                  //Champs sur lequel se ferme le fieldset
180                          $form->setBloc('date_envoi','F');                  $form->setFieldset('date_envoi','F','');
181                          if ( $maj == 1 OR $maj == 3 ){                  $form->setBloc('date_envoi','F');
182                                  //Champs sur lequel s'ouvre le fieldset              }
183                                  $form->setBloc('date_reception','D',"");              if ( $maj == 1 OR $maj == 3 ){
184                                  $form->setFieldset('date_reception','D',_('Retour d\'avis'));                  //Champs sur lequel s'ouvre le fieldset
185                                    $form->setBloc('date_reception','D',"");
186                                  //Champs sur lequel se ferme le fieldset                  $form->setFieldset('date_reception','D',_('Retour d\'avis'));
187                                  $form->setFieldset('lu','F','');  
188                                  $form->setBloc('lu','F');                  //Champs sur lequel se ferme le fieldset
189                          }                  $form->setFieldset('lu','F','');
190                  }                  $form->setBloc('lu','F');
191                                        }
192          }          }
193                }
194        
195  }// fin classe  }// fin classe
196  ?>  ?>

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26