mirror of
https://github.com/itflow-org/itflow
synced 2026-03-22 13:35:37 +00:00
Updated UI for Restrict Client Access
This commit is contained in:
@@ -109,25 +109,31 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pills-user-access">
|
<div class="tab-pane fade" id="pills-user-access">
|
||||||
|
|
||||||
<h5>Restrict Client Access</h5>
|
|
||||||
<small class="text-muted">Leave Blank for Full access to all clients, no affect on users with the admin role.</small>
|
|
||||||
|
|
||||||
<?php
|
<div class="alert alert-info">
|
||||||
|
Leave Blank for Full access to all clients, no affect on users with the admin role.
|
||||||
$sql_client_select = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL ORDER BY client_name ASC");
|
|
||||||
while ($row = mysqli_fetch_array($sql_client_select)) {
|
|
||||||
$client_id = intval($row['client_id']);
|
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="form-group form-check">
|
|
||||||
<input type="checkbox" class="form-check-input" name="clients[]" value="<?php echo $client_id; ?>">
|
|
||||||
<label class="form-check-label ml-2"><?php echo $client_name; ?></label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php } ?>
|
<ul class="list-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql_client_select = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL ORDER BY client_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql_client_select)) {
|
||||||
|
$client_id = intval($row['client_id']);
|
||||||
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<div class="form-check">
|
||||||
|
<input type="checkbox" class="form-check-input" name="clients[]" value="<?php echo $client_id; ?>">
|
||||||
|
<label class="form-check-label ml-2"><?php echo $client_name; ?></label>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -130,9 +130,11 @@
|
|||||||
|
|
||||||
<div class="tab-pane fade" id="pills-user-access<?php echo $user_id; ?>">
|
<div class="tab-pane fade" id="pills-user-access<?php echo $user_id; ?>">
|
||||||
|
|
||||||
<h6>Restrict Client Access To<br><small class="text-muted">Leave Blank for Full access to all clients, no affect on users with the admin role.</small></h6>
|
<div class="alert alert-info">
|
||||||
|
Leave Blank for Full access to all clients, no affect on users with the admin role.
|
||||||
|
</div>
|
||||||
|
|
||||||
<hr>
|
<ul class="list-group">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@@ -143,13 +145,17 @@
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="form-group form-check">
|
<li class="list-group-item">
|
||||||
<input type="checkbox" class="form-check-input" name="clients[]" value="<?php echo $client_id_select; ?>" <?php if (in_array($client_id_select, $client_access_array)) { echo "checked"; } ?>>
|
<div class="form-check">
|
||||||
<label class="form-check-label ml-2"><?php echo $client_name_select; ?></label>
|
<input type="checkbox" class="form-check-input" name="clients[]" value="<?php echo $client_id_select; ?>" <?php if (in_array($client_id_select, $client_access_array)) { echo "checked"; } ?>>
|
||||||
</div>
|
<label class="form-check-label ml-2"><?php echo $client_name_select; ?></label>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user