mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 03:14:52 +00:00
Converted even more bulk modals to the new ajax-modal
This commit is contained in:
@@ -1,47 +1,61 @@
|
||||
<div class="modal" id="bulkAssignTicketToProjectModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-user-check mr-2"></i>Adding Tickets to Project</strong></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php
|
||||
|
||||
<div class="form-group">
|
||||
<label>Project</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-project-diagram"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="project_id">
|
||||
<option value="0">No Project</option>
|
||||
<?php
|
||||
$sql_projects_select = mysqli_query($mysqli, "SELECT project_id, project_name, project_prefix, project_number FROM projects
|
||||
WHERE project_archived_at IS NULL
|
||||
AND project_completed_at IS NULL
|
||||
ORDER BY project_name DESC"
|
||||
);
|
||||
while ($row = mysqli_fetch_array($sql_projects_select)) {
|
||||
$project_id_select = intval($row['project_id']);
|
||||
$project_prefix_select = nullable_htmlentities($row['project_prefix']);
|
||||
$project_number_select = intval($row['project_number']);
|
||||
$project_name_select = nullable_htmlentities($row['project_name']);
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
?>
|
||||
<option value="<?php echo $project_id_select; ?>"><?php echo " $project_prefix_select$project_number_select - $project_name_select"; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||
|
||||
$count = count($selected_ids);
|
||||
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-user-check mr-2"></i>Assign Project to <strong><?= $count ?></strong> Tickets</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Project</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-project-diagram"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<select class="form-control select2" name="project_id">
|
||||
<option value="0">No Project</option>
|
||||
<?php
|
||||
$sql_projects_select = mysqli_query($mysqli, "SELECT project_id, project_name, project_prefix, project_number FROM projects
|
||||
WHERE project_archived_at IS NULL
|
||||
AND project_completed_at IS NULL
|
||||
ORDER BY project_name DESC"
|
||||
);
|
||||
while ($row = mysqli_fetch_array($sql_projects_select)) {
|
||||
$project_id_select = intval($row['project_id']);
|
||||
$project_prefix_select = nullable_htmlentities($row['project_prefix']);
|
||||
$project_number_select = intval($row['project_number']);
|
||||
$project_name_select = nullable_htmlentities($row['project_name']);
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_add_ticket_project" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Assign</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
?>
|
||||
<option value="<?php echo $project_id_select; ?>"><?php echo " $project_prefix_select$project_number_select - $project_name_select"; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_add_ticket_project" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Assign</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
|
||||
@@ -1,46 +1,60 @@
|
||||
<div class="modal" id="bulkAssignTicketModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-user-check mr-2"></i>Bulk Assigning Selected Tickets:</strong></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php
|
||||
|
||||
<div class="form-group">
|
||||
<label>Assign to</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user-check"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="assign_to">
|
||||
<option value="0">Not Assigned</option>
|
||||
<?php
|
||||
$sql_users_select = mysqli_query($mysqli, "SELECT user_id, user_name FROM users
|
||||
WHERE user_type = 1
|
||||
AND user_status = 1
|
||||
AND user_archived_at IS NULL
|
||||
ORDER BY user_name ASC"
|
||||
);
|
||||
while ($row = mysqli_fetch_array($sql_users_select)) {
|
||||
$user_id_select = intval($row['user_id']);
|
||||
$user_name_select = nullable_htmlentities($row['user_name']);
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
?>
|
||||
<option value="<?php echo $user_id_select; ?>"><?php echo $user_name_select; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||
|
||||
$count = count($selected_ids);
|
||||
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-user-check mr-2"></i>Assign Agent to <strong><?= $count ?></strong> Tickets</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Assign to</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user-check"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<select class="form-control select2" name="assign_to">
|
||||
<option value="0">Not Assigned</option>
|
||||
<?php
|
||||
$sql_users_select = mysqli_query($mysqli, "SELECT user_id, user_name FROM users
|
||||
WHERE user_type = 1
|
||||
AND user_status = 1
|
||||
AND user_archived_at IS NULL
|
||||
ORDER BY user_name ASC"
|
||||
);
|
||||
while ($row = mysqli_fetch_array($sql_users_select)) {
|
||||
$user_id_select = intval($row['user_id']);
|
||||
$user_name_select = nullable_htmlentities($row['user_name']);
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_assign_ticket" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Bulk Assign</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
?>
|
||||
<option value="<?php echo $user_id_select; ?>"><?php echo $user_name_select; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_assign_ticket" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Assign</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
|
||||
@@ -1,42 +1,58 @@
|
||||
<div class="modal" id="bulkEditCategoryTicketModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-layer-group mr-2"></i>Bulk Categorizing Selected Tickets:</strong></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php
|
||||
|
||||
<div class="form-group">
|
||||
<label>Category</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="bulk_category">
|
||||
<option value="0">- Uncategorized -</option>
|
||||
<?php
|
||||
$sql_categories = mysqli_query($mysqli, "SELECT category_id, category_name FROM categories WHERE category_type = 'Ticket' AND category_archived_at IS NULL ORDER BY category_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql_categories)) {
|
||||
$category_id = intval($row['category_id']);
|
||||
$category_name = nullable_htmlentities($row['category_name']);
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
?>
|
||||
<option value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
|
||||
<?php } ?>
|
||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||
|
||||
</select>
|
||||
</div>
|
||||
$count = count($selected_ids);
|
||||
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-layer-group mr-2"></i>Set Category for <strong><?= $count ?></strong> Tickets</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label>Category</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<select class="form-control select2" name="bulk_category">
|
||||
<option value="0">- Uncategorized -</option>
|
||||
<?php
|
||||
$sql_categories = mysqli_query($mysqli, "SELECT category_id, category_name FROM categories WHERE category_type = 'Ticket' AND category_archived_at IS NULL ORDER BY category_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql_categories)) {
|
||||
$category_id = intval($row['category_id']);
|
||||
$category_name = nullable_htmlentities($row['category_name']);
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_edit_ticket_category" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Bulk Edit</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
?>
|
||||
<option value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
|
||||
<?php } ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_edit_ticket_category" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Set</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
|
||||
@@ -1,36 +1,49 @@
|
||||
<div class="modal" id="bulkEditPriorityTicketModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-thermometer-half mr-2"></i>Bulk Editing Priority:</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<?php
|
||||
|
||||
<div class="form-group">
|
||||
<label>Priority</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-thermometer-half"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="bulk_priority">
|
||||
<option>Low</option>
|
||||
<option>Medium</option>
|
||||
<option>High</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
</div>
|
||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_edit_ticket_priority" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
$count = count($selected_ids);
|
||||
|
||||
</div>
|
||||
</div>
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-thermometer-half mr-2"></i>Set Priority for <strong><?= $count ?></strong> Tickets</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Priority</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-thermometer-half"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="bulk_priority">
|
||||
<option>Low</option>
|
||||
<option>Medium</option>
|
||||
<option>High</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_edit_ticket_priority" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Set Priority</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
@@ -1,69 +1,77 @@
|
||||
<div class="modal" id="bulkMergeTicketModal" tabindex="-1">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-clone mr-2"></i>Bulk merge & close tickets</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
<input type="hidden" id="current_ticket_id" value="0"> <!-- Can't currently bulk check this -->
|
||||
<input type="hidden" name="merge_move_replies" value="0"> <!-- Default 0 -->
|
||||
<div class="modal-body">
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
<div class="form-group">
|
||||
<label>Ticket number to merge tickets into <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<?php
|
||||
// Show the ticket prefix, or just the tag icon
|
||||
if (empty($ticket_prefix)) {
|
||||
echo "<span class=\"input-group-text\"><i class=\"fa fa-fw fa-tag\"></i></span>";
|
||||
} else {
|
||||
echo "<div class=\"input-group-text\"> $ticket_prefix </div>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="merge_into_ticket_number" name="merge_into_ticket_number" placeholder="Ticket number" onfocusout="merge_into_number_get_details()">
|
||||
<!-- Calls Javascript function merge_into_number_get_details() after leaving input field -->
|
||||
</div>
|
||||
</div>
|
||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||
|
||||
<div class="form-group">
|
||||
<label>Reason for merge <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-sticky-note"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="merge_comment" placeholder="Comments">
|
||||
</div>
|
||||
</div>
|
||||
$count = count($selected_ids);
|
||||
|
||||
<div class="alert alert-dark" role="alert">
|
||||
<i>Selected tickets will be closed once merging is complete.</i>
|
||||
</div>
|
||||
ob_start();
|
||||
|
||||
|
||||
<hr>
|
||||
<div class="form-group" id="merge_into_details_div" hidden>
|
||||
<h5 id="merge_into_details_number"></h5>
|
||||
<p id="merge_into_details_client"></p>
|
||||
<p id="merge_into_details_subject"></p>
|
||||
<p id="merge_into_details_priority"></p>
|
||||
<p id="merge_into_details_status"></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" id="merge_ticket_btn" name="bulk_merge_tickets" class="btn btn-primary text-bold" disabled><i class="fa fa-check mr-2"></i>Merge</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
<!-- Merge button starts disabled. Is enabled by the merge_into_number_get_details Javascript function-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
?>
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-clone mr-2"></i>Merge & close <strong><?= $count ?></strong>tickets</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
||||
<input type="hidden" id="current_ticket_id" value="0"> <!-- Can't currently bulk check this -->
|
||||
<input type="hidden" name="merge_move_replies" value="0"> <!-- Default 0 -->
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Ticket number to merge tickets into <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<?php
|
||||
// Show the ticket prefix, or just the tag icon
|
||||
if (empty($ticket_prefix)) {
|
||||
echo "<span class=\"input-group-text\"><i class=\"fa fa-fw fa-tag\"></i></span>";
|
||||
} else {
|
||||
echo "<div class=\"input-group-text\"> $ticket_prefix </div>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="merge_into_ticket_number" name="merge_into_ticket_number" placeholder="Ticket number" onfocusout="merge_into_number_get_details()">
|
||||
<!-- Calls Javascript function merge_into_number_get_details() after leaving input field -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Reason for merge <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-sticky-note"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="merge_comment" placeholder="Comments">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-dark" role="alert">
|
||||
<i>Selected tickets will be closed once merging is complete.</i>
|
||||
</div>
|
||||
|
||||
|
||||
<hr>
|
||||
<div class="form-group" id="merge_into_details_div" hidden>
|
||||
<h5 id="merge_into_details_number"></h5>
|
||||
<p id="merge_into_details_client"></p>
|
||||
<p id="merge_into_details_subject"></p>
|
||||
<p id="merge_into_details_priority"></p>
|
||||
<p id="merge_into_details_status"></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" id="merge_ticket_btn" name="bulk_merge_tickets" class="btn btn-primary text-bold" disabled><i class="fa fa-check mr-2"></i>Merge</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
<!-- Merge button starts disabled. Is enabled by the merge_into_number_get_details Javascript function-->
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Ticket merge JS -->
|
||||
<script src="js/ticket_merge.js"></script>
|
||||
<script src="/agent/js/ticket_merge.js"></script>
|
||||
|
||||
@@ -1,60 +1,73 @@
|
||||
<div class="modal" id="bulkReplyTicketModal" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-paper-plane mr-2"></i>Bulk Update/Reply</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||
|
||||
$count = count($selected_ids);
|
||||
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-paper-plane mr-2"></i>Update & Reply <strong><?= $count ?></strong> Tickets</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
||||
<input type="hidden" name="bulk_private_reply" value="0">
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-thermometer-half"></i></span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<input type="hidden" name="bulk_private_reply" value="0">
|
||||
<select class="form-control select2" name="bulk_status" required>
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-thermometer-half"></i></span>
|
||||
</div>
|
||||
<!-- Show all active ticket statuses, apart from new or closed as these are system-managed -->
|
||||
<?php $sql_ticket_status = mysqli_query($mysqli, "SELECT * FROM ticket_statuses WHERE ticket_status_id != 1 AND ticket_status_id != 5 AND ticket_status_active = 1");
|
||||
while ($row = mysqli_fetch_array($sql_ticket_status)) {
|
||||
$ticket_status_id_select = intval($row['ticket_status_id']);
|
||||
$ticket_status_name_select = nullable_htmlentities($row['ticket_status_name']); ?>
|
||||
|
||||
<select class="form-control select2" name="bulk_status" required>
|
||||
<option value="<?php echo $ticket_status_id_select ?>"> <?php echo $ticket_status_name_select ?> </option>
|
||||
|
||||
<!-- Show all active ticket statuses, apart from new or closed as these are system-managed -->
|
||||
<?php $sql_ticket_status = mysqli_query($mysqli, "SELECT * FROM ticket_statuses WHERE ticket_status_id != 1 AND ticket_status_id != 5 AND ticket_status_active = 1");
|
||||
while ($row = mysqli_fetch_array($sql_ticket_status)) {
|
||||
$ticket_status_id_select = intval($row['ticket_status_id']);
|
||||
$ticket_status_name_select = nullable_htmlentities($row['ticket_status_name']); ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
<option value="<?php echo $ticket_status_id_select ?>"> <?php echo $ticket_status_name_select ?> </option>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="form-group">
|
||||
<textarea class="form-control tinymce" rows="5" name="bulk_reply_details" placeholder="Type an update here"></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<textarea class="form-control tinymce" rows="5" name="bulk_reply_details" placeholder="Type an update here"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="form-group">
|
||||
<label>Time worked</label>
|
||||
<input class="form-control timepicker" id="time_worked" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="00:01:00" required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="bulkPrivateReplyCheckbox" name="bulk_private_reply" value="1">
|
||||
<label class="custom-control-label" for="bulkPrivateReplyCheckbox">Mark as internal</label>
|
||||
<small class="form-text text-muted">If checked this note will only be visible to agents.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_ticket_reply" class="btn btn-primary text-bold"><i class="fas fa-paper-plane mr-2"></i>Reply</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
<div class="col-3">
|
||||
<div class="form-group">
|
||||
<label>Time worked</label>
|
||||
<input class="form-control timepicker" id="time_worked" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="00:01:00" required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="bulkPrivateReplyCheckbox" name="bulk_private_reply" value="1">
|
||||
<label class="custom-control-label" for="bulkPrivateReplyCheckbox">Mark as internal</label>
|
||||
<small class="form-text text-muted">If checked this note will only be visible to agents.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_ticket_reply" class="btn btn-primary text-bold"><i class="fas fa-paper-plane mr-2"></i>Update & Reply</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
|
||||
@@ -1,40 +1,52 @@
|
||||
<div class="modal" id="bulkCloseTicketsModal" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-check mr-2"></i>Resolving Multiple Tickets</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php
|
||||
|
||||
<input type="hidden" name="bulk_private_note" value="0">
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
<div class="form-group">
|
||||
<textarea class="form-control tinymce" rows="5" name="bulk_details" placeholder="Enter closing remarks"></textarea>
|
||||
</div>
|
||||
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||
|
||||
<div class="col-3">
|
||||
<div class="form-group">
|
||||
<label>Time worked</label>
|
||||
<input class="form-control timepicker" id="time_worked" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="00:01:00" required/>
|
||||
</div>
|
||||
</div>
|
||||
$count = count($selected_ids);
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="bulkPrivateCheckbox" name="bulk_private_note" value="1">
|
||||
<label class="custom-control-label" for="bulkPrivateCheckbox">Mark as Internal</label>
|
||||
<small class="form-text text-muted">If checked this note will only be visible to agents. The contact / watcher will not be informed this ticket was resolved.</small>
|
||||
</div>
|
||||
</div>
|
||||
ob_start();
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_resolve_tickets" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Resolve</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
?>
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-check mr-2"></i>Resolve <strong><?= $count ?></strong> Tickets</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="ticket_ids[]" value="<?= $id ?>"><?php } ?>
|
||||
<input type="hidden" name="bulk_private_note" value="0">
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control tinymce" rows="5" name="bulk_details" placeholder="Enter closing remarks"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="form-group">
|
||||
<label>Time worked</label>
|
||||
<input class="form-control timepicker" id="time_worked" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="00:01:00" required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="bulkPrivateCheckbox" name="bulk_private_note" value="1">
|
||||
<label class="custom-control-label" for="bulkPrivateCheckbox">Mark as Internal</label>
|
||||
<small class="form-text text-muted">If checked this note will only be visible to agents. The contact / watcher will not be informed this ticket was resolved.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="bulk_resolve_tickets" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Resolve Tickets</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
|
||||
Reference in New Issue
Block a user