Simplify Ticket Template Creation by putting all fields into 1 modal tab instead of multiple and removing the ability to ass tasks via add ticket template, this should be done in the details

This commit is contained in:
johnnyq
2024-10-18 15:11:54 -04:00
parent d01d912154
commit 6c1c5d6523
3 changed files with 104 additions and 185 deletions

View File

@@ -23,16 +23,6 @@ if (isset($_POST['add_ticket_template'])) {
mysqli_query($mysqli, "INSERT INTO project_template_ticket_templates SET project_template_id = $project_template_id, ticket_template_id = $ticket_template_id");
}
// Add Tasks to ticket template
if (!empty($_POST['tasks'])) {
foreach($_POST['tasks'] as $task) {
$task_template_name = sanitizeInput($task);
if (!empty($task_template_name)) {
mysqli_query($mysqli,"INSERT INTO task_templates SET task_template_name = '$task_template_name', task_template_ticket_template_id = $ticket_template_id");
}
}
}
// Logging
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Ticket Template', log_action = 'Create', log_description = '$session_name created ticket template $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id, log_entity_id = $ticket_template_id");