Debug v20
This commit is contained in:
parent
2e533f692f
commit
f94d0cd907
5 changed files with 31 additions and 21 deletions
|
|
@ -547,13 +547,6 @@ abstract class CommonObject
|
|||
*/
|
||||
public $model_pdf;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @deprecated Use $model_pdf instead.
|
||||
* @see $model_pdf
|
||||
*/
|
||||
private $modelpdf;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* Contains relative path of last generated main file
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ MailCC=Copy to
|
|||
MailToCCUsers=Copy to users(s)
|
||||
MailCCC=Cached copy to
|
||||
MailTopic=Email subject
|
||||
MailReferences=Message IDs in References
|
||||
MailText=Message
|
||||
MailFile=Attached files
|
||||
MailMessage=Email body
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ TicketEmailPleaseDoNotReplyToThisEmail=Please do not reply directly to this emai
|
|||
TicketPublicInfoCreateTicket=This form allows you to record a support ticket in our management system.
|
||||
TicketPublicPleaseBeAccuratelyDescribe=Please accurately describe your request. Provide the most information possible to allow us to correctly identify your request.
|
||||
TicketPublicMsgViewLogIn=Please enter ticket tracking ID
|
||||
TicketTrackId=Public Tracking ID
|
||||
TicketTrackId=Tracking ID
|
||||
OneOfTicketTrackId=One of your tracking ID
|
||||
ErrorTicketNotFound=Ticket with tracking ID %s not found!
|
||||
Subject=Subject
|
||||
|
|
|
|||
|
|
@ -421,11 +421,11 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
|
|||
|
||||
if ($object->dao->fk_statut < Ticket::STATUS_CLOSED) {
|
||||
// New message
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=presend&mode=init&track_id='.$object->dao->track_id.(!empty($entity) && isModEnabled('multicompany') ? '&entity='.$entity : '').'&token='.newToken().'">'.$langs->trans('TicketAddMessage').'</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=presend&mode=init&track_id='.$object->dao->track_id.(!empty($entity) && isModEnabled('multicompany') ? '&entity='.$entity : '').'&token='.newToken().'">'.$langs->trans('TicketAddMessage').'</a></div>';
|
||||
|
||||
// Close ticket
|
||||
if ($object->dao->fk_statut >= Ticket::STATUS_NOT_READ && $object->dao->fk_statut < Ticket::STATUS_CLOSED) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=close&track_id='.$object->dao->track_id.(!empty($entity) && isModEnabled('multicompany') ? '&entity='.$entity : '').'&token='.newToken().'">'.$langs->trans('CloseTicket').'</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=close&track_id='.$object->dao->track_id.(!empty($entity) && isModEnabled('multicompany') ? '&entity='.$entity : '').'&token='.newToken().'">'.$langs->trans('CloseTicket').'</a></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -460,12 +460,16 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
|
|||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="view_ticket">';
|
||||
|
||||
print '<p><label for="track_id" style="display: inline-block; width: 30%; "><span class="fieldrequired">'.$langs->trans("TicketTrackId").'</span></label>';
|
||||
print '<input size="30" id="track_id" name="track_id" value="'.(GETPOST('track_id', 'alpha') ? GETPOST('track_id', 'alpha') : '').'" />';
|
||||
print '<p><label for="track_id" style="display: inline-block;" class="titlefieldcreate"><span class="fieldrequired">';
|
||||
print img_picto($langs->trans("TicketTrackId"), 'generic', 'class="pictofixedwidth"');
|
||||
print $langs->trans("TicketTrackId").'</span></label>';
|
||||
print '<input class="minwidth100" id="track_id" name="track_id" value="'.(GETPOST('track_id', 'alpha') ? GETPOST('track_id', 'alpha') : '').'" />';
|
||||
print '</p>';
|
||||
|
||||
print '<p><label for="email" style="display: inline-block; width: 30%; "><span class="fieldrequired">'.$langs->trans('Email').'</span></label>';
|
||||
print '<input size="30" id="email" name="email" value="'.(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : (!empty($_SESSION['customer_email']) ? $_SESSION['customer_email'] : "")).'" />';
|
||||
print '<p><label for="email" style="display: inline-block;" class="titlefieldcreate"><span class="fieldrequired">';
|
||||
print img_picto($langs->trans("Email"), 'email', 'class="pictofixedwidth"');
|
||||
print $langs->trans('Email').'</span></label>';
|
||||
print '<input class="minwidth100" id="email" name="email" value="'.(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : (!empty($_SESSION['customer_email']) ? $_SESSION['customer_email'] : "")).'" />';
|
||||
print '</p>';
|
||||
|
||||
print '<p style="text-align: center; margin-top: 1.5em;">';
|
||||
|
|
|
|||
|
|
@ -955,23 +955,35 @@ if ($action == 'create' || $action == 'presend') {
|
|||
$morehtmlref = '<div class="refidno">';
|
||||
$morehtmlref .= $object->subject;
|
||||
// Author
|
||||
$createdbyshown = 0;
|
||||
if ($object->fk_user_create > 0) {
|
||||
$morehtmlref .= '<br>'.$langs->trans("CreatedBy").' : ';
|
||||
|
||||
$fuser = new User($db);
|
||||
$fuser->fetch($object->fk_user_create);
|
||||
$morehtmlref .= $fuser->getNomUrl(-1);
|
||||
} elseif (!empty($object->email_msgid)) {
|
||||
$morehtmlref .= '<br>'.$langs->trans("CreatedBy").' : ';
|
||||
$createdbyshown++;
|
||||
}
|
||||
|
||||
//var_dump($object);
|
||||
if (!empty($object->origin_email)) { // If ticket create from public interface - TODO Add a more robust test to know if created by pubic interface
|
||||
$htmltooptip = $langs->trans("OriginEmail").': '.$object->origin_email;
|
||||
$htmltooptip .= '<br>'.$langs->trans("IP").': '.$object->ip;
|
||||
$morehtmlref .= ($createdbyshown ? ' - ' : '<br>');
|
||||
$morehtmlref .= ($createdbyshown ? '' : $langs->trans("CreatedBy").' : ');
|
||||
$morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"');
|
||||
$morehtmlref .= dol_escape_htmltag($object->origin_email).' <small class="hideonsmartphone opacitymedium">- '.$form->textwithpicto($langs->trans("CreatedByPublicPortal"), $htmltooptip, 1, 'help', '', 0, 3, 'tooltip').'</small>';
|
||||
} elseif (!empty($object->email_msgid)) { // If ticket create by emailcollector - TODO Add a more robust test to know if created by email collector (using import ky ?)
|
||||
$langs->load("mails");
|
||||
$htmltooltip = $langs->trans("EmailMsgID").': '.$object->email_msgid;
|
||||
$htmltooltip .= '<br>'.$langs->trans("EmailDate").': '.dol_print_date($object->email_date, 'dayhour');
|
||||
$morehtmlref .= dol_escape_htmltag($object->origin_email).' <small class="hideonsmartphone opacitymedium">- '.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $htmltooltip, 1, 'help', '', 0, 3, 'tooltip').'</small>';
|
||||
} elseif (!empty($object->origin_email)) {
|
||||
$morehtmlref .= '<br>'.$langs->trans("CreatedBy").' : ';
|
||||
$htmltooltip .= '<br>'.$langs->trans("MailFrom").': '.$object->email_from;
|
||||
$htmltooltip .= '<br>'.$langs->trans("MailReply").': '.$object->origin_replyto;
|
||||
$htmltooltip .= '<br>'.$langs->trans("MailReferences").': '.$object->origin_references;
|
||||
$morehtmlref .= ($createdbyshown ? ' - ' : '<br>');
|
||||
$morehtmlref .= ($createdbyshown ? '' : $langs->trans("CreatedBy").' : ');
|
||||
$morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"');
|
||||
$htmltooptip = $langs->trans("IP").': '.$object->ip;
|
||||
$morehtmlref .= dol_escape_htmltag($object->origin_email).' <small class="hideonsmartphone opacitymedium">- '.$form->textwithpicto($langs->trans("CreatedByPublicPortal"), $htmltooptip, 1, 'help', '', 0, 3, 'tooltip').'</small>';
|
||||
$morehtmlref .= dol_escape_htmltag($object->origin_email).' <small class="hideonsmartphone opacitymedium">- '.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $htmltooltip, 1, 'help', '', 0, 3, 'tooltip').'</small>';
|
||||
}
|
||||
|
||||
$permissiontoedit = $object->status < 8 && !$user->socid && $user->hasRight('ticket', 'write');
|
||||
|
|
|
|||
Loading…
Reference in a new issue