summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-02-25 23:06:24 +0100
committerlpsolit%gmail.com <>2008-02-25 23:06:24 +0100
commit816eb1e9bd788b2b3468481281793639c824996d (patch)
tree9e272644a04e3dec038785e4d819ff9fe25fe1e6 /template
parent8ef50bdaba56ee100821c51ff141e00d26723dc7 (diff)
downloadbugzilla-816eb1e9bd788b2b3468481281793639c824996d.tar.gz
bugzilla-816eb1e9bd788b2b3468481281793639c824996d.tar.xz
Bug 415652: Implement Bugzilla->active_custom_fields - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'template')
-rw-r--r--template/en/default/bug/create/create.html.tmpl5
-rw-r--r--template/en/default/bug/edit.html.tmpl15
-rw-r--r--template/en/default/bug/show-multiple.html.tmpl2
-rw-r--r--template/en/default/list/edit-multiple.html.tmpl2
4 files changed, 10 insertions, 14 deletions
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index 8bc4ab465..c8fd0fc10 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -421,10 +421,9 @@ function handleWantsAttachment(wants_attachment) {
<tbody>
[% USE Bugzilla %]
- [% custom_fields = Bugzilla.get_fields({ obsolete => 0, custom => 1,
- enter_bug => 1 }) %]
- [% FOREACH field = custom_fields %]
+ [% FOREACH field = Bugzilla.active_custom_fields %]
+ [% NEXT UNLESS field.enter_bug %]
[% SET value = ${field.name} IF ${field.name}.defined %]
<tr>
[% PROCESS bug/field.html.tmpl editable=1 value_span=3 %]
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index 63913beee..1cdf5e798 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -907,15 +907,12 @@
[%# *** Custom Fields *** %]
[% USE Bugzilla %]
- [% fields = Bugzilla.get_fields({ obsolete => 0, custom => 1 }) %]
- [% IF fields %]
- [% FOREACH field = fields %]
- <tr>
- [% PROCESS bug/field.html.tmpl value=bug.${field.name}
- editable = bug.check_can_change_field(field.name, 0, 1)
- value_span = 2 %]
- </tr>
- [% END %]
+ [% FOREACH field = Bugzilla.active_custom_fields %]
+ <tr>
+ [% PROCESS bug/field.html.tmpl value=bug.${field.name}
+ editable = bug.check_can_change_field(field.name, 0, 1)
+ value_span = 2 %]
+ </tr>
[% END %]
[% END %]
diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl
index 2104c90a4..2562903a6 100644
--- a/template/en/default/bug/show-multiple.html.tmpl
+++ b/template/en/default/bug/show-multiple.html.tmpl
@@ -178,7 +178,7 @@
[% USE Bugzilla %]
[% field_counter = 0 %]
- [% FOREACH field = Bugzilla.get_fields({ obsolete => 0, custom => 1 }) %]
+ [% FOREACH field = Bugzilla.active_custom_fields %]
[% field_counter = field_counter + 1 %]
[%# Odd-numbered fields get an opening <tr> %]
[% '<tr>' IF field_counter % 2 %]
diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl
index 9aa110359..5607371eb 100644
--- a/template/en/default/list/edit-multiple.html.tmpl
+++ b/template/en/default/list/edit-multiple.html.tmpl
@@ -240,7 +240,7 @@
[% END %]
[% USE Bugzilla %]
- [% FOREACH field = Bugzilla.get_fields({ obsolete => 0, custom => 1 }) %]
+ [% FOREACH field = Bugzilla.active_custom_fields %]
<tr>
[% PROCESS bug/field.html.tmpl value = dontchange
editable = 1