1 |
<?php |
<?php |
2 |
//$Id$ |
//$Id$ |
3 |
//gen openMairie le 13/02/2013 15:13 |
//gen openMairie le 15/02/2013 16:29 |
4 |
|
|
5 |
require_once ("../obj/om_dbform.class.php"); |
require_once ("../obj/om_dbform.class.php"); |
6 |
|
|
27 |
} else { |
} else { |
28 |
$this->valF['dossier_autorisation'] = $val['dossier_autorisation']; |
$this->valF['dossier_autorisation'] = $val['dossier_autorisation']; |
29 |
} |
} |
|
if (!is_numeric($val['cerfa'])) { |
|
|
$this->valF['cerfa'] = NULL; |
|
|
} else { |
|
|
$this->valF['cerfa'] = $val['cerfa']; |
|
|
} |
|
30 |
} |
} |
31 |
|
|
32 |
//================================================= |
//================================================= |
62 |
} else { |
} else { |
63 |
$form->setType('dossier_autorisation','select'); |
$form->setType('dossier_autorisation','select'); |
64 |
} |
} |
|
|
|
|
if($this->retourformulaire=='cerfa' |
|
|
and $form->val['cerfa'] == $this->getParameter('idxformulaire')) { |
|
|
$form->setType('cerfa','selecthiddenstatic'); |
|
|
} else { |
|
|
$form->setType('cerfa','select'); |
|
|
} |
|
65 |
}// fin ajout |
}// fin ajout |
66 |
if ($maj==1){ //modifier |
if ($maj==1){ //modifier |
67 |
$form->setType('lot','hiddenstatic'); |
$form->setType('lot','hiddenstatic'); |
73 |
} else { |
} else { |
74 |
$form->setType('dossier_autorisation','select'); |
$form->setType('dossier_autorisation','select'); |
75 |
} |
} |
|
|
|
|
if($this->retourformulaire=='cerfa' |
|
|
and $form->val['cerfa'] == $this->getParameter('idxformulaire')) { |
|
|
$form->setType('cerfa','selecthiddenstatic'); |
|
|
} else { |
|
|
$form->setType('cerfa','select'); |
|
|
} |
|
76 |
}// fin modifier |
}// fin modifier |
77 |
if ($maj==2){ //supprimer |
if ($maj==2){ //supprimer |
78 |
$form->setType('lot','hiddenstatic'); |
$form->setType('lot','hiddenstatic'); |
79 |
$form->setType('libelle','hiddenstatic'); |
$form->setType('libelle','hiddenstatic'); |
80 |
$form->setType('dossier_autorisation','selectstatic'); |
$form->setType('dossier_autorisation','selectstatic'); |
|
$form->setType('cerfa','selectstatic'); |
|
81 |
}//fin supprimer |
}//fin supprimer |
82 |
if ($maj==3){ //consulter |
if ($maj==3){ //consulter |
83 |
$form->setType('lot','static'); |
$form->setType('lot','static'); |
84 |
$form->setType('libelle','static'); |
$form->setType('libelle','static'); |
85 |
$form->setType('dossier_autorisation','selectstatic'); |
$form->setType('dossier_autorisation','selectstatic'); |
|
$form->setType('cerfa','selectstatic'); |
|
86 |
}//fin consulter |
}//fin consulter |
87 |
} |
} |
88 |
|
|
89 |
function setOnchange(&$form,$maj) { |
function setOnchange(&$form,$maj) { |
90 |
//javascript controle client |
//javascript controle client |
91 |
$form->setOnchange('lot','VerifNum(this)'); |
$form->setOnchange('lot','VerifNum(this)'); |
|
$form->setOnchange('cerfa','VerifNum(this)'); |
|
92 |
} |
} |
93 |
/** |
/** |
94 |
* Methode setTaille |
* Methode setTaille |
97 |
$form->setTaille("lot", 11); |
$form->setTaille("lot", 11); |
98 |
$form->setTaille("libelle", 30); |
$form->setTaille("libelle", 30); |
99 |
$form->setTaille("dossier_autorisation", 20); |
$form->setTaille("dossier_autorisation", 20); |
|
$form->setTaille("cerfa", 11); |
|
100 |
} |
} |
101 |
|
|
102 |
/** |
/** |
106 |
$form->setMax("lot", 11); |
$form->setMax("lot", 11); |
107 |
$form->setMax("libelle", 80); |
$form->setMax("libelle", 80); |
108 |
$form->setMax("dossier_autorisation", 20); |
$form->setMax("dossier_autorisation", 20); |
|
$form->setMax("cerfa", 11); |
|
109 |
} |
} |
110 |
|
|
111 |
|
|
114 |
$form->setLib('lot',_('lot')); |
$form->setLib('lot',_('lot')); |
115 |
$form->setLib('libelle',_('libelle')); |
$form->setLib('libelle',_('libelle')); |
116 |
$form->setLib('dossier_autorisation',_('dossier_autorisation')); |
$form->setLib('dossier_autorisation',_('dossier_autorisation')); |
|
$form->setLib('cerfa',_('cerfa')); |
|
117 |
} |
} |
118 |
|
|
119 |
function setSelect(&$form, $maj,&$db,$debug) { |
function setSelect(&$form, $maj,&$db,$debug) { |
122 |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
123 |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
124 |
|
|
|
// cerfa |
|
|
$this->init_select($form, $db, $maj, $debug, "cerfa", |
|
|
$sql_cerfa, $sql_cerfa_by_id, true); |
|
|
|
|
125 |
// dossier_autorisation |
// dossier_autorisation |
126 |
$this->init_select($form, $db, $maj, $debug, "dossier_autorisation", |
$this->init_select($form, $db, $maj, $debug, "dossier_autorisation", |
127 |
$sql_dossier_autorisation, $sql_dossier_autorisation_by_id, false); |
$sql_dossier_autorisation, $sql_dossier_autorisation_by_id, false); |
134 |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
135 |
$this->retourformulaire = $retourformulaire; |
$this->retourformulaire = $retourformulaire; |
136 |
if($validation == 0) { |
if($validation == 0) { |
|
if($retourformulaire =='cerfa') |
|
|
$form->setVal('cerfa', $idxformulaire); |
|
137 |
if($retourformulaire =='dossier_autorisation') |
if($retourformulaire =='dossier_autorisation') |
138 |
$form->setVal('dossier_autorisation', $idxformulaire); |
$form->setVal('dossier_autorisation', $idxformulaire); |
139 |
}// fin validation |
}// fin validation |