Fix bug form for the case when there are less than 4 custom fields

hinted-selects
Vitaliy Filippov 2014-10-24 18:57:41 +04:00
parent 29e96c6eec
commit c47f0a6935
1 changed files with 7 additions and 5 deletions

View File

@ -792,11 +792,13 @@ document.changeform = document.[% cfname %];
[% BLOCK section_customfields %]
[% c = Bugzilla.active_custom_fields %]
[% FOREACH field = c.slice(c.size * (part - 1) / 4, c.size * part / 4 - 1) %]
[% INCLUDE bug/field.html.tmpl
value = bug.${field.name}
editable = bug.check_can_change_field(field.name, 0, 1)
value_span = 2 %]
[% IF c && c.size >= part %]
[% FOREACH field = c.slice((c.size * (part - 1)) div 4, (c.size * part) div 4 - 1) %]
[% INCLUDE bug/field.html.tmpl
value = bug.${field.name}
editable = bug.check_can_change_field(field.name, 0, 1)
value_span = 2 %]
[% END %]
[% END %]
[% END %]