summaryrefslogtreecommitdiffstats
path: root/template/en
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-09-02 06:33:06 +0200
committerlpsolit%gmail.com <>2005-09-02 06:33:06 +0200
commit7ce67eec4fb2c17ee3621b1aad2f99295ed4649f (patch)
treef9ca85cd15b4732807d2c35bd314b8c989644469 /template/en
parenta3cbf5618bb6133f8cd56d8b1d1414fe4c87e469 (diff)
downloadbugzilla-7ce67eec4fb2c17ee3621b1aad2f99295ed4649f.tar.gz
bugzilla-7ce67eec4fb2c17ee3621b1aad2f99295ed4649f.tar.xz
Bug 302370: Remove the EmitFormElements() routine from editproducts.cgi and templatize that code - Patch by Gabriel Sales de Oliveira <gabriel@async.com.br> r=LpSolit a=myk
Diffstat (limited to 'template/en')
-rw-r--r--template/en/default/admin/products/create.html.tmpl64
-rw-r--r--template/en/default/admin/products/edit-common.html.tmpl89
-rw-r--r--template/en/default/admin/products/edit.html.tmpl152
3 files changed, 305 insertions, 0 deletions
diff --git a/template/en/default/admin/products/create.html.tmpl b/template/en/default/admin/products/create.html.tmpl
new file mode 100644
index 000000000..8dc6615b4
--- /dev/null
+++ b/template/en/default/admin/products/create.html.tmpl
@@ -0,0 +1,64 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # Contributor(s): Gabriel S. Oliveira <gabriel@async.com.br>
+ #%]
+
+[%# INTERFACE:
+ # classification: string; name of the classification in which the new
+ # product is created.
+ #
+ #%]
+
+[% title = BLOCK %]Add Product[% END %]
+
+[% PROCESS global/header.html.tmpl
+ title = title
+%]
+
+[% DEFAULT
+ product.votesperuser = "0",
+ product.maxvotesperbug = "10000",
+ product.votestoconfirm = "0",
+ version = "unspecified",
+ product.defaultmilestone = "---"
+%]
+
+<form method="post" action="editproducts.cgi">
+ <table border="0" cellpadding="4" cellspacing="0">
+
+ [% PROCESS "admin/products/edit-common.html.tmpl" %]
+
+ <tr>
+ <th align="right">Version:</th>
+ <td><input size="64" maxlength="255" name="version"
+ value="[% version FILTER html %]">
+ </td>
+ </tr>
+ <tr>
+ <th align="right">Create chart datasets for this product:</th>
+ <td><input type="checkbox" name="createseries" value="1"></td>
+ </tr>
+ </table>
+
+ <input type="submit" value="Add">
+ <input type="hidden" name="subcategory" value="-All-">
+ <input type="hidden" name="open_name" value="All Open">
+ <input type="hidden" name="action" value="new">
+ <input type="hidden" name="classification"
+ value="[% classification FILTER html %]">
+</form>
+
+[% PROCESS "admin/products/footer.html.tmpl" no_add_product_link = 1 %]
+
+[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/admin/products/edit-common.html.tmpl b/template/en/default/admin/products/edit-common.html.tmpl
new file mode 100644
index 000000000..cbbbd8232
--- /dev/null
+++ b/template/en/default/admin/products/edit-common.html.tmpl
@@ -0,0 +1,89 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # Contributor(s): Jack Nerad <jnerad@bellsouth.net>
+ # Tiago R. Mello <tiago@async.com.br>
+ # Gabriel S. Oliveira <gabriel@async.com.br>
+ #%]
+
+[%# INTERFACE:
+ # classification: string; name of classification product is in.
+ # product: array; an array of product objects.
+ #%]
+
+[% IF Param('useclassification') %]
+ <tr>
+ <th align="right"><b>Classification:</b></th>
+ <td><b>[% classification FILTER html %]</b></td>
+ </tr>
+[% END %]
+
+<tr>
+ <th align="right">Product:</th>
+ <td><input size="64" maxlength="64" name="product"
+ value="[% product.name FILTER html %]">
+ </td>
+</tr>
+<tr>
+ <th align="right">Description:</th>
+ <td><textarea rows="4" cols="64" wrap="virtual" name="description">
+ [% product.description FILTER none %]</textarea>
+ </td>
+</tr>
+
+[% IF Param('usetargetmilestone') -%]
+ <tr>
+ <th align="right">URL describing milestones for this product:</th>
+ <td><input type="text" size="64" maxlength="255" name="milestoneurl"
+ value="[% product.milestoneurl FILTER html %]">
+ </td>
+ </tr>
+ <tr>
+ <th align="right">Default milestone:</th>
+ <td><input type="text" size="20" maxlength="20" name="defaultmilestone"
+ value="[% product.defaultmilestone FILTER html %]">
+ </td>
+ </tr>
+[% END %]
+
+<tr>
+ <th align="right">Closed for [% terms.bug %] entry:</th>
+ <td><input type="checkbox" name="disallownew" value="1"
+ [% IF product.disallownew == "1" %]
+ checked="checked"[% END %]>
+ </td>
+</tr>
+<tr>
+ <th align="right">Maximum votes per person:</th>
+ <td><input size="5" maxlength="5" name="votesperuser"
+ value="[% product.votesperuser FILTER html %]">
+ </td>
+</tr>
+<tr>
+ <th align="right">
+ Maximum votes a person can put on a single [% terms.bug %]:
+ </th>
+ <td><input size="5" maxlength="5" name="maxvotesperbug"
+ value="[% product.maxvotesperbug FILTER html %]">
+ </td>
+</tr>
+<tr>
+ <th align="right">
+ Number of votes [% terms.abug %] in this product needs to
+ automatically get out of the
+ <a href="page.cgi?id=fields.html#status">UNCONFIRMED</a> state:
+ </th>
+ <td><input size="5" maxlength="5" name="votestoconfirm"
+ value="[% product.votestoconfirm FILTER html %]">
+ </td>
+</tr>
diff --git a/template/en/default/admin/products/edit.html.tmpl b/template/en/default/admin/products/edit.html.tmpl
new file mode 100644
index 000000000..da58e6722
--- /dev/null
+++ b/template/en/default/admin/products/edit.html.tmpl
@@ -0,0 +1,152 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # Contributor(s): Jack Nerad <jnerad@bellsouth.net>
+ # Tiago R. Mello <tiago@async.com.br>
+ # Gabriel S. Oliveira <gabriel@async.com.br>
+ #%]
+
+[%# INTERFACE:
+ # classification: string; name of classification product is in.
+ # product: an array of product objects.
+ # components: an array of component object(s) related to the product.
+ # groups: an array of group objects related to the product.
+ # versions: an array of version objects related to product.
+ # milestones: an array of milestones objects related to product.
+ # bug_count: integer; number of bugs in this product.
+ #%]
+
+[% title = BLOCK %]Edit Product[% END %]
+
+[% PROCESS global/header.html.tmpl
+ title = title
+%]
+
+<form method="post" action="editproducts.cgi">
+ <table border="0" cellpadding="4" cellspacing="0">
+
+ [% PROCESS "admin/products/edit-common.html.tmpl" %]
+
+ <tr>
+ <th align="right" valign="top">
+ <a href="editcomponents.cgi?product=[% product.name FILTER url_quote %]">
+ Edit components:
+ </a>
+ </th>
+ <td>
+ [% IF components.size -%]
+ [% FOREACH component = components %]
+ <b>[% component.name FILTER html %]:</b>&nbsp;
+ [% IF component.description %]
+ [% component.description FILTER none %]
+ [% ELSE %]
+ <font color="red">description missing</font>
+ [% END %]
+ <br>
+ [% END %]
+ [% ELSE %]
+ <font color="red">missing</font>
+ [% END %]
+ </td>
+ </tr>
+ <tr>
+ <th align="right" valign="top">
+ <a href="editversions.cgi?product=[% product.name FILTER html %]">Edit
+versions:</a>
+ </th>
+ <td>
+ [%- IF versions.size -%]
+ [% FOREACH v = versions %]
+ [% v FILTER html %]
+ <br>
+ [% END %]
+ [% ELSE %]
+ <font color="red">missing</font>
+ [% END %]
+ </td>
+ </tr>
+ [% IF Param('usetargetmilestone') %]
+ <tr>
+ <th align="right" valign="top">
+ <a href="editmilestones.cgi?product=[% product.name FILTER url_quote %]">
+ Edit milestones:</a>
+ </th>
+ <td>
+ [%- IF milestones.size -%]
+ [%- FOREACH m = milestones -%]
+ [% m FILTER html %]
+ <br>
+ [% END %]
+ [% ELSE %]
+ <font color="red">missing</font>
+ [% END %]
+ </td>
+ </tr>
+ [% END %]
+ <tr>
+ <th align="right" valign="top">
+ <a href="editproducts.cgi?action=editgroupcontrols&product=
+ [%- product.name FILTER url_quote %]">
+ Edit Group Access Controls:
+ </a>
+ </th>
+ <td>
+ [% IF groups.size %]
+ [% FOREACH g = groups %]
+ <b>[% g.name FILTER html %]:</b>&nbsp;
+ [% IF g.isactive %]
+ [% g.membercontrol FILTER html %]/
+ [% g.othercontrol FILTER html %]
+ [% IF g.entry %], ENTRY[% END %]
+ [% IF g.canedit %], CANEDIT[% END %]
+ [% ELSE %]
+ DISABLED
+ [% END %]
+ <br>
+ [% END %]
+ [% ELSE %]
+ no groups
+ [% END %]
+ </td>
+ </tr>
+ <tr>
+ <th align="right">[% terms.Bugs %]:</th>
+ <td>[% bug_count FILTER html %]</td>
+ </tr>
+ </table>
+
+ <input type="hidden" name="productold"
+ value="[% product.name FILTER html %]">
+ <input type="hidden" name="descriptionold"
+ value="[% product.description FILTER html %]">
+ <input type="hidden" name="milestoneurlold"
+ value="[% product.milestoneurl FILTER html %]">
+ <input type="hidden" name="disallownewold"
+ value="[% product.disallownew FILTER html %]">
+ <input type="hidden" name="votesperuserold"
+ value="[% product.votesperuser FILTER html %]">
+ <input type="hidden" name="maxvotesperbugold"
+ value="[% product.maxvotesperbug FILTER html %]">
+ <input type="hidden" name="votestoconfirmold"
+ value="[% product.votestoconfirm FILTER html %]">
+ <input type="hidden" name="defaultmilestoneold"
+ value="[% product.defaultmilestone FILTER html %]">
+ <input type="hidden" name="action" value="update">
+ <input type="hidden" name="classification"
+ value="[% classification FILTER html %]">
+ <input type="submit" name="submit" value="Update">
+</form>
+
+[% PROCESS "admin/products/footer.html.tmpl" no_add_product_link = 1 %]
+
+[% PROCESS global/footer.html.tmpl %]