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('qualite','selectdisabled'); |
27 |
|
|
$form->setType('particulier_nom','textdisabled'); |
28 |
|
|
$form->setType('particulier_prenom','textdisabled'); |
29 |
|
|
$form->setType('particulier_date_naissance','datedisabled'); |
30 |
|
|
$form->setType('particulier_commune_naissance','textdisabled'); |
31 |
|
|
$form->setType('particulier_departement_naissance','textdisabled'); |
32 |
|
|
$form->setType('personne_morale_denomination','textdisabled'); |
33 |
|
|
$form->setType('personne_morale_raison_sociale','textdisabled'); |
34 |
|
|
$form->setType('personne_morale_siret','textdisabled'); |
35 |
|
|
$form->setType('personne_morale_categorie_juridique','textdisabled'); |
36 |
|
|
$form->setType('personne_morale_nom','textdisabled'); |
37 |
|
|
$form->setType('personne_morale_prenom','textdisabled'); |
38 |
|
|
$form->setType('numero','textdisabled'); |
39 |
|
|
$form->setType('voie','textdisabled'); |
40 |
|
|
$form->setType('complement','textdisabled'); |
41 |
|
|
$form->setType('lieu_dit','textdisabled'); |
42 |
|
|
$form->setType('localite','textdisabled'); |
43 |
|
|
$form->setType('code_postal','textdisabled'); |
44 |
|
|
$form->setType('bp','textdisabled'); |
45 |
|
|
$form->setType('cedex','textdisabled'); |
46 |
|
|
$form->setType('pays','textdisabled'); |
47 |
|
|
$form->setType('division_territoriale','textdisabled'); |
48 |
|
|
$form->setType('telephone_fixe','textdisabled'); |
49 |
|
|
$form->setType('telephone_mobile','textdisabled'); |
50 |
|
|
$form->setType('indicatif','textdisabled'); |
51 |
|
|
$form->setType('courriel','textdisabled'); |
52 |
|
|
$form->setType('notification','checkboxdisabled'); |
53 |
|
|
$form->setType('frequent','checkboxdisabled'); |
54 |
|
|
$form->setType('particulier_civilite','selectdisabled'); |
55 |
|
|
$form->setType('personne_morale_civilite','selectdisabled'); |
56 |
|
|
}// fin modifier |
57 |
|
|
} |
58 |
vpihour |
799 |
/* |
59 |
nhaye |
828 |
* Ajout du fielset |
60 |
|
|
* Add fieldset |
61 |
|
|
*/ |
62 |
|
|
function setLayout(&$form, $maj){ |
63 |
|
|
if ( $maj < 2 OR $maj == 3 ) { |
64 |
|
|
|
65 |
|
|
$form->setBloc('particulier_civilite','D',"", "bloc_demandeur"); |
66 |
|
|
$form->setBloc('particulier_civilite','D',"", "particulier_fields"); |
67 |
|
|
|
68 |
|
|
$form->setBloc('particulier_civilite','D',""); |
69 |
|
|
$form->setBloc('particulier_civilite','F'); |
70 |
|
|
|
71 |
|
|
$form->setBloc('particulier_nom','D',"","group search_particulier_fields"); |
72 |
|
|
$form->setBloc('particulier_prenom','F'); |
73 |
|
|
|
74 |
|
|
$form->setBloc('particulier_date_naissance','D',"","group"); |
75 |
|
|
$form->setBloc('particulier_commune_naissance','F'); |
76 |
|
|
|
77 |
|
|
$form->setBloc('particulier_departement_naissance','D',""); |
78 |
|
|
$form->setBloc('particulier_departement_naissance','F'); |
79 |
|
|
|
80 |
|
|
$form->setBloc('particulier_departement_naissance','F'); |
81 |
|
|
|
82 |
|
|
$form->setBloc('personne_morale_denomination','D',"", "personne_morale_fields"); |
83 |
|
|
|
84 |
|
|
$form->setBloc('personne_morale_denomination','D',"","group"); |
85 |
|
|
$form->setBloc('personne_morale_denomination','D',"", "search_personne_morale_fields"); |
86 |
|
|
$form->setBloc('personne_morale_denomination','F'); |
87 |
|
|
$form->setBloc('personne_morale_raison_sociale','F'); |
88 |
|
|
|
89 |
|
|
$form->setBloc('personne_morale_siret','D',""); |
90 |
|
|
$form->setBloc('personne_morale_siret','F'); |
91 |
|
|
|
92 |
|
|
$form->setBloc('personne_morale_categorie_juridique','D',""); |
93 |
|
|
$form->setBloc('personne_morale_categorie_juridique','F'); |
94 |
|
|
|
95 |
|
|
$form->setBloc('personne_morale_civilite','D',""); |
96 |
|
|
$form->setBloc('personne_morale_civilite','F'); |
97 |
|
|
|
98 |
|
|
$form->setBloc('personne_morale_nom','D',"", "group"); |
99 |
|
|
$form->setBloc('personne_morale_nom','D',"", "search_personne_morale_fields"); |
100 |
|
|
$form->setBloc('personne_morale_nom','F'); |
101 |
|
|
$form->setBloc('personne_morale_prenom','F'); |
102 |
|
|
|
103 |
|
|
$form->setBloc('personne_morale_prenom','F'); |
104 |
|
|
|
105 |
|
|
$form->setBloc('numero','D',""); |
106 |
|
|
|
107 |
|
|
$form->setBloc('numero','D',"","group"); |
108 |
|
|
$form->setBloc('voie','F'); |
109 |
|
|
|
110 |
|
|
$form->setBloc('complement','D',""); |
111 |
|
|
$form->setBloc('complement','F'); |
112 |
|
|
|
113 |
|
|
$form->setBloc('lieu_dit','D',"","group"); |
114 |
|
|
$form->setBloc('localite','F'); |
115 |
|
|
|
116 |
|
|
$form->setBloc('code_postal','D',"","group"); |
117 |
|
|
$form->setBloc('cedex','F'); |
118 |
|
|
|
119 |
|
|
$form->setBloc('pays','D',"", "","group"); |
120 |
|
|
$form->setBloc('division_territoriale','F'); |
121 |
|
|
|
122 |
|
|
$form->setBloc('telephone_fixe','D',"", "group"); |
123 |
|
|
$form->setBloc('indicatif','F'); |
124 |
|
|
|
125 |
|
|
$form->setBloc('frequent','F'); |
126 |
|
|
$form->setBloc('frequent','F'); |
127 |
|
|
} |
128 |
|
|
} |
129 |
|
|
/* |
130 |
vpihour |
799 |
* Met le champ type_demandeur à delegataire par défaut |
131 |
|
|
*/ |
132 |
|
|
function setVal(&$form, $maj, $validation, &$db) { |
133 |
nhaye |
828 |
$form->setVal("type_demandeur","petitionnaire"); |
134 |
vpihour |
799 |
} |
135 |
nhaye |
819 |
/* |
136 |
|
|
* Met le champ type_demandeur à delegataire par défaut |
137 |
|
|
*/ |
138 |
|
|
function setValSousFormulaire(&$form, $maj, $validation, &$db) { |
139 |
nhaye |
828 |
$form->setVal("type_demandeur","petitionnaire"); |
140 |
nhaye |
819 |
} |
141 |
nhaye |
787 |
}// fin classe |
142 |
|
|
?> |