Skip to content

Commit

Permalink
FIX Add message from public interface
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 19, 2019
1 parent feee437 commit de4142e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion htdocs/core/class/html.formticket.class.php
Expand Up @@ -1058,7 +1058,7 @@ public function showMessageForm($width = '40%')
$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>';
}
Expand Down
9 changes: 8 additions & 1 deletion htdocs/public/ticket/view.php
Expand Up @@ -166,7 +166,7 @@
}
}

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);
Expand Down Expand Up @@ -196,6 +196,13 @@
//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';



/*
Expand Down

0 comments on commit de4142e

Please sign in to comment.