Collapse add use, ticket tpl uses new UI
This commit is contained in:
parent
34e58519f2
commit
42c49c688c
@ -37,6 +37,7 @@ define('PAGE_TITLE', 'ADMIN_CANNED');
|
||||
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();
|
||||
@ -78,10 +79,6 @@ require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
|
||||
require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
function confirm_delete() {
|
||||
if (confirm('<?php echo hesk_makeJsString($hesklang['delete_tpl']); ?>')) {
|
||||
@ -105,141 +102,159 @@ $i = 1;
|
||||
$j = 0;
|
||||
$num = hesk_dbNumRows($result);
|
||||
?>
|
||||
<div class="row move-down-20">
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<section class="content">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h1 class="box-title">
|
||||
<?php echo $hesklang['saved_ticket_tpl']; ?>
|
||||
</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 class="panel-body">
|
||||
<?php if ($num < 1) {
|
||||
echo '<p>' . $hesklang['no_ticket_tpl'] . '</p>';
|
||||
} else {
|
||||
?>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $hesklang['ticket_tpl_title']; ?></th>
|
||||
<th><?php echo $hesklang['opt']; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<?php if ($num < 1) {
|
||||
echo '<p>' . $hesklang['no_ticket_tpl'] . '</p>';
|
||||
} else {
|
||||
?>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $hesklang['ticket_tpl_title']; ?></th>
|
||||
<th><?php echo $hesklang['opt']; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while ($mysaved = hesk_dbFetchAssoc($result)) {
|
||||
$j++;
|
||||
$color = '';
|
||||
if (isset($_SESSION['canned']['selcat2']) && $mysaved['id'] == $_SESSION['canned']['selcat2']) {
|
||||
$color = 'success';
|
||||
unset($_SESSION['canned']['selcat2']);
|
||||
}
|
||||
while ($mysaved = hesk_dbFetchAssoc($result)) {
|
||||
$j++;
|
||||
$color = '';
|
||||
if (isset($_SESSION['canned']['selcat2']) && $mysaved['id'] == $_SESSION['canned']['selcat2']) {
|
||||
$color = 'success';
|
||||
unset($_SESSION['canned']['selcat2']);
|
||||
}
|
||||
|
||||
$options .= '<option class="form-control" value="' . $mysaved['id'] . '"';
|
||||
$options .= (isset($_SESSION['canned']['id']) && $_SESSION['canned']['id'] == $mysaved['id']) ? ' selected="selected" ' : '';
|
||||
$options .= '>' . $mysaved['title'] . '</option>';
|
||||
$options .= '<option class="form-control" value="' . $mysaved['id'] . '"';
|
||||
$options .= (isset($_SESSION['canned']['id']) && $_SESSION['canned']['id'] == $mysaved['id']) ? ' selected="selected" ' : '';
|
||||
$options .= '>' . $mysaved['title'] . '</option>';
|
||||
|
||||
if ($modsForHesk_settings['rich_text_for_tickets']) {
|
||||
$theMessage = html_entity_decode($mysaved['message']);
|
||||
$theMessage = addslashes($theMessage);
|
||||
$javascript_messages .= 'myMsgTxt[' . $mysaved['id'] . ']=\'' . str_replace("\r\n", "\\r\\n' + \r\n'", $theMessage) . "';\n";
|
||||
} else {
|
||||
$javascript_messages .= 'myMsgTxt[' . $mysaved['id'] . ']=\'' . str_replace("\r\n", "\\r\\n' + \r\n'", addslashes($mysaved['message'])) . "';\n";
|
||||
}
|
||||
$javascript_titles .= 'myTitle[' . $mysaved['id'] . ']=\'' . addslashes($mysaved['title']) . "';\n";
|
||||
if ($modsForHesk_settings['rich_text_for_tickets']) {
|
||||
$theMessage = html_entity_decode($mysaved['message']);
|
||||
$theMessage = addslashes($theMessage);
|
||||
$javascript_messages .= 'myMsgTxt[' . $mysaved['id'] . ']=\'' . str_replace("\r\n", "\\r\\n' + \r\n'", $theMessage) . "';\n";
|
||||
} else {
|
||||
$javascript_messages .= 'myMsgTxt[' . $mysaved['id'] . ']=\'' . str_replace("\r\n", "\\r\\n' + \r\n'", addslashes($mysaved['message'])) . "';\n";
|
||||
}
|
||||
$javascript_titles .= 'myTitle[' . $mysaved['id'] . ']=\'' . addslashes($mysaved['title']) . "';\n";
|
||||
|
||||
echo '
|
||||
echo '
|
||||
<tr>
|
||||
<td>' . $mysaved['title'] . '</td>
|
||||
<td class="text-left">
|
||||
';
|
||||
|
||||
if ($num > 1) {
|
||||
if ($j == 1) {
|
||||
echo '<img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />
|
||||
if ($num > 1) {
|
||||
if ($j == 1) {
|
||||
echo '<img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />
|
||||
<a href="manage_ticket_templates.php?a=order&replyid=' . $mysaved['id'] . '&move=15&token=' . hesk_token_echo(0) . '">
|
||||
<i class="fa fa-arrow-down icon-link green" data-toggle="tooltip" data-placement="top" data-original-title="' . $hesklang['move_dn'] . '"></i></a>';
|
||||
} elseif ($j == $num) {
|
||||
echo '<a href="manage_ticket_templates.php?a=order&replyid=' . $mysaved['id'] . '&move=-15&token=' . hesk_token_echo(0) . '"><i class="fa fa-arrow-up icon-link green" data-toggle="tooltip" data-placement="top" data-original-title="' . $hesklang['move_up'] . '"></i></a> <img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />';
|
||||
} else {
|
||||
echo '
|
||||
} elseif ($j == $num) {
|
||||
echo '<a href="manage_ticket_templates.php?a=order&replyid=' . $mysaved['id'] . '&move=-15&token=' . hesk_token_echo(0) . '"><i class="fa fa-arrow-up icon-link green" data-toggle="tooltip" data-placement="top" data-original-title="' . $hesklang['move_up'] . '"></i></a> <img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />';
|
||||
} else {
|
||||
echo '
|
||||
<a href="manage_ticket_templates.php?a=order&replyid=' . $mysaved['id'] . '&move=-15&token=' . hesk_token_echo(0) . '"><i class="fa fa-arrow-up icon-link green" data-toggle="tooltip" data-placement="top" data-original-title="' . $hesklang['move_up'] . '"></i></a>
|
||||
<a href="manage_ticket_templates.php?a=order&replyid=' . $mysaved['id'] . '&move=15&token=' . hesk_token_echo(0) . '"><i class="fa fa-arrow-down icon-link green" data-toggle="tooltip" data-placement="top" data-original-title="' . $hesklang['move_dn'] . '"></i></a>
|
||||
';
|
||||
}
|
||||
} else {
|
||||
echo '';
|
||||
}
|
||||
} else {
|
||||
echo '';
|
||||
}
|
||||
|
||||
echo '
|
||||
echo '
|
||||
<a href="manage_ticket_templates.php?a=remove&id=' . $mysaved['id'] . '&token=' . hesk_token_echo(0) . '" onclick="return confirm_delete();"><i class="fa fa-times icon-link red" data-toggle="tooltip" data-placement="top" data-original-title="' . $hesklang['delete'] . '"></i></a></td>
|
||||
</tr>
|
||||
';
|
||||
} // End while
|
||||
} // End while
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<?php
|
||||
/* This will handle error, success and notice messages */
|
||||
hesk_handle_messages();
|
||||
|
||||
$onsubmit = '';
|
||||
if ($modsForHesk_settings['rich_text_for_tickets']) {
|
||||
$onsubmit = 'onsubmit="return validateRichText(\'message-help-block\', \'message-group\', \'message\', \''.htmlspecialchars($hesklang['this_field_is_required']).'\')"';
|
||||
}
|
||||
?>
|
||||
<form class="form-horizontal" action="manage_ticket_templates.php" method="post" name="form1" role="form" data-toggle="validator" <?php echo $onsubmit; ?>>
|
||||
<h3><?php echo $hesklang['new_ticket_tpl']; ?> <a href="javascript:void(0)"
|
||||
onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['ticket_tpl_intro']); ?>')"><i
|
||||
class="fa fa-question-circle settingsquestionmark"></i></a></h3>
|
||||
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<?php
|
||||
if ($num > 0) {
|
||||
?>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="a"
|
||||
value="new" <?php echo (!isset($_SESSION['canned']['what']) || $_SESSION['canned']['what'] != 'EDIT') ? 'checked=' : ''; ?>>
|
||||
<?php echo $hesklang['ticket_tpl_add']; ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="a"
|
||||
value="edit" <?php echo (isset($_SESSION['canned']['what']) && $_SESSION['canned']['what'] == 'EDIT') ? 'checked' : ''; ?>>
|
||||
<?php echo $hesklang['ticket_tpl_edit']; ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" name="saved_replies" onchange="setMessage(this.value)">
|
||||
<option value="0"> - <?php echo $hesklang['select_empty']; ?>-
|
||||
</option><?php echo $options; ?></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
} else {
|
||||
echo '<p><input type="hidden" name="a" value="new" /> ' . $hesklang['ticket_tpl_add'] . '</label></p>';
|
||||
}
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label"><?php echo $hesklang['ticket_tpl_title']; ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h1 class="box-title">
|
||||
<?php echo $hesklang['new_ticket_tpl']; ?>
|
||||
<a href="javascript:void(0)"
|
||||
onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['ticket_tpl_intro']); ?>')"><i
|
||||
class="fa fa-question-circle settingsquestionmark"></i></a>
|
||||
</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
|
||||
/* This will handle error, success and notice messages */
|
||||
hesk_handle_messages();
|
||||
|
||||
<div class="col-sm-10">
|
||||
$onsubmit = '';
|
||||
if ($modsForHesk_settings['rich_text_for_tickets']) {
|
||||
$onsubmit = 'onsubmit="return validateRichText(\'message-help-block\', \'message-group\', \'message\', \''.htmlspecialchars($hesklang['this_field_is_required']).'\')"';
|
||||
}
|
||||
?>
|
||||
<form class="form-horizontal" action="manage_ticket_templates.php" method="post" name="form1" role="form" data-toggle="validator" <?php echo $onsubmit; ?>>
|
||||
<?php
|
||||
if ($num > 0) {
|
||||
?>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="a"
|
||||
value="new" <?php echo (!isset($_SESSION['canned']['what']) || $_SESSION['canned']['what'] != 'EDIT') ? 'checked=' : ''; ?>>
|
||||
<?php echo $hesklang['ticket_tpl_add']; ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="a"
|
||||
value="edit" <?php echo (isset($_SESSION['canned']['what']) && $_SESSION['canned']['what'] == 'EDIT') ? 'checked' : ''; ?>>
|
||||
<?php echo $hesklang['ticket_tpl_edit']; ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" name="saved_replies" onchange="setMessage(this.value)">
|
||||
<option value="0"> - <?php echo $hesklang['select_empty']; ?>-
|
||||
</option><?php echo $options; ?></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
echo '<p><input type="hidden" name="a" value="new" /> ' . $hesklang['ticket_tpl_add'] . '</label></p>';
|
||||
}
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label"><?php echo $hesklang['ticket_tpl_title']; ?></label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<span id="HeskTitle">
|
||||
<input id="subject" class="form-control" type="text" name="name" size="40" maxlength="50"
|
||||
data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
|
||||
@ -248,13 +263,13 @@ $num = hesk_dbNumRows($result);
|
||||
echo ' value="' . stripslashes($_SESSION['canned']['name']) . '" ';
|
||||
} ?> required>
|
||||
</span>
|
||||
<div class="help-block with-errors"></div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="message-group">
|
||||
<label for="msg" class="col-sm-2 control-label"><?php echo $hesklang['message']; ?></label>
|
||||
<div class="form-group" id="message-group">
|
||||
<label for="msg" class="col-sm-2 control-label"><?php echo $hesklang['message']; ?></label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<div class="col-sm-10">
|
||||
<span id="HeskMsg">
|
||||
<textarea id="message" class="form-control htmlEditor"
|
||||
data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
|
||||
@ -269,18 +284,19 @@ $num = hesk_dbNumRows($result);
|
||||
}
|
||||
?></textarea>
|
||||
</span>
|
||||
<div class="help-block with-errors" id="message-help-block"></div>
|
||||
<div class="help-block with-errors" id="message-help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>"/>
|
||||
<input type="submit" value="<?php echo $hesklang['save_ticket_tpl']; ?>" class="btn btn-default">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>"/>
|
||||
<input type="submit" value="<?php echo $hesklang['save_ticket_tpl']; ?>" class="btn btn-default">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php if ($modsForHesk_settings['rich_text_for_tickets']): ?>
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
|
@ -188,6 +188,27 @@ if ($action = hesk_REQUEST('a')) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<div class="box collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h1 class="box-title">
|
||||
<?php echo $hesklang['add_user']; ?>
|
||||
<a href="javascript:void(0)" onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['users_intro']); ?>')">
|
||||
<i class="fa fa-question-circle settingsquestionmark"></i>
|
||||
</a>
|
||||
</h1>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<?php echo $hesklang['req_marked_with']; ?> <span class="red">*</span>
|
||||
<form data-toggle="validator" name="form1" method="post" action="manage_users.php" class="form-horizontal" role="form">
|
||||
<?php hesk_profile_tab('userdata', false, 'create_user'); ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h1 class="box-title">
|
||||
@ -331,27 +352,6 @@ EOC;
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h1 class="box-title">
|
||||
<?php echo $hesklang['add_user']; ?>
|
||||
<a href="javascript:void(0)" onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['users_intro']); ?>')">
|
||||
<i class="fa fa-question-circle settingsquestionmark"></i>
|
||||
</a>
|
||||
</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 $hesklang['req_marked_with']; ?> <span class="red">*</span>
|
||||
<form data-toggle="validator" name="form1" method="post" action="manage_users.php" class="form-horizontal" role="form">
|
||||
<?php hesk_profile_tab('userdata', false, 'create_user'); ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script language="Javascript" type="text/javascript"><!--
|
||||
hesk_checkPassword(document.form1.newpass.value);
|
||||
//-->
|
||||
|
Loading…
x
Reference in New Issue
Block a user