add hook on public new member card
This commit is contained in:
parent
ae4020c9fe
commit
76a0eba1a0
@ -73,6 +73,9 @@ if (empty($conf->global->MEMBER_ENABLE_PUBLIC))
|
||||
exit;
|
||||
}
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('publicnewmembercard', 'globalcard'));
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
$object = new Adherent($db);
|
||||
@ -152,10 +155,15 @@ function llxFooterVierge()
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
$parameters = array('');
|
||||
// Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
}
|
||||
|
||||
// Action called when page is submitted
|
||||
if ($action == 'add')
|
||||
{
|
||||
if (empty($reshook) && $action == 'add') {
|
||||
$error = 0;
|
||||
$urlback = '';
|
||||
|
||||
@ -454,8 +462,7 @@ if ($action == 'add')
|
||||
// Action called after a submitted was send and member created successfully
|
||||
// If MEMBER_URL_REDIRECT_SUBSCRIPTION is set to url we never go here because a redirect was done to this url.
|
||||
// backtopage parameter with an url was set on member submit page, we never go here because a redirect was done to this url.
|
||||
if ($action == 'added')
|
||||
{
|
||||
if (empty($reshook) && $action == 'added') {
|
||||
llxHeaderVierge($langs->trans("NewMemberForm"));
|
||||
|
||||
// Si on a pas ete redirige
|
||||
|
||||
@ -92,7 +92,7 @@ if ($id > 0)
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" width="35%">'.$object->firstname.' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Gender").'</td><td class="valeur">'.$object->gender.' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->company.' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td class="valeur">'.nl2br($object->address).' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td class="valeur">'.$object->zip.' '.$object->town.' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">'.$object->country.' </td></tr>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user