|
200 | 200 | print $form->select_company('', 'labourdoctor_socid', '', 'SelectThirdParty', 1, 0, $events, 0, 'minwidth300');
|
201 | 201 | }
|
202 | 202 | }
|
203 |
| - if ( ! GETPOSTISSET('backtopage')) print ' <a href="' . DOL_URL_ROOT . '/societe/card.php?action=create&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddThirdParty") . '"></span></a>'; |
| 203 | + if (!GETPOSTISSET('backtopage')) { |
| 204 | + print ' <a href="' . DOL_URL_ROOT . '/societe/card.php?action=create&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddThirdParty") . '"></span></a>'; |
| 205 | + } |
204 | 206 | print '</td></tr>';
|
205 | 207 |
|
206 | 208 | // * Related contacts - Contacts associés *
|
|
210 | 212 | $labourDoctorPreselectedIds = $labourdDoctorContact->id;
|
211 | 213 |
|
212 | 214 | if ($labourdDoctorContact->id) {
|
213 |
| - print $form->selectcontacts(empty($labourdDoctorSociety->id[0]) ? -1 : $labourdDoctorSociety->id[0], $labourdDoctorContact->id, 'labourdoctor_contactid[]', 0, '', '', 0, 'quatrevingtpercent', false, 0, array(), false, 'multiple', 'labourdoctor_contactid'); |
| 215 | + print $form->selectcontacts(empty($labourdDoctorSociety->id[0]) ? -1 : $labourdDoctorSociety->id[0], $labourdDoctorContact->id, 'labourdoctor_contactid[]', 0, '', '', 0, 'minwidth500', false, 0, array(), false, 'multiple', 'labourdoctor_contactid'); |
214 | 216 | } else {
|
215 |
| - $labourDoctorPreselectedIds = GETPOST('labourdoctor_contactid', 'array'); |
216 |
| - if (GETPOST('labourdoctor_contactid', 'array')) $labourDoctorPreselectedIds[GETPOST('labourdoctor_contactid', 'array')] = GETPOST('labourdoctor_contactid', 'array'); |
217 |
| - print $form->selectcontacts(empty(GETPOST('labourdoctor_socid', 'int')) ? -1 : GETPOST('labourdoctor_socid', 'int'), $labourDoctorPreselectedIds, 'labourdoctor_contactid[]', 0, '', '', 0, 'quatrevingtpercent', false, 0, array(), false, 'multiple', 'labourdoctor_contactid'); |
| 217 | + $labourDoctorPreselectedIds = GETPOST('labourdoctor_contactid', 'array'); |
| 218 | + if (GETPOST('labourdoctor_contactid', 'array')) { |
| 219 | + $labourDoctorPreselectedIds[GETPOST('labourdoctor_contactid', 'array')] = GETPOST('labourdoctor_contactid', 'array'); |
| 220 | + } |
| 221 | + print $form->selectcontacts(empty(GETPOST('labourdoctor_socid', 'int')) ? -1 : GETPOST('labourdoctor_socid', 'int'), $labourDoctorPreselectedIds, 'labourdoctor_contactid[]', 0, '', '', 0, 'minwidth500', false, 0, array(), false, 'multiple', 'labourdoctor_contactid'); |
218 | 222 | }
|
219 |
| - print '</td></tr>'; |
| 223 | + if (!GETPOSTISSET('backtopage')) { |
| 224 | + print ' <a href="' . DOL_URL_ROOT . '/contact/card.php?action=create&socid='. $labourdDoctorSociety->id[0] .'&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddContact") . '"></span></a>'; |
| 225 | + } |
| 226 | + print '</td></tr>'; |
220 | 227 |
|
221 | 228 | /*
|
222 | 229 | *** Labour Inspector -- Inspecteur du travail ***
|
|
245 | 252 | print $form->select_company('', 'labourinspector_socid', '', 'SelectThirdParty', 1, 0, $events, 0, 'minwidth300');
|
246 | 253 | }
|
247 | 254 | }
|
248 |
| - if ( ! GETPOSTISSET('backtopage')) print ' <a href="' . DOL_URL_ROOT . '/societe/card.php?action=create&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddThirdParty") . '"></span></a>'; |
| 255 | + if (!GETPOSTISSET('backtopage')) { |
| 256 | + print ' <a href="' . DOL_URL_ROOT . '/societe/card.php?action=create&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddThirdParty") . '"></span></a>'; |
| 257 | + } |
249 | 258 | print '</td></tr>';
|
250 | 259 |
|
251 | 260 | // * Related contacts - Contacts associés *
|
|
256 | 265 | $labourInspectorPreselectedIds = $labourInspectorContacts->id;
|
257 | 266 |
|
258 | 267 | if ($labourInspectorContacts->id) {
|
259 |
| - print $form->selectcontacts(empty($labourdInspectorSociete->id[0]) ? -1 : $labourdInspectorSociete->id[0], $labourInspectorContacts->id, 'labourinspector_contactid[]', 0, '', '', 0, 'quatrevingtpercent', false, 0, array(), false, 'multiple', 'labourinspector_contactid'); |
| 268 | + print $form->selectcontacts(empty($labourdInspectorSociete->id[0]) ? -1 : $labourdInspectorSociete->id[0], $labourInspectorContacts->id, 'labourinspector_contactid[]', 0, '', '', 0, 'minwidth500', false, 0, array(), false, 'multiple', 'labourinspector_contactid'); |
260 | 269 | } else {
|
261 | 270 | $labourInspectorPreselectedIds = GETPOST('labourinspector_contactid', 'array');
|
262 |
| - if (GETPOST('labourinspector_contactid', 'array')) $labourInspectorPreselectedIds[GETPOST('labourinspector_contactid', 'array')] = GETPOST('labourinspector_contactid', 'array'); |
263 |
| - print $form->selectcontacts(empty(GETPOST('labourinspector_socid', 'int')) ? -1 : GETPOST('labourinspector_socid', 'int'), $labourInspectorPreselectedIds, 'labourinspector_contactid[]', 0, '', '', 0, 'quatrevingtpercent', false, 0, array(), false, 'multiple', 'labourinspector_contactid'); |
| 271 | + if (GETPOST('labourinspector_contactid', 'array')) { |
| 272 | + $labourInspectorPreselectedIds[GETPOST('labourinspector_contactid', 'array')] = GETPOST('labourinspector_contactid', 'array'); |
| 273 | + } |
| 274 | + print $form->selectcontacts(empty(GETPOST('labourinspector_socid', 'int')) ? -1 : GETPOST('labourinspector_socid', 'int'), $labourInspectorPreselectedIds, 'labourinspector_contactid[]', 0, '', '', 0, 'minwidth500', false, 0, array(), false, 'multiple', 'labourinspector_contactid'); |
264 | 275 | }
|
| 276 | + if (!GETPOSTISSET('backtopage')) { |
| 277 | + print ' <a href="' . DOL_URL_ROOT . '/contact/card.php?action=create&socid='. $labourdInspectorSociete->id[0] .'&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddContact") . '"></span></a>'; |
| 278 | + } |
265 | 279 | print '</td></tr>';
|
266 | 280 |
|
267 | 281 | /*
|
|
0 commit comments