/[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 2042 - (show annotations)
Tue Jun 25 10:54:34 2013 UTC (11 years, 7 months ago) by vpihour
File size: 29002 byte(s)
Prise en compte des dates de validité d'un cerfa rattaché à des données techniques

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26