This commit is contained in:
Mike Koch 2016-10-26 13:10:23 -04:00
parent 3a690ace8e
commit 3fe649d14b
3 changed files with 459 additions and 531 deletions

View File

@ -286,7 +286,7 @@ $show_quick_help = $show['show'];
} else if (isset($_GET['email'])) { } else if (isset($_GET['email'])) {
echo hesk_GET('email'); echo hesk_GET('email');
} ?>" <?php if ($hesk_settings['detect_typos']) { } ?>" <?php if ($hesk_settings['detect_typos']) {
echo ' onblur="Javascript:hesk_suggestEmail(1)"'; echo ' onblur="Javascript:Javascript:hesk_suggestEmail(\'email\', \'email_suggestions\', 1, 1)"';
} ?> } ?>
placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>" placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>"
onkeyup="disableIfEmpty('email','notify-email')"> onkeyup="disableIfEmpty('email','notify-email')">

View File

@ -27,7 +27,6 @@
* a license please visit the page below: * a license please visit the page below:
* https://www.hesk.com/buy.php * https://www.hesk.com/buy.php
*******************************************************************************/ *******************************************************************************/
define('MINIMUM_REFRESH_THRESHOLD_IN_SECONDS', 1);
/* Check if this is a valid include */ /* Check if this is a valid include */
if (!defined('IN_SCRIPT')) { if (!defined('IN_SCRIPT')) {
die('Invalid attempt'); die('Invalid attempt');
@ -106,15 +105,7 @@ if ($total > 0) {
$next_page = ($page + 1 > $pages) ? 0 : $page + 1; $next_page = ($page + 1 > $pages) ? 0 : $page + 1;
$autorefreshInSeconds = $_SESSION['autorefresh'] / 1000; $autorefreshInSeconds = $_SESSION['autorefresh'] / 1000;
$autorefresh = ''; $autorefresh = '';
if ($autorefreshInSeconds >= MINIMUM_REFRESH_THRESHOLD_IN_SECONDS) {
$autorefresh = ' | ' . $hesklang['autorefresh'] . ' ' . $autorefreshInSeconds . ' ' . $hesklang['abbr']['second'];
?>
<script>
(function () {
setTimeout("location.reload(true);", <?php echo $_SESSION['autorefresh']; ?>);
})();
</script>
<?php }
echo sprintf($hesklang['tickets_on_pages'], $total, $pages) . $autorefresh . ' <br />'; echo sprintf($hesklang['tickets_on_pages'], $total, $pages) . $autorefresh . ' <br />';
if ($pages > 1) { if ($pages > 1) {
@ -403,14 +394,11 @@ if ($total > 0) {
// Print custom fields // Print custom fields
foreach ($hesk_settings['custom_fields'] as $key => $value) { foreach ($hesk_settings['custom_fields'] as $key => $value) {
if ($value['use'] && hesk_show_column($key)) { if ($value['use'] && hesk_show_column($key)) {
echo '<td class="' . $color . '">'; echo '<td class="'.$color.'">'.
if ($value['type'] == 'date' && !empty($ticket[$key])) { ($value['type'] == 'date'
$dt = date('Y-m-d h:i:s', $ticket[$key]); ? hesk_custom_date_display_format($ticket[$key], $value['value']['date_format'])
echo hesk_dateToString($dt, 0); : $ticket[$key]).
} else { '</td>';
echo $ticket[$key];
}
echo '</td>';
} }
} }
@ -439,8 +427,13 @@ if ($total > 0) {
<option value="high"><?php echo $hesklang['set_pri_to'] . ' ' . $hesklang['high']; ?></option> <option value="high"><?php echo $hesklang['set_pri_to'] . ' ' . $hesklang['high']; ?></option>
<option <option
value="critical"><?php echo $hesklang['set_pri_to'] . ' ' . $hesklang['critical']; ?></option> value="critical"><?php echo $hesklang['set_pri_to'] . ' ' . $hesklang['critical']; ?></option>
<?php
if (hesk_checkPermission('can_resolve', 0)) {
?>
<option value="close"><?php echo $hesklang['close_selected']; ?></option> <option value="close"><?php echo $hesklang['close_selected']; ?></option>
<?php <?php
}
if (hesk_checkPermission('can_add_archive', 0)) { if (hesk_checkPermission('can_add_archive', 0)) {
?> ?>
<option value="tag"><?php echo $hesklang['add_archive_quick']; ?></option> <option value="tag"><?php echo $hesklang['add_archive_quick']; ?></option>
@ -478,17 +471,6 @@ else {
echo '<div class="row"><div class="col-sm-12">'; echo '<div class="row"><div class="col-sm-12">';
$autorefreshInSeconds = $_SESSION['autorefresh'] / 1000; $autorefreshInSeconds = $_SESSION['autorefresh'] / 1000;
if ($autorefreshInSeconds >= MINIMUM_REFRESH_THRESHOLD_IN_SECONDS) {
echo $hesklang['autorefresh'] . ' ' . $autorefreshInSeconds . ' ' . $hesklang['abbr']['second'];
?>
<script>
(function () {
setTimeout("location.reload(true);", <?php echo $_SESSION['autorefresh']; ?>);
})();
</script>
<?php
}
if (isset($is_search) || $href == 'find_tickets.php') { if (isset($is_search) || $href == 'find_tickets.php') {
hesk_show_notice($hesklang['no_tickets_crit']); hesk_show_notice($hesklang['no_tickets_crit']);
} else { } else {

820
index.php

File diff suppressed because it is too large Load Diff