Skip to content
Snippets Groups Projects
Commit 8588be67 authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Allows edits to ticket custom data

parent 452eeec5
No related branches found
No related tags found
No related merge requests found
......@@ -202,7 +202,8 @@ if($_POST && !$errors):
// Don't validate deleted forms
if (!in_array($form->getId(), $_POST['forms']))
continue;
elseif (!$form->isValid())
$form->setSource($_POST);
if (!$form->isValid())
$errors = array_merge($errors, $form->errors());
}
if(!$ticket || !$thisstaff->canEditTickets())
......
......@@ -47,9 +47,11 @@ if($_POST && is_object($ticket) && $ticket->getId()):
$errors['err']='Access Denied. Client updates are currently disabled';
else {
$forms=DynamicFormEntry::forTicket($ticket->getId());
foreach ($forms as $form)
foreach ($forms as $form) {
$form->setSource($_POST);
if (!$form->isValid())
$errors = array_merge($errors, $form->errors());
}
}
if (!$errors) {
foreach ($forms as $f) $f->save();
......
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