mirror of https://github.com/itflow-org/itflow
Migrate Add Ticket, Recurring Ticket, Project and Vendor to the new ajax-modal
This commit is contained in:
parent
a55dabb1cd
commit
c12bfb157e
|
|
@ -361,11 +361,11 @@ if (isset($_GET['asset_id'])) {
|
|||
<div class="dropdown dropleft mr-2">
|
||||
<button type="button" class="btn btn-primary" data-toggle="dropdown"><i class="fas fa-plus mr-2"></i>New</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addTicketModal">
|
||||
<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/ticket/ticket_add.php?<?= $client_url ?>&asset_id=<?= $asset_id ?>" data-modal-size="lg">
|
||||
<i class="fa fa-fw fa-life-ring mr-2"></i>New Ticket
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addRecurringTicketModal">
|
||||
<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/recurring_ticket/recurring_ticket_add.php?<?= $client_url ?>&asset_id=<?= $asset_id ?>" data-modal-size="lg">
|
||||
<i class="fa fa-fw fa-recycle mr-2"></i>New Recurring Ticket
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -1225,8 +1225,6 @@ if (isset($_GET['asset_id'])) {
|
|||
require_once "modals/asset/asset_interface_multiple_add.php";
|
||||
require_once "modals/asset/asset_interface_import.php";
|
||||
require_once "modals/asset/asset_interface_export.php";
|
||||
require_once "modals/ticket/ticket_add.php";
|
||||
require_once "modals/recurring_ticket/recurring_ticket_add.php";
|
||||
require_once "modals/document/document_add.php";
|
||||
require_once "modals/file/file_upload.php";
|
||||
|
||||
|
|
|
|||
|
|
@ -262,11 +262,11 @@ if (isset($_GET['contact_id'])) {
|
|||
<div class="dropdown dropleft mr-2">
|
||||
<button type="button" class="btn btn-primary" data-toggle="dropdown"><i class="fas fa-plus mr-2"></i>New</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addTicketModal">
|
||||
<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/ticket/ticket_add.php?<?= $client_url ?>&contact_id=<?= $contact_id ?>" data-modal-size="lg">
|
||||
<i class="fa fa-fw fa-life-ring mr-2"></i>New Ticket
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addRecurringTicketModal">
|
||||
<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/recurring_ticket/recurring_ticket_add.php?<?= $client_url ?>&contact_id=<?= $contact_id ?>" data-modal-size="lg">
|
||||
<i class="fa fa-fw fa-recycle mr-2"></i>New Recurring Ticket
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -1180,8 +1180,6 @@ if (isset($_GET['contact_id'])) {
|
|||
|
||||
<?php
|
||||
|
||||
require_once "modals/ticket/ticket_add.php";
|
||||
require_once "modals/recurring_ticket/recurring_ticket_add.php";
|
||||
require_once "modals/document/document_add.php";
|
||||
require_once "modals/file/file_upload.php";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
<div class="modal" id="addProjectModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
$client_id = intval($_GET['client_id'] ?? 0);
|
||||
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-project-diagram mr-2"></i>New Project</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
|
|
@ -8,10 +14,33 @@
|
|||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="client_id" value="<?php if (isset($_GET['client_id'])) { echo $client_id; } else { echo 0; } ?>">
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<?php if ($client_id) { ?>
|
||||
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||
<?php } else { ?>
|
||||
<div class="form-group">
|
||||
<label>Client</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-users"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="client_id">
|
||||
<option value="0">- No Client -</option>
|
||||
<?php
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
$client_id_select = intval($row['client_id']);
|
||||
$client_name = nullable_htmlentities($row['client_name']);
|
||||
?>
|
||||
<option value="<?php echo $client_id_select; ?>"><?php echo $client_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Project Name <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
|
|
@ -87,34 +116,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (empty($_GET['client_id'])) { ?>
|
||||
<div class="form-group">
|
||||
<label>Client</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-users"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="client_id">
|
||||
<option value="0">- No Client -</option>
|
||||
<?php
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
$client_id = intval($row['client_id']);
|
||||
$client_name = nullable_htmlentities($row['client_name']);
|
||||
?>
|
||||
<option value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="add_project" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
<div class="modal" id="addRecurringTicketModal" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
$client_id = intval($_GET['client_id'] ?? 0);
|
||||
$contact_id = intval($_GET['contact_id'] ?? 0);
|
||||
$asset_id = intval($_GET['asset_id'] ?? 0);
|
||||
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-calendar-check mr-2"></i>New Recurring Ticket</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
|
|
@ -19,7 +27,7 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="pill" href="#pills-add-details"><i class="fa fa-fw fa-life-ring mr-2"></i>Details</a>
|
||||
</li>
|
||||
<?php if (!isset($_GET['contact_id'])) { ?>
|
||||
<?php if (!$contact_id) { ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="pill" href="#pills-add-contacts"><i class="fa fa-fw fa-users mr-2"></i>Contact</a>
|
||||
</li>
|
||||
|
|
@ -135,7 +143,10 @@
|
|||
|
||||
</div>
|
||||
|
||||
<?php if (!isset($_GET['contact_id'])) { ?>
|
||||
<?php if ($contact_id) { ?>
|
||||
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
||||
<input type="hidden" name="contact" value="<?php echo $contact_id; ?>">
|
||||
<?php } else { ?>
|
||||
<div class="tab-pane fade" id="pills-add-contacts">
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -144,16 +155,16 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="client" id="changeClientSelect" required <?php if (isset($client_id)) { echo "disabled"; } ?>>
|
||||
<select class="form-control select2" name="client" id="changeClientSelect" required <?php if ($client_id) { echo "disabled"; } ?>>
|
||||
<option value="">- Client -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
$selectable_client_id = intval($row['client_id']);
|
||||
$client_id_select = intval($row['client_id']);
|
||||
$client_name = nullable_htmlentities($row['client_name']); ?>
|
||||
|
||||
<option value="<?php echo $selectable_client_id; ?>" <?php if (isset($client_id) && $client_id == $selectable_client_id) {echo "selected"; } ?>><?php echo $client_name; ?></option>
|
||||
<option value="<?php echo $client_id_select; ?>" <?php if ($client_id == $client_id_select) {echo "selected"; } ?>><?php echo $client_name; ?></option>
|
||||
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
|
@ -176,9 +187,7 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
||||
<input type="hidden" name="contact" value="<?php echo intval($_GET['contact_id']); ?>">
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div class="tab-pane fade" id="pills-add-schedule">
|
||||
|
|
@ -219,7 +228,7 @@
|
|||
|
||||
<div class="tab-pane fade" id="pills-add-assets">
|
||||
|
||||
<?php if (isset($client_id)) { ?>
|
||||
<?php if ($client_id) { ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Asset</label>
|
||||
|
|
@ -263,7 +272,7 @@
|
|||
. ($contact_name_select ? " - ($contact_name_select)" : '');
|
||||
?>
|
||||
|
||||
<option value="<?= $asset_id_select ?>"><?= $full_name ?></option>
|
||||
<option <?php if ($asset_id == $asset_id_select) { echo "selected"; } ?> value="<?= $asset_id_select ?>"><?= $full_name ?></option>
|
||||
|
||||
<?php }
|
||||
|
||||
|
|
@ -338,11 +347,12 @@
|
|||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Recurring Ticket Client/Contact JS -->
|
||||
<link rel="stylesheet" href="../plugins/jquery-ui/jquery-ui.min.css">
|
||||
<script src="../plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||
<script src="js/tickets_add_modal.js"></script>
|
||||
<link rel="stylesheet" href="/plugins/jquery-ui/jquery-ui.min.css">
|
||||
<script src="/plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||
<script src="/agent/js/tickets_add_modal.js"></script>
|
||||
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,15 @@
|
|||
<div class="modal" id="addTicketModal" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
$client_id = intval($_GET['client_id'] ?? 0);
|
||||
$contact_id = intval($_GET['contact_id'] ?? 0);
|
||||
$asset_id = intval($_GET['asset_id'] ?? 0);
|
||||
$project_id = intval($_GET['project_id'] ?? 0);
|
||||
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-life-ring mr-2"></i>New Ticket (v1)</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
|
|
@ -36,7 +45,9 @@
|
|||
|
||||
<div class="tab-pane fade show active" id="pills-ticket-details">
|
||||
|
||||
<?php if (empty($_GET['client_id'])) { ?>
|
||||
<?php if ($client_id) { ?>
|
||||
<input type="hidden" name="client" value="<?= $client_id ?>">
|
||||
<?php } else { ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Client <strong class="text-danger">*</strong> / <span class="text-secondary">Use Primary Contact</label>
|
||||
|
|
@ -50,9 +61,9 @@
|
|||
|
||||
$sql = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
$client_id = intval($row['client_id']);
|
||||
$client_id_select = intval($row['client_id']);
|
||||
$client_name = nullable_htmlentities($row['client_name']); ?>
|
||||
<option value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
|
||||
<option value="<?php echo $client_id_select; ?>"><?php echo $client_name; ?></option>
|
||||
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
|
@ -223,7 +234,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<?php if (isset($_GET['client_id'])) { ?>
|
||||
<?php if($client_id) { ?>
|
||||
|
||||
<div class="tab-pane fade" id="pills-ticket-contacts">
|
||||
|
||||
|
|
@ -264,9 +275,9 @@
|
|||
?>
|
||||
<option value="<?php echo $contact_id_select; ?>"
|
||||
<?php
|
||||
if (isset($_GET['contact_id']) && $contact_id_select == intval($_GET['contact_id'])) {
|
||||
if ($contact_id == $contact_id_select) {
|
||||
echo "selected";
|
||||
} elseif (empty($_GET['contact_id']) && $contact_primary_select == 1) {
|
||||
} elseif (!$contact_id && $contact_primary_select == 1) {
|
||||
echo "selected";
|
||||
}
|
||||
?>
|
||||
|
|
@ -320,8 +331,7 @@
|
|||
$asset_contact_name_select = nullable_htmlentities($row['contact_name']);
|
||||
?>
|
||||
<option value="<?php echo $asset_id_select; ?>"
|
||||
<?php if (isset($_GET['asset_id']) && $asset_id_select == $_GET['asset_id']) { echo "selected"; }
|
||||
?>
|
||||
<?php if ($asset_id == $asset_id_select) { echo "selected"; }?>
|
||||
><?php echo "$asset_name_select - $asset_contact_name_select"; ?></option>
|
||||
|
||||
<?php } ?>
|
||||
|
|
@ -433,7 +443,7 @@
|
|||
while ($row = mysqli_fetch_array($sql_projects)) {
|
||||
$project_id_select = intval($row['project_id']);
|
||||
$project_name_select = nullable_htmlentities($row['project_name']); ?>
|
||||
<option <?php if (isset($_GET['project_id']) && $project_id_select == $_GET['project_id']) { echo "selected"; } ?> value="<?php echo $project_id_select; ?>"><?php echo $project_name_select; ?></option>
|
||||
<option <?php if ($project_id == $project_id_select) { echo "selected"; } ?> value="<?php echo $project_id_select; ?>"><?php echo $project_name_select; ?></option>
|
||||
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
|
@ -452,9 +462,6 @@
|
|||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
|
|
@ -484,3 +491,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
<div class="modal" id="addTicketModalv2" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
$client_id = intval($_GET['client_id'] ?? 0);
|
||||
$contact_id = intval($_GET['contact_id'] ?? 0);
|
||||
$project_id = intval($_GET['project_id'] ?? 0);
|
||||
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-life-ring mr-2"></i>New Ticket (v2)</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
|
|
@ -9,14 +17,11 @@
|
|||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<!-- Hidden/System fields -->
|
||||
<?php if ($client_url && isset($client_id)) { ?>
|
||||
<?php if ($client_id) { ?>
|
||||
<input type="hidden" name="client" value="<?php echo $client_id; ?>>">
|
||||
<?php }
|
||||
if (isset($_GET['contact_id'])) { ?>
|
||||
<input type="hidden" name="contact" value="<?php echo intval($_GET['contact_id']); ?>">
|
||||
<?php }
|
||||
if (isset($_GET['project_id'])) { ?>
|
||||
<input type="hidden" name="project" value="<?php echo intval($_GET['project_id']); ?>">
|
||||
<?php } ?>
|
||||
<?php if ($project_id) { ?>
|
||||
<input type="hidden" name="project" value="<?php echo $project_id; ?>">
|
||||
<?php } ?>
|
||||
<input type="hidden" name="billable" value="0">
|
||||
|
||||
|
|
@ -27,8 +32,7 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="pill" href="#pills-add-details"><i class="fa fa-fw fa-life-ring mr-2"></i>Details</a>
|
||||
</li>
|
||||
<!-- Hide contact if in URL as it means we're creating a ticket from a contact record -->
|
||||
<?php if (!isset($_GET['contact_id'])) { ?>
|
||||
<?php if (!$contact_id) { ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="pill" href="#pills-add-contacts"><i class="fa fa-fw fa-users mr-2"></i>Contact</a>
|
||||
</li>
|
||||
|
|
@ -183,7 +187,9 @@
|
|||
</div>
|
||||
|
||||
<!-- Ticket client/contact -->
|
||||
<?php if (!isset($_GET['contact_id'])) { ?>
|
||||
<?php if ($contact_id) { ?>
|
||||
<input type="hidden" name="contact" value="<?php echo $contact_id; ?>">
|
||||
<?php } else { ?>
|
||||
<div class="tab-pane fade" id="pills-add-contacts">
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -192,16 +198,16 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="client" id="changeClientSelect" required <?php if ($client_url && isset($client_id)) { echo "disabled"; } ?>>
|
||||
<select class="form-control select2" name="client" id="changeClientSelect" required <?php if ($client_id) { echo "disabled"; } ?>>
|
||||
<option value="">- Client -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_lead = 0 AND client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
$selectable_client_id = intval($row['client_id']);
|
||||
$client_id_select = intval($row['client_id']);
|
||||
$client_name = nullable_htmlentities($row['client_name']); ?>
|
||||
|
||||
<option value="<?php echo $selectable_client_id; ?>" <?php if ($client_url && isset($client_id) && $client_id == $selectable_client_id) {echo "selected"; } ?>><?php echo $client_name; ?></option>
|
||||
<option value="<?php echo $client_id_select; ?>" <?php if ($client_id == $client_id_select) {echo "selected"; } ?>><?php echo $client_name; ?></option>
|
||||
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
|
@ -288,9 +294,6 @@
|
|||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Ticket Templates -->
|
||||
<script>
|
||||
|
|
@ -323,7 +326,10 @@
|
|||
</script>
|
||||
|
||||
<!-- Ticket Client/Contact JS -->
|
||||
<link rel="stylesheet" href="../plugins/jquery-ui/jquery-ui.min.css">
|
||||
<script src="../plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||
<script src="js/tickets_add_modal.js"></script>
|
||||
<link rel="stylesheet" href="/plugins/jquery-ui/jquery-ui.min.css">
|
||||
<script src="/plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||
<script src="/agent/js/tickets_add_modal.js"></script>
|
||||
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
<div class="modal" id="addVendorModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
$client_id = intval($_GET['client_id'] ?? 0);
|
||||
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-building mr-2"></i>New Vendor</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
|
|
@ -8,7 +14,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="client_id" value="<?php if (isset($_GET['client_id'])) { echo $client_id; } else { echo 0; } ?>">
|
||||
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||
|
||||
<div class="modal-body">
|
||||
<ul class="nav nav-pills nav-justified mb-3">
|
||||
|
|
@ -154,6 +160,7 @@
|
|||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
|
|
|
|||
|
|
@ -184,8 +184,8 @@ if (isset($_GET['project_id'])) {
|
|||
<i class="fas fa-fw fa-plus mr-2"></i>New
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addTicketModal">
|
||||
<i class="fas fa-fw fa-life-ring mr-2"></i>Ticket
|
||||
<a class="dropdown-item text-dark ajax-modal" href="#" data-modal-url="modals/ticket/ticket_add.php?<?= $client_url ?>&project_id=<?= $project_id ?>" data-modal-size="lg">
|
||||
<i class="fa fa-fw fa-life-ring mr-2"></i>Ticket
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -541,7 +541,6 @@ if (isset($_GET['project_id'])) {
|
|||
|
||||
require_once "modals/project/project_link_ticket.php";
|
||||
require_once "modals/project/project_link_closed_ticket.php";
|
||||
require_once "modals/ticket/ticket_add.php";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ $order = "ASC";
|
|||
if (isset($_GET['client_id'])) {
|
||||
require_once "includes/inc_all_client.php";
|
||||
$client_query = "AND project_client_id = $client_id";
|
||||
|
||||
$client_url = "client_id=$client_id&";
|
||||
} else {
|
||||
require_once "includes/inc_all.php";
|
||||
|
|
@ -55,7 +54,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<h3 class="card-title mt-2"><i class="fas fa-fw fa-project-diagram mr-2"></i>Projects</h3>
|
||||
<?php if (lookupUserPermission("module_support") >= 2) { ?>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#addProjectModal"><i class="fas fa-plus"></i><span class="d-none d-lg-inline ml-2">New Project</span></button>
|
||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/project/project_add.php?<?= $client_url ?>"><i class="fas fa-plus"></i><span class="d-none d-lg-inline ml-2">New Project</span></button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
|
@ -316,5 +315,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/project/project_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<h3 class="card-title mt-2"><i class="fas fa-fw fa-redo-alt mr-2"></i>Recurring Tickets</h3>
|
||||
<div class='card-tools'>
|
||||
<div class="float-left">
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#addRecurringTicketModal">
|
||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/recurring_ticket/recurring_ticket_add.php?<?= $client_url ?>" data-modal-size="lg">
|
||||
<i class="fas fa-plus"></i><span class="d-none d-lg-inline ml-2">New Recurring Ticket</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -365,5 +365,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<script src="../js/bulk_actions.js"></script>
|
||||
|
||||
<?php
|
||||
require_once "modals/recurring_ticket/recurring_ticket_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ $sql_categories_filter = mysqli_query(
|
|||
<?php if (lookupUserPermission("module_support") >= 2) { ?>
|
||||
<div class="card-tools">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#addTicketModalv2">
|
||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/ticket/ticket_add_v2.php?<?= $client_url ?>" data-modal-size="lg">
|
||||
<i class="fas fa-plus"></i><span class="d-none d-lg-inline ml-2">New Ticket</span>
|
||||
</button>
|
||||
<?php if ($num_rows[0] > 0) { ?>
|
||||
|
|
@ -391,6 +391,5 @@ if (isset($_GET["view"])) {
|
|||
<script src="../js/bulk_actions.js"></script>
|
||||
|
||||
<?php
|
||||
require_once "modals/ticket/ticket_add_v2.php";
|
||||
require_once "modals/ticket/ticket_export.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</h3>
|
||||
<div class="card-tools">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#addVendorModal">
|
||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/vendor/vendor_add.php?<?= $client_url ?>">
|
||||
<i class="fas fa-plus mr-2"></i>New Vendor
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||
|
|
@ -283,7 +283,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<script src="../js/bulk_actions.js"></script>
|
||||
|
||||
<?php
|
||||
require_once "modals/vendor/vendor_add.php";
|
||||
require_once "modals/vendor/vendor_add_from_template.php";
|
||||
require_once "modals/vendor/vendor_export.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
Loading…
Reference in New Issue