diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index ddb4632181d..0b2ade260e7 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -1,29 +1,30 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo -* Copyright (C) 2004-2011 Laurent Destailleur -* Copyright (C) 2005-2012 Regis Houssin -* Copyright (C) 2012 Marcos García -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Marcos García + * Copyright (C) 2012 Philippe Grand + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * \file htdocs/adherents/fiche.php -* \ingroup member -* \brief Page of member -*/ + * \ingroup member + * \brief Page of member + */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; @@ -74,7 +75,7 @@ if (! empty($canvas)) { require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; $objcanvas = new Canvas($db, $action); - $objcanvas->getCanvas('adherent', 'card', $canvas); + $objcanvas->getCanvas('adherent', 'membercard', $canvas); } $errmsg=''; $errmsgs=array(); @@ -140,7 +141,6 @@ if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights } } } -else $object->canvas=$canvas; if ($action == 'setsocid') { @@ -197,7 +197,6 @@ if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user $errmsg=$object->error; } } -else $object->canvas=$canvas; // Create third party from a member if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) @@ -220,7 +219,6 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights $errmsg=$object->error; } } -else $object->canvas=$canvas; if ($action == 'confirm_sendinfo' && $confirm == 'yes') { @@ -398,6 +396,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) if ($action == 'add' && $user->rights->adherent->creer) { + if ($canvas) $object->canvas=$canvas; $datenaiss=''; if (isset($_POST["naissday"]) && $_POST["naissday"] && isset($_POST["naissmonth"]) && $_POST["naissmonth"] @@ -718,6 +717,7 @@ else /* Fiche creation */ /* */ /* ************************************************************************** */ + $object->canvas=$canvas; $object->fk_departement = $_POST["departement_id"]; // We set country_id, country_code and country for the selected country