Skip to content
Snippets Groups Projects
Commit 1458d2f5 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #177 from greezybacon/issue/web-open-topic-data


Save extra from from help topic on web ticket open

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 74c02ba7 e61d737f
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ if($_POST):
$errors['captcha']='Invalid - try again!';
}
$interest = array('subject');
$form = false;
if ($topic = Topic::lookup($vars['topicId'])) {
if ($form = DynamicForm::lookup($topic->ht['form_id'])) {
$form = $form->instanciate();
......@@ -52,6 +52,11 @@ if($_POST):
if(($ticket=Ticket::create($vars, $errors, SOURCE))){
$msg='Support ticket request created';
Draft::deleteForNamespace('ticket.client.'.substr(session_id(), -12));
// Save the form data from the help-topic form, if any
if ($form) {
$form->setTicketId($ticket->getId());
$form->save();
}
//Logged in...simply view the newly created ticket.
if($thisclient && $thisclient->isValid()) {
if(!$cfg->showRelatedTickets())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment