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 |
|
if($this->f->isAccredited('consultation_retour_avis_suivi') OR |
20 |
|
$this->f->isAccredited('consultation_retour_avis_service')) { |
21 |
|
$form->setVal("date_retour",date('d/m/Y')); |
22 |
|
} |
23 |
|
} |
24 |
|
} |
25 |
|
} |
26 |
|
|
27 |
|
function setVal(&$form, $maj, $validation, &$db) { |
28 |
|
if($maj == 1) { |
29 |
|
$form->setVal("date_retour",date('d/m/Y')); |
30 |
} |
} |
31 |
} |
} |
32 |
|
|
33 |
function setvalF($val) { |
function setvalF($val) { |
34 |
parent::setValF($val); |
parent::setValF($val); |
35 |
|
if($this->maj==0) { |
36 |
|
$this->valF["date_reception"]=$this->valF["date_envoi"]; |
37 |
|
} |
38 |
// Si un retour d'avis est modifie on passe "lu" a false |
// Si un retour d'avis est modifie on passe "lu" a false |
39 |
if($this->maj==1 AND ($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 |
40 |
$this->val[array_search("date_retour",$this->champs)] != $val["date_retour"] OR |
$this->val[array_search("date_retour",$this->champs)] != $val["date_retour"] OR |
41 |
$this->val[array_search("motivation",$this->champs)] != $val["motivation"] OR |
$this->val[array_search("motivation",$this->champs)] != $val["motivation"] OR |
42 |
$this->val[array_search("fichier",$this->champs)] != $val["fichier"])) { |
$this->val[array_search("fichier",$this->champs)] != $val["fichier"])) { |
43 |
$this->valF["lu"]=FALSE; |
$this->valF["lu"]=FALSE; |
|
$this->valF["date_retour"]=$this->dateDB(date('d/m/Y')); |
|
44 |
} |
} |
45 |
|
|
46 |
} |
} |
67 |
$form->setType('date_reception', 'hidden'); |
$form->setType('date_reception', 'hidden'); |
68 |
$form->setType('date_limite', 'hidden'); |
$form->setType('date_limite', 'hidden'); |
69 |
$form->setType('lu', 'hidden'); |
$form->setType('lu', 'hidden'); |
70 |
|
$form->setType('fichier', 'upload2'); |
71 |
} else { |
} else { |
72 |
|
$form->setType('dossier', 'hiddenstatic'); |
73 |
$form->setType('date_envoi', 'hiddenstaticdate'); |
$form->setType('date_envoi', 'hiddenstaticdate'); |
74 |
$form->setType('date_limite', 'hiddenstaticdate'); |
$form->setType('date_limite', 'hiddenstaticdate'); |
75 |
|
if($this->f->isAccredited('consultation_modifier_date_reception')) { |
76 |
|
$form->setType('date_reception', 'hiddenstaticdate'); |
77 |
|
} else { |
78 |
|
$form->setType('date_reception', 'date2'); |
79 |
|
} |
80 |
$form->setType('service', 'selecthiddenstatic'); |
$form->setType('service', 'selecthiddenstatic'); |
81 |
$form->setType('date_retour', 'date2'); |
$form->setType('date_retour', 'date2'); |
82 |
$form->setType('avis_consultation', 'select'); |
$form->setType('avis_consultation', 'select'); |
83 |
$form->setType('motivation', 'textarea'); |
$form->setType('motivation', 'textarea'); |
84 |
$form->setType('fichier', 'upload2'); |
if(!isset($this->parameters['retourformulaire'])) { |
85 |
|
$form->setType('fichier', 'upload'); |
86 |
|
} else { |
87 |
|
$form->setType('fichier', 'upload2'); |
88 |
|
} |
89 |
//Affichage du champ en modification pour le prifil instructeur |
//Affichage du champ en modification pour le prifil instructeur |
90 |
if(!$this->f->isAccredited('consultation_modifier_lu')) { |
if(!$this->f->isAccredited('consultation_modifier_lu')) { |
91 |
$form->setType('lu', 'hidden'); |
$form->setType('lu', 'hidden'); |
92 |
} |
} |
93 |
} |
} |
94 |
} |
} |
|
$form->setType('dossier', 'hiddenstatic'); |
|
95 |
} |
} |
96 |
$form->setType('consultation', 'hidden'); |
$form->setType('consultation', 'hidden'); |
97 |
//setType pour profil service |
//setType pour profil service |
215 |
} |
} |
216 |
} |
} |
217 |
} |
} |
218 |
|
|
219 |
|
/** Surcharge de la methode retour afin de retourner sur la page de saisie de |
220 |
|
* code barre si besoin |
221 |
|
**/ |
222 |
|
function retour($premier = 0, $recherche = "", $tricol = "") { |
223 |
|
$params ="obj=".get_class($this); |
224 |
|
if($this->getParameter("retour")=="form") { |
225 |
|
$params .= "&idx=".$this->getParameter("idx"); |
226 |
|
$params .= "&action=3"; |
227 |
|
} |
228 |
|
$params .= "&premier=".$this->getParameter("premier"); |
229 |
|
$params .= "&tricol=".$this->getParameter("tricol"); |
230 |
|
$params .= "&recherche=".$this->getParameter("recherche"); |
231 |
|
$params .= "&selectioncol=".$this->getParameter("selectioncol"); |
232 |
|
$params .= "&advs_id=".$this->getParameter("advs_id"); |
233 |
|
$params .= "&valide=".$this->getParameter("valide"); |
234 |
|
echo "\n<a class=\"retour\" "; |
235 |
|
echo "href=\""; |
236 |
|
// |
237 |
|
|
238 |
|
if($this->getParameter("retour")=="form" AND !($this->getParameter("validation")>0 AND $this->getParameter("maj")==2 AND $this->correct)) { |
239 |
|
echo "form.php?".$params; |
240 |
|
} elseif($this->getParameter("retour")=="avis_code_barre") { |
241 |
|
echo "../app/avis_code_barre.php"; |
242 |
|
} else { |
243 |
|
echo "tab.php?".$params; |
244 |
|
} |
245 |
|
// |
246 |
|
echo "\""; |
247 |
|
echo ">"; |
248 |
|
// |
249 |
|
echo _("Retour"); |
250 |
|
// |
251 |
|
echo "</a>\n"; |
252 |
|
|
253 |
|
} |
254 |
|
|
255 |
}// fin classe |
}// fin classe |
256 |
?> |
?> |