mirror of
https://github.com/itflow-org/itflow
synced 2026-03-06 13:54:51 +00:00
Added Email Client to ticket details, Public Comment does not email the client or watchers anything, but can view it in the ticker portal
This commit is contained in:
@@ -1105,9 +1105,14 @@ if (isset($_POST['add_ticket_reply'])) {
|
|||||||
|
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
|
|
||||||
|
$send_email = 0;
|
||||||
|
|
||||||
if ($_POST['public_reply_type'] == 1 ){
|
if ($_POST['public_reply_type'] == 1 ){
|
||||||
$ticket_reply_type = 'Public';
|
$ticket_reply_type = 'Public';
|
||||||
} else {
|
} elseif ($_POST['public_reply_type'] == 2 ) {
|
||||||
|
$ticket_reply_type = 'Public';
|
||||||
|
$send_email = 1;
|
||||||
|
} else {
|
||||||
$ticket_reply_type = 'Internal';
|
$ticket_reply_type = 'Internal';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1157,7 +1162,7 @@ if (isset($_POST['add_ticket_reply'])) {
|
|||||||
$company_phone = sanitizeInput(formatPhoneNumber($row['company_phone']));
|
$company_phone = sanitizeInput(formatPhoneNumber($row['company_phone']));
|
||||||
|
|
||||||
// Send e-mail to client if public update & email is set up
|
// Send e-mail to client if public update & email is set up
|
||||||
if ($ticket_reply_type == 'Public' && !empty($config_smtp_host)) {
|
if ($ticket_reply_type == 'Public' && $send_email == 1 && !empty($config_smtp_host)) {
|
||||||
|
|
||||||
if (filter_var($contact_email, FILTER_VALIDATE_EMAIL)) {
|
if (filter_var($contact_email, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
|
||||||
|
|||||||
15
ticket.php
15
ticket.php
@@ -544,6 +544,9 @@ if (isset($_GET['ticket_id'])) {
|
|||||||
<label class="btn btn-light">
|
<label class="btn btn-light">
|
||||||
<input type="radio" name="public_reply_type" value="0">Internal Note
|
<input type="radio" name="public_reply_type" value="0">Internal Note
|
||||||
</label>
|
</label>
|
||||||
|
<label class="btn btn-light mx-auto">
|
||||||
|
<input type="radio" class="float-right" name="public_reply_type" value="2">Email Client
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($config_ai_enable) { ?>
|
<?php if ($config_ai_enable) { ?>
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
@@ -583,7 +586,7 @@ if (isset($_GET['ticket_id'])) {
|
|||||||
<!-- Time Tracking -->
|
<!-- Time Tracking -->
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<div class="input-group px-0 col-2">
|
<div class="input-group pr-0 col-2">
|
||||||
<input type="text" class="form-control" inputmode="numeric" id="hours" name="hours" placeholder="Hrs" min="0" max="23" pattern="0?[0-9]|1[0-9]|2[0-3]">
|
<input type="text" class="form-control" inputmode="numeric" id="hours" name="hours" placeholder="Hrs" min="0" max="23" pattern="0?[0-9]|1[0-9]|2[0-3]">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -604,7 +607,7 @@ if (isset($_GET['ticket_id'])) {
|
|||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<button type="submit" id="ticket_add_reply" name="add_ticket_reply" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Submit</button>
|
<button type="submit" id="ticket_add_reply" name="add_ticket_reply" class="btn btn-primary btn-block text-bold"><i class="fas fa-check mr-2"></i>Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -630,10 +633,16 @@ if (isset($_GET['ticket_id'])) {
|
|||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<button class="nav-link" id="notes-tab" data-toggle="tab" data-target="#notes" type="button">
|
<button class="nav-link" id="notes-tab" data-toggle="tab" data-target="#notes" type="button">
|
||||||
Notes
|
Internal Notes
|
||||||
<span class="right badge badge-pill badge-dark ml-2"><?php echo $ticket_internal_notes_count; ?></span>
|
<span class="right badge badge-pill badge-dark ml-2"><?php echo $ticket_internal_notes_count; ?></span>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<button class="nav-link" id="public-comments-tab" data-toggle="tab" data-target="#publicComments" type="button">
|
||||||
|
Client Communication
|
||||||
|
<span class="right badge badge-pill badge-dark ml-2"><?php echo $ticket_public_comments_count; ?></span>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
<li class="nav-item ml-auto">
|
<li class="nav-item ml-auto">
|
||||||
<button class="nav-link" id="events-tab" data-toggle="tab" data-target="#events" type="button">
|
<button class="nav-link" id="events-tab" data-toggle="tab" data-target="#events" type="button">
|
||||||
Events
|
Events
|
||||||
|
|||||||
Reference in New Issue
Block a user