mirror of
https://github.com/itflow-org/itflow
synced 2026-03-04 21:04:50 +00:00
Ticket Details Checks, Dont display Add/edit relations if no cliet in selected, dont show relations in ticket edit if no client assigned to ticket, also dont display public and email response type if no contact_email exists
This commit is contained in:
@@ -38,33 +38,35 @@ while ($row = mysqli_fetch_array($sql_additional_assets)) {
|
|||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-life-ring mr-2"></i>Editing ticket: <strong><?php echo "$ticket_prefix$ticket_number"; ?></strong> - <?php echo $client_name; ?></h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-life-ring mr-2"></i>Ticket: <strong><?= "$ticket_prefix$ticket_number" ?></strong> - <?= $client_name ?></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="ticket_id" value="<?php echo $ticket_id; ?>">
|
<input type="hidden" name="ticket_id" value="<?= $ticket_id ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
<?php if ($client_id) { ?>
|
||||||
<ul class="nav nav-pills nav-justified mb-3">
|
<ul class="nav nav-pills nav-justified mb-3">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" data-toggle="pill" href="#pills-details<?php echo $ticket_id; ?>"><i class="fa fa-fw fa-life-ring mr-2"></i>Details</a>
|
<a class="nav-link active" data-toggle="pill" href="#pills-details"><i class="fa fa-fw fa-life-ring mr-2"></i>Details</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-contacts<?php echo $ticket_id; ?>"><i class="fa fa-fw fa-users mr-2"></i>Contact</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" data-toggle="pill" href="#pills-assignment<?php echo $ticket_id; ?>"><i class="fa fa-fw fa-desktop mr-2"></i>Assignment</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" data-toggle="pill" href="#pills-contacts"><i class="fa fa-fw fa-users mr-2"></i>Contact</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" data-toggle="pill" href="#pills-assignment"><i class="fa fa-fw fa-desktop mr-2"></i>Assignment</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
<hr>
|
<hr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<div class="tab-content" <?php if (lookupUserPermission('module_support') <= 1) { echo 'inert'; } ?>>
|
<div class="tab-content" <?php if (lookupUserPermission('module_support') <= 1) { echo 'inert'; } ?>>
|
||||||
|
|
||||||
<div class="tab-pane fade show active" id="pills-details<?php echo $ticket_id; ?>">
|
<div class="tab-pane fade show active" id="pills-details">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Subject <strong class="text-danger">*</strong></label>
|
<label>Subject <strong class="text-danger">*</strong></label>
|
||||||
@@ -182,7 +184,9 @@ ob_start();
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pills-contacts<?php echo $ticket_id; ?>">
|
<?php if ($client_id) { ?>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="pills-contacts">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Contact</label>
|
<label>Contact</label>
|
||||||
@@ -236,7 +240,7 @@ ob_start();
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pills-assignment<?php echo $ticket_id; ?>">
|
<div class="tab-pane fade" id="pills-assignment">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Asset</label>
|
<label>Asset</label>
|
||||||
@@ -372,7 +376,7 @@ ob_start();
|
|||||||
while ($row = mysqli_fetch_array($sql_projects)) {
|
while ($row = mysqli_fetch_array($sql_projects)) {
|
||||||
$project_id_select = intval($row['project_id']);
|
$project_id_select = intval($row['project_id']);
|
||||||
$project_name_select = nullable_htmlentities($row['project_name']); ?>
|
$project_name_select = nullable_htmlentities($row['project_name']); ?>
|
||||||
<option <?php if ($project_id == $project_id_select) { echo "selected"; } ?> value="<?php echo $project_id_select; ?>"><?php echo $project_name_select; ?></option>
|
<option <?php if ($project_id == $project_id_select) { echo "selected"; } ?> value="<?= $project_id_select ?>"><?= $project_name_select ?></option>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
@@ -380,13 +384,14 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<?php } // End client_id check ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="edit_ticket" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
|
<button type="submit" name="edit_ticket" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save changes</button>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ if (isset($_GET['ticket_id'])) {
|
|||||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/ticket/ticket_merge.php?ticket_id=<?= $ticket_id ?>">
|
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/ticket/ticket_merge.php?ticket_id=<?= $ticket_id ?>">
|
||||||
<i class="fas fa-fw fa-clone mr-2"></i>Merge
|
<i class="fas fa-fw fa-clone mr-2"></i>Merge
|
||||||
</a>
|
</a>
|
||||||
<?php if (empty($ticket_closed_at)) { ?>
|
<?php if (empty($ticket_closed_at) && $client_id) { ?>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item ajax-modal" href="#"
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
data-modal-url="modals/ticket/ticket_contact.php?id=<?= $ticket_id ?>">
|
data-modal-url="modals/ticket/ticket_contact.php?id=<?= $ticket_id ?>">
|
||||||
@@ -600,9 +600,11 @@ if (isset($_GET['ticket_id'])) {
|
|||||||
<label class="btn btn-outline-dark active">
|
<label class="btn btn-outline-dark active">
|
||||||
<input type="radio" name="public_reply_type" value="0" checked>Internal Note
|
<input type="radio" name="public_reply_type" value="0" checked>Internal Note
|
||||||
</label>
|
</label>
|
||||||
|
<?php if ($contact_email) { ?>
|
||||||
<label class="btn btn-outline-info">
|
<label class="btn btn-outline-info">
|
||||||
<input type="radio" name="public_reply_type" value="2">Public Comment & Email
|
<input type="radio" name="public_reply_type" value="2">Public Comment & Email
|
||||||
</label>
|
</label>
|
||||||
|
<?php } ?>
|
||||||
<label class="btn btn-outline-info">
|
<label class="btn btn-outline-info">
|
||||||
<input type="radio" name="public_reply_type" value="1">Public Comment
|
<input type="radio" name="public_reply_type" value="1">Public Comment
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
Reference in New Issue
Block a user