Works on contact canvas in relation to the thirdparty canvas module
This commit is contained in:
parent
dc3fd00557
commit
05ed583cf1
@ -84,22 +84,20 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
|||||||
*/
|
*/
|
||||||
function assign_values($action='')
|
function assign_values($action='')
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user, $mysoc;
|
global $langs, $user;
|
||||||
global $form, $formadmin, $formcompany;
|
global $form;
|
||||||
|
|
||||||
parent::assign_values($action);
|
parent::assign_values($action);
|
||||||
|
|
||||||
if ($action == 'create' || $action == 'edit')
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'view')
|
if ($action == 'view')
|
||||||
{
|
{
|
||||||
// Confirm delete third party
|
// Confirm delete contact
|
||||||
|
if ($user->rights->societe->contact->supprimer)
|
||||||
|
{
|
||||||
if ($_GET["action"] == 'delete')
|
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);
|
$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 -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|
||||||
|
<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
|
||||||
|
|
||||||
<table class="border" width="100%">
|
<table class="border" width="100%">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -249,18 +249,6 @@ if (! empty($canvas))
|
|||||||
// When used with 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')
|
if (GETPOST("action") == 'create')
|
||||||
{
|
{
|
||||||
// Set action type
|
// Set action type
|
||||||
|
|||||||
@ -23,10 +23,6 @@
|
|||||||
|
|
||||||
<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
|
<?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">
|
<form name="formsoc" method="POST">
|
||||||
<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
|
<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
<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 ($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">
|
<form name="formsoc" method="POST">
|
||||||
<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
|
<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user