Update card.php

This commit is contained in:
ptibogxiv 2019-09-08 20:08:32 +02:00 committed by GitHub
parent 2d3b0a7d43
commit a83c067081
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -867,6 +867,18 @@ else
$object->country=$tmparray['label']; $object->country=$tmparray['label'];
} }
if (!empty($socid)) {
$object = new Societe($db);
if ($socid > 0) $object->fetch($socid);
if (! ($object->id > 0))
{
$langs->load("errors");
print($langs->trans('ErrorRecordNotFound'));
exit;
}
}
$adht = new AdherentType($db); $adht = new AdherentType($db);
print load_fiche_titre($langs->trans("NewMember")); print load_fiche_titre($langs->trans("NewMember"));
@ -905,6 +917,7 @@ else
print '<form name="formsoc" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">'; print '<form name="formsoc" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="socid" value="'.$socid.'">';
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">'; if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
dol_fiche_head(''); dol_fiche_head('');