Works on contact canvas in relation to the thirdparty canvas module
This commit is contained in:
parent
06f2288904
commit
44119719b8
@ -178,8 +178,10 @@ class ActionsContactCardCommon
|
||||
{
|
||||
$this->tpl['showrefnav'] = $form->showrefnav($this->object,'id');
|
||||
|
||||
if (is_object($objsoc) && $this->object->socid > 0)
|
||||
if ($this->object->socid > 0)
|
||||
{
|
||||
$objsoc = new Societe($this->db);
|
||||
|
||||
$objsoc->fetch($this->object->socid);
|
||||
$this->tpl['company'] = $objsoc->getNomUrl(1);
|
||||
}
|
||||
@ -351,7 +353,7 @@ class ActionsContactCardCommon
|
||||
$_GET["action"] = $_POST["action"] = 'edit';
|
||||
}
|
||||
|
||||
if (! sizeof($errors))
|
||||
if (empty($errors))
|
||||
{
|
||||
$this->object->fetch($_POST["contactid"]);
|
||||
|
||||
|
||||
@ -29,9 +29,9 @@
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||
<input type="hidden" name="id" value="<?php echo GETPOST("id"); ?>">
|
||||
<input type="hidden" name="action" value="update">
|
||||
<input type="hidden" name="contactid" value="<?php echo $object->id; ?>">
|
||||
<input type="hidden" name="old_name" value="<?php echo $object->name; ?>">
|
||||
<input type="hidden" name="old_firstname" value="<?php echo $object->firstname; ?>">
|
||||
<input type="hidden" name="contactid" value="<?php echo $this->control->tpl['id']; ?>">
|
||||
<input type="hidden" name="old_name" value="<?php echo $this->control->tpl['name']; ?>">
|
||||
<input type="hidden" name="old_firstname" value="<?php echo $this->control->tpl['firstname']; ?>">
|
||||
<?php if ($this->control->tpl['company_id']) { ?>
|
||||
<input type="hidden" name="socid" value="<?php echo $this->control->tpl['company_id']; ?>">
|
||||
<?php } ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user