62 lines
2.1 KiB
PHP
62 lines
2.1 KiB
PHP
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card-body">
|
|
<form role="form" class="parsley-examples" method="post" id="ticket_note_form"
|
|
enctype="multipart/form-data">
|
|
<div class="form-group">
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12">
|
|
<label for="ticket_note">Add Notes</label>
|
|
<textarea class="form-control" id="ticket_note" name="ticket_note" rows="3"
|
|
placeholder="Enter Text"><?= isset($client['addon_subheading']) ? $client['addon_subheading'] : '' ?></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group text-right m-b-0">
|
|
<button type="submit" class="btn btn-primary" id="ticket_note_submit">Submit</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div> <!-- end col-->
|
|
</div>
|
|
<!-- end -->
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$("#ticket_note_form").submit(function(event) {
|
|
|
|
event.preventDefault();
|
|
$('.loader').fadeIn();
|
|
$('.loader-mask').fadeIn();
|
|
|
|
var url = '<?= base_url("/ticket/note"); ?>';
|
|
var formData = new FormData($('#ticket_note_form')[0]);
|
|
|
|
sendAjaxRequestForGlobal(url, 'POST', formData, function(response) {
|
|
if (response.status == true) {
|
|
$('.loader').fadeOut();
|
|
$('.loader-mask').delay(350).fadeOut('slow');
|
|
|
|
} else {
|
|
$('.loader').fadeOut();
|
|
$('.loader-mask').delay(350).fadeOut('slow');
|
|
let message = response.message;
|
|
toastr.error(message, 'ERROR');
|
|
}
|
|
|
|
|
|
}, function(xhr, status, error) {
|
|
console.error('Error fetching data:', error);
|
|
console.error(xhr.responseText);
|
|
toastr.error('An error occurred while fetching the report page.', 'ERROR');
|
|
|
|
$('.loader').fadeOut();
|
|
$('.loader-mask').delay(350).fadeOut('slow');
|
|
});
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|