commit
60ae50abb3
@ -55,13 +55,19 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
|||||||
*/
|
*/
|
||||||
private function getTitle($action)
|
private function getTitle($action)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs, $conf;
|
||||||
|
|
||||||
$out = '';
|
$out = '';
|
||||||
|
|
||||||
if ($action == 'view') $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contact") : $langs->trans("ContactAddress"));
|
if ($action == 'view') {
|
||||||
if ($action == 'edit') $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("EditContact") : $langs->trans("EditContactAddress"));
|
$out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contact") : $langs->trans("ContactAddress"));
|
||||||
if ($action == 'create') $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress"));
|
}
|
||||||
|
if ($action == 'edit') {
|
||||||
|
$out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("EditContact") : $langs->trans("EditContactAddress"));
|
||||||
|
}
|
||||||
|
if ($action == 'create') {
|
||||||
|
$out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress"));
|
||||||
|
}
|
||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
@ -89,8 +95,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
|||||||
$this->tpl['error'] = $this->error;
|
$this->tpl['error'] = $this->error;
|
||||||
$this->tpl['errors'] = $this->errors;
|
$this->tpl['errors'] = $this->errors;
|
||||||
|
|
||||||
if ($action == 'view')
|
if ($action == 'view') {
|
||||||
{
|
|
||||||
// Card header
|
// Card header
|
||||||
$head = contact_prepare_head($this->object);
|
$head = contact_prepare_head($this->object);
|
||||||
$title = $this->getTitle($action);
|
$title = $this->getTitle($action);
|
||||||
@ -106,14 +111,12 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
|||||||
$this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1);
|
$this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1);
|
||||||
} else {
|
} else {
|
||||||
// Confirm delete contact
|
// Confirm delete contact
|
||||||
if ($action == 'delete' && $user->rights->societe->contact->supprimer)
|
if ($action == 'delete' && $user->rights->societe->contact->supprimer) {
|
||||||
{
|
|
||||||
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id, $langs->trans("DeleteContact"), $langs->trans("ConfirmDeleteContact"), "confirm_delete", '', 0, 1);
|
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id, $langs->trans("DeleteContact"), $langs->trans("ConfirmDeleteContact"), "confirm_delete", '', 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'list')
|
if ($action == 'list') {
|
||||||
{
|
|
||||||
$this->LoadListDatas($limit, $offset, $sortfield, $sortorder);
|
$this->LoadListDatas($limit, $offset, $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user