10 |
$this->constructeur($id,$db,$debug); |
$this->constructeur($id,$db,$debug); |
11 |
}// fin constructeur |
}// fin constructeur |
12 |
|
|
13 |
// ============================================= |
/* |
14 |
// Ajout du fielset |
* Pays par défaut : France |
15 |
// Add fieldset |
*/ |
16 |
// ============================================= |
function setVal(&$form, $maj, $validation, &$db) { |
17 |
function setLayout(&$form, $maj){ |
if($maj == 0) { |
18 |
if ( $maj < 2 OR $maj == 3 ) { |
$form->setVal("pays",'France'); |
|
|
|
|
//Champs sur lequel s'ouvre le fieldset |
|
|
$form->setBloc('particulier_civilite','D',"", "particulier_fields"); |
|
|
|
|
|
$form->setBloc('particulier_civilite','D',""); |
|
|
$form->setBloc('particulier_civilite','F'); |
|
|
|
|
|
$form->setBloc('particulier_nom','D',"","group search_particulier_fields"); |
|
|
$form->setBloc('particulier_prenom','F'); |
|
|
|
|
|
$form->setBloc('particulier_date_naissance','D',"","group"); |
|
|
$form->setBloc('particulier_commune_naissance','F'); |
|
|
|
|
|
$form->setBloc('particulier_departement_naissance','D',""); |
|
|
$form->setBloc('particulier_departement_naissance','F'); |
|
|
|
|
|
$form->setBloc('particulier_departement_naissance','F'); |
|
|
|
|
|
$form->setBloc('personne_morale_denomination','D',"", "personne_morale_fields"); |
|
|
|
|
|
$form->setBloc('personne_morale_denomination','D',"","group search_personne_morale_fields"); |
|
|
$form->setBloc('personne_morale_raison_sociale','F'); |
|
|
|
|
|
$form->setBloc('personne_morale_siret','D',""); |
|
|
$form->setBloc('personne_morale_siret','F'); |
|
|
|
|
|
$form->setBloc('personne_morale_categorie_juridique','D',""); |
|
|
$form->setBloc('personne_morale_categorie_juridique','F'); |
|
|
|
|
|
$form->setBloc('personne_morale_civilite','D',""); |
|
|
$form->setBloc('personne_morale_civilite','F'); |
|
|
|
|
|
$form->setBloc('personne_morale_nom','D',"", "group"); |
|
|
$form->setBloc('personne_morale_prenom','F'); |
|
|
|
|
|
$form->setBloc('personne_morale_prenom','F'); |
|
|
|
|
|
$form->setBloc('numero','D',""); |
|
|
|
|
|
$form->setBloc('numero','D',"","group"); |
|
|
$form->setBloc('voie','F'); |
|
|
|
|
|
$form->setBloc('complement','D',""); |
|
|
$form->setBloc('complement','F'); |
|
|
|
|
|
$form->setBloc('lieu_dit','D',"","group"); |
|
|
$form->setBloc('localite','F'); |
|
|
|
|
|
$form->setBloc('code_postal','D',"","group"); |
|
|
$form->setBloc('cedex','F'); |
|
|
|
|
|
$form->setBloc('pays','D',"", "","group"); |
|
|
$form->setBloc('division_territoriale','F'); |
|
|
|
|
|
$form->setBloc('telephone_fixe','D',"", "group"); |
|
|
$form->setBloc('indicatif','F'); |
|
|
|
|
|
$form->setBloc('frequent','F'); |
|
19 |
} |
} |
20 |
} |
} |
21 |
|
|
55 |
/* qualite*/ |
/* qualite*/ |
56 |
$contenu=array(); |
$contenu=array(); |
57 |
|
|
58 |
$contenu[0][0]=""; |
$contenu[0][0]="particulier"; |
59 |
$contenu[1][0]=_('choisir')." "._('qualite'); |
$contenu[1][0]=_('particulier'); |
60 |
$contenu[0][1]="particulier"; |
$contenu[0][1]="personne_morale"; |
61 |
$contenu[1][1]=_('particulier'); |
$contenu[1][1]=_('personne morale'); |
|
$contenu[0][2]="personne_morale"; |
|
|
$contenu[1][2]=_('personne morale'); |
|
62 |
|
|
63 |
$form->setSelect("qualite",$contenu); |
$form->setSelect("qualite",$contenu); |
64 |
} |
} |
72 |
|
|
73 |
$form->setOnchange("qualite","changeDemandeurType('qualite');"); |
$form->setOnchange("qualite","changeDemandeurType('qualite');"); |
74 |
} |
} |
75 |
|
|
76 |
|
/** |
77 |
|
* Ajout d'un champs caché permettant de linker l'id du demandeur |
78 |
|
* recement ajouté |
79 |
|
**/ |
80 |
|
function sousFormSpecificContent($maj) { |
81 |
|
if(isset($this->valF['demandeur']) AND !empty($this->valF['demandeur'])) { |
82 |
|
echo "<input id=\"id_retour\" name=\"idRetour\" type=\"hidden\" value=\"". |
83 |
|
$this->valF['demandeur']."\" />"; |
84 |
|
} |
85 |
|
} |
86 |
|
/** |
87 |
|
* Surcharge du lien de retour permettant de linker l'id du demandeur |
88 |
|
* recement ajouté |
89 |
|
**/ |
90 |
|
function retoursousformulaire($idxformulaire, $retourformulaire, $val, |
91 |
|
$objsf, $premiersf, $tricolsf, $validation, |
92 |
|
$idx, $maj, $retour) { |
93 |
|
if($retourformulaire === "demande") { |
94 |
|
echo "\n<a class=\"retour\" "; |
95 |
|
echo "href=\"#\">"; |
96 |
|
// |
97 |
|
echo _("Retour"); |
98 |
|
// |
99 |
|
echo "</a>\n"; |
100 |
|
} else { |
101 |
|
parent::retoursousformulaire($idxformulaire, $retourformulaire, $val, |
102 |
|
$objsf, $premiersf, $tricolsf, $validation, |
103 |
|
$idx, $maj, $retour); |
104 |
|
} |
105 |
|
} |
106 |
|
|
107 |
|
/** |
108 |
|
* Ajout du paramètre principal |
109 |
|
*/ |
110 |
|
function getDataSubmitSousForm() { |
111 |
|
// |
112 |
|
$datasubmit = ""; |
113 |
|
$datasubmit .= "../scr/sousform.php"; |
114 |
|
$datasubmit .= "?"; |
115 |
|
$datasubmit .= "obj=".get_class($this); |
116 |
|
$datasubmit .= "&validation=".$this->getParameter("validation"); |
117 |
|
if ($this->getParameter("idx") != "]") { |
118 |
|
// |
119 |
|
if ($this->getParameter("maj") == 1) { // modifier |
120 |
|
$datasubmit .= "&action=1"; |
121 |
|
$datasubmit .= "&idx=".$this->getParameter("idx"); |
122 |
|
} else { // supprimer |
123 |
|
$datasubmit .= "&action=2"; |
124 |
|
$datasubmit .= "&idx=".$this->getParameter("idx"); |
125 |
|
} |
126 |
|
} |
127 |
|
$datasubmit .= "&premiersf=".$this->getParameter("premiersf"); |
128 |
|
$datasubmit .= "&retourformulaire=".$this->getParameter("retourformulaire"); |
129 |
|
$datasubmit .= "&trisf=".$this->getParameter("tricolsf"); |
130 |
|
$datasubmit .= "&idxformulaire=".$this->getParameter("idxformulaire"); |
131 |
|
$datasubmit .= "&principal=".$this->getParameter("principal"); |
132 |
|
// |
133 |
|
return $datasubmit; |
134 |
|
} |
135 |
|
|
136 |
|
/** |
137 |
|
* Synthèse des demandeurs pour le formulaire de la demande |
138 |
|
*/ |
139 |
|
function afficherSynthese($type) { |
140 |
|
echo "<div class=\"".$type."\">"; |
141 |
|
if($this->val[array_search('qualite', $this->champs)] == 'particulier') { |
142 |
|
$sql = "SELECT libelle FROM civilite WHERE civilite=". |
143 |
|
$this->val[array_search('civilite', $this->champs)]; |
144 |
|
$civilite = $this->f->db->getone($sql); |
145 |
|
$this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
146 |
|
$this->f->isDatabaseError($civilite); |
147 |
|
echo $civilite." ". |
148 |
|
$this->val[array_search('particulier_nom', $this->champs)]." ". |
149 |
|
$this->val[array_search('particulier_prenom', $this->champs)]."<br/>"; |
150 |
|
} else { |
151 |
|
echo $this->val[array_search('personne_morale_raison_sociale', $this->champs)]." ". |
152 |
|
$this->val[array_search('personne_morale_denomination', $this->champs)]."<br/>"; |
153 |
|
$sql = "SELECT libelle FROM civilite WHERE civilite=". |
154 |
|
$this->val[array_search('personne_morale_civilite', $this->champs)]; |
155 |
|
$civilite = $this->f->db->getone($sql); |
156 |
|
$this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
157 |
|
$this->f->isDatabaseError($civilite); |
158 |
|
echo $civilite." ". |
159 |
|
$this->val[array_search('personne_morale_nom', $this->champs)]." ". |
160 |
|
$this->val[array_search('personne_morale_nom', $this->champs)]."<br/>"; |
161 |
|
} |
162 |
|
echo (($this->val[array_search('numero', $this->champs)] != "")? |
163 |
|
$this->val[array_search('numero', $this->champs)]." " : ""). |
164 |
|
(($this->val[array_search('voie', $this->champs)] != "")? |
165 |
|
$this->val[array_search('voie', $this->champs)]." " : ""). |
166 |
|
(($this->val[array_search('complement', $this->champs)] != "")? |
167 |
|
$this->val[array_search('complement', $this->champs)]." " : "")."<br/>". |
168 |
|
(($this->val[array_search('code_postal', $this->champs)] != "")? |
169 |
|
$this->val[array_search('code_postal', $this->champs)]." " : ""). |
170 |
|
(($this->val[array_search('localite', $this->champs)] != "")? |
171 |
|
$this->val[array_search('localite', $this->champs)]." " : ""). |
172 |
|
(($this->val[array_search('bp', $this->champs)] != "")? |
173 |
|
$this->val[array_search('bp', $this->champs)]." " : ""). |
174 |
|
(($this->val[array_search('cedex', $this->champs)] != "")? |
175 |
|
$this->val[array_search('cedex', $this->champs)]." " : "")."<br/>". |
176 |
|
(($this->val[array_search('telephone_fixe', $this->champs)] != "")? |
177 |
|
$this->val[array_search('telephone_fixe', $this->champs)]." " : ""). |
178 |
|
(($this->val[array_search('telephone_mobile', $this->champs)] != "")? |
179 |
|
$this->val[array_search('telephone_mobile', $this->champs)]." " : ""); |
180 |
|
echo "</div>"; |
181 |
|
} |
182 |
|
|
183 |
}// fin classe |
}// fin classe |
184 |
?> |
?> |