Simplify Ticket Creation and Edit Model by removing unessesary tabs and combining fields to fewer tabs

This commit is contained in:
johnnyq
2024-10-18 15:40:17 -04:00
parent 6c1c5d6523
commit 8dca7bc183
3 changed files with 96 additions and 145 deletions

View File

@@ -77,17 +77,6 @@ if (isset($_POST['add_ticket'])) {
$ticket_id = mysqli_insert_id($mysqli);
// Add Tasks
if (!empty($_POST['tasks'])) {
foreach ($_POST['tasks'] as $task) {
$task_name = sanitizeInput($task);
// Check that task_name is not-empty (For some reason the !empty on the array doesnt work here like in watchers)
if (!empty($task_name)) {
mysqli_query($mysqli,"INSERT INTO tasks SET task_name = '$task_name', task_ticket_id = $ticket_id");
}
}
}
// Add Tasks from Template if Template was selected
if($ticket_template_id) {
if (mysqli_num_rows($sql_task_templates) > 0) {