]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 913364 - Reuse preset values when navigation through enter_bug.cgi
authorSimon Green <sgreen@redhat.com>
Mon, 20 Jan 2014 23:29:22 +0000 (09:29 +1000)
committerSimon Green <sgreen@redhat.com>
Mon, 20 Jan 2014 23:29:22 +0000 (09:29 +1000)
r=glob, a=glob

enter_bug.cgi
template/en/default/global/choose-classification.html.tmpl
template/en/default/global/choose-product.html.tmpl

index 1769b464c09dbded4f16212cd644bdf8476103aa..617fdde67aad381d743dab9c07a79ae85dfc521a 100755 (executable)
@@ -75,8 +75,6 @@ if ($product_name eq '') {
             $vars->{'classifications'} = [map {$_->{'object'}} @classifications];
 
             $vars->{'target'} = "enter_bug.cgi";
-            $vars->{'format'} = $cgi->param('format');
-            $vars->{'cloned_bug_id'} = $cgi->param('cloned_bug_id');
 
             print $cgi->header();
             $template->process("global/choose-classification.html.tmpl", $vars)
@@ -107,8 +105,6 @@ if ($product_name eq '') {
     elsif (scalar(@enterable_products) > 1) {
         $vars->{'classifications'} = \@classifications;
         $vars->{'target'} = "enter_bug.cgi";
-        $vars->{'format'} = $cgi->param('format');
-        $vars->{'cloned_bug_id'} = $cgi->param('cloned_bug_id');
 
         print $cgi->header();
         $template->process("global/choose-product.html.tmpl", $vars)
index 1a59f6d89ddc1c02517c63f5b70e9a4ee5344b88..815e625a6111230ac0dadb8d3b886b9acca4a684 100644 (file)
 [% DEFAULT title = "Choose the classification" %]
 [% PROCESS global/header.html.tmpl %]
 
+[% previous_params = cgi.canonicalise_query('classification') %]
 <h2>First, you must pick a classification on which to enter [% terms.abug %]:</h2>
 <table id="choose_classification">
   <tr>
     <th class="right">
       <a href="[% target FILTER uri %]?classification=__all
-            [% IF cloned_bug_id %]&amp;cloned_bug_id=[% cloned_bug_id FILTER uri %][% END -%] 
-            [%- IF format %]&amp;format=[% format FILTER uri %][% END %]">
+            [%- IF previous_params %]&amp;[% previous_params FILTER none %][% END -%]">
       All</a>:
     </th>
 
@@ -39,8 +39,7 @@
   <tr>
     <th class="right">
       <a href="[% target FILTER uri %]?classification=[% class.name FILTER uri -%]
-            [%- IF cloned_bug_id %]&amp;cloned_bug_id=[% cloned_bug_id FILTER uri %][% END -%] 
-            [%- IF format %]&amp;format=[% format FILTER uri %][% END %]">
+            [%- IF previous_params %]&amp;[% previous_params FILTER none %][% END -%]">
       [% class.name FILTER html %]</a>:
     </th>
 
index b6b75fdbc2da8114b951a3c7914ff86b5262d4f2..5dc619087d74a1b9be9d30c9176193f44b623ab3 100644 (file)
@@ -11,8 +11,6 @@
   #                  classification object and 'products' the list of
   #                  product objects the user can enter bugs into.
   # target:   the script that displays this template.
-  # cloned_bug_id: ID of the bug being cloned.
-  # format:   the desired format to display the target.
   #%]
 
 [% IF target == "enter_bug.cgi" %]
@@ -30,6 +28,7 @@
 [% DEFAULT title = "Choose a Product" %]
 [% PROCESS global/header.html.tmpl %]
 
+[% previous_params = cgi.canonicalise_query('classification', 'product') %]
 <h2>[% h2 FILTER html %]</h2>
 
 <table id="choose_product">
@@ -46,8 +45,7 @@
     <tr>
       <th class="right">
         <a href="[% target %]?product=[% p.name FILTER uri -%]
-              [%- IF cloned_bug_id %]&amp;cloned_bug_id=[% cloned_bug_id FILTER uri %][% END -%]
-              [%- IF format %]&amp;format=[% format FILTER uri %][% END %]">
+              [%- IF previous_params %]&amp;[% previous_params FILTER none %][% END -%]">
         [% p.name FILTER html FILTER no_break %]</a>:&nbsp;
       </th>