/[openfoncier]/trunk/obj/cerfa.class.php
ViewVC logotype

Annotation of /trunk/obj/cerfa.class.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2116 - (hide annotations)
Tue Jul 30 12:37:29 2013 UTC (11 years, 6 months ago) by nhaye
File size: 17854 byte(s)
Correction des champs affichés dans le formulaire de données techniques,
ajout des fonction javascript de calculs automatique,
suppression des champs non utiles,
modification de la mise en page des données techniques et cerfa (setLayout)
maj des traductions,

1 vpihour 1249 <?php
2     //$Id$
3     //gen openMairie le 13/02/2013 14:41
4    
5     require_once ("../gen/obj/cerfa.class.php");
6    
7     class cerfa extends cerfa_gen {
8    
9     function cerfa($id,&$db,$debug) {
10     $this->constructeur($id,$db,$debug);
11     }// fin constructeur
12    
13 nhaye 1258
14     function setType(&$form,$maj) {
15     parent::setType($form,$maj);
16    
17    
18 vpihour 1329 //Ajout des select sur les tableaux
19 nhaye 1258 if($maj == 0) {
20 vpihour 1329
21 nhaye 1258 $form->setType('tab_surface', 'select');
22 vpihour 1329 $form->setType('tab_tax_su_princ', 'select');
23     $form->setType('tab_tax_su_heber', 'select');
24     $form->setType('tab_tax_su_secon', 'select');
25     $form->setType('tab_tax_su_tot', 'select');
26     $form->setType('tab_tax_su_non_habit_surf', 'select');
27     $form->setType('tab_tax_am', 'select');
28 nhaye 1258 }elseif($maj == 1) {
29 vpihour 1329
30 nhaye 1258 $form->setType('tab_surface', 'select');
31 vpihour 1329 $form->setType('tab_tax_su_princ', 'select');
32     $form->setType('tab_tax_su_heber', 'select');
33     $form->setType('tab_tax_su_secon', 'select');
34     $form->setType('tab_tax_su_tot', 'select');
35     $form->setType('tab_tax_su_non_habit_surf', 'select');
36     $form->setType('tab_tax_am', 'select');
37 nhaye 1258 }elseif($maj == 2) {
38 vpihour 1329
39 nhaye 1258 $form->setType('tab_surface', 'selecthiddenstatic');
40 vpihour 1329 $form->setType('tab_tax_su_princ', 'selecthiddenstatic');
41     $form->setType('tab_tax_su_heber', 'selecthiddenstatic');
42     $form->setType('tab_tax_su_secon', 'selecthiddenstatic');
43     $form->setType('tab_tax_su_tot', 'selecthiddenstatic');
44     $form->setType('tab_tax_su_non_habit_surf', 'selecthiddenstatic');
45     $form->setType('tab_tax_am', 'selecthiddenstatic');
46 nhaye 1258 }elseif($maj == 3) {
47 vpihour 1329
48 nhaye 1258 $form->setType('tab_surface', 'selecthiddenstatic');
49 vpihour 1329 $form->setType('tab_tax_su_princ', 'selecthiddenstatic');
50     $form->setType('tab_tax_su_heber', 'selecthiddenstatic');
51     $form->setType('tab_tax_su_secon', 'selecthiddenstatic');
52     $form->setType('tab_tax_su_tot', 'selecthiddenstatic');
53     $form->setType('tab_tax_su_non_habit_surf', 'selecthiddenstatic');
54     $form->setType('tab_tax_am', 'selecthiddenstatic');
55 nhaye 1258 }
56     }
57    
58     function setSelect(&$form, $maj,&$db,$debug) {
59     parent::setSelect($form, $maj,$db,$debug);
60    
61     if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php"))
62     include ("../sql/".$db->phptype."/".$this->table.".form.inc.php");
63     elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
64     include ("../sql/".$db->phptype."/".$this->table.".form.inc");
65    
66     // parametrage du tableau de surface
67     $contenu=array();
68     $contenu[0]=array_keys($tab_surface);
69     $contenu[1]=array_values($tab_surface);
70     $form->setSelect("tab_surface",$contenu);
71    
72 nhaye 1268 $contenu[0]=array_keys($tab_tax_su_princ);
73     $contenu[1]=array_values($tab_tax_su_princ);
74     $form->setSelect("tab_tax_su_princ",$contenu);
75    
76     $contenu[0]=array_keys($tab_tax_su_heber);
77     $contenu[1]=array_values($tab_tax_su_heber);
78     $form->setSelect("tab_tax_su_heber",$contenu);
79    
80     $contenu[0]=array_keys($tab_tax_su_secon);
81     $contenu[1]=array_values($tab_tax_su_secon);
82     $form->setSelect("tab_tax_su_secon",$contenu);
83    
84     $contenu[0]=array_keys($tab_tax_su_tot);
85     $contenu[1]=array_values($tab_tax_su_tot);
86     $form->setSelect("tab_tax_su_tot",$contenu);
87    
88     $contenu[0]=array_keys($tab_tax_su_non_habit_surf);
89     $contenu[1]=array_values($tab_tax_su_non_habit_surf);
90     $form->setSelect("tab_tax_su_non_habit_surf",$contenu);
91    
92     $contenu[0]=array_keys($tab_tax_am);
93     $contenu[1]=array_values($tab_tax_am);
94     $form->setSelect("tab_tax_am",$contenu);
95    
96    
97    
98 nhaye 1258 }
99    
100     function setLayout(&$form, $maj) {
101    
102     /*Fieldset Parametrage du cerfa */
103 nhaye 1268 $form->setBloc('cerfa','D',"","col_12");
104     $form->setFieldset('cerfa','D'
105 nhaye 1258 ,_("Parametrage du cerfa"));
106    
107    
108 nhaye 1263 $form->setFieldset('om_validite_fin','F','');
109     $form->setBloc('om_validite_fin','F');
110 nhaye 1258
111 nhaye 1616 $form->setBloc('terr_juri_titul','D',"","col_12");
112     $form->setFieldset('terr_juri_titul','D'
113 nhaye 2116 ,_("Terrain"), "startClosed");
114     $form->setBloc('terr_juri_titul','D',_("Situation juridique du terrain"),"col_12");
115     $form->setBloc('terr_juri_desc','D',"","col_12");
116     $form->setBloc('terr_div_surf_etab','D',_("Terrain issu d'une division de propriete"),"col_12");
117     $form->setBloc('terr_div_surf_av_div','D',"","col_12");
118 nhaye 1616 $form->setFieldset('terr_div_surf_av_div','F','');
119     $form->setBloc('terr_div_surf_av_div','F');
120 nhaye 1268
121 nhaye 2116 // Aménager
122     $form->setBloc('am_lotiss','D',"","col_12");
123     $form->setFieldset('am_lotiss','D'
124     ,_("Amenager"), "startClosed");
125     $form->setBloc('am_lotiss','D',"","col_12");
126     $form->setFieldset('am_lotiss','D'
127     ,_("Projet d'amenagement"), "startClosed");
128     // bloc 4.1
129     $form->setBloc('am_lotiss','D',_("Nature des travaux, instalations
130     ou amenagements envisages"),"col_12");
131     $form->setBloc('am_exhau_haut','F');
132 nhaye 1268
133 nhaye 2116 $form->setBloc('am_chem_ouv_esp','D',_("Dans les secteurs proteges :"),"col_12");
134     $form->setBloc('am_chem_ouv_esp','D',_("Amenagement situe dans un espace remarquable :"),"col_12 cerfasubtitle");
135     $form->setBloc('am_agri_peche','F');
136     $form->setBloc('am_crea_voie','D',_("Amenagement situe dans un secteur sauvegarde :"),"col_12 cerfasubtitle");
137     $form->setBloc('am_crea_esp_sauv','F');
138     $form->setBloc('am_crea_esp_class','D',_("Amenagement situe dans un site classe ou une reserve naturelle 1 :"),"col_12 cerfasubtitle");
139     $form->setBloc('am_rememb_afu','F');
140 nhaye 1268
141 nhaye 2116 $form->setBloc('am_rememb_afu','F');
142 nhaye 1268
143 nhaye 2116 $form->setBloc('am_mob_art','D',_("Dans un secteur sauvegarde, site classe ou reserve naturelle :"),"col_12");
144     $form->setBloc('am_plant_voie_esp','F');
145 nhaye 1268
146 nhaye 2116 $form->setFieldset('am_plant_voie_esp','F','');
147     $form->setBloc('am_plant_voie_esp','F');
148     $form->setBloc('am_projet_desc','D',"","col_12");
149     $form->setFieldset('am_projet_desc','D'
150     ,_("Description amenagement"), "startClosed");
151 nhaye 1268
152 nhaye 2116 $form->setBloc('am_projet_desc','D', '',"col_12");
153 nhaye 1828
154 nhaye 2116 $form->setBloc('am_tranche_desc','F');
155     $form->setFieldset('am_tranche_desc','F','');
156 nhaye 1258 $form->setBloc('am_tranche_desc','F');
157 nhaye 2116 $form->setBloc('am_lot_max_nb','D',"","col_12");
158     $form->setFieldset('am_lot_max_nb','D'
159     ,_("Complement d'amenagement"), "startClosed");
160     // bloc 4.2
161     $form->setBloc('am_lot_max_nb','D',_("Demande concernant un lotissement"),"col_12");
162     $form->setBloc('am_lot_cstr_cos','D',_("Comment la constructibilite globale sera-t-elle repartie ?"),"col_12 cerfasubtitle");
163     $form->setBloc('am_lot_fin_diff','F');
164     $form->setBloc('am_lot_consign','D',_("si oui, quelle garantie sera utilisee ?"),"col_12 cerfasubtitle");
165     $form->setBloc('am_lot_vente_ant','F');
166 nhaye 1258
167 nhaye 2116 $form->setBloc('am_lot_vente_ant','F');
168 nhaye 1258
169 nhaye 2116 // bloc 4.3
170     $form->setBloc('am_exist_agrand','D',_("Amenagement d'un camping ou
171     d'un terrain amenage en vue de l'hebergement
172     touristique"),"col_12");
173     $form->setBloc('am_tente_nb','D',_("Nombre maximum d’emplacements reserves aux :"),"group col_12 cerfasubtitle");
174     $form->setBloc('am_mobil_nb','F');
175     $form->setBloc('am_empl_hll_nb','D',_("Implantation d’habitations legeres de loisirs (HLL) :"),"col_12 cerfasubtitle");
176     $form->setBloc('am_hll_shon','F');
177     $form->setBloc('am_coupe_bois','D',_("Declaration de coupe et/ou abattage d’arbres :"),"col_12 cerfasubtitle");
178     $form->setBloc('am_coupe_bois','D',_("Courte description du lieu :"),"group col_12 cerfasubtitle");
179     $form->setBloc('am_coupe_align','F');
180     $form->setBloc('am_coupe_ess','D',_("Nature du boisement :"),"col_12 cerfasubtitle");
181     $form->setBloc('am_coupe_ess','D', '',"group col_12");
182     $form->setBloc('am_coupe_dens','F');
183     $form->setBloc('am_coupe_qual','D', '',"group col_12");
184     $form->setBloc('am_coupe_autr','F');
185     $form->setBloc('am_coupe_autr','F');
186     $form->setBloc('am_coupe_autr','F');
187     $form->setBloc('am_coupe_autr','F');
188 nhaye 1258
189    
190 nhaye 2116 $form->setFieldset('am_coupe_autr','F','');
191    
192     $form->setBloc('am_coupe_autr','F');
193 nhaye 1258 $form->setFieldset('am_coupe_autr','F','');
194     $form->setBloc('am_coupe_autr','F');
195 nhaye 2116 // Fin amménager
196     // Construire
197 nhaye 1258 $form->setBloc('co_archi_recours','D',"","col_12");
198     $form->setFieldset('co_archi_recours','D'
199 nhaye 2116 ,_("Construire"), "startClosed");
200     $form->setBloc('co_archi_recours','D', "","col_12");
201     $form->setFieldset('co_archi_recours','D'
202     ,_("Projet construction"), "startClosed");
203     $form->setBloc('co_archi_recours','D', _("Architecte"),"col_12 cerfasubtitle");
204     $form->setBloc('architecte','F');
205 nhaye 1258
206 nhaye 2116 $form->setBloc('co_cstr_nouv','D', _("Nature du projet"),"col_12 cerfasubtitle");
207     $form->setBloc('co_elec_tension','F');
208     $form->setFieldset('co_elec_tension','F','');
209     $form->setFieldset('co_anx_pisc','D'
210     ,_("Complement construction"), "startClosed");
211     $form->setBloc('co_anx_pisc','D', "","col_12 group");
212     $form->setBloc('co_anx_autr','F');
213     $form->setBloc('co_tot_log_nb','D', "","col_12 group");
214     $form->setBloc('co_tot_coll_nb','F');
215     $form->setBloc('co_mais_piece_nb','D', "","col_12 group");
216     $form->setBloc('co_mais_niv_nb','F');
217     $form->setBloc('co_fin_lls_nb','D', _("Repartition du nombre total de logement crees par type de financement :"),"col_12");
218     $form->setBloc('co_fin_lls_nb','D', "","col_12 group");
219     $form->setBloc('co_fin_autr_nb','F');
220     $form->setBloc('co_mais_contrat_ind','F');
221     $form->setBloc('co_uti_pers','D', _("Mode d'utilisation principale des logements :"),"col_12 group");
222     $form->setBloc('co_uti_loc','F');
223     $form->setBloc('co_uti_princ','D', _("S’il s’agit d’une occupation personnelle, veuillez preciser :"),"col_12 group");
224     $form->setBloc('co_uti_secon','F');
225     $form->setBloc('co_resid_agees','D', _("Si le projet est un foyer ou une residence, a quel titre :"),"col_12 group");
226     $form->setBloc('co_resid_hand','F');
227     $form->setBloc('co_log_1p_nb','D', _("Repartition du nombre de logements crees selon le nombre de pieces :"),"col_12 group");
228     $form->setBloc('co_log_6p_nb','F');
229     $form->setBloc('co_trx_exten','D', _("Indiquez si vos travaux comprennent notamment :"),"col_12 group");
230     $form->setBloc('co_trx_nivsup','F');
231    
232     $form->setFieldset('co_trx_nivsup','F','');
233     $form->setFieldset('tab_surface','D'
234     ,_("Destinations et surfaces des constructions"), "startClosed");
235     $form->setBloc('tab_surface','D', "","col_12 group");
236     $form->setBloc('tab_surface','F');
237     $form->setBloc('co_sp_transport','D', _("Destination des constructions futures en cas de realisation au benefice d'un service public ou d'interet collectif :"),"col_12 group");
238     $form->setBloc('co_sp_culture','F');
239 nhaye 1258
240 nhaye 2116 $form->setFieldset('co_sp_culture','F','');
241     $form->setFieldset('co_demont_periode','D'
242     ,_("Divers construction"), "startClosed");
243     $form->setBloc('co_demont_periode','D', _("Construction periodiquement demontee et re-installee :"),"col_12 group");
244     $form->setBloc('co_demont_periode','F');
245     $form->setBloc('co_statio_avt_nb','D', _("Nombre de places de stationnement"),"col_12 group");
246     $form->setBloc('co_statio_apr_nb','F');
247     $form->setBloc('co_statio_adr','D', _("Places de stationnement affectees au projet, amenagees ou reservees en dehors du terrain sur lequel est situe le projet"),"col_12");
248     $form->setBloc('co_statio_place_nb','D', "","col_12 group");
249     $form->setBloc('co_statio_tot_shob','F');
250     $form->setBloc('co_statio_tot_shob','F');
251     $form->setBloc('co_statio_comm_cin_surf','D', _("Pour les commerces et cinemas :"),"col_12 group");
252     $form->setBloc('co_statio_comm_cin_surf','F');
253    
254     $form->setFieldset('co_perf_energ','F','');
255     $form->setBloc('co_perf_energ','F');
256 nhaye 1258
257 nhaye 2116 $form->setFieldset('co_perf_energ','F','');
258 nhaye 1258
259 nhaye 2116 $form->setBloc('co_perf_energ','F');
260     // Fin construire
261 nhaye 1258
262     /*Fieldset n°6 Projet necessitant demolitions */
263     $form->setBloc('dm_constr_dates','D',"","col_12");
264     $form->setFieldset('dm_constr_dates','D'
265 nhaye 2116 ,_("Demolir"), "startClosed");
266 nhaye 1258
267     $form->setBloc('dm_constr_dates','D',"","col_12");
268    
269     $form->setBloc('dm_tot_log_nb','F');
270    
271     $form->setFieldset('dm_tot_log_nb','F','');
272    
273     $form->setBloc('dm_tot_log_nb','F');
274 nhaye 1268
275 nhaye 2116 /*Fieldset n°4 Ouverture de chantier */
276     $form->setBloc('doc_date','D',"","col_12");
277     $form->setFieldset('doc_date','D'
278     ,_("Ouverture de chantier"), "startClosed");
279 nhaye 1268
280 nhaye 2116 $form->setFieldset('doc_nb_log_autre','F','');
281     $form->setBloc('doc_nb_log_autre','F');
282 nhaye 1268
283 nhaye 2116 /*Fieldset n°4 Achèvement des travaux */
284     $form->setBloc('daact_date','D',"","col_12");
285     $form->setFieldset('daact_date','D'
286     ,_("Achevement des travaux") , "startClosed");
287 nhaye 1268
288 nhaye 2116 $form->setFieldset('daact_nb_log_autre','F','');
289     $form->setBloc('daact_nb_log_autre','F');
290 nhaye 1268
291 nhaye 2116 $form->setBloc('code_cnil','D',"","col_12");
292     $form->setFieldset('code_cnil','D'
293     ,_("cnil (opposition à l’utilisation des informations du formulaire à des fins commerciales)") , "startClosed");
294 nhaye 1268
295 nhaye 2116 $form->setFieldset('code_cnil','F','');
296     $form->setBloc('code_cnil','F');
297 nhaye 1268
298 nhaye 2116 $form->setBloc('tax_surf_tot','D',"","col_12");
299     $form->setFieldset('tax_surf_tot','D'
300     ,_("Declaration des elements necessaires au calcul des impositions"), "startClosed");
301 nhaye 1268
302 nhaye 2116 $form->setBloc('tax_surf_tot','D',_("Renseignement"),"col_12");
303    
304     $form->setBloc('tax_surf_suppr_mod','F');
305    
306     $form->setBloc('tab_tax_su_princ','D',_("Creation de locaux destines a l’habitation :"),"col_12");
307 nhaye 1268 $form->setBloc('tax_log_exist_nb','F');
308    
309 nhaye 2116 $form->setBloc('tax_comm_nb','D',_("Creation ou extension de locaux non destines a l'habitation :"),"col_12");
310     $form->setBloc('tax_log_exist_nb','F');
311 nhaye 1268
312     $form->setBloc('tax_trx_presc_ppr','D',_("Cas particuliers"),"col_12");
313     $form->setBloc('tax_monu_hist','F');
314    
315     $form->setBloc('vsd_surf_planch_smd','D',_("Versement pour sous-densite (VSD)"),"col_12");
316     $form->setBloc('vsd_rescr_fisc','F');
317    
318     $form->setBloc('pld_val_terr','D',_("Plafond legal de densite (PLD)"),"col_12");
319     $form->setBloc('pld_const_exist_dem_surf','F');
320    
321     $form->setFieldset('pld_const_exist_dem_surf','F','');
322    
323     $form->setBloc('pld_const_exist_dem_surf','F');
324 nhaye 1258 }
325 vpihour 2113
326     function setLib(&$form,$maj) {
327     parent::setLib($form,$maj);
328     //libelle des champs
329     $form->setLib('architecte', _("coordonnees de l'architecte"));
330     }
331 vpihour 1249 }// fin classe
332 nhaye 2116 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26