forked from Wavyzz/dolibarr
Works on contact canvas in relation to the thirdparty canvas module
This commit is contained in:
@@ -181,7 +181,7 @@ class ActionsContactCardCommon
|
||||
|
||||
if ($action == 'view')
|
||||
{
|
||||
$this->tpl['showrefnav'] = $form->showrefnav($this->object,'id');
|
||||
$this->tpl['showrefnav'] = $form->showrefnav($this->object,'id');
|
||||
|
||||
if ($this->object->socid > 0)
|
||||
{
|
||||
@@ -207,8 +207,8 @@ class ActionsContactCardCommon
|
||||
$this->tpl['phone_pro'] = dol_print_phone($this->object->phone_pro,$this->object->pays_code,0,$this->object->id,'AC_TEL');
|
||||
$this->tpl['phone_perso'] = dol_print_phone($this->object->phone_perso,$this->object->pays_code,0,$this->object->id,'AC_TEL');
|
||||
$this->tpl['phone_mobile'] = dol_print_phone($this->object->phone_mobile,$this->object->pays_code,0,$this->object->id,'AC_TEL');
|
||||
$this->tpl['fax'] = dol_print_phone($this->object->fax,$this->object->pays_code,0,$this->object->id,'AC_FAX');
|
||||
$this->tpl['email'] = dol_print_email($this->object->email,0,$this->object->id,'AC_EMAIL');
|
||||
$this->tpl['fax'] = dol_print_phone($this->object->fax,$this->object->pays_code,0,$this->object->id,'AC_FAX');
|
||||
$this->tpl['email'] = dol_print_email($this->object->email,0,$this->object->id,'AC_EMAIL');
|
||||
|
||||
$this->tpl['visibility'] = $this->object->LibPubPriv($this->object->priv);
|
||||
|
||||
|
||||
@@ -84,23 +84,21 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
||||
*/
|
||||
function assign_values($action='')
|
||||
{
|
||||
global $conf, $langs, $user, $mysoc;
|
||||
global $form, $formadmin, $formcompany;
|
||||
global $langs, $user;
|
||||
global $form;
|
||||
|
||||
parent::assign_values($action);
|
||||
|
||||
if ($action == 'create' || $action == 'edit')
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if ($action == 'view')
|
||||
{
|
||||
// Confirm delete third party
|
||||
if ($_GET["action"] == 'delete')
|
||||
{
|
||||
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,2);
|
||||
}
|
||||
// Confirm delete contact
|
||||
if ($user->rights->societe->contact->supprimer)
|
||||
{
|
||||
if ($_GET["action"] == 'delete')
|
||||
{
|
||||
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE -->
|
||||
|
||||
<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
|
||||
|
||||
<table class="border" width="100%">
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -249,18 +249,6 @@ if (! empty($canvas))
|
||||
// When used with CANVAS
|
||||
// -----------------------------------------
|
||||
|
||||
/*
|
||||
* Confirmation de la suppression du contact
|
||||
*/
|
||||
if ($user->rights->societe->contact->supprimer)
|
||||
{
|
||||
if ($_GET["action"] == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"],$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
}
|
||||
|
||||
if (GETPOST("action") == 'create')
|
||||
{
|
||||
// Set action type
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
|
||||
<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
|
||||
|
||||
<?php if ($mesg) { ?>
|
||||
<div class="error"><?php echo $mesg; ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<form name="formsoc" method="POST">
|
||||
<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
|
||||
<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
|
||||
|
||||
<?php if ($mesg) { ?>
|
||||
<div class="error"><?php echo $mesg; ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<form name="formsoc" method="POST">
|
||||
<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||
|
||||
Reference in New Issue
Block a user