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 |
|
418 |
|
419 |
/*Fieldset n°4 Projet d'aménagement */ |
420 |
$form->setBloc('am_lotiss','D',"","col_12"); |
421 |
$form->setFieldset('am_lotiss','D' |
422 |
,_("Projet d'amenagement")); |
423 |
// bloc 4.1 |
424 |
$form->setBloc('am_lotiss','D',_("Nature des travaux, instalations |
425 |
ou amenagements envisages"),"col_12"); |
426 |
|
427 |
$form->setBloc('am_tranche_desc','F'); |
428 |
|
429 |
// bloc 4.2 |
430 |
$form->setBloc('am_lot_max_nb','D',_("Demande concernant un lotissement"),"col_12"); |
431 |
|
432 |
$form->setBloc('am_lot_vente_ant','F'); |
433 |
|
434 |
// bloc 4.3 |
435 |
$form->setBloc('am_empl_nb','D',_("Amenagement d'un camping ou |
436 |
d'un terrain amenage en vue de l'hebergement |
437 |
touristique"),"col_12"); |
438 |
|
439 |
$form->setBloc('am_exist_agrand','F'); |
440 |
|
441 |
$form->setFieldset('am_coupe_autr','F',''); |
442 |
|
443 |
$form->setBloc('am_coupe_autr','F'); |
444 |
|
445 |
/*Fieldset n°5 Projet de construction */ |
446 |
$form->setBloc('co_archi_recours','D',"","col_12"); |
447 |
$form->setFieldset('co_archi_recours','D' |
448 |
,_("Projet de construction")); |
449 |
// bloc 5.1 |
450 |
$form->setBloc('co_archi_recours','D',_("Architecte"),"col_12"); |
451 |
|
452 |
$form->setBloc('co_archi_recours','DF', "","group"); |
453 |
|
454 |
$form->setBloc('co_archi_nom','D', "","group"); |
455 |
$form->setBloc('co_archi_prenom','F'); |
456 |
|
457 |
$form->setBloc('co_archi_adr_num','D', "","group"); |
458 |
$form->setBloc('co_archi_adr_voie','F'); |
459 |
|
460 |
$form->setBloc('co_archi_adr_lieu_dit','D', "","group"); |
461 |
$form->setBloc('co_archi_adr_localite','F'); |
462 |
|
463 |
$form->setBloc('co_archi_adr_cp','D', "","group"); |
464 |
$form->setBloc('co_archi_adr_cedex','F'); |
465 |
|
466 |
$form->setBloc('co_archi_no_incri','DF', "","group"); |
467 |
|
468 |
$form->setBloc('co_archi_cg','DF', "","group"); |
469 |
|
470 |
$form->setBloc('co_archi_tel1','D', "","group"); |
471 |
$form->setBloc('co_archi_tel2','F'); |
472 |
|
473 |
$form->setBloc('co_archi_mail','DF', "","group"); |
474 |
|
475 |
$form->setBloc('co_archi_mail','F'); |
476 |
|
477 |
// bloc 5.2 |
478 |
$form->setBloc('co_cstr_nouv','D',_("Nature du projet"),"col_12"); |
479 |
|
480 |
$form->setBloc('co_elec_tension','F'); |
481 |
|
482 |
// bloc 5.3 |
483 |
$form->setBloc('co_tot_log_nb','D',_("Informations complementaires"),"col_12"); |
484 |
|
485 |
$form->setBloc('co_trx_nivsup','F'); |
486 |
|
487 |
// bloc 5.4 |
488 |
$form->setBloc('co_demont_period','D',_("Construction periodiquement |
489 |
demontee et re-installee"),"col_12"); |
490 |
|
491 |
$form->setBloc('co_demont_period','F'); |
492 |
|
493 |
// bloc 5.5 |
494 |
$form->setBloc('tab_surface','D',_("Destination des constructions |
495 |
et tableau des surfaces"),"col_12"); |
496 |
|
497 |
$form->setBloc('tab_surface','F'); |
498 |
|
499 |
// bloc 5.6 |
500 |
$form->setBloc('co_sp_transport','D',_("Destination des constructions |
501 |
futures en cas de realisation au benefice d'un |
502 |
service public ou d'interet collectif"),"col_12"); |
503 |
|
504 |
$form->setBloc('co_sp_culture','F'); |
505 |
|
506 |
// bloc 5.7 |
507 |
$form->setBloc('co_statio_avt_nb','D',_("Stationnement"),"col_12"); |
508 |
|
509 |
$form->setBloc('co_statio_comm_cin_surf','F'); |
510 |
|
511 |
$form->setFieldset('co_statio_apr_surf','F',''); |
512 |
|
513 |
$form->setBloc('co_statio_apr_surf','F'); |
514 |
|
515 |
|
516 |
/*Fieldset n°6 Projet necessitant demolitions */ |
517 |
$form->setBloc('dm_constr_dates','D',"","col_12"); |
518 |
$form->setFieldset('dm_constr_dates','D' |
519 |
,_("Projet necessitant demolitions")); |
520 |
|
521 |
$form->setBloc('dm_constr_dates','D',"","col_12"); |
522 |
|
523 |
$form->setBloc('dm_tot_log_nb','F'); |
524 |
|
525 |
$form->setFieldset('dm_tot_log_nb','F',''); |
526 |
|
527 |
$form->setBloc('dm_tot_log_nb','F'); |
528 |
|
529 |
$form->setBloc('tax_surf_tot','D',_("Declaration des elements necessaires au calcul des impositions"),"col_12"); |
530 |
$form->setBloc('tax_surf_tot','D',"","col_12"); |
531 |
$form->setFieldset('tax_surf_tot','D' |
532 |
,_("Renseignement")); |
533 |
|
534 |
$form->setBloc('tax_surf_tot','D',"","col_12"); |
535 |
|
536 |
$form->setBloc('tax_dest_loc_tr','F'); |
537 |
|
538 |
$form->setBloc('tab_tax_su_princ','D',_("Locaux a usage d'habitation principale"),"col_12"); |
539 |
$form->setBloc('tab_tax_su_princ','F'); |
540 |
|
541 |
$form->setBloc('tab_tax_su_heber','D',_("Locaux a usage d'hebergement"),"col_12"); |
542 |
$form->setBloc('tab_tax_su_heber','F'); |
543 |
|
544 |
$form->setBloc('tab_tax_su_secon','D',_("Locaux a usage d'habitation secondaire"),"col_12"); |
545 |
$form->setBloc('tab_tax_su_secon','F'); |
546 |
|
547 |
$form->setBloc('tab_tax_su_tot','D',_("Total de logement"),"col_12"); |
548 |
$form->setBloc('tab_tax_su_tot','F'); |
549 |
|
550 |
$form->setBloc('tax_ext_pret','D',"","col_12"); |
551 |
$form->setBloc('tax_log_exist_nb','F'); |
552 |
|
553 |
$form->setBloc('tax_comm_nb','D',_("Creation ou extension de locaux non destines a l'habitation"),"col_12"); |
554 |
$form->setBloc('tab_tax_su_non_habit_surf','F'); |
555 |
|
556 |
$form->setBloc('tab_tax_am','D',_("Autres elements soumis a la taxe d'amenagement"),"col_12"); |
557 |
$form->setBloc('tab_tax_am','F'); |
558 |
|
559 |
$form->setBloc('tax_trx_presc_ppr','D',_("Cas particuliers"),"col_12"); |
560 |
$form->setBloc('tax_monu_hist','F'); |
561 |
|
562 |
$form->setFieldset('tax_monu_hist','F',''); |
563 |
|
564 |
$form->setBloc('tax_monu_hist','F'); |
565 |
|
566 |
$form->setBloc('vsd_surf_planch_smd','D',"","col_12"); |
567 |
$form->setFieldset('vsd_surf_planch_smd','D' |
568 |
,_("Autres renseignements")); |
569 |
|
570 |
$form->setBloc('vsd_surf_planch_smd','D',_("Versement pour sous-densite (VSD)"),"col_12"); |
571 |
$form->setBloc('vsd_rescr_fisc','F'); |
572 |
|
573 |
$form->setBloc('pld_val_terr','D',_("Plafond legal de densite (PLD)"),"col_12"); |
574 |
$form->setBloc('pld_const_exist_dem_surf','F'); |
575 |
|
576 |
$form->setFieldset('pld_const_exist_dem_surf','F',''); |
577 |
|
578 |
$form->setBloc('pld_const_exist_dem_surf','F'); |
579 |
|
580 |
$form->setBloc('pld_const_exist_dem_surf','F'); |
581 |
} |
582 |
|
583 |
|
584 |
|
585 |
/** |
586 |
* Surcharge du bouton retour afin de retourner sur le dossier d'instruction selon de cas |
587 |
*/ |
588 |
function retoursousformulaire($idxformulaire, $retourformulaire, $val, |
589 |
$objsf, $premiersf, $tricolsf, $validation, |
590 |
$idx, $maj, $retour) { |
591 |
|
592 |
$visualisation = $this->getParameter('visualisation'); |
593 |
|
594 |
if ( $visualisation == "" ){ |
595 |
|
596 |
// Ajout et consultation, retour dossier |
597 |
if ( ( $maj == 0 && $validation == 0 ) || |
598 |
( $maj == 3 && $validation == 0 ) || |
599 |
( $maj == 0 && $validation == 1 ) && $retourformulaire == "dossier_instruction" ){ |
600 |
|
601 |
echo "\n<a class=\"retour\" "; |
602 |
echo "href=\"#\" "; |
603 |
echo "onclick=\"redirectPortletAction(1,'main');\" "; |
604 |
echo ">"; |
605 |
echo _("Retour"); |
606 |
echo "</a>\n"; |
607 |
} |
608 |
//Sinon affiche un retour normal |
609 |
else{ |
610 |
|
611 |
parent::retoursousformulaire($idxformulaire, $retourformulaire, $val, |
612 |
$objsf, $premiersf, $tricolsf, $validation, |
613 |
$idx, $maj, $retour); |
614 |
} |
615 |
} |
616 |
} |
617 |
}// fin classe |
618 |
?> |