12 |
|
|
13 |
function setType(&$form,$maj) { |
function setType(&$form,$maj) { |
14 |
parent::setType($form, $maj); |
parent::setType($form, $maj); |
15 |
//type |
|
16 |
if ($maj==0){ //ajout |
//En ajout ou modification pour l'instructeur |
17 |
if(($this->retourformulaire=='dossier' |
if ( $maj < 2 && |
18 |
|
( |
19 |
|
$this->retourformulaire=='dossier' |
20 |
|| $this->retourformulaire=='dossier_instruction' |
|| $this->retourformulaire=='dossier_instruction' |
21 |
|| $this->retourformulaire=='dossier_instruction_mes_encours' |
|| $this->retourformulaire=='dossier_instruction_mes_encours' |
22 |
|| $this->retourformulaire=='dossier_instruction_tous_encours' |
|| $this->retourformulaire=='dossier_instruction_tous_encours' |
23 |
|| $this->retourformulaire=='dossier_instruction_mes_clotures' |
|| $this->retourformulaire=='dossier_instruction_mes_clotures' |
24 |
|| $this->retourformulaire=='dossier_instruction_tous_clotures' |
|| $this->retourformulaire=='dossier_instruction_tous_clotures' |
25 |
) |
) ){ |
26 |
and $form->val['dossier'] == $this->getParameter('idxformulaire')) { |
|
|
$form->setType('dossier','hidden'); |
|
|
} else { |
|
|
$form->setType('dossier','hidden'); |
|
|
} |
|
|
}// fin ajout |
|
|
if ($maj==1){ //modifier |
|
|
if(($this->retourformulaire=='dossier' |
|
|
|| $this->retourformulaire=='dossier_instruction' |
|
|
|| $this->retourformulaire=='dossier_instruction_mes_encours' |
|
|
|| $this->retourformulaire=='dossier_instruction_tous_encours' |
|
|
|| $this->retourformulaire=='dossier_instruction_mes_clotures' |
|
|
|| $this->retourformulaire=='dossier_instruction_tous_clotures' |
|
|
) |
|
|
and $form->val['dossier'] == $this->getParameter('idxformulaire')) { |
|
|
$form->setType('dossier','hidden'); |
|
|
} else { |
|
|
$form->setType('dossier','hidden'); |
|
|
} |
|
|
}// fin modifier |
|
|
if ($maj==2){ //supprimer |
|
27 |
$form->setType('dossier','hiddenstatic'); |
$form->setType('dossier','hiddenstatic'); |
28 |
}//fin supprimer |
$form->setType('commission','hidden'); |
29 |
if ($maj==3){ //consulter |
$form->setType('avis','hidden'); |
30 |
|
} |
31 |
|
|
32 |
|
// En consultation et modification pour la cellule suivi |
33 |
|
if ( $maj == 1 && $this->retourformulaire == 'commission'){ |
34 |
|
|
35 |
$form->setType('dossier','hiddenstatic'); |
$form->setType('dossier','hiddenstatic'); |
36 |
}//fin consulter |
$form->setType('commission_type','hiddenstatic'); |
37 |
|
$form->setType('date_souhaitee','hiddenstatic'); |
38 |
|
$form->setType('motivation','hiddenstatic'); |
39 |
|
$form->setType('commission','hiddenstatic'); |
40 |
|
$form->setType('lu','hidden'); |
41 |
|
} |
42 |
|
|
43 |
|
if ( $maj == 3 && $this->retourformulaire == 'commission'){ |
44 |
|
|
45 |
|
$form->setType('lu','hidden'); |
46 |
|
} |
47 |
} |
} |
|
|
|
48 |
|
|
49 |
|
// la demande de commission est mis à lu par défaut |
50 |
|
function triggerajouter($id,&$db,$val,$DEBUG) { |
51 |
|
|
52 |
|
$this->valF['lu'] = TRUE; |
53 |
|
} |
54 |
|
|
55 |
|
// Si la commission rend son avis, la demande de commission est non lu pour que |
56 |
|
// l'instructeur soit notifié |
57 |
|
function triggermodifier($id,&$db,$val,$DEBUG) { |
58 |
|
|
59 |
|
if ( $val['avis'] != "" ){ |
60 |
|
|
61 |
|
$this->valF['lu'] = FALSE; |
62 |
|
} |
63 |
|
} |
64 |
|
|
65 |
|
// Met la date au bon format |
66 |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
67 |
$this->retourformulaire = $retourformulaire; |
$this->retourformulaire = $retourformulaire; |
68 |
if($validation == 0) { |
|
69 |
if($retourformulaire =='commission') |
$form->setVal('date_souhaitee', $this->dateDBToForm($this->getVal('date_souhaitee'))); |
70 |
$form->setVal('commission', $idxformulaire); |
|
71 |
|
// Afficher le numéro de dossier d'instruction |
72 |
|
if($maj == 0 ){ |
73 |
|
|
74 |
if($retourformulaire =='dossier' |
if($retourformulaire =='dossier' |
75 |
|| $retourformulaire =='dossier_instruction' |
|| $retourformulaire =='dossier_instruction' |
76 |
|| $retourformulaire =='dossier_instruction_mes_encours' |
|| $retourformulaire =='dossier_instruction_mes_encours' |
77 |
|| $retourformulaire =='dossier_instruction_tous_encours' |
|| $retourformulaire =='dossier_instruction_tous_encours' |
78 |
|| $retourformulaire =='dossier_instruction_mes_clotures' |
|| $retourformulaire =='dossier_instruction_mes_clotures' |
79 |
|| $retourformulaire =='dossier_instruction_tous_clotures') |
|| $retourformulaire =='dossier_instruction_tous_clotures'){ |
80 |
|
|
81 |
$form->setVal('dossier', $idxformulaire); |
$form->setVal('dossier', $idxformulaire); |
82 |
}// fin validation |
} |
83 |
}// fin setValsousformulaire |
} |
84 |
|
} |
85 |
|
|
86 |
|
//Surcharge du bouton retour de la gestion des commissions afin de retourner directement vers le tableau |
87 |
|
function retoursousformulaire($idxformulaire, $retourformulaire, $val, |
88 |
|
$objsf, $premiersf, $tricolsf, $validation, |
89 |
|
$idx, $maj, $retour) { |
90 |
|
|
91 |
|
if( $maj = 1 && $retourformulaire === "commission") { |
92 |
|
|
93 |
|
echo "\n<a class=\"retour\" "; |
94 |
|
echo "href=\"#\" "; |
95 |
|
|
96 |
|
echo "onclick=\"ajaxIt('".$objsf."', '"; |
97 |
|
echo "../scr/soustab.php?obj=dossier_commission&idxformulaire=" |
98 |
|
.$val['commission']. |
99 |
|
"&retourformulaire=commission');\""; |
100 |
|
echo "\" "; |
101 |
|
echo ">"; |
102 |
|
// |
103 |
|
echo _("Retour"); |
104 |
|
// |
105 |
|
echo "</a>\n"; |
106 |
|
|
107 |
|
} else { |
108 |
|
parent::retoursousformulaire($idxformulaire, $retourformulaire, $val, |
109 |
|
$objsf, $premiersf, $tricolsf, $validation, |
110 |
|
$idx, $maj, $retour); |
111 |
|
} |
112 |
|
} |
113 |
}// fin classe |
}// fin classe |
114 |
?> |
?> |