|
|
|
@ -1056,16 +1056,10 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
/* Reply form on top? */
|
|
|
|
|
if ($can_reply && $hesk_settings['reply_top'] == 1) {
|
|
|
|
|
hesk_printReplyForm();
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<div class="box">
|
|
|
|
|
<div class="box box-warning">
|
|
|
|
|
<div class="box-header with-border">
|
|
|
|
|
<h1 class="box-title">
|
|
|
|
|
<?php echo $hesklang['message']; ?>
|
|
|
|
|
<?php echo $hesklang['notes']; ?>
|
|
|
|
|
</h1>
|
|
|
|
|
<div class="box-tools pull-right">
|
|
|
|
|
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
|
|
|
@ -1075,82 +1069,17 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box-body">
|
|
|
|
|
<?php
|
|
|
|
|
/* Do we need or have any canned responses? */
|
|
|
|
|
$can_options = hesk_printCanned();
|
|
|
|
|
?>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-3 text-right">
|
|
|
|
|
<strong><?php echo $hesklang['m_sub']; ?></strong>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-9">
|
|
|
|
|
<?php echo $ticket['subject']; ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php foreach ($hesk_settings['custom_fields'] as $k => $v) {
|
|
|
|
|
if ($v['use'] && $v['place'] == 0) {
|
|
|
|
|
if ($modsForHesk_settings['custom_field_setting']) {
|
|
|
|
|
$v['name'] = $hesklang[$v['name']];
|
|
|
|
|
}
|
|
|
|
|
echo '<div class="row">';
|
|
|
|
|
echo '<div class="col-md-3 text-right"><strong>' . $v['name'] . ':</strong></div>';
|
|
|
|
|
if ($v['type'] == 'date' && !empty($ticket[$k])) {
|
|
|
|
|
$dt = date('Y-m-d h:i:s', $ticket[$k]);
|
|
|
|
|
echo '<div class="col-md-9">' . hesk_dateToString($dt, 0) . '</div>';
|
|
|
|
|
} else {
|
|
|
|
|
echo '<div class="col-md-9">' . $ticket[$k] . '</div>';
|
|
|
|
|
}
|
|
|
|
|
echo '</div>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<div class="row push-down-10">
|
|
|
|
|
<div class="col-md-3 text-right">
|
|
|
|
|
<strong><?php echo $hesklang['message_colon']; ?></strong>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-9">
|
|
|
|
|
<?php if ($ticket['html']) {
|
|
|
|
|
echo hesk_html_entity_decode($ticket['message']);
|
|
|
|
|
} else {
|
|
|
|
|
echo $ticket['message'];
|
|
|
|
|
} ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
foreach ($hesk_settings['custom_fields'] as $k => $v) {
|
|
|
|
|
if ($v['use'] && $v['place']) {
|
|
|
|
|
if ($modsForHesk_settings['custom_field_setting']) {
|
|
|
|
|
$v['name'] = $hesklang[$v['name']];
|
|
|
|
|
}
|
|
|
|
|
echo '<div class="row">';
|
|
|
|
|
echo '<div class="col-md-3 text-right"><strong>' . $v['name'] . ':</strong></div>';
|
|
|
|
|
if ($v['type'] == 'date' && !empty($ticket[$k])) {
|
|
|
|
|
$dt = date('Y-m-d h:i:s', $ticket[$k]);
|
|
|
|
|
echo '<div class="col-md-9">' . hesk_dateToString($dt, 0) . '</div>';
|
|
|
|
|
$res = hesk_dbQuery("SELECT t1.*, t2.`name` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "notes` AS t1 LEFT JOIN `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` AS t2 ON t1.`who` = t2.`id` WHERE `ticket`='" . intval($ticket['id']) . "' ORDER BY t1.`id` " . ($hesk_settings['new_top'] ? 'DESC' : 'ASC'));
|
|
|
|
|
if (hesk_dbNumRows($res) > 0):
|
|
|
|
|
$first = true;
|
|
|
|
|
while ($note = hesk_dbFetchAssoc($res)):
|
|
|
|
|
if (!$first) {
|
|
|
|
|
echo '<hr>';
|
|
|
|
|
} else {
|
|
|
|
|
echo '<div class="col-md-9">' . $ticket[$k] . '</div>';
|
|
|
|
|
}
|
|
|
|
|
echo '</div>';
|
|
|
|
|
}
|
|
|
|
|
$first = false;
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box-footer">
|
|
|
|
|
<?php echo hesk_getAdminButtonsInTicket(0, $i); ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<div class="row" style="padding: 20px">
|
|
|
|
|
<div class="col-md-10">
|
|
|
|
|
|
|
|
|
|
<div class="blankSpace"></div>
|
|
|
|
|
<!-- BEGIN TICKET HEAD -->
|
|
|
|
|
<?php
|
|
|
|
|
$res = hesk_dbQuery("SELECT t1.*, t2.`name` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "notes` AS t1 LEFT JOIN `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` AS t2 ON t1.`who` = t2.`id` WHERE `ticket`='" . intval($ticket['id']) . "' ORDER BY t1.`id` " . ($hesk_settings['new_top'] ? 'DESC' : 'ASC'));
|
|
|
|
|
while ($note = hesk_dbFetchAssoc($res)) {
|
|
|
|
|
?>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-12 alert-warning">
|
|
|
|
|
<div class="row" style="padding-top: 10px; padding-bottom: 10px">
|
|
|
|
|
<div class="col-md-8">
|
|
|
|
|
<p><i><?php echo $hesklang['noteby']; ?>
|
|
|
|
|
<b><?php echo($note['name'] ? $note['name'] : $hesklang['e_udel']); ?></b></i>
|
|
|
|
@ -1161,7 +1090,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|
|
|
|
|
|
|
|
|
// Attachments
|
|
|
|
|
if ($hesk_settings['attachments']['use'] && strlen($note['attachments'])) {
|
|
|
|
|
echo strlen($note['message']) ? '<br /><br />' : '';
|
|
|
|
|
echo strlen($note['message']) ? '<br><br>' : '';
|
|
|
|
|
|
|
|
|
|
$att = explode(',', substr($note['attachments'], 0, -1));
|
|
|
|
|
$num = count($att);
|
|
|
|
@ -1195,79 +1124,148 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4 text-right">
|
|
|
|
|
<?php if ($can_del_notes || $note['who'] == $_SESSION['id']) { ?>
|
|
|
|
|
<div class="btn-group" role="group">
|
|
|
|
|
<a href="edit_note.php?track=<?php echo $trackingID; ?>&Refresh=<?php echo mt_rand(10000, 99999); ?>&note=<?php echo $note['id']; ?>&token=<?php hesk_token_echo(); ?>"
|
|
|
|
|
class="btn btn-warning">
|
|
|
|
|
<i class="fa fa-pencil"></i> <?php echo $hesklang['ednote']; ?>
|
|
|
|
|
<a href="edit_note.php?track=<?php echo $trackingID; ?>&Refresh=<?php echo mt_rand(10000, 99999); ?>&note=<?php echo $note['id']; ?>&token=<?php hesk_token_echo(); ?>">
|
|
|
|
|
<i class="fa fa-pencil icon-link orange" data-toggle="tooltip" title="<?php echo $hesklang['ednote']; ?>"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<a href="admin_ticket.php?track=<?php echo $trackingID; ?>&Refresh=<?php echo mt_rand(10000, 99999); ?>&delnote=<?php echo $note['id']; ?>&token=<?php hesk_token_echo(); ?>">
|
|
|
|
|
<i class="fa fa-times icon-link red" data-toggle="tooltip" title="<?php echo $hesklang['delnote']; ?>"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<a href="admin_ticket.php?track=<?php echo $trackingID; ?>&Refresh=<?php echo mt_rand(10000, 99999); ?>&delnote=<?php echo $note['id']; ?>&token=<?php hesk_token_echo(); ?>"
|
|
|
|
|
class="btn btn-danger">
|
|
|
|
|
<i class="fa fa-times"></i> <?php echo $hesklang['delnote']; ?>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endwhile; endif; ?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php if ($can_reply): ?>
|
|
|
|
|
<div class="box-footer">
|
|
|
|
|
<button class="btn btn-default pull-right" data-toggle="modal" data-target="#noteform">
|
|
|
|
|
<i class="fa fa-plus-circle"></i> <?php echo $hesklang['addnote']; ?>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal fade" tabindex="-1" role="dialog" id="noteform">
|
|
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
|
|
<h4 class="modal-title"><?php echo $hesklang['addnote']; ?></h4>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<b><i><?php echo $hesklang['notes']; ?>: </i></b>
|
|
|
|
|
<?php
|
|
|
|
|
if ($can_reply) {
|
|
|
|
|
?>
|
|
|
|
|
<a href="Javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('notesform')"><i
|
|
|
|
|
class="fa fa-plus"></i> <?php echo $hesklang['addnote']; ?></a>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<div id="notesform" style="display:<?php echo isset($_SESSION['note_message']) ? 'block' : 'none'; ?>">
|
|
|
|
|
<form class="form-horizontal" data-toggle="validator" method="post" action="admin_ticket.php" style="margin:0px; padding:0px;"
|
|
|
|
|
enctype="multipart/form-data">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<textarea style="min-height: 150px" data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']) ?>" class="form-control" name="notemsg" rows="6"
|
|
|
|
|
<label for="note-message" class="control-label col-sm-2"><?php echo $hesklang['message']; ?></label>
|
|
|
|
|
<div class="col-sm-10">
|
|
|
|
|
<textarea id="note-message" style="min-height: 150px" data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']) ?>" class="form-control" name="notemsg" rows="6"
|
|
|
|
|
cols="60" required><?php echo isset($_SESSION['note_message']) ? stripslashes(hesk_input($_SESSION['note_message'])) : ''; ?></textarea>
|
|
|
|
|
<div class="help-block with-errors"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="note-attachments" class="control-label col-sm-2">
|
|
|
|
|
<?php echo $hesklang['attachments']; ?>
|
|
|
|
|
</label>
|
|
|
|
|
<div class="col-sm-10">
|
|
|
|
|
<?php build_dropzone_markup(true, 'notesFiledrop'); ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php display_dropzone_field($hesk_settings['hesk_url'] . '/internal-api/ticket/upload-attachment.php', 'notesFiledrop'); ?>
|
|
|
|
|
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['s']; ?>"/><input
|
|
|
|
|
type="hidden" name="track" value="<?php echo $trackingID; ?>"/>
|
|
|
|
|
<i><?php echo $hesklang['nhid']; ?></i>
|
|
|
|
|
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<i><?php echo $hesklang['nhid']; ?></i>
|
|
|
|
|
<div class="btn-group">
|
|
|
|
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancel</button>
|
|
|
|
|
<input type="submit" class="btn btn-success" value="<?php echo $hesklang['s']; ?>">
|
|
|
|
|
</div>
|
|
|
|
|
<input type="hidden" name="track" value="<?php echo $trackingID; ?>">
|
|
|
|
|
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>">
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
if ($hesk_settings['new_top']) {
|
|
|
|
|
$i = hesk_printTicketReplies() ? 0 : 1;
|
|
|
|
|
/* Reply form on top? */
|
|
|
|
|
if ($can_reply && $hesk_settings['reply_top'] == 1) {
|
|
|
|
|
hesk_printReplyForm();
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<div class="box">
|
|
|
|
|
<div class="box-header with-border">
|
|
|
|
|
<h1 class="box-title">
|
|
|
|
|
<?php echo $hesklang['message']; ?>
|
|
|
|
|
</h1>
|
|
|
|
|
<div class="box-tools pull-right">
|
|
|
|
|
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
|
|
|
|
<i class="fa fa-minus"></i>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box-body">
|
|
|
|
|
<?php
|
|
|
|
|
/* Do we need or have any canned responses? */
|
|
|
|
|
$can_options = hesk_printCanned();
|
|
|
|
|
?>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-3 text-right">
|
|
|
|
|
<strong><?php echo $hesklang['m_sub']; ?></strong>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-9">
|
|
|
|
|
<?php echo $ticket['subject']; ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php foreach ($hesk_settings['custom_fields'] as $k => $v) {
|
|
|
|
|
if ($v['use'] && $v['place'] == 0) {
|
|
|
|
|
if ($modsForHesk_settings['custom_field_setting']) {
|
|
|
|
|
$v['name'] = $hesklang[$v['name']];
|
|
|
|
|
}
|
|
|
|
|
echo '<div class="row">';
|
|
|
|
|
echo '<div class="col-md-3 text-right"><strong>' . $v['name'] . ':</strong></div>';
|
|
|
|
|
if ($v['type'] == 'date' && !empty($ticket[$k])) {
|
|
|
|
|
$dt = date('Y-m-d h:i:s', $ticket[$k]);
|
|
|
|
|
echo '<div class="col-md-9">' . hesk_dateToString($dt, 0) . '</div>';
|
|
|
|
|
} else {
|
|
|
|
|
$i = 1;
|
|
|
|
|
echo '<div class="col-md-9">' . $ticket[$k] . '</div>';
|
|
|
|
|
}
|
|
|
|
|
echo '</div>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Make sure original message is in correct color if newest are on top */
|
|
|
|
|
$color = 'class="ticketMessageContainer"';
|
|
|
|
|
?>
|
|
|
|
|
<div class="row ticketMessageContainer">
|
|
|
|
|
<div class="col-md-9 col-xs-12 pushMarginLeft">
|
|
|
|
|
<div class="ticketMessageTop">
|
|
|
|
|
<!-- Custom Fields after Message -->
|
|
|
|
|
<div class="row push-down-10">
|
|
|
|
|
<div class="col-md-3 text-right">
|
|
|
|
|
<strong><?php echo $hesklang['message_colon']; ?></strong>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-9">
|
|
|
|
|
<?php if ($ticket['html']) {
|
|
|
|
|
echo hesk_html_entity_decode($ticket['message']);
|
|
|
|
|
} else {
|
|
|
|
|
echo $ticket['message'];
|
|
|
|
|
} ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
foreach ($hesk_settings['custom_fields'] as $k => $v) {
|
|
|
|
|
if ($v['use'] && $v['place']) {
|
|
|
|
|
if ($modsForHesk_settings['custom_field_setting']) {
|
|
|
|
|
$v['name'] = $hesklang[$v['name']];
|
|
|
|
|
}
|
|
|
|
|
echo '<div class="row">';
|
|
|
|
|
echo '<div class="col-md-3 text-right"><strong>' . $v['name'] . ':</strong></div>';
|
|
|
|
|
if ($v['type'] == 'date' && !empty($ticket[$k])) {
|
|
|
|
|
$dt = date('Y-m-d h:i:s', $ticket[$k]);
|
|
|
|
|
echo '<div class="col-md-9">' . hesk_dateToString($dt, 0) . '</div>';
|
|
|
|
|
} else {
|
|
|
|
|
echo '<div class="col-md-9">' . $ticket[$k] . '</div>';
|
|
|
|
|
}
|
|
|
|
|
echo '</div>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php if (($hesk_settings['attachments']['use'] && strlen($ticket['attachments']))
|
|
|
|
|
|| ($hesk_settings['kb_enable'] && $hesk_settings['kb_recommendanswers'] && strlen($ticket['articles']))): ?>
|
|
|
|
|
<div class="box-footer">
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/* Attachments */
|
|
|
|
|
mfh_listAttachments($ticket['attachments'], 0, true);
|
|
|
|
|
|
|
|
|
@ -1298,8 +1296,23 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<div class="box-footer">
|
|
|
|
|
<?php echo hesk_getAdminButtonsInTicket(0, $i); ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<div class="row" style="padding: 20px">
|
|
|
|
|
<div class="col-md-10">
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
if ($hesk_settings['new_top']) {
|
|
|
|
|
hesk_printTicketReplies() ? 0 : 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Make sure original message is in correct color if newest are on top */
|
|
|
|
|
$color = 'class="ticketMessageContainer"';
|
|
|
|
|
?>
|
|
|
|
|
<?php
|
|
|
|
|
if (!$hesk_settings['new_top']) {
|
|
|
|
|
hesk_printTicketReplies();
|
|
|
|
|