From 5309f8873d813701ff4bbde8dc0f1e24e0feeec2 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Wed, 19 Sep 2007 02:07:20 +0000 Subject: Bug 373689: Implement set_product: Move product changing from process_bug into Bugzilla::Bug Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- .../bug/process/verify-new-product.html.tmpl | 117 ++++++++++++--------- 1 file changed, 67 insertions(+), 50 deletions(-) (limited to 'template') diff --git a/template/en/default/bug/process/verify-new-product.html.tmpl b/template/en/default/bug/process/verify-new-product.html.tmpl index 73c11fae9..ee87ef818 100644 --- a/template/en/default/bug/process/verify-new-product.html.tmpl +++ b/template/en/default/bug/process/verify-new-product.html.tmpl @@ -17,6 +17,7 @@ # # Contributor(s): Myk Melez # Frédéric Buclin + # Max Kanat-Alexander #%] [%# INTERFACE: @@ -26,12 +27,10 @@ # milestones: array; milestones for the new product. # defaults: hash; keys are names of fields, values are defaults for # those fields + # + # verify_bug_groups: If groups need to be confirmed in addition to fields. #%] -[%# The global Bugzilla->cgi object is used to obtain form variable values. %] -[% USE Bugzilla %] -[% cgi = Bugzilla.cgi %] - [% PROCESS global/variables.none.tmpl %] [% PROCESS global/header.html.tmpl @@ -39,60 +38,77 @@
+[% SET exclude_items = ['version', 'component', 'target_milestone'] %] +[% IF verify_bug_groups %] + [% exclude_items.push('bit-\d+') %] +[% END %] + [% PROCESS "global/hidden-fields.html.tmpl" - exclude=("^version|component|target_milestone|bit-\\d+$") %] + exclude = '^' _ exclude_items.join('|') _ '$' %] + [%# Verify the version, component, and target milestone fields. %] -

Verify Version, Component[% ", Target Milestone" IF Param("usetargetmilestone") %]

- -

- [% IF Param("usetargetmilestone") %] - You are moving the [% terms.bug %](s) to the product - [% cgi.param("product") FILTER html %], - and the version, component, and/or target milestone fields are no longer - correct. Please set the correct version, component, and target milestone now: - [% ELSE %] - You are moving the [% terms.bug %](s) to the product - [% cgi.param("product") FILTER html %], - and the version and component fields are no longer correct. - Please set the correct version and component now: - [% END %] -

- - - - +

Verify Version, Component[% ", Target Milestone" IF Param("usetargetmilestone") %]

+ +

+[% IF Param("usetargetmilestone") %] + You are moving the [% terms.bug %](s) to the product + [% product.name FILTER html %], + and the version, component, and/or target milestone fields are no longer + correct. Please set the correct version, component, and target milestone now: +[% ELSE %] + You are moving the [% terms.bug %](s) to the product + [% product.name FILTER html %], + and the version and component fields are no longer correct. + Please set the correct version and component now: +[% END %] +

+ +
- Version:
- [% PROCESS "global/select-menu.html.tmpl" - name="version" - options=versions - default=defaults.version - size=10 %] -
+ + + + [% IF Param("usetargetmilestone") %] - [% IF Param("usetargetmilestone") %] - - [% END %] - -
+ Version:
+ [% IF versions.size == 1 %] + [% SET default_version = versions.0 %] + [% ELSE %] + [% SET default_version = defaults.version %] + [% END %] + [% PROCESS "global/select-menu.html.tmpl" + name="version" + options=versions + default=default_version + size=10 %] +
+ Component:
+ [% IF components.size == 1 %] + [% SET default_component = components.0 %] + [% ELSE %] + [% SET default_component = defaults.component %] + [% END %] + [% PROCESS "global/select-menu.html.tmpl" + name="component" + options=components + default=default_component + size=10 %] +
- Component:
- [% PROCESS "global/select-menu.html.tmpl" - name="component" - options=components - default=defaults.component - size=10 %] + Target Milestone:
+ [% PROCESS "global/select-menu.html.tmpl" + name="target_milestone" + options=milestones + default=defaults.milestone + size=10 %]
- Target Milestone:
- [% PROCESS "global/select-menu.html.tmpl" - name="target_milestone" - options=milestones - default=defaults.target_milestone - size=10 %] -
+ [% END %] + + +[% IF verify_bug_groups %]

Verify [% terms.Bug %] Group

- + [% IF old_groups.size %]

These groups are not legal for the '[% product.name FILTER html %]' product or you are not allowed to restrict [% terms.bugs %] to these groups. @@ -157,6 +173,7 @@ [% END %]

[% END %] +[% END %] -- cgit v1.2.3-24-g4f1b