mirror of https://github.com/itflow-org/itflow
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:
parent
6af61cbb3c
commit
e0364183e2
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>)
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<?php if ($client_url) { ?>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignContactModal">
|
||||
<i class="fas fa-fw fa-user mr-2"></i>Assign Contact
|
||||
</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>
|
||||
<div class="dropdown-divider"></div>
|
||||
<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
|
||||
</a>
|
||||
<?php } ?>
|
||||
<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
|
||||
</a>
|
||||
|
|
@ -327,6 +325,10 @@ if (mysqli_num_rows($os_sql) > 0) {
|
|||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAddTicketModal">
|
||||
<i class="fas fa-fw fa-life-ring mr-2"></i>Create Tickets
|
||||
</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) { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<button class="dropdown-item text-info"
|
||||
|
|
@ -688,9 +690,13 @@ if (mysqli_num_rows($os_sql) > 0) {
|
|||
</tbody>
|
||||
</table>
|
||||
</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_contact_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_add_ticket_modal.php"; ?>
|
||||
|
|
@ -719,6 +725,8 @@ if (mysqli_num_rows($os_sql) > 0) {
|
|||
|
||||
<?php
|
||||
require_once "modals/asset_add_modal.php";
|
||||
require_once "modals/asset_import_modal.php";
|
||||
require_once "modals/asset_export_modal.php";
|
||||
if ($client_url) {
|
||||
require_once "modals/asset_import_modal.php";
|
||||
}
|
||||
require_once "includes/footer.php";
|
||||
|
|
|
|||
12
contacts.php
12
contacts.php
|
|
@ -95,12 +95,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||
<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>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importContactModal">
|
||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<?php } ?>
|
||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportContactModal">
|
||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||
</a>
|
||||
|
|
@ -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>)
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<?php if ($client_url) { ?>
|
||||
<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
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<?php } ?>
|
||||
<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
|
||||
</a>
|
||||
|
|
@ -556,7 +560,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</tbody>
|
||||
</table>
|
||||
</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_department_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
|
||||
|
||||
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";
|
||||
if ($client_url) {
|
||||
require_once "modals/contact_invite_modal.php";
|
||||
require_once "modals/contact_import_modal.php";
|
||||
}
|
||||
require_once "includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -111,11 +111,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||
<div class="dropdown-menu">
|
||||
<?php if ($client_url) { ?>
|
||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importCredentialModal">
|
||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<?php } ?>
|
||||
<?php if ($num_rows[0] > 0) { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportCredentialModal">
|
||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||
</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/share_modal.php";
|
||||
require_once "modals/credential_import_modal.php";
|
||||
require_once "modals/credential_export_modal.php";
|
||||
if ($client_url) {
|
||||
require_once "modals/credential_import_modal.php";
|
||||
}
|
||||
require_once "includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -8,9 +8,35 @@
|
|||
</button>
|
||||
</div>
|
||||
<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">
|
||||
|
||||
<?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>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ if (isset($_POST['bulk_assign_asset_physical_location'])) {
|
|||
// Bulk Logging
|
||||
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"]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue