mirror of https://github.com/itflow-org/itflow
Add time tracking for bulk ticket replies
- TT for bulk replies - Encourage the correct time format using a placeholder and pattern (client-side validation only)
This commit is contained in:
parent
a31387720c
commit
425b06e550
|
|
@ -1019,6 +1019,7 @@ if (isset($_POST['bulk_ticket_reply'])) {
|
|||
// POST variables
|
||||
$ticket_reply = mysqli_escape_string($mysqli, $_POST['bulk_reply_details']);
|
||||
$ticket_status = intval($_POST['bulk_status']);
|
||||
$ticket_reply_time_worked = sanitizeInput($_POST['time']);
|
||||
$private_note = intval($_POST['bulk_private_reply']);
|
||||
if ($private_note == 1) {
|
||||
$ticket_reply_type = 'Internal';
|
||||
|
|
@ -1046,7 +1047,7 @@ if (isset($_POST['bulk_ticket_reply'])) {
|
|||
$client_id = intval($row['ticket_client_id']);
|
||||
|
||||
// Add reply
|
||||
mysqli_query($mysqli, "INSERT INTO ticket_replies SET ticket_reply = '$ticket_reply', ticket_reply_time_worked = '00:01:00', ticket_reply_type = '$ticket_reply_type', ticket_reply_by = $session_user_id, ticket_reply_ticket_id = $ticket_id");
|
||||
mysqli_query($mysqli, "INSERT INTO ticket_replies SET ticket_reply = '$ticket_reply', ticket_reply_time_worked = '$ticket_reply_time_worked', ticket_reply_type = '$ticket_reply_type', ticket_reply_by = $session_user_id, ticket_reply_ticket_id = $ticket_id");
|
||||
|
||||
$ticket_reply_id = mysqli_insert_id($mysqli);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,13 @@
|
|||
<textarea class="form-control tinymce" rows="5" name="bulk_reply_details" placeholder="Type an update here"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="form-group">
|
||||
<label>Time worked</label>
|
||||
<input class="form-control timepicker" id="time_worked" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="00:00:00"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="bulkPrivateReplyCheckbox" name="bulk_private_reply" value="1">
|
||||
|
|
|
|||
|
|
@ -29,11 +29,10 @@
|
|||
</div>
|
||||
|
||||
<?php if (!empty($ticket_reply_time_worked)) { ?>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="form-group">
|
||||
<label>Time worked</label>
|
||||
<input class="form-control timepicker" id="time_worked" name="time" type="text" value="<?php echo date_format($ticket_reply_time_worked, 'H:i:s') ?>"/>
|
||||
<input class="form-control timepicker" id="time_worked" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="<?php echo date_format($ticket_reply_time_worked, 'H:i:s') ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue