1 |
nhaye |
787 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
|
4 |
|
|
require_once ("../obj/demandeur.class.php"); |
5 |
|
|
|
6 |
vpihour |
795 |
/* |
7 |
|
|
* Classe qui hérite de la classe demandeur |
8 |
|
|
*/ |
9 |
nhaye |
787 |
class petitionnaire extends demandeur { |
10 |
|
|
|
11 |
|
|
function petitionnaire($id,&$db,$debug) { |
12 |
|
|
$this->constructeur($id,$db,$debug); |
13 |
|
|
}// fin constructeur |
14 |
|
|
|
15 |
vpihour |
799 |
/* |
16 |
|
|
* Cache le champ type_demandeur. |
17 |
|
|
*/ |
18 |
|
|
function setType(&$form,$maj) { |
19 |
|
|
parent::setType($form,$maj); |
20 |
|
|
|
21 |
|
|
$form->setType('type_demandeur', 'hidden'); |
22 |
nhaye |
850 |
|
23 |
|
|
// Champs disabled pour la modif de petitionnaires frequents |
24 |
|
|
// Solution temporaire |
25 |
|
|
if ($maj==1){ //modifier |
26 |
|
|
$form->setType('type_demandeur','selectdisabled'); |
27 |
|
|
$form->setType('qualite','selectdisabled'); |
28 |
|
|
$form->setType('particulier_nom','textdisabled'); |
29 |
|
|
$form->setType('particulier_prenom','textdisabled'); |
30 |
|
|
$form->setType('particulier_date_naissance','datedisabled'); |
31 |
|
|
$form->setType('particulier_commune_naissance','textdisabled'); |
32 |
|
|
$form->setType('particulier_departement_naissance','textdisabled'); |
33 |
|
|
$form->setType('personne_morale_denomination','textdisabled'); |
34 |
|
|
$form->setType('personne_morale_raison_sociale','textdisabled'); |
35 |
|
|
$form->setType('personne_morale_siret','textdisabled'); |
36 |
|
|
$form->setType('personne_morale_categorie_juridique','textdisabled'); |
37 |
|
|
$form->setType('personne_morale_nom','textdisabled'); |
38 |
|
|
$form->setType('personne_morale_prenom','textdisabled'); |
39 |
|
|
$form->setType('numero','textdisabled'); |
40 |
|
|
$form->setType('voie','textdisabled'); |
41 |
|
|
$form->setType('complement','textdisabled'); |
42 |
|
|
$form->setType('lieu_dit','textdisabled'); |
43 |
|
|
$form->setType('localite','textdisabled'); |
44 |
|
|
$form->setType('code_postal','textdisabled'); |
45 |
|
|
$form->setType('bp','textdisabled'); |
46 |
|
|
$form->setType('cedex','textdisabled'); |
47 |
|
|
$form->setType('pays','textdisabled'); |
48 |
|
|
$form->setType('division_territoriale','textdisabled'); |
49 |
|
|
$form->setType('telephone_fixe','textdisabled'); |
50 |
|
|
$form->setType('telephone_mobile','textdisabled'); |
51 |
|
|
$form->setType('indicatif','textdisabled'); |
52 |
|
|
$form->setType('courriel','textdisabled'); |
53 |
|
|
$form->setType('notification','checkboxdisabled'); |
54 |
|
|
$form->setType('frequent','checkboxdisabled'); |
55 |
|
|
$form->setType('particulier_civilite','selectdisabled'); |
56 |
|
|
$form->setType('personne_morale_civilite','selectdisabled'); |
57 |
|
|
}// fin modifier |
58 |
|
|
} |
59 |
vpihour |
799 |
/* |
60 |
nhaye |
828 |
* Ajout du fielset |
61 |
|
|
* Add fieldset |
62 |
|
|
*/ |
63 |
|
|
function setLayout(&$form, $maj){ |
64 |
|
|
if ( $maj < 2 OR $maj == 3 ) { |
65 |
|
|
|
66 |
|
|
$form->setBloc('particulier_civilite','D',"", "bloc_demandeur"); |
67 |
|
|
$form->setBloc('particulier_civilite','D',"", "particulier_fields"); |
68 |
|
|
|
69 |
|
|
$form->setBloc('particulier_civilite','D',""); |
70 |
|
|
$form->setBloc('particulier_civilite','F'); |
71 |
|
|
|
72 |
|
|
$form->setBloc('particulier_nom','D',"","group search_particulier_fields"); |
73 |
|
|
$form->setBloc('particulier_prenom','F'); |
74 |
|
|
|
75 |
|
|
$form->setBloc('particulier_date_naissance','D',"","group"); |
76 |
|
|
$form->setBloc('particulier_commune_naissance','F'); |
77 |
|
|
|
78 |
|
|
$form->setBloc('particulier_departement_naissance','D',""); |
79 |
|
|
$form->setBloc('particulier_departement_naissance','F'); |
80 |
|
|
|
81 |
|
|
$form->setBloc('particulier_departement_naissance','F'); |
82 |
|
|
|
83 |
|
|
$form->setBloc('personne_morale_denomination','D',"", "personne_morale_fields"); |
84 |
|
|
|
85 |
|
|
$form->setBloc('personne_morale_denomination','D',"","group"); |
86 |
|
|
$form->setBloc('personne_morale_denomination','D',"", "search_personne_morale_fields"); |
87 |
|
|
$form->setBloc('personne_morale_denomination','F'); |
88 |
|
|
$form->setBloc('personne_morale_raison_sociale','F'); |
89 |
|
|
|
90 |
|
|
$form->setBloc('personne_morale_siret','D',""); |
91 |
|
|
$form->setBloc('personne_morale_siret','F'); |
92 |
|
|
|
93 |
|
|
$form->setBloc('personne_morale_categorie_juridique','D',""); |
94 |
|
|
$form->setBloc('personne_morale_categorie_juridique','F'); |
95 |
|
|
|
96 |
|
|
$form->setBloc('personne_morale_civilite','D',""); |
97 |
|
|
$form->setBloc('personne_morale_civilite','F'); |
98 |
|
|
|
99 |
|
|
$form->setBloc('personne_morale_nom','D',"", "group"); |
100 |
|
|
$form->setBloc('personne_morale_nom','D',"", "search_personne_morale_fields"); |
101 |
|
|
$form->setBloc('personne_morale_nom','F'); |
102 |
|
|
$form->setBloc('personne_morale_prenom','F'); |
103 |
|
|
|
104 |
|
|
$form->setBloc('personne_morale_prenom','F'); |
105 |
|
|
|
106 |
|
|
$form->setBloc('numero','D',""); |
107 |
|
|
|
108 |
|
|
$form->setBloc('numero','D',"","group"); |
109 |
|
|
$form->setBloc('voie','F'); |
110 |
|
|
|
111 |
|
|
$form->setBloc('complement','D',""); |
112 |
|
|
$form->setBloc('complement','F'); |
113 |
|
|
|
114 |
|
|
$form->setBloc('lieu_dit','D',"","group"); |
115 |
|
|
$form->setBloc('localite','F'); |
116 |
|
|
|
117 |
|
|
$form->setBloc('code_postal','D',"","group"); |
118 |
|
|
$form->setBloc('cedex','F'); |
119 |
|
|
|
120 |
|
|
$form->setBloc('pays','D',"", "","group"); |
121 |
|
|
$form->setBloc('division_territoriale','F'); |
122 |
|
|
|
123 |
|
|
$form->setBloc('telephone_fixe','D',"", "group"); |
124 |
|
|
$form->setBloc('indicatif','F'); |
125 |
|
|
|
126 |
|
|
$form->setBloc('frequent','F'); |
127 |
|
|
$form->setBloc('frequent','F'); |
128 |
|
|
} |
129 |
|
|
} |
130 |
|
|
/* |
131 |
vpihour |
799 |
* Met le champ type_demandeur à delegataire par défaut |
132 |
|
|
*/ |
133 |
|
|
function setVal(&$form, $maj, $validation, &$db) { |
134 |
nhaye |
828 |
$form->setVal("type_demandeur","petitionnaire"); |
135 |
vpihour |
799 |
} |
136 |
nhaye |
819 |
/* |
137 |
|
|
* Met le champ type_demandeur à delegataire par défaut |
138 |
|
|
*/ |
139 |
|
|
function setValSousFormulaire(&$form, $maj, $validation, &$db) { |
140 |
nhaye |
828 |
$form->setVal("type_demandeur","petitionnaire"); |
141 |
nhaye |
819 |
} |
142 |
nhaye |
787 |
}// fin classe |
143 |
|
|
?> |