#209 View ticket on admin side now supports new statuses
This commit is contained in:
parent
98ee61ff6d
commit
22e8a8efe9
@ -677,9 +677,9 @@ if($ticket['email'] != '') {
|
||||
$recentTicketsWithStatuses = array();
|
||||
foreach ($recentTickets as $recentTicket) {
|
||||
$newRecentTicket = $recentTicket;
|
||||
$thisTicketStatusRS = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` WHERE `ID` = " . intval($recentTicket['status']));
|
||||
$thisTicketStatusRS = hesk_dbQuery("SELECT `ID`, `TextColor` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` WHERE `ID` = " . intval($recentTicket['status']));
|
||||
$theStatusRow = hesk_dbFetchAssoc($thisTicketStatusRS);
|
||||
$newRecentTicket['statusText'] = $hesklang[$theStatusRow['Key']];
|
||||
$newRecentTicket['statusText'] = mfh_getDisplayTextForStatusId($theStatusRow['ID']);
|
||||
$newRecentTicket['statusColor'] = $theStatusRow['TextColor'];
|
||||
array_push($recentTicketsWithStatuses, $newRecentTicket);
|
||||
}
|
||||
@ -975,11 +975,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<?php
|
||||
$random=rand(10000,99999);
|
||||
|
||||
$statusSql = 'SELECT `ID`, `Key`, `IsStaffClosedOption`, `IsStaffReopenedStatus` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsStaffClosedOption` = 1 OR `IsStaffReopenedStatus` = 1';
|
||||
$statusSql = 'SELECT `ID`, `IsStaffClosedOption`, `IsStaffReopenedStatus` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsStaffClosedOption` = 1 OR `IsStaffReopenedStatus` = 1';
|
||||
$statusRs = hesk_dbQuery($statusSql);
|
||||
$staffClosedOptionStatus = array();
|
||||
$staffReopenedStatus = array();
|
||||
while ($statusRow = $statusRs->fetch_assoc())
|
||||
while ($statusRow = hesk_dbFetchAssoc($statusRs))
|
||||
{
|
||||
if ($statusRow['IsStaffReopenedStatus'] == 1)
|
||||
{
|
||||
@ -1079,11 +1079,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
echo '<div class="col-md-3 col-sm-12 ticket-cell-admin"><p class="ticketPropertyTitle">'.$hesklang['status'].'</p>';
|
||||
$status_options = array();
|
||||
$results = hesk_dbQuery("SELECT `ID`, `Key` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses`");
|
||||
while ($row = $results->fetch_assoc())
|
||||
$results = hesk_dbQuery("SELECT `ID`FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses`");
|
||||
while ($row = hesk_dbFetchAssoc($results))
|
||||
{
|
||||
$selected = $ticket['status'] == $row['ID'] ? 'selected' : '';
|
||||
$status_options[$row['ID']] = '<option value="'.$row['ID'].'" '.$selected.'>'.$hesklang[$row['Key']].'</option>';
|
||||
$status_options[$row['ID']] = '<option value="'.$row['ID'].'" '.$selected.'>'.mfh_getDisplayTextForStatusId($row['ID']).'</option>';
|
||||
}
|
||||
|
||||
echo '
|
||||
@ -2033,7 +2033,7 @@ function hesk_printReplyForm() {
|
||||
</a></li>
|
||||
<li class="divider"></li>
|
||||
<?php
|
||||
$allStatusesRs = hesk_dbQuery('SELECT `ID`, `Key`, `TextColor` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses`');
|
||||
$allStatusesRs = hesk_dbQuery('SELECT `ID`, `TextColor` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses`');
|
||||
$statuses = array();
|
||||
while ($row = hesk_dbFetchAssoc($allStatusesRs)) {
|
||||
array_push($statuses, $row);
|
||||
@ -2043,7 +2043,7 @@ function hesk_printReplyForm() {
|
||||
echo '<li><a>
|
||||
<button class="dropdown-submit" type="submit" name="submit_as_status" value="'.$status['ID'].'"">
|
||||
'.$hesklang['submit_reply'].' '.$hesklang['and_change_status_to'].' <b>
|
||||
<span style="color:'.$status['TextColor'].'">'.$hesklang[$status['Key']].'</span></b>
|
||||
<span style="color:'.$status['TextColor'].'">'.mfh_getDisplayTextForStatusId($status['ID']).'</span></b>
|
||||
</button>
|
||||
</a></li>';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user