Projects/Tickets

- Hide new project button for users that only have support read access
- Hide new ticket button for users that only have support read access
- Enforce client access restrictions for viewing project details based off project client
- Prevent selecting the 'Select tickets' text when linking ticket
This commit is contained in:
Marcus Hill
2025-05-11 11:45:47 +01:00
parent 429dfa5ca4
commit 1400983d8c
4 changed files with 57 additions and 45 deletions

View File

@@ -2,7 +2,7 @@
<div class="modal-dialog">
<div class="modal-content bg-dark">
<div class="modal-header">
<h5 class="modal-title"><i class="fas fa-fw fa-life-ring mr-2"></i>Link Ticket to Project: <strong><?php echo $project_name; ?></strong></h5>
<h5 class="modal-title"><i class="fas fa-fw fa-life-ring mr-2"></i>Link open ticket to project: <strong><?php echo $project_name; ?></strong></h5>
<button type="button" class="close text-white" data-dismiss="modal">
<span>&times;</span>
</button>
@@ -18,7 +18,7 @@
<span class="input-group-text"><i class="fa fa-fw fa-life-ring"></i></span>
</div>
<select class="form-control select2" multiple name="tickets[]" required>
<option value="">- Select a Tickets -</option>
<option value="" disabled>- Select Ticket(s) -</option>
<?php
$sql_tickets_select = mysqli_query($mysqli, "SELECT * FROM tickets WHERE ticket_project_id = 0 AND ticket_closed_at IS NULL $client_ticket_select_query");
@@ -28,7 +28,7 @@
$ticket_number_select = intval($row['ticket_number']);
$ticket_subject_select = nullable_htmlentities($row['ticket_subject']);
?>
<option value="<?php echo $ticket_id_select; ?>"><?php echo "$ticket_prefix_select $ticket_number_select - $ticket_subject_select"; ?></option>
<option value="<?php echo $ticket_id_select; ?>"><?php echo "$ticket_prefix_select$ticket_number_select - $ticket_subject_select"; ?></option>
<?php
}