summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-12-18 00:31:51 +0100
committermkanat%bugzilla.org <>2009-12-18 00:31:51 +0100
commita73890d2ef8851ddae6b4991998824596a0f5644 (patch)
treea154cc5cd26842300bb0dd513ed7949c67682153 /template/en/default
parent3eb0b0d657efa47583d5bea699d8b9a62547fb6c (diff)
downloadbugzilla-a73890d2ef8851ddae6b4991998824596a0f5644.tar.gz
bugzilla-a73890d2ef8851ddae6b4991998824596a0f5644.tar.xz
Bug 162060: Remove the relationship between "votestoconfirm" and whether or not the UNCONFIRMED status is available, by adding a checkbox to enable the UNCONFIRMED status in editproducts.cgi.
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/admin/products/create.html.tmpl4
-rw-r--r--template/en/default/admin/products/edit-common.html.tmpl69
-rw-r--r--template/en/default/admin/products/edit.html.tmpl1
-rw-r--r--template/en/default/admin/products/updated.html.tmpl20
-rw-r--r--template/en/default/attachment/create.html.tmpl3
5 files changed, 63 insertions, 34 deletions
diff --git a/template/en/default/admin/products/create.html.tmpl b/template/en/default/admin/products/create.html.tmpl
index 664564040..f4a2161aa 100644
--- a/template/en/default/admin/products/create.html.tmpl
+++ b/template/en/default/admin/products/create.html.tmpl
@@ -25,15 +25,17 @@
[% PROCESS global/header.html.tmpl
title = title
style_urls = ['skins/standard/admin.css']
+ javascript_urls = ['js/util.js']
%]
[% DEFAULT
product.votesperuser = "0",
product.maxvotesperbug = "10000",
- product.votestoconfirm = "0",
+ product.votes_to_confirm = "0",
product.is_active = 1,
version = "unspecified",
product.defaultmilestone = constants.DEFAULT_MILESTONE
+ product.allows_unconfirmed = 0
%]
<form method="post" action="editproducts.cgi">
diff --git a/template/en/default/admin/products/edit-common.html.tmpl b/template/en/default/admin/products/edit-common.html.tmpl
index 67dd5ae64..2c94402d6 100644
--- a/template/en/default/admin/products/edit-common.html.tmpl
+++ b/template/en/default/admin/products/edit-common.html.tmpl
@@ -69,39 +69,44 @@
[% ' checked="checked"' IF product.is_active %]>
</td>
</tr>
-
-[% IF !Param('usevotes') %]
-<tr class="param_disabled">
- <td colspan="2"
- style="font-family: arial; font-style: italic; font-size: 0.7em; text-align: center;">
- The 'usevotes' parameter is currently 'off'. These voting
- settings will take effect when the parameter is next enabled.</td>
-</tr>
-[% END %]
-<tr [% IF !Param('usevotes') %]class="param_disabled" [% END %]>
- <th align="right">Maximum votes per person:</th>
- <td><input size="5" maxlength="5" name="votesperuser"
- value="[% product.votesperuser FILTER html %]">
- </td>
-</tr>
-<tr [% IF !Param('usevotes') %]class="param_disabled" [% END %]>
- <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 [% IF !Param('usevotes') %]class="param_disabled" [% END %]>
+<tr>
<th align="right">
- Confirmation threshold:
+ <label for="allows_unconfirmed">Enable the
+ [%+ display_value('bug_status', 'UNCONFIRMED') FILTER html %] status
+ in this product:</label>
</th>
- <td>
- Enter the number of votes [% terms.abug %] in this product needs to
- automatically get out of the
- <a href="page.cgi?id=fields.html#status">[% display_value("bug_status", "UNCONFIRMED") FILTER html %]</a>
- state.<br>
- <input size="5" maxlength="5" name="votestoconfirm"
- value="[% product.votestoconfirm FILTER html %]">
+ <td><input type="checkbox" id="allows_unconfirmed" name="allows_unconfirmed"
+ [% ' checked="checked"' IF product.allows_unconfirmed %]
+ [% IF Param('usevotes') %]
+ onchange="bz_toggleClass('votes_to_confirm_container',
+ 'bz_default_hidden')"
+ [% END %]>
+ [% IF Param('usevotes') %]
+ <span id="votes_to_confirm_container"
+ [% ' class="bz_default_hidden"' IF !product.allows_unconfirmed %]>
+ ...and automatically confirm [% terms.bugs %] if they get
+ <input size="3" maxlength="5" name="votestoconfirm" id="votestoconfirm"
+ value="[% product.votes_to_confirm FILTER html %]">
+ votes. (Setting this to 0 disables auto-confirming [% terms.bugs %]
+ by vote.)
+ </span>
+ [% END %]
</td>
</tr>
+
+[% IF Param('usevotes') %]
+ <tr>
+ <th align="right">Maximum votes per person:</th>
+ <td><input size="5" maxlength="5" name="votesperuser" id="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" id="maxvotesperbug"
+ value="[% product.maxvotesperbug FILTER html %]">
+ </td>
+ </tr>
+[% END %]
diff --git a/template/en/default/admin/products/edit.html.tmpl b/template/en/default/admin/products/edit.html.tmpl
index e6480c453..976739f78 100644
--- a/template/en/default/admin/products/edit.html.tmpl
+++ b/template/en/default/admin/products/edit.html.tmpl
@@ -29,6 +29,7 @@
[% PROCESS global/header.html.tmpl
title = title
style_urls = ['skins/standard/admin.css']
+ javascript_urls = ['js/util.js']
%]
[% group_control = {${constants.CONTROLMAPNA} => 'NA',
diff --git a/template/en/default/admin/products/updated.html.tmpl b/template/en/default/admin/products/updated.html.tmpl
index 594f84327..6e484ff34 100644
--- a/template/en/default/admin/products/updated.html.tmpl
+++ b/template/en/default/admin/products/updated.html.tmpl
@@ -39,6 +39,8 @@
style_urls = ['skins/standard/admin.css']
%]
+[% PROCESS "global/field-descs.none.tmpl" %]
+
[% IF changes.name.defined %]
<p>
Updated product name from '[% changes.name.0 FILTER html %]' to
@@ -101,6 +103,24 @@
[% checkvotes = 1 %]
[% END %]
+[% IF changes.allows_unconfirmed.defined %]
+ <p>
+ [% IF product.allows_unconfirmed %]
+ The product now allows the
+ [%+ display_value('bug_status', 'UNCONFIRMED') FILTER html %] status.
+ [% ELSE %]
+ The product no longer allows the
+ [%+ display_value('bug_status', 'UNCONFIRMED') FILTER html %] status.
+ Note that any
+ <a href="buglist.cgi?product=
+ [%- product.name FILTER url_quote %]&amp;bug_status=UNCONFIRMED">
+ [%- terms.bugs %] that currently have the
+ [%+ display_value('bug_status', 'UNCONFIRMED') FILTER html %] status</a>
+ will remain in that status until they are edited.
+ [% END %]
+ </p>
+[% END %]
+
[% IF !changes.keys.size %]
<p>Nothing changed for product '[% product.name FILTER html %]'.</p>
[% END %]
diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl
index 9150b2b32..f00a0ade4 100644
--- a/template/en/default/attachment/create.html.tmpl
+++ b/template/en/default/attachment/create.html.tmpl
@@ -77,7 +77,8 @@
<label for="takebug">take [% terms.bug %]</label>
[% bug_statuses = [] %]
[% FOREACH bug_status = bug.status.can_change_to %]
- [% NEXT IF bug_status.name == "UNCONFIRMED" && !bug.product_obj.votes_to_confirm %]
+ [% NEXT IF bug_status.name == "UNCONFIRMED"
+ && !bug.product_obj.allows_unconfirmed %]
[% bug_statuses.push(bug_status) IF bug_status.is_open %]
[% END %]
[% IF bug_statuses.size %]