NEW The thirdparties tabs, the contacts tabs and the members tabs are
now presented using a new top banner, saving space and using a same way to show address, status and navigation arrows.
This commit is contained in:
parent
df0c6aa5cf
commit
87c12717a7
@ -96,11 +96,11 @@ if ($object->id > 0)
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
@ -116,16 +116,6 @@ if ($object->id > 0)
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$object->lastname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$object->firstname.' </td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
@ -1432,13 +1432,6 @@ else
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->firstname.' </td></tr>';
|
||||
|
||||
// Password
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
@ -1559,6 +1552,22 @@ else
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end subscription
|
||||
print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">';
|
||||
if ($object->datefin)
|
||||
{
|
||||
print dol_print_date($object->datefin,'day');
|
||||
if ($object->hasDelay()) {
|
||||
print " ".img_warning($langs->trans("Late"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
print "</div></div></div>\n";
|
||||
|
||||
@ -572,46 +572,150 @@ if ($rowid > 0)
|
||||
dol_banner_tab($object, 'rowid', $linkback);
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td>';
|
||||
print $showphoto; $showphoto='';
|
||||
print '</tr>';
|
||||
}
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print $showphoto; $showphoto='';
|
||||
print '</tr>';
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.' </td>';
|
||||
print '</tr>';
|
||||
// Password
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Password").'</td><td>'.preg_replace('/./i','*',$object->pass);
|
||||
if ((! empty($object->pass) || ! empty($object->pass_crypted)) && empty($object->user_id))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$htmltext=$langs->trans("WarningPasswordSetWithNoAccount");
|
||||
print ' '.$form->textwithpicto('', $htmltext,1,'warning');
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Firstname
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->firstname.' </td>';
|
||||
print '</tr>';
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||
}
|
||||
|
||||
// EMail
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.dol_print_email($object->email,0,$object->fk_soc,1).'</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '<div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Birthday
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
|
||||
// Public
|
||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||
|
||||
// Categories
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
print '<tr><td>' . $langs->trans("Categories") . '</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->showCategories($object->id, 'member', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan'=>2);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
print $object->showOptionals($extrafields, 'view', $parameters);
|
||||
}
|
||||
|
||||
// Third party Dolibarr
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans("LinkedToDolibarrThirdParty");
|
||||
print '</td>';
|
||||
if ($action != 'editthirdparty' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="2" class="valeur">';
|
||||
if ($action == 'editthirdparty')
|
||||
{
|
||||
$htmlname='socid';
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" name="form'.$htmlname.'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$object->id.'">';
|
||||
print '<input type="hidden" name="action" value="set'.$htmlname.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||
print '<tr><td>';
|
||||
print $form->select_company($object->fk_soc,'socid','',1);
|
||||
print '</td>';
|
||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr></table></form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($object->fk_soc)
|
||||
{
|
||||
$company=new Societe($db);
|
||||
$result=$company->fetch($object->fk_soc);
|
||||
print $company->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("NoThirdPartyAssociatedToMember");
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Login Dolibarr
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans("LinkedToDolibarrUser");
|
||||
print '</td>';
|
||||
if ($action != 'editlogin' && $user->rights->adherent->creer)
|
||||
{
|
||||
print '<td align="right">';
|
||||
if ($user->rights->user->user->creer)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=editlogin&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="2" class="valeur">';
|
||||
if ($action == 'editlogin')
|
||||
{
|
||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid','');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($object->user_id)
|
||||
{
|
||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none');
|
||||
}
|
||||
else print $langs->trans("NoDolibarrAccess");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end subscription
|
||||
print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">';
|
||||
@ -629,76 +733,10 @@ if ($rowid > 0)
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party Dolibarr
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans("LinkedToDolibarrThirdParty");
|
||||
print '</td>';
|
||||
if ($action != 'editthirdparty' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td class="valeur">';
|
||||
if ($action == 'editthirdparty')
|
||||
{
|
||||
$htmlname='socid';
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" name="form'.$htmlname.'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$object->id.'">';
|
||||
print '<input type="hidden" name="action" value="set'.$htmlname.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||
print '<tr><td>';
|
||||
print $form->select_company($object->fk_soc,'socid','',1);
|
||||
print '</td>';
|
||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr></table></form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($object->fk_soc)
|
||||
{
|
||||
$company=new Societe($db);
|
||||
$result=$company->fetch($object->fk_soc);
|
||||
print $company->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("NoThirdPartyAssociatedToMember");
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Login Dolibarr
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans("LinkedToDolibarrUser");
|
||||
print '</td>';
|
||||
if ($action != 'editlogin' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlogin&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td class="valeur">';
|
||||
if ($action == 'editlogin')
|
||||
{
|
||||
/*$include=array();
|
||||
if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only
|
||||
{
|
||||
$include=array($object->user_id,$user->id);
|
||||
}*/
|
||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid','');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($object->user_id)
|
||||
{
|
||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none');
|
||||
}
|
||||
else print $langs->trans("NoDolibarrAccess");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
print '</div>';
|
||||
print "</div></div></div>\n";
|
||||
print '<div style="clear:both"></div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -83,6 +83,7 @@ include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
@ -91,19 +92,7 @@ if ($id > 0)
|
||||
$result=$membert->fetch($object->typeid);
|
||||
if ($result > 0)
|
||||
{
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
if (! empty($conf->notification->enabled))
|
||||
$langs->load("mails");
|
||||
|
||||
$head = member_prepare_head($object);
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
dol_fiche_head($head, 'document', $langs->trans("Member"),0,'user');
|
||||
|
||||
|
||||
|
||||
// Construit liste des fichiers
|
||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||
$totalsize=0;
|
||||
@ -111,34 +100,41 @@ if ($id > 0)
|
||||
{
|
||||
$totalsize+=$file['size'];
|
||||
}
|
||||
|
||||
if (! empty($conf->notification->enabled))
|
||||
$langs->load("mails");
|
||||
|
||||
$head = member_prepare_head($object);
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
dol_fiche_head($head, 'document', $langs->trans("Member"),0,'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'rowid', $linkback);
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print $form->showrefnav($object, 'rowid', $linkback);
|
||||
print '</td></tr>';
|
||||
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$membert->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||
print $form->showphoto('memberphoto',$object);
|
||||
print '</td>';*/
|
||||
print '</tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$membert->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
|
||||
|
||||
@ -146,17 +142,6 @@ if ($id > 0)
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->firstname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Nbre fichiers
|
||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
|
||||
@ -166,6 +151,8 @@ if ($id > 0)
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
$modulepart = 'member';
|
||||
$permission = $user->rights->adherent->creer;
|
||||
|
||||
@ -180,18 +180,24 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment');
|
||||
|
||||
print "\n";
|
||||
print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||
print "<input type=\"hidden\" name=\"rowid\" value=\"$rowid\">";
|
||||
print "<input type=\"hidden\" name=\"fk_bank\" value=\"".$subscription->fk_bank."\">";
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment');
|
||||
|
||||
print "\n";
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/cotisations.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td class="valeur" colspan="2">'.$subscription->ref.' </td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td class="valeur" colspan="3">';
|
||||
print $form->showrefnav($subscription, 'rowid', $linkback, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Member
|
||||
$adh->ref=$adh->getFullName($langs);
|
||||
@ -239,18 +245,18 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
}
|
||||
}
|
||||
|
||||
print '<tr><td colspan="3" align="center">';
|
||||
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print "\n";
|
||||
|
||||
print '</div>';
|
||||
print "\n";
|
||||
}
|
||||
|
||||
if ($rowid && $action != 'edit')
|
||||
@ -355,8 +361,7 @@ if ($rowid && $action != 'edit')
|
||||
print "</table>\n";
|
||||
print '</form>';
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
/*
|
||||
* Barre d'actions
|
||||
@ -388,6 +393,6 @@ if ($rowid && $action != 'edit')
|
||||
}
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -42,23 +42,34 @@ $result=restrictedArea($user,'adherent',$id);
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||
|
||||
$adh = new Adherent($db);
|
||||
$adh->fetch($id);
|
||||
$adh->info($id);
|
||||
$object = new Adherent($db);
|
||||
$object->fetch($id);
|
||||
$object->info($id);
|
||||
|
||||
$head = member_prepare_head($adh);
|
||||
$head = member_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'info', $langs->trans("Member"), 0, 'user');
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dol_print_object_info($adh);
|
||||
print '</td></tr></table>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'rowid', $linkback);
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<br>';
|
||||
dol_print_object_info($object);
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -44,12 +44,11 @@ if ($user->societe_id > 0)
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
|
||||
$adh = new Adherent($db);
|
||||
$adh->id = $rowid;
|
||||
$result=$adh->fetch($rowid);
|
||||
$object = new Adherent($db);
|
||||
$result=$object->fetch($rowid);
|
||||
if (! $result)
|
||||
{
|
||||
dol_print_error($db,"Failed to get adherent: ".$adh->error);
|
||||
dol_print_error($db,"Failed to get adherent: ".$object->error);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -65,8 +64,8 @@ if ($action == 'dolibarr2ldap')
|
||||
$ldap=new Ldap();
|
||||
$result=$ldap->connect_bind();
|
||||
|
||||
$info=$adh->_load_ldap_info();
|
||||
$dn=$adh->_load_ldap_dn($info);
|
||||
$info=$object->_load_ldap_info();
|
||||
$dn=$object->_load_ldap_dn($info);
|
||||
$olddn=$dn; // We can say that old dn = dn as we force synchro
|
||||
|
||||
$result=$ldap->update($dn,$info,$user,$olddn);
|
||||
@ -93,35 +92,27 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhé
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$head = member_prepare_head($adh);
|
||||
$head = member_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'ldap', $langs->trans("Member"), 0, 'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
dol_banner_tab($object, 'rowid', $linkback);
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print $form->showrefnav($adh,'id');
|
||||
print '</td></tr>';
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->lastname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td width="15%">'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->firstname.' </td>';
|
||||
print '</tr>';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Login
|
||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$adh->login.' </td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
|
||||
// Password not crypted
|
||||
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("LDAPFieldPasswordNotCrypted").'</td>';
|
||||
print '<td class="valeur">'.$adh->pass.'</td>';
|
||||
print '<td class="valeur">'.$object->pass.'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@ -129,12 +120,12 @@ if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD))
|
||||
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("LDAPFieldPasswordCrypted").'</td>';
|
||||
print '<td class="valeur">'.$adh->pass_crypted.'</td>';
|
||||
print '<td class="valeur">'.$object->pass_crypted.'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adh->type."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$object->type."</td></tr>\n";
|
||||
|
||||
$langs->load("admin");
|
||||
|
||||
@ -155,6 +146,8 @@ print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
/*
|
||||
* Barre d'actions
|
||||
*/
|
||||
@ -163,7 +156,7 @@ print '<div class="tabsAction">';
|
||||
|
||||
if (! empty($conf->global->LDAP_MEMBER_ACTIVE) && $conf->global->LDAP_MEMBER_ACTIVE != 'ldap2dolibarr')
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$adh->id.'&action=dolibarr2ldap">'.$langs->trans("ForceSynchronize").'</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dolibarr2ldap">'.$langs->trans("ForceSynchronize").'</a></div>';
|
||||
}
|
||||
|
||||
print "</div>\n";
|
||||
@ -187,9 +180,9 @@ $ldap=new Ldap();
|
||||
$result=$ldap->connect_bind();
|
||||
if ($result > 0)
|
||||
{
|
||||
$info=$adh->_load_ldap_info();
|
||||
$dn=$adh->_load_ldap_dn($info,1);
|
||||
$search = "(".$adh->_load_ldap_dn($info,2).")";
|
||||
$info=$object->_load_ldap_info();
|
||||
$dn=$object->_load_ldap_dn($info,1);
|
||||
$search = "(".$object->_load_ldap_dn($info,2).")";
|
||||
|
||||
if (empty($dn))
|
||||
{
|
||||
|
||||
@ -73,33 +73,31 @@ if ($id)
|
||||
print "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Reference
|
||||
print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($object, 'id', $linkback);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'rowid', $linkback);
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||
print $form->showphoto('memberphoto',$member);
|
||||
print '</td>';*/
|
||||
print '</tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
|
||||
|
||||
@ -107,21 +105,13 @@ if ($id)
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$object->lastname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$object->firstname.' </td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
$colwidth='20';
|
||||
$cssclass='titlefield';
|
||||
$permission = $user->rights->adherent->creer; // Used by the include of notes.tpl.php
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||
|
||||
|
||||
@ -95,6 +95,8 @@ if ($object->id)
|
||||
$totalsize+=$file['size'];
|
||||
}
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
@ -5265,9 +5265,9 @@ class Form
|
||||
$dir=$conf->societe->multidir_output[$entity];
|
||||
$smallfile=$object->logo;
|
||||
$smallfile=preg_replace('/(\.png|\.gif|\.jpg|\.jpeg|\.bmp)/i','_small\\1',$smallfile);
|
||||
if ($object->logo) $file=$id.'/logos/thumbs/'.$smallfile;
|
||||
if (! empty($object->logo)) $file=$id.'/logos/thumbs/'.$smallfile;
|
||||
}
|
||||
if ($modulepart=='contact')
|
||||
else if ($modulepart=='contact')
|
||||
{
|
||||
$dir=$conf->societe->multidir_output[$entity].'/contact';
|
||||
$file=$id.'/photos/'.$object->photo;
|
||||
@ -5275,19 +5275,19 @@ class Form
|
||||
else if ($modulepart=='userphoto')
|
||||
{
|
||||
$dir=$conf->user->dir_output;
|
||||
if ($object->photo) $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo;
|
||||
if (! empty($object->photo)) $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo;
|
||||
if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility
|
||||
$email=$object->email;
|
||||
}
|
||||
else if ($modulepart=='memberphoto')
|
||||
{
|
||||
$dir=$conf->adherent->dir_output;
|
||||
if ($object->photo) $file=get_exdir($id, 2, 0, 0, $object, 'invoice_supplier').'photos/'.$object->photo;
|
||||
if (! empty($object->photo)) $file=get_exdir($id, 2, 0, 0, $object, 'invoice_supplier').'photos/'.$object->photo;
|
||||
if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility
|
||||
$email=$object->email;
|
||||
} else {
|
||||
$dir=$conf->$modulepart->dir_output;
|
||||
if ($object->photo) $file=get_exdir($id, 2, 0, 0, $adherent, 'member').'photos/'.$object->photo;
|
||||
if (! empty($object->photo)) $file=get_exdir($id, 2, 0, 0, $object, 'member').'photos/'.$object->photo;
|
||||
if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility
|
||||
$email=$object->email;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user