Skip to content
Snippets Groups Projects
Unverified Commit e3f6c6ac authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4788 from JediKev/issue/duplicate-form-titles

issue: Duplicate Form Titles
parents 43a5900e 5bae5159
No related branches found
No related tags found
No related merge requests found
...@@ -98,7 +98,7 @@ if ($thisclient && $thisclient->isGuest() ...@@ -98,7 +98,7 @@ if ($thisclient && $thisclient->isGuest()
<td colspan="2"> <td colspan="2">
<!-- Custom Data --> <!-- Custom Data -->
<?php <?php
$sections = array(); $sections = $forms = array();
foreach (DynamicFormEntry::forTicket($ticket->getId()) as $i=>$form) { foreach (DynamicFormEntry::forTicket($ticket->getId()) as $i=>$form) {
// Skip core fields shown earlier in the ticket view // Skip core fields shown earlier in the ticket view
$answers = $form->getAnswers()->exclude(Q::any(array( $answers = $form->getAnswers()->exclude(Q::any(array(
...@@ -111,11 +111,13 @@ foreach (DynamicFormEntry::forTicket($ticket->getId()) as $i=>$form) { ...@@ -111,11 +111,13 @@ foreach (DynamicFormEntry::forTicket($ticket->getId()) as $i=>$form) {
if ($v = $a->display()) if ($v = $a->display())
$sections[$i][$j] = array($v, $a); $sections[$i][$j] = array($v, $a);
} }
// Set form titles
$forms[$i] = $form->getTitle();
} }
foreach ($sections as $i=>$answers) { foreach ($sections as $i=>$answers) {
?> ?>
<table class="custom-data" cellspacing="0" cellpadding="4" width="100%" border="0"> <table class="custom-data" cellspacing="0" cellpadding="4" width="100%" border="0">
<tr><td colspan="2" class="headline flush-left"><?php echo $form->getTitle(); ?></th></tr> <tr><td colspan="2" class="headline flush-left"><?php echo $forms[$i]; ?></th></tr>
<?php foreach ($answers as $A) { <?php foreach ($answers as $A) {
list($v, $a) = $A; ?> list($v, $a) = $A; ?>
<tr> <tr>
......
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