mirror of https://github.com/itflow-org/itflow
Allow to remove additional assets in a ticket
This commit is contained in:
parent
4a22b03952
commit
a0ece18876
|
|
@ -75,20 +75,23 @@
|
|||
|
||||
<div class="tab-pane fade" id="pills-support">
|
||||
|
||||
<label>Support Phone</label>
|
||||
<label>Support Phone / <span class="text-secondary">Extension</span></label>
|
||||
<div class="form-row">
|
||||
<div class="col-8">
|
||||
<div class="col-9">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-phone"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="phone" placeholder="Phone Number" maxlength="200">
|
||||
<input type="tel" class="form-control col-2" name="phone_country_code" placeholder="+" maxlength="4">
|
||||
<input type="tel" class="form-control" name="phone" placeholder="Phone Number" maxlength="200">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="text" class="form-control" name="extension" placeholder="Prompts" maxlength="200">
|
||||
<div class="col-3">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="extension" placeholder="ext." maxlength="200">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -203,6 +203,10 @@ if (isset($_POST['edit_ticket'])) {
|
|||
$additional_asset_id = intval($additional_asset);
|
||||
mysqli_query($mysqli, "INSERT INTO ticket_assets SET ticket_id = $ticket_id, asset_id = $additional_asset_id");
|
||||
}
|
||||
} else {
|
||||
// If no additional assets are provided, delete them all
|
||||
// This handles cases where the assets input might be cleared or not set at all.
|
||||
mysqli_query($mysqli, "DELETE FROM ticket_assets WHERE ticket_id = $ticket_id");
|
||||
}
|
||||
|
||||
// Get contact/ticket details after update for logging / email purposes
|
||||
|
|
|
|||
Loading…
Reference in New Issue