]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 312876: Make new products non-selectable until they have components - Patch by...
authorlpsolit%gmail.com <>
Thu, 19 Oct 2006 23:15:53 +0000 (23:15 +0000)
committerlpsolit%gmail.com <>
Thu, 19 Oct 2006 23:15:53 +0000 (23:15 +0000)
template/en/default/search/form.html.tmpl
template/en/default/search/search-specific.html.tmpl

index d7b7715fd27947a4f1e262ed1541617ad9ccbb40..3cc8b7b4333248bb7213434b0d4225a00724fc33 100644 (file)
@@ -45,7 +45,7 @@ var tms = new Array();
   prods[[% nclass FILTER js %]] = [
     [% sep = '' %]
     [%- FOREACH item = c.products -%]
-      [%- IF user.can_see_product(item.name) -%]
+      [%- IF user.can_see_product(item.name) && item.components.size -%]
         [%- sep FILTER js %]'[% item.name FILTER js %]'
         [%- sep = ',' -%] 
       [%- END -%]
@@ -58,7 +58,7 @@ var tms = new Array();
 
 [% n = 0 %]
 [% FOREACH p = product %]
-  [% IF Param('useclassification') %]
+  [% IF Param('useclassification') && p.components.size %]
   prods['[% p.name FILTER js %]'] = [% n %]
   [% END %]
   cpts[[% n %]] = [
@@ -193,9 +193,11 @@ function doOnSelectProduct(selectmode) {
                   <select name="product" multiple="multiple" size="5" id="product"
                           onchange="doOnSelectProduct(2);">
                     [% FOREACH p = product %]
+                      [% IF p.components.size %]
                       <option value="[% p.name FILTER html %]"
                         [% " selected" IF lsearch(default.product, p.name) != -1 %]>
                         [% p.name FILTER html %]</option>
+                      [% END %]
                     [% END %]
                   </select>
                 </td>
index e09caca7f17091b23f504daaf81a2a3082f287f2..05c8bd180115d0904830e9b49b628ac27a798297 100644 (file)
@@ -74,7 +74,7 @@ for "crash secure SSL flash".
           [% FOREACH c = classification %]
             <optgroup label="[% c.name FILTER html %]">
             [% FOREACH p = c.products %]
-              [% IF user.can_see_product(p.name) %]
+              [% IF user.can_see_product(p.name) && p.components.size %]
                 <option value="[% p.name FILTER html %]"
                   [% " selected" IF lsearch(default.product, p.name) != -1 %]>
                   [% p.name FILTER html %]