1 |
vpihour |
633 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
//gen openMairie le 08/11/2012 14:59 |
4 |
|
|
|
5 |
|
|
require_once ("../gen/obj/demandeur.class.php"); |
6 |
|
|
|
7 |
|
|
class demandeur extends demandeur_gen { |
8 |
|
|
|
9 |
|
|
function demandeur($id,&$db,$debug) { |
10 |
|
|
$this->constructeur($id,$db,$debug); |
11 |
|
|
}// fin constructeur |
12 |
vpihour |
703 |
|
13 |
|
|
// ============================================= |
14 |
|
|
// Ajout du fielset |
15 |
|
|
// Add fieldset |
16 |
|
|
// ============================================= |
17 |
|
|
function setLayout(&$form, $maj){ |
18 |
|
|
if ( $maj < 2 OR $maj == 3 ) { |
19 |
|
|
|
20 |
|
|
//Champs sur lequel s'ouvre le fieldset |
21 |
|
|
$form->setBloc('particulier_civilite','D',"", "particulier_fields"); |
22 |
|
|
|
23 |
|
|
$form->setBloc('particulier_civilite','D',""); |
24 |
|
|
$form->setBloc('particulier_civilite','F'); |
25 |
|
|
|
26 |
|
|
$form->setBloc('particulier_nom','D',"","group search_particulier_fields"); |
27 |
|
|
$form->setBloc('particulier_prenom','F'); |
28 |
|
|
|
29 |
|
|
$form->setBloc('particulier_date_naissance','D',"","group"); |
30 |
|
|
$form->setBloc('particulier_commune_naissance','F'); |
31 |
|
|
|
32 |
|
|
$form->setBloc('particulier_departement_naissance','D',""); |
33 |
|
|
$form->setBloc('particulier_departement_naissance','F'); |
34 |
|
|
|
35 |
|
|
$form->setBloc('particulier_departement_naissance','F'); |
36 |
|
|
|
37 |
|
|
$form->setBloc('personne_morale_denomination','D',"", "personne_morale_fields"); |
38 |
|
|
|
39 |
|
|
$form->setBloc('personne_morale_denomination','D',"","group search_personne_morale_fields"); |
40 |
|
|
$form->setBloc('personne_morale_raison_sociale','F'); |
41 |
|
|
|
42 |
|
|
$form->setBloc('personne_morale_siret','D',""); |
43 |
|
|
$form->setBloc('personne_morale_siret','F'); |
44 |
|
|
|
45 |
|
|
$form->setBloc('personne_morale_categorie_juridique','D',""); |
46 |
|
|
$form->setBloc('personne_morale_categorie_juridique','F'); |
47 |
|
|
|
48 |
|
|
$form->setBloc('personne_morale_civilite','D',""); |
49 |
|
|
$form->setBloc('personne_morale_civilite','F'); |
50 |
|
|
|
51 |
|
|
$form->setBloc('personne_morale_nom','D',"", "group"); |
52 |
|
|
$form->setBloc('personne_morale_prenom','F'); |
53 |
|
|
|
54 |
|
|
$form->setBloc('personne_morale_prenom','F'); |
55 |
|
|
|
56 |
|
|
$form->setBloc('numero','D',""); |
57 |
|
|
|
58 |
|
|
$form->setBloc('numero','D',"","group"); |
59 |
|
|
$form->setBloc('voie','F'); |
60 |
|
|
|
61 |
|
|
$form->setBloc('complement','D',""); |
62 |
|
|
$form->setBloc('complement','F'); |
63 |
|
|
|
64 |
|
|
$form->setBloc('lieu_dit','D',"","group"); |
65 |
|
|
$form->setBloc('localite','F'); |
66 |
|
|
|
67 |
|
|
$form->setBloc('code_postal','D',"","group"); |
68 |
|
|
$form->setBloc('cedex','F'); |
69 |
|
|
|
70 |
|
|
$form->setBloc('pays','D',"", "","group"); |
71 |
|
|
$form->setBloc('division_territoriale','F'); |
72 |
|
|
|
73 |
|
|
$form->setBloc('telephone_fixe','D',"", "group"); |
74 |
|
|
$form->setBloc('indicatif','F'); |
75 |
|
|
|
76 |
|
|
$form->setBloc('frequent','F'); |
77 |
|
|
} |
78 |
|
|
} |
79 |
vpihour |
799 |
|
80 |
|
|
/* |
81 |
|
|
* Select pour les champs qualite et type_demandeur |
82 |
|
|
*/ |
83 |
|
|
function setType(&$form,$maj) { |
84 |
|
|
parent::setType($form,$maj); |
85 |
|
|
if ($maj < 2) { //ajouter et modifier |
86 |
|
|
|
87 |
|
|
$form->setType('type_demandeur', 'select'); |
88 |
|
|
$form->setType('qualite', 'select'); |
89 |
|
|
} |
90 |
|
|
} |
91 |
|
|
|
92 |
|
|
/* |
93 |
|
|
* Select pour le type_demandeur et qualite |
94 |
|
|
*/ |
95 |
|
|
function setSelect(&$form, $maj,&$db,$debug) { |
96 |
|
|
parent::setSelect($form, $maj,$db,$debug); |
97 |
|
|
|
98 |
|
|
/*Lors d'un ajout ou d'une modification*/ |
99 |
|
|
if( $maj < 2 ){ |
100 |
|
|
|
101 |
|
|
/* type_demandeur*/ |
102 |
|
|
$contenu=array(); |
103 |
|
|
|
104 |
|
|
$contenu[0][0]=""; |
105 |
|
|
$contenu[1][0]=_('choisir')." "._('type_demandeur'); |
106 |
|
|
$contenu[0][1]="petitionnaire"; |
107 |
|
|
$contenu[1][1]=_('petitionnaire'); |
108 |
|
|
$contenu[0][2]="delegataire"; |
109 |
|
|
$contenu[1][2]=_('delegataire'); |
110 |
|
|
|
111 |
|
|
$form->setSelect("type_demandeur",$contenu); |
112 |
|
|
|
113 |
|
|
/* qualite*/ |
114 |
|
|
$contenu=array(); |
115 |
|
|
|
116 |
|
|
$contenu[0][0]=""; |
117 |
|
|
$contenu[1][0]=_('choisir')." "._('qualite'); |
118 |
|
|
$contenu[0][1]="particulier"; |
119 |
|
|
$contenu[1][1]=_('particulier'); |
120 |
|
|
$contenu[0][2]="personne_morale"; |
121 |
|
|
$contenu[1][2]=_('personne morale'); |
122 |
|
|
|
123 |
|
|
$form->setSelect("qualite",$contenu); |
124 |
|
|
} |
125 |
|
|
} |
126 |
|
|
|
127 |
|
|
/* |
128 |
|
|
* Ajoute l'action javascript sur |
129 |
|
|
*/ |
130 |
|
|
function setOnchange(&$form,$maj){ |
131 |
|
|
parent::setOnchange($form,$maj); |
132 |
|
|
|
133 |
|
|
$form->setOnchange("qualite","changeDemandeurType('qualite');"); |
134 |
|
|
} |
135 |
vpihour |
633 |
}// fin classe |
136 |
|
|
?> |