View ticket and edit post on admin-side restyled
This commit is contained in:
parent
03765bb798
commit
8b14ef19cd
@ -1133,7 +1133,12 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; endif; ?>
|
||||
<?php
|
||||
endwhile;
|
||||
else:
|
||||
?>
|
||||
<?php echo $hesklang['no_notes_for_this_ticket']; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($can_reply): ?>
|
||||
<div class="box-footer">
|
||||
@ -1189,152 +1194,40 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
if ($can_reply && $hesk_settings['reply_top'] == 1) {
|
||||
hesk_printReplyForm();
|
||||
}
|
||||
|
||||
/* Do we need or have any canned responses? */
|
||||
$can_options = hesk_printCanned();
|
||||
|
||||
hesk_printTicketReplies();
|
||||
|
||||
echo '<br>';
|
||||
|
||||
/* Reply form on bottom? */
|
||||
if ($can_reply && !$hesk_settings['reply_top']) {
|
||||
hesk_printReplyForm();
|
||||
}
|
||||
|
||||
/* Display ticket history */
|
||||
if (strlen($ticket['history'])) {
|
||||
?>
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h1 class="box-title">
|
||||
<?php echo $hesklang['thist']; ?>
|
||||
</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 echo $ticket['history']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php }
|
||||
?>
|
||||
<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 {
|
||||
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>';
|
||||
} 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);
|
||||
|
||||
// Show suggested KB articles
|
||||
if ($hesk_settings['kb_enable'] && $hesk_settings['kb_recommendanswers'] && strlen($ticket['articles'])) {
|
||||
$suggested = array();
|
||||
$suggested_list = '';
|
||||
|
||||
// Get article info from the database
|
||||
$articles = hesk_dbQuery("SELECT `id`,`subject` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "kb_articles` WHERE `id` IN (" . preg_replace('/[^0-9\,]/', '', $ticket['articles']) . ")");
|
||||
while ($article = hesk_dbFetchAssoc($articles)) {
|
||||
$suggested[$article['id']] = '<a href="../knowledgebase.php?article=' . $article['id'] . '">' . $article['subject'] . '</a><br />';
|
||||
}
|
||||
|
||||
// Loop through the IDs to preserve the order they were suggested in
|
||||
$articles = explode(',', $ticket['articles']);
|
||||
foreach ($articles as $article) {
|
||||
if (isset($suggested[$article])) {
|
||||
$suggested_list .= $suggested[$article];
|
||||
}
|
||||
}
|
||||
|
||||
// Finally print suggested articles
|
||||
if (strlen($suggested_list)) {
|
||||
$suggested_list = '<hr /><i>' . $hesklang['taws'] . '</i><br />' . $suggested_list . ' ';
|
||||
echo $_SESSION['show_suggested'] ? $suggested_list : '<a href="Javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay(\'suggested_articles\')">' . $hesklang['sska'] . '</a><span id="suggested_articles" style="display:none">' . $suggested_list . '</span>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</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();
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* Reply form on bottom? */
|
||||
if ($can_reply && !$hesk_settings['reply_top']) {
|
||||
hesk_printReplyForm();
|
||||
}
|
||||
|
||||
/* Display ticket history */
|
||||
if (strlen($ticket['history'])) {
|
||||
?>
|
||||
<h3><?php echo $hesklang['thist']; ?></h3>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<ul><?php echo $ticket['history']; ?></ul>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: none">
|
||||
<p id="lang_ticket_due_date_updated"><?php echo $hesklang['ticket_due_date_updated']; ?></p>
|
||||
<p id="lang_none"><?php echo $hesklang['none']; ?></p>
|
||||
@ -1660,24 +1553,137 @@ function print_form()
|
||||
exit();
|
||||
} // End print_form()
|
||||
|
||||
function mfh_print_message() {
|
||||
global $ticket, $hesklang, $hesk_settings, $modsForHesk_settings;
|
||||
?>
|
||||
<li><i class="fa fa-comment bg-red" data-toggle="tooltip" title="<?php echo $hesklang['original_message']; ?>"></i>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> <?php echo $ticket['dt']; ?></span>
|
||||
<h3 class="timeline-header"><?php echo $ticket['name']; ?></h3>
|
||||
<div class="timeline-body">
|
||||
<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 = hesk_date($ticket[$k], false, false);
|
||||
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 = hesk_date($ticket[$k], false, false);
|
||||
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="timeline-footer">
|
||||
<?php
|
||||
/* Attachments */
|
||||
mfh_listAttachments($ticket['attachments'], 0, true);
|
||||
|
||||
// Show suggested KB articles
|
||||
if ($hesk_settings['kb_enable'] && $hesk_settings['kb_recommendanswers'] && strlen($ticket['articles'])) {
|
||||
$suggested = array();
|
||||
$suggested_list = '';
|
||||
|
||||
// Get article info from the database
|
||||
$articles = hesk_dbQuery("SELECT `id`,`subject` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "kb_articles` WHERE `id` IN (" . preg_replace('/[^0-9\,]/', '', $ticket['articles']) . ")");
|
||||
while ($article = hesk_dbFetchAssoc($articles)) {
|
||||
$suggested[$article['id']] = '<a href="../knowledgebase.php?article=' . $article['id'] . '">' . $article['subject'] . '</a><br />';
|
||||
}
|
||||
|
||||
// Loop through the IDs to preserve the order they were suggested in
|
||||
$articles = explode(',', $ticket['articles']);
|
||||
foreach ($articles as $article) {
|
||||
if (isset($suggested[$article])) {
|
||||
$suggested_list .= $suggested[$article];
|
||||
}
|
||||
}
|
||||
|
||||
// Finally print suggested articles
|
||||
if (strlen($suggested_list)) {
|
||||
$suggested_list = '<hr /><i>' . $hesklang['taws'] . '</i><br />' . $suggested_list . ' ';
|
||||
echo $_SESSION['show_suggested'] ? $suggested_list : '<a href="Javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay(\'suggested_articles\')">' . $hesklang['sska'] . '</a><span id="suggested_articles" style="display:none">' . $suggested_list . '</span>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="timeline-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<?php echo hesk_getAdminButtonsInTicket(0); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
function hesk_printTicketReplies()
|
||||
{
|
||||
global $hesklang, $hesk_settings, $result, $reply, $isManager, $modsForHesk_settings;
|
||||
|
||||
if ($reply === false) {
|
||||
return;
|
||||
}
|
||||
global $hesklang, $hesk_settings, $result, $reply;
|
||||
|
||||
echo '<ul class="timeline">';
|
||||
if (!$hesk_settings['new_top']) {
|
||||
mfh_print_message();
|
||||
} else {
|
||||
echo '<li class="today-top"><i class="fa fa-clock-o bg-gray" data-toggle="tooltip" title="' . $hesklang['timeline_today'] . '"></i></li>';
|
||||
}
|
||||
|
||||
while ($reply = hesk_dbFetchAssoc($result)) {
|
||||
$reply['dt'] = hesk_date($reply['dt'], true);
|
||||
?>
|
||||
<li>
|
||||
<?php if ($reply['staffid']): ?>
|
||||
<i class="fa fa-reply bg-orange"></i>
|
||||
<i class="fa fa-reply bg-orange" data-toggle="tooltip" title="<?php echo $hesklang['reply_by_staff']; ?>"></i>
|
||||
<?php else: ?>
|
||||
<i class="fa fa-share bg-blue"></i>
|
||||
<i class="fa fa-share bg-blue" data-toggle="tooltip" title="<?php echo $hesklang['reply_by_customer']; ?>"></i>
|
||||
<?php endif; ?>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> <?php echo $reply['dt']; ?></span>
|
||||
@ -1724,7 +1730,12 @@ function hesk_printTicketReplies()
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
echo '<li><i class="fa fa-clock-o bg-gray"></i></li>';
|
||||
|
||||
if ($hesk_settings['new_top']) {
|
||||
mfh_print_message();
|
||||
} else {
|
||||
echo '<li><i class="fa fa-clock-o bg-gray" data-toggle="tooltip" title="' . $hesklang['timeline_today'] . '"></i></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
|
||||
return;
|
||||
|
@ -36,6 +36,7 @@ define('WYSIWYG', 1);
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
require(HESK_PATH . 'inc/common.inc.php');
|
||||
require(HESK_PATH . 'inc/admin_functions.inc.php');
|
||||
require(HESK_PATH . 'inc/mail_functions.inc.php');
|
||||
hesk_load_database_functions();
|
||||
|
||||
hesk_session_start();
|
||||
@ -207,176 +208,183 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<li class="active"><?php echo $hesklang['edtt']; ?></li>
|
||||
</ol>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<h3><?php echo $hesklang['edtt']; ?></h3>
|
||||
<section class="content">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h1 class="box-title">
|
||||
<?php echo $hesklang['edtt']; ?>
|
||||
</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">
|
||||
<form role="form" class="form-horizontal" method="post" action="edit_post.php" name="form1">
|
||||
<?php
|
||||
/* If it's not a reply edit all the fields */
|
||||
if (!$is_reply) {
|
||||
if ($hesk_settings['can_sel_lang']) {
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label for="customerLanguage" class="col-sm-3 control-label"><?php echo $hesklang['chol']; ?>
|
||||
:</label>
|
||||
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
|
||||
<form role="form" class="form-horizontal" method="post" action="edit_post.php" name="form1">
|
||||
<?php
|
||||
/* If it's not a reply edit all the fields */
|
||||
if (!$is_reply) {
|
||||
if ($hesk_settings['can_sel_lang']) {
|
||||
?>
|
||||
<div class="col-sm-9">
|
||||
<select name="customerLanguage" id="customerLanguage" class="form-control">
|
||||
<?php hesk_listLanguages(); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else {
|
||||
echo '<input type="hidden" name="customerLanguage" value="' . $ticket['language'] . '">';
|
||||
} ?>
|
||||
<div class="form-group">
|
||||
<label for="customerLanguage" class="col-sm-3 control-label"><?php echo $hesklang['chol']; ?>
|
||||
:</label>
|
||||
<label for="subject" class="col-sm-3 control-label"><?php echo $hesklang['subject']; ?>:</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<select name="customerLanguage" id="customerLanguage" class="form-control">
|
||||
<?php hesk_listLanguages(); ?>
|
||||
</select>
|
||||
<input class="form-control" type="text" name="subject" size="40" maxlength="40"
|
||||
value="<?php echo $ticket['subject']; ?>"
|
||||
placeholder="<?php echo htmlspecialchars($hesklang['subject']); ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else {
|
||||
echo '<input type="hidden" name="customerLanguage" value="' . $ticket['language'] . '">';
|
||||
} ?>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-sm-3 control-label"><?php echo $hesklang['subject']; ?>:</label>
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-3 control-label"><?php echo $hesklang['name']; ?>:</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="text" name="subject" size="40" maxlength="40"
|
||||
value="<?php echo $ticket['subject']; ?>"
|
||||
placeholder="<?php echo htmlspecialchars($hesklang['subject']); ?>"/>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="text" name="name" size="40" maxlength="30"
|
||||
value="<?php echo $ticket['name']; ?>"
|
||||
placeholder="<?php echo htmlspecialchars($hesklang['name']); ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-3 control-label"><?php echo $hesklang['name']; ?>:</label>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-3 control-label"><?php echo $hesklang['email']; ?>:</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="text" name="name" size="40" maxlength="30"
|
||||
value="<?php echo $ticket['name']; ?>"
|
||||
placeholder="<?php echo htmlspecialchars($hesklang['name']); ?>"/>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="text" name="email" size="40" maxlength="1000"
|
||||
value="<?php echo $ticket['email']; ?>"
|
||||
placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-3 control-label"><?php echo $hesklang['email']; ?>:</label>
|
||||
<?php
|
||||
foreach ($hesk_settings['custom_fields'] as $k => $v) {
|
||||
if ($v['use']) {
|
||||
if ($modsForHesk_settings['custom_field_setting']) {
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="text" name="email" size="40" maxlength="1000"
|
||||
value="<?php echo $ticket['email']; ?>"
|
||||
placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
foreach ($hesk_settings['custom_fields'] as $k => $v) {
|
||||
if ($v['use']) {
|
||||
if ($modsForHesk_settings['custom_field_setting']) {
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
$k_value = $ticket[$k];
|
||||
|
||||
$k_value = $ticket[$k];
|
||||
if ($v['type'] == 'checkbox') {
|
||||
$k_value = explode('<br />', $k_value);
|
||||
}
|
||||
|
||||
if ($v['type'] == 'checkbox') {
|
||||
$k_value = explode('<br />', $k_value);
|
||||
}
|
||||
|
||||
switch ($v['type']) {
|
||||
/* Radio box */
|
||||
case 'radio':
|
||||
echo '
|
||||
switch ($v['type']) {
|
||||
/* Radio box */
|
||||
case 'radio':
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': </label>
|
||||
<div class="col-sm-9">';
|
||||
|
||||
$options = explode('#HESK#', $v['value']);
|
||||
$options = explode('#HESK#', $v['value']);
|
||||
|
||||
foreach ($options as $option) {
|
||||
foreach ($options as $option) {
|
||||
|
||||
if (strlen($k_value) == 0 || $k_value == $option) {
|
||||
$k_value = $option;
|
||||
$checked = 'checked="checked"';
|
||||
} else {
|
||||
$checked = '';
|
||||
if (strlen($k_value) == 0 || $k_value == $option) {
|
||||
$k_value = $option;
|
||||
$checked = 'checked="checked"';
|
||||
} else {
|
||||
$checked = '';
|
||||
}
|
||||
|
||||
echo '<div class="radio"><label><input type="radio" name="' . $k . '" value="' . $option . '" ' . $checked . ' /> ' . $option . '</label></div>';
|
||||
}
|
||||
|
||||
echo '<div class="radio"><label><input type="radio" name="' . $k . '" value="' . $option . '" ' . $checked . ' /> ' . $option . '</label></div>';
|
||||
}
|
||||
|
||||
echo '</div>
|
||||
echo '</div>
|
||||
</div>
|
||||
';
|
||||
break;
|
||||
break;
|
||||
|
||||
/* Select drop-down box */
|
||||
case 'select':
|
||||
echo '
|
||||
/* Select drop-down box */
|
||||
case 'select':
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': </label>
|
||||
<div class="col-sm-9"><select class="form-control" name="' . $k . '">';
|
||||
|
||||
// Show "Click to select"?
|
||||
$v['value'] = str_replace('{HESK_SELECT}', '', $v['value'], $num);
|
||||
if ($num) {
|
||||
echo '<option value="">' . $hesklang['select'] . '</option>';
|
||||
}
|
||||
|
||||
$options = explode('#HESK#', $v['value']);
|
||||
|
||||
foreach ($options as $option) {
|
||||
|
||||
if (strlen($k_value) == 0 || $k_value == $option) {
|
||||
$k_value = $option;
|
||||
$selected = 'selected="selected"';
|
||||
} else {
|
||||
$selected = '';
|
||||
// Show "Click to select"?
|
||||
$v['value'] = str_replace('{HESK_SELECT}', '', $v['value'], $num);
|
||||
if ($num) {
|
||||
echo '<option value="">' . $hesklang['select'] . '</option>';
|
||||
}
|
||||
|
||||
echo '<option ' . $selected . '>' . $option . '</option>';
|
||||
}
|
||||
$options = explode('#HESK#', $v['value']);
|
||||
|
||||
echo '</select></div>
|
||||
foreach ($options as $option) {
|
||||
|
||||
if (strlen($k_value) == 0 || $k_value == $option) {
|
||||
$k_value = $option;
|
||||
$selected = 'selected="selected"';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
|
||||
echo '<option ' . $selected . '>' . $option . '</option>';
|
||||
}
|
||||
|
||||
echo '</select></div>
|
||||
</div>
|
||||
';
|
||||
break;
|
||||
break;
|
||||
|
||||
/* Checkbox */
|
||||
case 'checkbox':
|
||||
echo '
|
||||
/* Checkbox */
|
||||
case 'checkbox':
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': </label>
|
||||
<div class="col-sm-9">';
|
||||
|
||||
$options = explode('#HESK#', $v['value']);
|
||||
$options = explode('#HESK#', $v['value']);
|
||||
|
||||
foreach ($options as $option) {
|
||||
foreach ($options as $option) {
|
||||
|
||||
if (in_array($option, $k_value)) {
|
||||
$checked = 'checked="checked"';
|
||||
} else {
|
||||
$checked = '';
|
||||
if (in_array($option, $k_value)) {
|
||||
$checked = 'checked="checked"';
|
||||
} else {
|
||||
$checked = '';
|
||||
}
|
||||
|
||||
echo '<div class="checkbox"><label><input type="checkbox" name="' . $k . '[]" value="' . $option . '" ' . $checked . ' /> ' . $option . '</label></div>';
|
||||
}
|
||||
|
||||
echo '<div class="checkbox"><label><input type="checkbox" name="' . $k . '[]" value="' . $option . '" ' . $checked . ' /> ' . $option . '</label></div>';
|
||||
}
|
||||
|
||||
echo '</div>
|
||||
echo '</div>
|
||||
</div>
|
||||
';
|
||||
break;
|
||||
break;
|
||||
|
||||
/* Large text box */
|
||||
case 'textarea':
|
||||
$size = explode('#', $v['value']);
|
||||
$size[0] = empty($size[0]) ? 5 : intval($size[0]);
|
||||
$size[1] = empty($size[1]) ? 30 : intval($size[1]);
|
||||
$k_value = hesk_msgToPlain($k_value, 0, 0);
|
||||
/* Large text box */
|
||||
case 'textarea':
|
||||
$size = explode('#', $v['value']);
|
||||
$size[0] = empty($size[0]) ? 5 : intval($size[0]);
|
||||
$size[1] = empty($size[1]) ? 30 : intval($size[1]);
|
||||
$k_value = hesk_msgToPlain($k_value, 0, 0);
|
||||
|
||||
echo '
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': </label>
|
||||
<div class="col-sm-9">
|
||||
<textarea class="form-control" name="' . $k . '" rows="' . $size[0] . '" placeholder="' . htmlspecialchars($v['name']) . '" cols="' . $size[1] . '">' . $k_value . '</textarea>
|
||||
</div>
|
||||
</div>';
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'date':
|
||||
if (strlen($k_value) != 0) {
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
echo '
|
||||
case 'date':
|
||||
if (strlen($k_value) != 0) {
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': </label>
|
||||
<div class="col-sm-9">
|
||||
@ -384,63 +392,63 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
maxlength="' . $v['maxlen'] . '" value="' . date('Y-m-d', $v['value']) . '" readonly/>
|
||||
</div>
|
||||
</div>';
|
||||
break;
|
||||
case 'multiselect':
|
||||
echo '<div class="form-group"><label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': </label>
|
||||
break;
|
||||
case 'multiselect':
|
||||
echo '<div class="form-group"><label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': </label>
|
||||
<div class="col-sm-9"><select class="form-control" id="' . $v['name'] . '" name="' . $k . '" multiple>';
|
||||
$options = explode('#HESK#', $v['value']);
|
||||
foreach ($options as $option) {
|
||||
if (strlen($k_value) == 0 || $k_value == $option) {
|
||||
$k_value = $option;
|
||||
$selected = 'selected="selected"';
|
||||
} else {
|
||||
$selected = '';
|
||||
$options = explode('#HESK#', $v['value']);
|
||||
foreach ($options as $option) {
|
||||
if (strlen($k_value) == 0 || $k_value == $option) {
|
||||
$k_value = $option;
|
||||
$selected = 'selected="selected"';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
echo '<option ' . $selected . '>' . $option . '</option>';
|
||||
}
|
||||
echo '<option ' . $selected . '>' . $option . '</option>';
|
||||
}
|
||||
echo '</select>
|
||||
echo '</select>
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-default" onclick="selectAll(\'' . $v['name'] . '\')">'.$hesklang['select_all_title_case'].'</button>
|
||||
<button type="button" class="btn btn-default" onclick="deselectAll(\'' . $v['name'] . '\')">'.$hesklang['deselect_all_title_case'].'</button>
|
||||
</div></div></div>';
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'hidden':
|
||||
//Clean up multiple dashes or whitespaces
|
||||
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
||||
$formattedId = preg_replace("/[\s_]/", "-", $formattedId);
|
||||
case 'hidden':
|
||||
//Clean up multiple dashes or whitespaces
|
||||
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
||||
$formattedId = preg_replace("/[\s_]/", "-", $formattedId);
|
||||
|
||||
if (strlen($k_value) != 0) {
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
if (strlen($k_value) != 0) {
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
|
||||
echo '<input type="hidden" class="form-control" id="' . $formattedId . '" name="' . $k . '" size="40" maxlength="' . $v['maxlen'] . '" value="' . $v['value'] . '"/>';
|
||||
echo '<input type="hidden" class="form-control" id="' . $formattedId . '" name="' . $k . '" size="40" maxlength="' . $v['maxlen'] . '" value="' . $v['value'] . '"/>';
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'readonly':
|
||||
//Clean up multiple dashes or whitespaces
|
||||
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
||||
$formattedId = preg_replace("/[\s_]/", "-", $formattedId);
|
||||
case 'readonly':
|
||||
//Clean up multiple dashes or whitespaces
|
||||
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
||||
$formattedId = preg_replace("/[\s_]/", "-", $formattedId);
|
||||
|
||||
if (strlen($k_value) != 0) {
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
if (strlen($k_value) != 0) {
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
|
||||
echo '<div class="form-group">
|
||||
echo '<div class="form-group">
|
||||
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': </label>
|
||||
<div class="col-sm-9"><input type="text" class="form-control" id="' . $formattedId . '" name="' . $k . '" size="40" maxlength="' . $v['maxlen'] . '" value="' . $v['value'] . '" readonly></div>
|
||||
</div>';
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
/* Default text input */
|
||||
default:
|
||||
if (strlen($k_value) != 0) {
|
||||
$k_value = hesk_msgToPlain($k_value, 0, 0);
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
echo '
|
||||
/* Default text input */
|
||||
default:
|
||||
if (strlen($k_value) != 0) {
|
||||
$k_value = hesk_msgToPlain($k_value, 0, 0);
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': </label>
|
||||
<div class="col-sm-9">
|
||||
@ -448,50 +456,55 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php } ?>
|
||||
<div class="form-group">
|
||||
<label for="message" class="col-sm-3 control-label"><?php echo $hesklang['message']; ?>:</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<?php
|
||||
$message = $modsForHesk_settings['rich_text_for_tickets'] ? hesk_html_entity_decode($ticket['message']) : $ticket['message'];
|
||||
?>
|
||||
<textarea class="form-control htmlEditor" name="message" rows="12"
|
||||
placeholder="<?php echo htmlspecialchars($hesklang['message']); ?>"
|
||||
cols="60"><?php echo $message; ?></textarea>
|
||||
|
||||
<?php } ?>
|
||||
<div class="form-group">
|
||||
<label for="message" class="col-sm-3 control-label"><?php echo $hesklang['message']; ?>:</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<?php
|
||||
$message = $modsForHesk_settings['rich_text_for_tickets'] ? hesk_html_entity_decode($ticket['message']) : $ticket['message'];
|
||||
?>
|
||||
<textarea class="form-control htmlEditor" name="message" rows="12"
|
||||
placeholder="<?php echo htmlspecialchars($hesklang['message']); ?>"
|
||||
cols="60"><?php echo $message; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="save" value="1"/><input type="hidden" name="track"
|
||||
value="<?php echo $trackingID; ?>"/>
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>"/>
|
||||
<?php
|
||||
if ($is_reply) {
|
||||
?>
|
||||
<input type="hidden" name="reply" value="<?php echo $tmpvar['id']; ?>"/>
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="save" value="1"/><input type="hidden" name="track"
|
||||
value="<?php echo $trackingID; ?>"/>
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>"/>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group" style="text-align: center">
|
||||
<?php
|
||||
$html = $modsForHesk_settings['rich_text_for_tickets'] ? 1 : 0;
|
||||
?>
|
||||
<input type="hidden" name="html" value="<?php echo $html; ?>">
|
||||
<input type="submit" value="<?php echo $hesklang['save_changes']; ?>" class="btn btn-default"/>
|
||||
<?php if (isset($_REQUEST['isManager']) && $_REQUEST['isManager']): ?>
|
||||
<input type="hidden" name="isManager" value="1">
|
||||
<?php endif; ?>
|
||||
<a class="btn btn-default" href="javascript:history.go(-1)"><?php echo $hesklang['back']; ?></a>
|
||||
</div>
|
||||
</form>
|
||||
if ($is_reply) {
|
||||
?>
|
||||
<input type="hidden" name="reply" value="<?php echo $tmpvar['id']; ?>"/>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<?php
|
||||
$html = $modsForHesk_settings['rich_text_for_tickets'] ? 1 : 0;
|
||||
?>
|
||||
<input type="hidden" name="html" value="<?php echo $html; ?>">
|
||||
<?php if (isset($_REQUEST['isManager']) && $_REQUEST['isManager']): ?>
|
||||
<input type="hidden" name="isManager" value="1">
|
||||
<?php endif; ?>
|
||||
<div class="btn-group">
|
||||
<input type="submit" value="<?php echo $hesklang['save_changes']; ?>" class="btn btn-primary"/>
|
||||
<a class="btn btn-default" href="javascript:history.go(-1)"><?php echo $hesklang['back']; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php if ($modsForHesk_settings['rich_text_for_tickets']): ?>
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
|
@ -117,4 +117,8 @@
|
||||
|
||||
.timeline-footer {
|
||||
border-top: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
.timeline > .today-top {
|
||||
margin-bottom: 60px;
|
||||
}
|
@ -41,6 +41,11 @@ $hesklang['last_replier_colon'] = 'Last replier:';
|
||||
$hesklang['click_to_edit'] = 'Click to edit';
|
||||
$hesklang['no_device_information'] = 'No device information';
|
||||
$hesklang['message_colon'] = 'Message:';
|
||||
$hesklang['original_message'] = 'Original message';
|
||||
$hesklang['reply_by_customer'] = 'Reply by customer';
|
||||
$hesklang['reply_by_staff'] = 'Reply by staff';
|
||||
$hesklang['timeline_today'] = 'Today';
|
||||
$hesklang['no_notes_for_this_ticket'] = 'No notes for this ticket';
|
||||
|
||||
// ADDED OR MODIFIED IN Mods for HESK 2.6.0
|
||||
$hesklang['search_logs'] = 'Search Logs';
|
||||
|
Loading…
x
Reference in New Issue
Block a user