/[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 560 by vpihour, Tue Oct 30 14:05:14 2012 UTC revision 561 by nhaye, Wed Oct 31 09:57:15 2012 UTC
# Line 21  class consultation extends consultation_ Line 21  class consultation extends consultation_
21          }          }
22      }      }
23    
24        function setvalF($val) {
25            parent::setValF($val);
26            // Si un retour d'avis est modifie on passe "lu" a false
27            if($this->val[array_search("avis_consultation",$this->champs)] != $val["avis_consultation"] OR
28               $this->val[array_search("date_retour",$this->champs)] != $val["date_retour"] OR
29               $this->val[array_search("motivation",$this->champs)] != $val["motivation"] OR
30               $this->val[array_search("fichier",$this->champs)] != $val["fichier"]) {
31                $this->valF["lu"]=FALSE;
32            }
33            
34        }
35        
36      function setType(&$form,$maj) {      function setType(&$form,$maj) {
37          parent::setType($form,$maj);          parent::setType($form,$maj);
38          if ($maj < 2) { //ajouter et modifier [add and modify]          if ($maj < 2) { //ajouter et modifier [add and modify]
# Line 30  class consultation extends consultation_ Line 42  class consultation extends consultation_
42                  $form->setType('date_limite', 'hidden');                  $form->setType('date_limite', 'hidden');
43                  $form->setType('date_retour', 'hidden');                  $form->setType('date_retour', 'hidden');
44                  $form->setType('avis_consultation', 'hidden');                  $form->setType('avis_consultation', 'hidden');
45                                  $form->setType('motivation', 'hidden');                  $form->setType('motivation', 'hidden');
46                                  $form->setType('fichier', 'hidden');                  $form->setType('fichier', 'hidden');
47                                  $form->setType('lu', 'hidden');                  $form->setType('lu', 'hidden');
48                                  $form->setType('date_reception', 'hidden');                  $form->setType('date_reception', 'hidden');
49              }else{   // modify              }else{   // modify
50                  $form->setType('date_envoi', 'hiddenstaticdate');                  $form->setType('date_envoi', 'hiddenstaticdate');
51                                  $form->setType('date_limite', 'hiddenstaticdate');                                  $form->setType('date_limite', 'hiddenstaticdate');
52                  $form->setType('service', 'selecthiddenstatic');                  $form->setType('service', 'selecthiddenstatic');
53                  $form->setType('date_retour', 'date2');                  $form->setType('date_retour', 'date2');
54                  $form->setType('avis_consultation', 'select');                  $form->setType('avis_consultation', 'select');
55                                  $form->setType('motivation', 'textarea');                  $form->setType('motivation', 'textarea');
56                                  $form->setType('fichier', 'upload2');                  $form->setType('fichier', 'upload2');
57                    if(!$this->f->isAccredited('consultation_modifier_lu')) {
58                        $form->setType('lu', 'hidden');
59                    }
60              }              }
61              $form->setType('dossier', 'hiddenstatic');              $form->setType('dossier', 'hiddenstatic');
62          }          }
63          $form->setType('consultation', 'hidden');          $form->setType('consultation', 'hidden');
64    
         $form->setType('consultation', 'hidden');  
65      }      }
66    
67      // TRIGGER AVANT MODIFICATION DE DONNEES      // TRIGGER AVANT MODIFICATION DE DONNEES

Legend:
Removed from v.560  
changed lines
  Added in v.561

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26