mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Moved Transfer Asset to Client to a Bulk Action and create Primary Interface when moving with MAC address
This commit is contained in:
48
modals/client_asset_bulk_transfer_client_modal.php
Normal file
48
modals/client_asset_bulk_transfer_client_modal.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="modal" id="bulkTransferAssetClientModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-exchange mr-2"></i>Transferring Asset(s)</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<div class="form-group">
|
||||
<label>New 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-users"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="bulk_client_id">
|
||||
<option value="">- Client -</option>
|
||||
<?php
|
||||
$clients_sql = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients WHERE client_id != $client_id AND client_archived_at IS NULL");
|
||||
|
||||
while ($row = mysqli_fetch_array($clients_sql)) {
|
||||
$client_id_select = intval($row["client_id"]);
|
||||
$client_name_select = nullable_htmlentities($row["client_name"]);
|
||||
?>
|
||||
<option value='<?php echo $client_id_select; ?>'><?php echo $client_name_select; ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-dark" role="alert">
|
||||
<i>The current asset will be archived and content copied to a new asset.</i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="submit" name="bulk_transfer_client_asset" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Transfer</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,48 +0,0 @@
|
||||
<div class="modal" id="transferAssetModal<?php echo $asset_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-<?php echo $device_icon; ?> mr-2"></i>Transfer asset: <strong><?php echo $asset_name; ?></strong> to a different client</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="<?php echo $_SESSION['csrf_token'] ?>">
|
||||
<input type="hidden" name="current_asset_id" value="<?php echo $asset_id; ?>">
|
||||
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<div class="form-group">
|
||||
<label>New 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-users"></i></span>
|
||||
</div>
|
||||
|
||||
<?php $clients_sql = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients WHERE client_id != $client_id AND client_archived_at IS NULL"); ?>
|
||||
<select class="form-control select2" name="new_client_id" required>
|
||||
<?php
|
||||
while ($row = mysqli_fetch_array($clients_sql)) {
|
||||
$id = intval($row["client_id"]);
|
||||
$name = nullable_htmlentities($row["client_name"]);
|
||||
echo "<option value='$id'>$name</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-dark" role="alert">
|
||||
<i>The current asset will be archived and content copied to a new asset.</i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="submit" name="change_client_asset" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Transfer</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>
|
||||
@@ -22,7 +22,7 @@
|
||||
$notification_type = nullable_htmlentities($row['notification_type']);
|
||||
$notification_details = nullable_htmlentities($row['notification']);
|
||||
$notification_action = nullable_htmlentities($row['notification_action']);
|
||||
$notification_created_at_formated = date('M d g:ia',strtotime($row['notification_created_at']));
|
||||
$notification_timestamp_formated = date('M d g:ia',strtotime($row['notification_timestamp']));
|
||||
$notification_client_id = intval($row['notification_client_id']);
|
||||
if(empty($notification_action)) { $notification_action = "#"; }
|
||||
?>
|
||||
@@ -34,7 +34,7 @@
|
||||
<i class="fas fa-bullhorn mr-2"></i><?php echo $notification_type; ?>
|
||||
</span>
|
||||
<small class="text-muted float-right">
|
||||
<?php echo $notification_created_at_formated; ?>
|
||||
<?php echo $notification_timestamp_formated; ?>
|
||||
</small>
|
||||
</div>
|
||||
<small class="text-secondary"><?php echo $notification_details; ?></small>
|
||||
|
||||
Reference in New Issue
Block a user