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

Contents of /trunk/obj/donnees_techniques.class.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1829 - (show annotations)
Fri May 3 15:05:38 2013 UTC (11 years, 9 months ago) by nhaye
File size: 26525 byte(s)
Correction de champs récement ajoutés

1 <?php
2 //$Id$
3 //gen openMairie le 13/02/2013 14:41
4
5 require_once ("../gen/obj/donnees_techniques.class.php");
6
7 class donnees_techniques extends donnees_techniques_gen {
8
9 var $cerfa; // Instance de la classe cerfa
10
11 function donnees_techniques($id,&$db,$debug) {
12 $this->constructeur($id,$db,$debug);
13 }// fin constructeur
14
15 /**
16 * Méthode permettant de récupérer l'id du cerfa lié au dossier
17 **/
18 function getCerfa(){
19 if($this->getParameter("retourformulaire") == "lot") {
20 $sql = "SELECT cerfa_lot FROM ".DB_PREFIXE."dossier_instruction_type
21 JOIN ".DB_PREFIXE."dossier ON dossier.dossier_instruction_type=
22 dossier_instruction_type.dossier_instruction_type
23 JOIN ".DB_PREFIXE."lien_dossier_lot ON dossier.dossier=lien_dossier_lot.dossier
24 WHERE lien_dossier_lot.lot = ".$this->getParameter("idxformulaire");
25
26 } else {
27 $sql = "SELECT cerfa FROM ".DB_PREFIXE."dossier_instruction_type
28 JOIN ".DB_PREFIXE."dossier ON dossier.dossier_instruction_type=
29 dossier_instruction_type.dossier_instruction_type
30 WHERE dossier = '";
31 $sql .= $this->getParameter("idxformulaire")."'";
32 }
33
34 $cerfa = $this->db->getOne($sql);
35 $this->f->addToLog("getCerfa() : db->getone(\"".$sql."\");", VERBOSE_MODE);
36 if ( database::isError($cerfa)){
37 die();
38 }
39
40 // Si le cerfa est défini dans dossier on instancie le cerfa correspondant
41 if(!empty($cerfa)) {
42 require_once ("../obj/cerfa.class.php");
43 $this->cerfa = new cerfa($cerfa, $this->db, DEBUG);
44 } else {
45 $this->f->displayMessage("error", _("Aucun cerfa lie a ce type de dossier"));
46 die();
47 }
48 }
49
50 /**
51 * Méthode permettant de vérifier si le tableau passé en parametre est défini
52 * dans la table des cerfa
53 */
54
55 function setTabSelect($tab, $idchamp) {
56 // Test si un tableau de surface a été défini
57 if ( $this->cerfa->getVal($idchamp) != "" ){
58
59 // Configuration du tableau des surfaces
60 $contenu['column_header']=$tab[$this->cerfa->getVal($idchamp)]['column_header'];
61 $contenu['row_header']=$tab[$this->cerfa->getVal($idchamp)]['row_header'];
62
63 foreach($tab[$this->cerfa->getVal($idchamp)]['values'] as $champ) {
64 $contenu['values'][$champ] = $this->getVal($champ);
65 }
66
67 $this->form->setSelect($idchamp,$contenu);
68 }
69 }
70
71
72 function setSelect(&$form, $maj,&$db,$debug) {
73 parent::setSelect($form, $maj,$db,$debug);
74 if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php"))
75 include ("../sql/".$db->phptype."/".$this->table.".form.inc.php");
76 elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
77 include ("../sql/".$db->phptype."/".$this->table.".form.inc");
78
79 if(empty($this->cerfa)) {
80 $this->getCerfa();
81 }
82
83 $this->setTabSelect($tab_surface, "tab_surface");
84 $this->setTabSelect($tab_tax_su_princ, "tab_tax_su_princ");
85 $this->setTabSelect($tab_tax_su_heber, "tab_tax_su_heber");
86 $this->setTabSelect($tab_tax_su_secon, "tab_tax_su_secon");
87 $this->setTabSelect($tab_tax_su_tot, "tab_tax_su_tot");
88 $this->setTabSelect($tab_tax_su_tot, "tab_tax_su_non_habit_surf");
89 $this->setTabSelect($tab_tax_am, "tab_tax_am");
90
91 // Définition des champs Oui/Non/Je ne sais pas
92 $value[] = array("nesaispas","oui","non");
93 $value[] = array(_("Je ne sais pas"),_("Oui"),_("Non"));
94
95 $form->setSelect('terr_juri_titul',$value);
96 $form->setSelect('terr_juri_lot',$value);
97 $form->setSelect('terr_juri_zac',$value);
98 $form->setSelect('terr_juri_afu',$value);
99 $form->setSelect('terr_juri_pup',$value);
100 $form->setSelect('terr_juri_oin',$value);
101 $form->setSelect('terr_juri_desc',$value);
102 $form->setSelect('terr_div_surf_etab',$value);
103 $form->setSelect('terr_div_surf_av_div',$value);
104
105 }
106
107
108 // XXX Créer une nouvelle méthode au même endroit que l'appel a checkAccessibility()
109 function checkAccessibility() {
110 if(file_exists ("../sql/".$this->db->phptype."/".$this->table.".form.inc.php"))
111 include ("../sql/".$this->db->phptype."/".$this->table.".form.inc.php");
112 elseif(file_exists ("../sql/".$this->db->phptype."/".$this->table.".form.inc"))
113 include ("../sql/".$this->db->phptype."/".$this->table.".form.inc");
114 if(empty($this->cerfa)) {
115 $this->getCerfa();
116 }
117
118 $id_tab_surface = $this->cerfa->getVal("tab_surface");
119 $id_tab_tax_su_princ = $this->cerfa->getVal("tab_tax_su_princ");
120 $id_tab_tax_su_heber = $this->cerfa->getVal("tab_tax_su_heber");
121 $id_tab_tax_su_secon = $this->cerfa->getVal("tab_tax_su_secon");
122 $id_tab_tax_su_tot = $this->cerfa->getVal("tab_tax_su_tot");
123 $id_tab_tax_su_non_habit_surf = $this->cerfa->getVal("tab_tax_su_non_habit_surf");
124 $id_tab_tax_am = $this->cerfa->getVal("tab_tax_am");
125
126 //Suppression des champs de tableaux
127 if(!empty($id_tab_surface)) {
128 foreach($tab_surface[$this->cerfa->getVal("tab_surface")]['values'] as $champ) {
129 unset($this->champs[array_search($champ,$this->champs)]);
130 }
131 }
132 if(!empty($id_tab_tax_su_princ)) {
133 foreach($tab_tax_su_princ[$this->cerfa->getVal("tab_tax_su_princ")]['values'] as $champ) {
134 unset($this->champs[array_search($champ,$this->champs)]);
135 }
136 }
137 if(!empty($id_tab_tax_su_heber)) {
138 foreach($tab_tax_su_heber[$this->cerfa->getVal("tab_tax_su_heber")]['values'] as $champ) {
139 unset($this->champs[array_search($champ,$this->champs)]);
140 }
141 }
142 if(!empty($id_tab_tax_su_secon)) {
143 foreach($tab_tax_su_secon[$this->cerfa->getVal("tab_tax_su_secon")]['values'] as $champ) {
144 unset($this->champs[array_search($champ,$this->champs)]);
145 }
146 }
147 if(!empty($id_tab_tax_su_tot)) {
148 foreach($tab_tax_su_tot[$this->cerfa->getVal("tab_tax_su_tot")]['values'] as $champ) {
149 unset($this->champs[array_search($champ,$this->champs)]);
150 }
151 }
152 if(!empty($id_tab_tax_su_non_habit_surf)) {
153 foreach($tab_tax_su_non_habit_surf[$this->cerfa->getVal("tab_tax_su_non_habit_surf")]['values'] as $champ) {
154 unset($this->champs[array_search($champ,$this->champs)]);
155 }
156 }
157 if(!empty($id_tab_tax_am)) {
158 foreach($tab_tax_am[$this->cerfa->getVal("tab_tax_am")]['values'] as $champ) {
159 unset($this->champs[array_search($champ,$this->champs)]);
160 }
161 }
162 // Renumérotation
163 $this->champs = array_values($this->champs);
164 }
165
166 /**
167 * Méthode permettant de définir le type des différents tableaux en fonction
168 * des valeurs du cerfa
169 **/
170 function setTabType($tab) {
171 // Définition du type "tableau"
172 if ( $this->cerfa->getVal($tab) != "" ){
173
174 $this->form->setType($tab,'tableau');
175 }
176 //Le chache si non défini
177 else {
178
179 $this->form->setType($tab,'hidden');
180 }
181 }
182
183 /**
184 * Méthode permettant de définir le type des champs des tableaux en fonction
185 * des valeurs du cerfa
186 **/
187 function setTabChampType($tab) {
188 if(file_exists ("../sql/".$this->db->phptype."/".$this->table.".form.inc.php"))
189 include ("../sql/".$this->db->phptype."/".$this->table.".form.inc.php");
190 elseif(file_exists ("../sql/".$this->db->phptype."/".$this->table.".form.inc"))
191 include ("../sql/".$this->db->phptype."/".$this->table.".form.inc");
192 // Pour chaque champ dans la liste des champs du cerfa
193 $tableau = $$tab;
194
195 foreach ($this->champs as $champ) {
196 if(array_search($champ, $this->cerfa->champs) !== false) {
197 // On les cache si décoché dans le formulaire de cerfa
198 if($this->cerfa->getVal($champ) == 'f') {
199 $this->form->setType($champ,'hidden');
200 }
201 } else {
202
203 if(!in_array($champ, $tableau[$this->cerfa->getVal($tab)]['values'])) {
204
205 $this->form->setType($champ,'hidden');
206 }
207 }
208 }
209 }
210
211
212
213 function setType(&$form,$maj) {
214 parent::setType($form,$maj);
215
216 if(file_exists ("../sql/".$this->db->phptype."/".$this->table.".form.inc.php"))
217 include ("../sql/".$this->db->phptype."/".$this->table.".form.inc.php");
218 elseif(file_exists ("../sql/".$this->db->phptype."/".$this->table.".form.inc"))
219 include ("../sql/".$this->db->phptype."/".$this->table.".form.inc");
220
221 if(empty($this->cerfa)) {
222 $this->getCerfa();
223 }
224
225 $this->setTabType("tab_surface");
226 $this->setTabType("tab_tax_su_princ");
227 $this->setTabType("tab_tax_su_heber");
228 $this->setTabType("tab_tax_su_secon");
229 $this->setTabType("tab_tax_su_tot");
230 $this->setTabType("tab_tax_su_non_habit_surf");
231 $this->setTabType("tab_tax_am");
232
233 //Champs select pour les liste a choix oui/non/je ne sais pas (terr_*)
234 if($maj == 0) {
235 $form->setType('terr_juri_titul','select');
236 $form->setType('terr_juri_lot','select');
237 $form->setType('terr_juri_zac','select');
238 $form->setType('terr_juri_afu','select');
239 $form->setType('terr_juri_pup','select');
240 $form->setType('terr_juri_oin','select');
241
242 } elseif($maj == 1) {
243 $form->setType('terr_juri_titul','select');
244 $form->setType('terr_juri_lot','select');
245 $form->setType('terr_juri_zac','select');
246 $form->setType('terr_juri_afu','select');
247 $form->setType('terr_juri_pup','select');
248 $form->setType('terr_juri_oin','select');
249
250 } elseif($maj == 2) {
251 $form->setType('terr_juri_titul','selectstatic');
252 $form->setType('terr_juri_lot','selectstatic');
253 $form->setType('terr_juri_zac','selectstatic');
254 $form->setType('terr_juri_afu','selectstatic');
255 $form->setType('terr_juri_pup','selectstatic');
256 $form->setType('terr_juri_oin','selectstatic');
257
258 } elseif($maj == 3) {
259 $form->setType('terr_juri_titul','selectstatic');
260 $form->setType('terr_juri_lot','selectstatic');
261 $form->setType('terr_juri_zac','selectstatic');
262 $form->setType('terr_juri_afu','selectstatic');
263 $form->setType('terr_juri_pup','selectstatic');
264 $form->setType('terr_juri_oin','selectstatic');
265
266 }
267
268
269 //Cache les champs des clés étrangères, elles sont renseignées automatiquement
270 $form->setType('dossier_instruction', 'hidden');
271 $form->setType('lot', 'hidden');
272
273 // Boucler sur les champs du cerfa pour cacher les données qui ne doivent
274 // pas être saisies
275
276 foreach ($this->champs as $champ) {
277 if(array_search($champ, $this->cerfa->champs) !== false) {
278 if($this->cerfa->getVal($champ) == 'f') {
279 $form->setType($champ,'hidden');
280 }
281 } else {
282 $id_tab_surface = $this->cerfa->getVal("tab_surface");
283 $id_tab_tax_su_princ = $this->cerfa->getVal("tab_tax_su_princ");
284 $id_tab_tax_su_heber = $this->cerfa->getVal("tab_tax_su_heber");
285 $id_tab_tax_su_secon = $this->cerfa->getVal("tab_tax_su_secon");
286 $id_tab_tax_su_tot = $this->cerfa->getVal("tab_tax_su_tot");
287 $id_tab_tax_su_non_habit_surf = $this->cerfa->getVal("tab_tax_su_non_habit_surf");
288 $id_tab_tax_am = $this->cerfa->getVal("tab_tax_am");
289 $hidden = true;
290
291 // On cache tous les champs
292 $form->setType($champ,'hidden');
293
294 // On défini l'affichage des champs des tableaux de configuration
295 // Si les tableau sont définis dans le cerfa on test si les champs des données
296 // techniques sont définis dans les tableaux de configuration des tableaux
297 // pour chaque cerfa alors on les affiche en type "text"
298 if(!empty($id_tab_surface)) {
299 if(in_array($champ, $tab_surface[$this->cerfa->getVal("tab_surface")]['values'])) {
300 $hidden = false;
301 }
302 }
303 if(!empty($id_tab_tax_su_princ)) {
304 if(in_array($champ, $tab_tax_su_princ[$this->cerfa->getVal("tab_tax_su_princ")]['values'])) {
305 $hidden = false;
306 }
307 }
308 if(!empty($id_tab_tax_su_heber)) {
309 if(in_array($champ, $tab_tax_su_heber[$this->cerfa->getVal("tab_tax_su_heber")]['values'])) {
310 $hidden = false;
311 }
312 }
313 if(!empty($id_tab_tax_su_secon)) {
314 if(in_array($champ, $tab_tax_su_secon[$this->cerfa->getVal("tab_tax_su_secon")]['values'])) {
315 $hidden = false;
316 }
317 }
318 if(!empty($id_tab_tax_su_tot)) {
319 if(in_array($champ, $tab_tax_su_tot[$this->cerfa->getVal("tab_tax_su_tot")]['values'])) {
320 $hidden = false;
321 }
322 }
323 if(!empty($id_tab_tax_su_non_habit_surf)) {
324 if(in_array($champ, $tab_tax_su_non_habit_surf[$this->cerfa->getVal("tab_tax_su_non_habit_surf")]['values'])) {
325 $hidden = false;
326 }
327 }
328 if(!empty($id_tab_tax_am)) {
329 if(in_array($champ, $tab_tax_am[$this->cerfa->getVal("tab_tax_am")]['values'])) {
330 $hidden = false;
331 }
332 }
333
334 if(!$hidden){
335 if($maj < 2) {
336 $form->setType($champ,'text');
337 } else {
338 $form->setType($champ,'static');
339 }
340
341 }
342 }
343 }
344 }
345
346 // Ajout des clés étrangères
347 function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
348 $this->retourformulaire = $retourformulaire;
349 if($validation == 0) {
350
351 //Si on est dans le dossier
352 if($retourformulaire =='dossier' || $retourformulaire =='dossier_instruction' ) {
353
354 $form->setVal('dossier_instruction', $idxformulaire);
355 $form->setVal('lot', "");
356 }
357
358 //Si on est dans le lot
359 if($retourformulaire =='lot') {
360
361 $form->setVal('dossier_instruction', "");
362 $form->setVal('lot', $idxformulaire);
363 }
364 }// fin validation
365 }// fin setValsousformulaire
366
367 function setLib(&$form,$maj) {
368 parent::setLib($form,$maj);
369 //libelle des champs
370 $form->setLib('tab_surface', "");
371 $form->setLib('tab_tax_su_princ', "");
372 $form->setLib('tab_tax_su_heber', "");
373 $form->setLib('tab_tax_su_secon', "");
374 $form->setLib('tab_tax_su_tot', "");
375 $form->setLib('tab_tax_su_non_habit_surf', "");
376 $form->setLib('tab_tax_am', "");
377 }
378
379 function setLayout(&$form, $maj) {
380 /*Fieldset Parametrage du cerfa */
381 $form->setBloc('cerfa','D',"","col_12");
382 $form->setFieldset('cerfa','D'
383 ,_("Parametrage du cerfa"));
384
385
386 $form->setFieldset('om_validite_fin','F','');
387 $form->setBloc('om_validite_fin','F');
388
389 $form->setBloc('terr_juri_titul','D',"","col_12");
390 $form->setFieldset('terr_juri_titul','D'
391 ,_("Terrain"));
392 $form->setBloc('terr_juri_titul','D',_("Situation juridique du terrain"),"col_12");
393 $form->setBloc('terr_juri_desc','F');
394 $form->setBloc('terr_div_surf_etab','D',_("Terrain issu d'une division de propriete"),"col_12");
395 $form->setBloc('terr_div_surf_av_div','F');
396
397 $form->setFieldset('terr_div_surf_av_div','F','');
398 $form->setBloc('terr_div_surf_av_div','F');
399
400 $form->setBloc('avap_co_elt_pro','D',"","col_12");
401 $form->setFieldset('avap_co_elt_pro','D'
402 ,_("Projet"));
403
404
405 $form->setFieldset('avap_aut_auv_elec','F','');
406 $form->setBloc('avap_aut_auv_elec','F');
407
408
409 $form->setBloc('tr_total','D',"","col_12");
410 $form->setFieldset('tr_total','D'
411 ,_("Projet"));
412
413
414 $form->setFieldset('tr_desc','F','');
415 $form->setBloc('tr_desc','F');
416
417 /*Fieldset n°4 Ouverture de chantier */
418 $form->setBloc('doc_date','D',"","col_12");
419 $form->setFieldset('doc_date','D'
420 ,_("Ouverture de chantier"));
421
422 $form->setFieldset('doc_nb_log_autre','F','');
423 $form->setBloc('doc_nb_log_autre','F');
424
425 /*Fieldset n°4 Achèvement des travaux */
426 $form->setBloc('daact_date','D',"","col_12");
427 $form->setFieldset('daact_date','D'
428 ,_("Achevement des travaux"));
429
430 $form->setFieldset('daact_nb_log_autre','F','');
431 $form->setBloc('daact_nb_log_autre','F');
432
433 /*Fieldset n°4 Projet d'aménagement */
434 $form->setBloc('am_lotiss','D',"","col_12");
435 $form->setFieldset('am_lotiss','D'
436 ,_("Projet d'amenagement"));
437 // bloc 4.1
438 $form->setBloc('am_lotiss','D',_("Nature des travaux, instalations
439 ou amenagements envisages"),"col_12");
440
441 $form->setBloc('am_tranche_desc','F');
442
443 // bloc 4.2
444 $form->setBloc('am_lot_max_nb','D',_("Demande concernant un lotissement"),"col_12");
445
446 $form->setBloc('am_lot_vente_ant','F');
447
448 // bloc 4.3
449 $form->setBloc('am_empl_nb','D',_("Amenagement d'un camping ou
450 d'un terrain amenage en vue de l'hebergement
451 touristique"),"col_12");
452
453 $form->setBloc('am_exist_agrand','F');
454
455 $form->setFieldset('am_coupe_autr','F','');
456
457 $form->setBloc('am_coupe_autr','F');
458
459 /*Fieldset n°5 Projet de construction */
460 $form->setBloc('co_archi_recours','D',"","col_12");
461 $form->setFieldset('co_archi_recours','D'
462 ,_("Projet de construction"));
463 // bloc 5.1
464 $form->setBloc('co_archi_recours','D',_("Architecte"),"col_12");
465
466 $form->setBloc('co_archi_recours','DF', "","group");
467
468 $form->setBloc('co_archi_nom','D', "","group");
469 $form->setBloc('co_archi_prenom','F');
470
471 $form->setBloc('co_archi_adr_num','D', "","group");
472 $form->setBloc('co_archi_adr_voie','F');
473
474 $form->setBloc('co_archi_adr_lieu_dit','D', "","group");
475 $form->setBloc('co_archi_adr_localite','F');
476
477 $form->setBloc('co_archi_adr_cp','D', "","group");
478 $form->setBloc('co_archi_adr_cedex','F');
479
480 $form->setBloc('co_archi_no_incri','DF', "","group");
481
482 $form->setBloc('co_archi_cg','DF', "","group");
483
484 $form->setBloc('co_archi_tel1','D', "","group");
485 $form->setBloc('co_archi_tel2','F');
486
487 $form->setBloc('co_archi_mail','DF', "","group");
488
489 $form->setBloc('co_archi_mail','F');
490
491 // bloc 5.2
492 $form->setBloc('co_cstr_nouv','D',_("Nature du projet"),"col_12");
493
494 $form->setBloc('co_elec_tension','F');
495
496 // bloc 5.3
497 $form->setBloc('co_tot_log_nb','D',_("Informations complementaires"),"col_12");
498
499 $form->setBloc('co_trx_nivsup','F');
500
501 // bloc 5.4
502 $form->setBloc('co_demont_period','D',_("Construction periodiquement
503 demontee et re-installee"),"col_12");
504
505 $form->setBloc('co_demont_period','F');
506
507 // bloc 5.5
508 $form->setBloc('tab_surface','D',_("Destination des constructions
509 et tableau des surfaces"),"col_12");
510
511 $form->setBloc('tab_surface','F');
512
513 // bloc 5.6
514 $form->setBloc('co_sp_transport','D',_("Destination des constructions
515 futures en cas de realisation au benefice d'un
516 service public ou d'interet collectif"),"col_12");
517
518 $form->setBloc('co_sp_culture','F');
519
520 // bloc 5.7
521 $form->setBloc('co_statio_avt_nb','D',_("Stationnement"),"col_12");
522
523 $form->setBloc('co_statio_comm_cin_surf','F');
524
525 $form->setFieldset('co_statio_apr_surf','F','');
526
527 $form->setBloc('co_statio_apr_surf','F');
528
529
530 /*Fieldset n°6 Projet necessitant demolitions */
531 $form->setBloc('dm_constr_dates','D',"","col_12");
532 $form->setFieldset('dm_constr_dates','D'
533 ,_("Projet necessitant demolitions"));
534
535 $form->setBloc('dm_constr_dates','D',"","col_12");
536
537 $form->setBloc('dm_tot_log_nb','F');
538
539 $form->setFieldset('dm_tot_log_nb','F','');
540
541 $form->setBloc('dm_tot_log_nb','F');
542
543 $form->setBloc('tax_surf_tot','D',_("Declaration des elements necessaires au calcul des impositions"),"col_12");
544 $form->setBloc('tax_surf_tot','D',"","col_12");
545 $form->setFieldset('tax_surf_tot','D'
546 ,_("Renseignement"));
547
548 $form->setBloc('tax_surf_tot','D',"","col_12");
549
550 $form->setBloc('tax_dest_loc_tr','F');
551
552 $form->setBloc('tab_tax_su_princ','D',_("Locaux a usage d'habitation principale"),"col_12");
553 $form->setBloc('tab_tax_su_princ','F');
554
555 $form->setBloc('tab_tax_su_heber','D',_("Locaux a usage d'hebergement"),"col_12");
556 $form->setBloc('tab_tax_su_heber','F');
557
558 $form->setBloc('tab_tax_su_secon','D',_("Locaux a usage d'habitation secondaire"),"col_12");
559 $form->setBloc('tab_tax_su_secon','F');
560
561 $form->setBloc('tab_tax_su_tot','D',_("Total de logement"),"col_12");
562 $form->setBloc('tab_tax_su_tot','F');
563
564 $form->setBloc('tax_ext_pret','D',"","col_12");
565 $form->setBloc('tax_log_exist_nb','F');
566
567 $form->setBloc('tax_comm_nb','D',_("Creation ou extension de locaux non destines a l'habitation"),"col_12");
568 $form->setBloc('tab_tax_su_non_habit_surf','F');
569
570 $form->setBloc('tab_tax_am','D',_("Autres elements soumis a la taxe d'amenagement"),"col_12");
571 $form->setBloc('tab_tax_am','F');
572
573 $form->setBloc('tax_trx_presc_ppr','D',_("Cas particuliers"),"col_12");
574 $form->setBloc('tax_monu_hist','F');
575
576 $form->setFieldset('tax_monu_hist','F','');
577
578 $form->setBloc('tax_monu_hist','F');
579
580 $form->setBloc('vsd_surf_planch_smd','D',"","col_12");
581 $form->setFieldset('vsd_surf_planch_smd','D'
582 ,_("Autres renseignements"));
583
584 $form->setBloc('vsd_surf_planch_smd','D',_("Versement pour sous-densite (VSD)"),"col_12");
585 $form->setBloc('vsd_rescr_fisc','F');
586
587 $form->setBloc('pld_val_terr','D',_("Plafond legal de densite (PLD)"),"col_12");
588 $form->setBloc('pld_const_exist_dem_surf','F');
589
590 $form->setFieldset('pld_const_exist_dem_surf','F','');
591
592 $form->setBloc('pld_const_exist_dem_surf','F');
593
594 $form->setBloc('pld_const_exist_dem_surf','F');
595 }
596
597
598
599 /**
600 * Surcharge du bouton retour afin de retourner sur le dossier d'instruction selon de cas
601 */
602 function retoursousformulaire($idxformulaire, $retourformulaire, $val,
603 $objsf, $premiersf, $tricolsf, $validation,
604 $idx, $maj, $retour) {
605
606 $visualisation = $this->getParameter('visualisation');
607
608 if ( $visualisation == "" ){
609
610 // Ajout et consultation, retour dossier
611 if ( ( $maj == 0 && $validation == 0 ) ||
612 ( $maj == 3 && $validation == 0 ) ||
613 ( $maj == 0 && $validation == 1 ) && $retourformulaire == "dossier_instruction" ){
614
615 echo "\n<a class=\"retour\" ";
616 echo "href=\"#\" ";
617 echo "onclick=\"redirectPortletAction(1,'main');\" ";
618 echo ">";
619 echo _("Retour");
620 echo "</a>\n";
621 }
622 //Sinon affiche un retour normal
623 else{
624
625 parent::retoursousformulaire($idxformulaire, $retourformulaire, $val,
626 $objsf, $premiersf, $tricolsf, $validation,
627 $idx, $maj, $retour);
628 }
629 }
630 }
631 }// fin classe
632 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26