diff --git a/mozilla/webtools/bugzilla/enter_bug.cgi b/mozilla/webtools/bugzilla/enter_bug.cgi index f6fdb7dbf2e..fa2fb345a39 100755 --- a/mozilla/webtools/bugzilla/enter_bug.cgi +++ b/mozilla/webtools/bugzilla/enter_bug.cgi @@ -21,6 +21,24 @@ source CGI.tcl + +if {![info exists FORM(product)]} { + GetVersionTable + if {[array size versions] != 1} { + puts "Content-type: text/html\n" + PutHeader "Enter Bug" "Enter Bug" + + puts "

First, you must pick a product on which to enter a bug.

" + foreach p [array names versions] { + puts "$p
" + } + exit + } + set $FORM(product) [array names versions] +} + +set product $FORM(product) + confirm_login puts "Content-type: text/html\n" @@ -41,27 +59,7 @@ proc pickplatform {} { } } -proc pickproduct {} { - global FORM env COOKIE product versions - set product missingProductSoPickDefault - - set product [formvalue product] - if {$product == ""} { - if {[info exists COOKIE(PRODUCT)]} { - set product $COOKIE(PRODUCT) - } else { - switch -regexp $env(HTTP_USER_AGENT) { - {2.0Gold} {set product "Hearst"} - {4\.0.*; *Nav} { set product "Ratbert"} - {4\.0} {set product "Communicator"} - {3\.0} {set product "Akbar"} - {2\.0} {set product "Cheddar"} - } - } - } - if {![info exists versions($product)]} { set product "Communicator" } - return $product -} + proc pickversion {} { global env versions product FORM @@ -131,7 +129,6 @@ proc formvalue {name {default ""}} { } GetVersionTable -pickproduct set assign_element [GeneratePersonInput assigned_to 1 [formvalue assigned_to]] set cc_element [GeneratePeopleInput cc [formvalue cc ""]] @@ -151,10 +148,13 @@ puts "
+ - + + +
Product:[Product_element $product]$product
Version: [Version_element [pickversion] $product] Component: