Ticket.php

- Change wording of ticket 'Respond' button to 'Add note' if reply is internal
- Fix TinyMCE not loading under certain circumstances
- Correct varname 'prefix' to 'ticket_prefix' in reply alert message
This commit is contained in:
Marcus Hill
2023-05-14 20:16:04 +01:00
parent eb4c5cbf34
commit 1057481039
4 changed files with 25 additions and 5 deletions

View File

@@ -0,0 +1,19 @@
// Ticket.php - Changes the wording of the "Respond" button to "Add note" if reply is not a public update (based on checkbox)
// Get Internal/Public Checkbox
checkbox = document.getElementById('ticket_reply_type_checkbox');
// Get Respond button
respond = document.getElementById('ticket_add_reply');
// When checkbox is checked/unchecked, update button wording
checkbox.addEventListener('change', e => {
if (e.target.checked) {
// Public reply
respond.innerHTML = "<i class=\"fas fa-check mr-2\"></i>Respond";
} else {
// Internal note
respond.innerHTML = "<i class=\"fas fa-sticky-note mr-2\"></i>Add note";
}
});