summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-07-19 06:10:31 +0200
committermkanat%bugzilla.org <>2006-07-19 06:10:31 +0200
commitf27aaa287562fb880934565d6a091ab1674bfab4 (patch)
treeef713bebee235631f1435d0312a0494caed9c8c1 /template/en/default/bug
parentaa205508ed3bc52b02cde76286daaec40aebfa5c (diff)
downloadbugzilla-f27aaa287562fb880934565d6a091ab1674bfab4.tar.gz
bugzilla-f27aaa287562fb880934565d6a091ab1674bfab4.tar.xz
Bug 344521: Make custom fields optionally functional on enter_bug.cgi
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'template/en/default/bug')
-rw-r--r--template/en/default/bug/create/create.html.tmpl9
-rw-r--r--template/en/default/bug/field.html.tmpl3
2 files changed, 12 insertions, 0 deletions
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index 1749813e3..8b2bcb997 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -313,6 +313,15 @@ function handleWantsAttachment(wants_attachment) {
</td>
</tr>
+ [% USE Bugzilla %]
+ [% FOREACH field = Bugzilla.get_fields({ obsolete => 0, custom => 1,
+ enter_bug => 1 }) %]
+ [% SET value = ${field.name} IF ${field.name}.defined %]
+ <tr>
+ [% PROCESS bug/field.html.tmpl editable=1 value_span=3 %]
+ </tr>
+ [% END %]
+
<tr>
<td align="right"><strong>Summary:</strong></td>
<td colspan="3">
diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl
index 9c45b3e57..ece2f64bf 100644
--- a/template/en/default/bug/field.html.tmpl
+++ b/template/en/default/bug/field.html.tmpl
@@ -25,6 +25,8 @@
# value: The value of the field for this bug.
# editable: Whether the field should be displayed as an editable
# <input> or as just the plain text of its value.
+ # value_span: A colspan for the table cell containing
+ # the field value.
#%]
<th class="field_label">
@@ -41,6 +43,7 @@
[% CASE constants.FIELD_TYPE_FREETEXT %]
<input name="[% field.name FILTER html %]"
value="[% value FILTER html %]"
+ [% "colspan=\"$value_span\"" FILTER none IF value_span %]
size="60">
[% END %]
[% ELSE %]