Skip to content

Commit

Permalink
Do not load most edit modals if ticket is closed.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrongecho committed Aug 30, 2024
1 parent 8ddb450 commit d9668f3
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,11 @@
</li>
<li class="breadcrumb-item active">Ticket Details</li>
</ol>

<div class="card">

<div class="card-header">

<div class="card-title">
<i class="fa fa-2x fa-fw fa fa-life-ring text-secondary mr-2"></i>
<span class="h3">
Expand All @@ -357,7 +357,7 @@
</span>
</span>
</div>

<div class="card-tools d-print-none">
<div class="btn-toolbar">

Expand Down Expand Up @@ -429,12 +429,12 @@
<?php } ?>
</div>
</div>

</div> <!-- Card Header -->

<div class="card-body pt-3 pb-0">
<div class="row">
<div class="col-sm-4">
<div class="col-sm-4">
<h5><?php echo $client_name; ?></h5>
<div title="<?php echo $ticket_created_at; ?>">
<i class="fa fa-fw fa-calendar text-secondary mr-2"></i><?php echo $ticket_created_at_ago; ?>
Expand Down Expand Up @@ -605,12 +605,12 @@
<input type="radio" name="public_reply_type" value="1">Public Comment
</label>
</div>
</div>
</div>

<div class="form-group">
<textarea class="form-control tinymce<?php if ($config_ai_enable) { echo "ai"; } ?>" id="textInput" name="ticket_reply" placeholder="Type a response"></textarea>
</div>

<div class="form-row">
<div class="col-md-3">
<div class="input-group mb-3">
Expand Down Expand Up @@ -652,15 +652,15 @@
<div class="btn-group">
<button type="button" class="btn btn-light" id="startStopTimer"><i class="fas fa-play"></i></button>
<button type="button" class="btn btn-light" id="resetTimer"><i class="fas fa-redo-alt"></i></button>
</div>
</div>
</div>
</div>

<div class="col-md-3">
<div class="btn-toolbar float-right">
<?php if ($config_ai_enable) { ?>
<button id="rewordButton" class="btn btn-secondary ml-3" type="button"><i class="fas fa-fw fa-robot mr-2"></i>Reword</button>
<button id="undoButton" class="btn btn-secondary ml-3" type="button" style="display:none;"><i class="fas fa-fw fa-redo-alt mr-2"></i>Undo</button>
<button id="undoButton" class="btn btn-secondary ml-3" type="button" style="display:none;"><i class="fas fa-fw fa-redo-alt mr-2"></i>Undo</button>
<?php } ?>
<button type="submit" id="ticket_add_reply" name="add_ticket_reply" class="btn btn-success ml-3"><i class="fas fa-check mr-2"></i>Submit</button>
</div>
Expand Down Expand Up @@ -735,13 +735,13 @@
<div>
<small class="text-muted">
<div title="<?php echo $ticket_reply_created_at; ?>">
<?php echo $ticket_reply_created_at_ago; ?>
<?php echo $ticket_reply_created_at_ago; ?>
</div>
<?php if ($ticket_reply_updated_at) { ?>
<div title="<?php echo $ticket_reply_updated_at; ?>">
modified: <?php echo $ticket_reply_updated_at_ago; ?>
</div>
<?php } ?>
<?php } ?>
</small>
</div>
<?php if ($ticket_reply_type !== "Client") { ?>
Expand Down Expand Up @@ -1126,25 +1126,27 @@
</div> <!-- End row -->

<?php
require_once "ticket_edit_modal.php";
if (empty($ticket_closed_at)) {
require_once "ticket_edit_modal.php";

require_once "ticket_assign_modal.php";
require_once "ticket_assign_modal.php";

require_once "ticket_edit_contact_modal.php";
require_once "ticket_edit_contact_modal.php";

require_once "ticket_edit_asset_modal.php";
require_once "ticket_edit_asset_modal.php";

require_once "ticket_edit_vendor_modal.php";
require_once "ticket_edit_vendor_modal.php";

require_once "ticket_add_watcher_modal.php";
require_once "ticket_add_watcher_modal.php";

require_once "ticket_edit_priority_modal.php";
require_once "ticket_edit_priority_modal.php";

require_once "ticket_change_client_modal.php";
require_once "ticket_change_client_modal.php";

require_once "ticket_edit_schedule_modal.php";
require_once "ticket_edit_schedule_modal.php";

require_once "ticket_merge_modal.php";
require_once "ticket_merge_modal.php";
}

if ($config_module_enable_accounting) {
require_once "ticket_edit_billable_modal.php";
Expand Down

0 comments on commit d9668f3

Please sign in to comment.