#3440: When adding custom ticket fields, two fullrow fields may appear on the
same
row in presentation.
-----------------------+----------------------------------------------------
Reporter: anonymous | Owner: jonas
Type: defect | Status: new
Priority: normal | Milestone:
Component: general | Version: 0.9.6
Severity: minor | Resolution:
Keywords: |
-----------------------+----------------------------------------------------
Old description:
> If an empty ticket filed have to be added in the presentation subsequent
> fullrow fileds may render on the same row in the HTML.
>
> This patch (for the 0.9-stable branch) will fix the problem:
>
> Index: templates/ticket.cs
> ===================================================================
> --- templates/ticket.cs (revision 3545)
> +++ templates/ticket.cs (working copy)
> @@ -181,7 +181,9 @@
> /each ?><?cs set:idx = 0 ?><?cs
> each:field = ticket.fields ?><?cs
> if:!field.skip ?><?cs set:fullrow = field.type == 'textarea' ?><?cs
> - if:fullrow && idx % 2 ?><?cs set:idx = idx + 1 ?><th
> class="col2"></th><td></td></tr><tr><?cs /if ?>
> + if:fullrow && idx % 2 ?><?cs set:idx = idx + 1 ?>
> + <?cs set:num_fields = num_fields + 1 ?>
> + <th class="col2"></th><td></td></tr><tr><?cs /if ?>
> <th class="col<?cs var:idx % 2 + 1 ?>"><?cs
> if:field.type != 'radio' ?><label for="<?cs var:name(field)
> ?>"><?cs
> /if ?><?cs alt:field.label ?><?cs var:field.name ?><?cs /alt
> ?>:<?cs
New description:
If an empty ticket filed have to be added in the presentation subsequent
fullrow fileds may render on the same row in the HTML.
This patch (for the 0.9-stable branch) will fix the problem:
{{{
#!diff
Index: templates/ticket.cs
===================================================================
--- templates/ticket.cs (revision 3545)
+++ templates/ticket.cs (working copy)
@@ -181,7 +181,9 @@
/each ?><?cs set:idx = 0 ?><?cs
each:field = ticket.fields ?><?cs
if:!field.skip ?><?cs set:fullrow = field.type == 'textarea' ?><?cs
- if:fullrow && idx % 2 ?><?cs set:idx = idx + 1 ?><th
class="col2"></th><td></td></tr><tr><?cs /if ?>
+ if:fullrow && idx % 2 ?><?cs set:idx = idx + 1 ?>
+ <?cs set:num_fields = num_fields + 1 ?>
+ <th class="col2"></th><td></td></tr><tr><?cs /if ?>
<th class="col<?cs var:idx % 2 + 1 ?>"><?cs
if:field.type != 'radio' ?><label for="<?cs var:name(field)
?>"><?cs
/if ?><?cs alt:field.label ?><?cs var:field.name ?><?cs /alt
?>:<?cs
}}}
Comment (by mgood):
''fix description formatting''
--
Ticket URL: <http://trac.edgewall.org/ticket/3440>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets