mirror of
https://github.com/itflow-org/itflow
synced 2026-03-03 20:34:51 +00:00
Disable Certain Bulk Actions that are directly related to a client in client overview section instead are shown in the client section
This commit is contained in:
22
assets.php
22
assets.php
@@ -305,17 +305,15 @@ if (mysqli_num_rows($os_sql) > 0) {
|
|||||||
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount"></span>)
|
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount"></span>)
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignContactModal">
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignContactModal">
|
||||||
<i class="fas fa-fw fa-user mr-2"></i>Assign Contact
|
<i class="fas fa-fw fa-user mr-2"></i>Assign Contact
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkTransferAssetClientModal">
|
|
||||||
<i class="fas fa-fw fa-arrow-right mr-2"></i>Transfer to Client
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignLocationModal">
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignLocationModal">
|
||||||
<i class="fas fa-fw fa-map-marker-alt mr-2"></i>Assign Location
|
<i class="fas fa-fw fa-map-marker-alt mr-2"></i>Assign Location
|
||||||
</a>
|
</a>
|
||||||
|
<?php } ?>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignPhysicalLocationModal">
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignPhysicalLocationModal">
|
||||||
<i class="fas fa-fw fa-map-marker-alt mr-2"></i>Set Physical Location
|
<i class="fas fa-fw fa-map-marker-alt mr-2"></i>Set Physical Location
|
||||||
</a>
|
</a>
|
||||||
@@ -327,6 +325,10 @@ if (mysqli_num_rows($os_sql) > 0) {
|
|||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAddTicketModal">
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAddTicketModal">
|
||||||
<i class="fas fa-fw fa-life-ring mr-2"></i>Create Tickets
|
<i class="fas fa-fw fa-life-ring mr-2"></i>Create Tickets
|
||||||
</a>
|
</a>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkTransferAssetClientModal">
|
||||||
|
<i class="fas fa-fw fa-arrow-right mr-2"></i>Transfer to Client
|
||||||
|
</a>
|
||||||
<?php if ($archived) { ?>
|
<?php if ($archived) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<button class="dropdown-item text-info"
|
<button class="dropdown-item text-info"
|
||||||
@@ -688,9 +690,13 @@ if (mysqli_num_rows($os_sql) > 0) {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php require_once "modals/asset_bulk_assign_location_modal.php"; ?>
|
<?php
|
||||||
|
if ($client_url) {
|
||||||
|
require_once "modals/asset_bulk_assign_contact_modal.php";
|
||||||
|
require_once "modals/asset_bulk_assign_location_modal.php";
|
||||||
|
}
|
||||||
|
?>
|
||||||
<?php require_once "modals/asset_bulk_assign_physical_location_modal.php"; ?>
|
<?php require_once "modals/asset_bulk_assign_physical_location_modal.php"; ?>
|
||||||
<?php require_once "modals/asset_bulk_assign_contact_modal.php"; ?>
|
|
||||||
<?php require_once "modals/asset_bulk_transfer_client_modal.php"; ?>
|
<?php require_once "modals/asset_bulk_transfer_client_modal.php"; ?>
|
||||||
<?php require_once "modals/asset_bulk_edit_status_modal.php"; ?>
|
<?php require_once "modals/asset_bulk_edit_status_modal.php"; ?>
|
||||||
<?php require_once "modals/asset_bulk_add_ticket_modal.php"; ?>
|
<?php require_once "modals/asset_bulk_add_ticket_modal.php"; ?>
|
||||||
@@ -719,6 +725,8 @@ if (mysqli_num_rows($os_sql) > 0) {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "modals/asset_add_modal.php";
|
require_once "modals/asset_add_modal.php";
|
||||||
require_once "modals/asset_import_modal.php";
|
|
||||||
require_once "modals/asset_export_modal.php";
|
require_once "modals/asset_export_modal.php";
|
||||||
|
if ($client_url) {
|
||||||
|
require_once "modals/asset_import_modal.php";
|
||||||
|
}
|
||||||
require_once "includes/footer.php";
|
require_once "includes/footer.php";
|
||||||
|
|||||||
14
contacts.php
14
contacts.php
@@ -95,12 +95,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#contactInviteModal"><i class="fas fa-fw fa-paper-plane mr-2"></i>Invite</a>
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#contactInviteModal"><i class="fas fa-fw fa-paper-plane mr-2"></i>Invite</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importContactModal">
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importContactModal">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
|
<?php } ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportContactModal">
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportContactModal">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
@@ -151,7 +153,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div class="input-group mb-3 mb-md-0">
|
<div class="input-group mb-3 mb-md-0">
|
||||||
<select class="form-control select2" name="location" onchange="this.form.submit()">
|
<select class="form-control select2" name="location" onchange="this.form.submit()">
|
||||||
@@ -219,10 +221,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignLocationModal">
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignLocationModal">
|
||||||
<i class="fas fa-fw fa-map-marker-alt mr-2"></i>Assign Location
|
<i class="fas fa-fw fa-map-marker-alt mr-2"></i>Assign Location
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
|
<?php } ?>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkEditPhoneModal">
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkEditPhoneModal">
|
||||||
<i class="fas fa-fw fa-phone-alt mr-2"></i>Set Phone Number
|
<i class="fas fa-fw fa-phone-alt mr-2"></i>Set Phone Number
|
||||||
</a>
|
</a>
|
||||||
@@ -556,7 +560,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php require_once "modals/contact_bulk_assign_location_modal.php"; ?>
|
<?php if ($client_url) { require_once "modals/contact_bulk_assign_location_modal.php"; } ?>
|
||||||
<?php require_once "modals/contact_bulk_edit_phone_modal.php"; ?>
|
<?php require_once "modals/contact_bulk_edit_phone_modal.php"; ?>
|
||||||
<?php require_once "modals/contact_bulk_edit_department_modal.php"; ?>
|
<?php require_once "modals/contact_bulk_edit_department_modal.php"; ?>
|
||||||
<?php require_once "modals/contact_bulk_edit_role_modal.php"; ?>
|
<?php require_once "modals/contact_bulk_edit_role_modal.php"; ?>
|
||||||
@@ -610,7 +614,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "modals/contact_add_modal.php";
|
require_once "modals/contact_add_modal.php";
|
||||||
require_once "modals/contact_invite_modal.php";
|
|
||||||
require_once "modals/contact_import_modal.php";
|
|
||||||
require_once "modals/contact_export_modal.php";
|
require_once "modals/contact_export_modal.php";
|
||||||
|
if ($client_url) {
|
||||||
|
require_once "modals/contact_invite_modal.php";
|
||||||
|
require_once "modals/contact_import_modal.php";
|
||||||
|
}
|
||||||
require_once "includes/footer.php";
|
require_once "includes/footer.php";
|
||||||
|
|||||||
@@ -111,11 +111,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importCredentialModal">
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importCredentialModal">
|
||||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||||
</a>
|
</a>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<?php } ?>
|
||||||
<?php if ($num_rows[0] > 0) { ?>
|
<?php if ($num_rows[0] > 0) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportCredentialModal">
|
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportCredentialModal">
|
||||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||||
</a>
|
</a>
|
||||||
@@ -540,6 +542,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
require_once "modals/credential_add_modal.php";
|
require_once "modals/credential_add_modal.php";
|
||||||
require_once "modals/share_modal.php";
|
require_once "modals/share_modal.php";
|
||||||
require_once "modals/credential_import_modal.php";
|
|
||||||
require_once "modals/credential_export_modal.php";
|
require_once "modals/credential_export_modal.php";
|
||||||
|
if ($client_url) {
|
||||||
|
require_once "modals/credential_import_modal.php";
|
||||||
|
}
|
||||||
require_once "includes/footer.php";
|
require_once "includes/footer.php";
|
||||||
|
|||||||
@@ -8,9 +8,35 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
<div class="modal-body bg-white">
|
<div class="modal-body bg-white">
|
||||||
|
|
||||||
|
<?php if ($client_url) { ?>
|
||||||
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
|
<?php } else { ?>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Client <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-user"></i></span>
|
||||||
|
</div>
|
||||||
|
<select class="form-control select2" name="client_id" required>
|
||||||
|
<option value="">- Select Client -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$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_name = nullable_htmlentities($row['client_name']); ?>
|
||||||
|
<option <?php if ($client_id == isset($_GET['client'])) { echo "selected"; } ?> value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<label>Template</label>
|
<label>Template</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ if (isset($_POST['bulk_assign_asset_physical_location'])) {
|
|||||||
// Bulk Logging
|
// Bulk Logging
|
||||||
logAction("Asset", "Bulk Edit", "$session_name set $asset_count assets to physical location $physical_location", $client_id);
|
logAction("Asset", "Bulk Edit", "$session_name set $asset_count assets to physical location $physical_location", $client_id);
|
||||||
|
|
||||||
$_SESSION['alert_message'] = "You moved <strong>$asset_count</strong> assets to location <strong>$location_name</strong>";
|
$_SESSION['alert_message'] = "You moved <strong>$asset_count</strong> assets to location <strong>$physical_location</strong>";
|
||||||
}
|
}
|
||||||
|
|
||||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||||
|
|||||||
Reference in New Issue
Block a user