FIX Add message from public interface

This commit is contained in:
Laurent Destailleur 2019-07-19 23:57:35 +02:00
parent feee437471
commit de4142e23e
2 changed files with 9 additions and 2 deletions

View File

@ -1058,7 +1058,7 @@ class FormTicket
$out .= '<div id="attachfile_' . $key . '">';
$out .= img_mime($listofnames[$key]) . ' ' . $listofnames[$key];
if (!$this->withfilereadonly) {
$out .= ' <input type="image" style="border: 0px;" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/delete.png" value="' . ($key + 1) . '" class="removedfile" id="removedfile_' . $key . '" name="removedfile_' . $key . '" />';
$out .= ' <input type="image" style="border: 0px;" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/delete.png" value="' . ($key + 1) . '" class="removedfile reposition" id="removedfile_' . $key . '" name="removedfile_' . $key . '" />';
}
$out .= '<br></div>';
}

View File

@ -166,7 +166,7 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
}
}
if (! $error && $action == "add_message" && $display_ticket)
if (! $error && $action == "add_message" && $display_ticket && GETPOSTISSET('btn_add_message'))
{
// TODO Add message...
$ret = $object->dao->newMessage($user, $action, 0);
@ -196,6 +196,13 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
//var_dump($action);
//$object->doActions($action);
// Actions to send emails (for ticket, we need to manage the addfile and removefile only)
$trigger_name='TICKET_SENTBYMAIL';
$paramname='id';
$autocopy='MAIN_MAIL_AUTOCOPY_TICKET_TO'; // used to know the automatic BCC to add
$trackid='tic'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
/*