summaryrefslogtreecommitdiffstats
path: root/extensions/GuidedBugEntry/web
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/GuidedBugEntry/web')
-rw-r--r--extensions/GuidedBugEntry/web/js/guided.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/extensions/GuidedBugEntry/web/js/guided.js b/extensions/GuidedBugEntry/web/js/guided.js
index 1883e4eb6..8eaf6b3b5 100644
--- a/extensions/GuidedBugEntry/web/js/guided.js
+++ b/extensions/GuidedBugEntry/web/js/guided.js
@@ -17,9 +17,11 @@ var guided = {
detectedOpSys: '',
currentUser: '',
openStates: [],
+ updateStep: true,
setStep: function(newStep, noSetHistory) {
// initialise new step
+ this.updateStep = true;
switch(newStep) {
case 'product':
product.onShow();
@@ -38,6 +40,9 @@ var guided = {
return;
}
+ if (!this.updateStep)
+ return;
+
// change visibility of _step div
if (this._currentStep)
Dom.addClass(this._currentStep + '_step', 'hidden');
@@ -586,6 +591,16 @@ var bugForm = {
},
onShow: function() {
+ // check for a forced format
+ var productName = product.getName();
+ if (products[productName] && products[productName].format) {
+ Dom.addClass('advanced', 'hidden');
+ document.location.href = 'enter_bug.cgi?format=' + encodeURIComponent(products[productName].format) +
+ '&product=' + encodeURIComponent(productName) +
+ '&short_desc=' + encodeURIComponent(dupes.getSummary());
+ guided.updateStep = false;
+ return;
+ }
Dom.removeClass('advanced', 'hidden');
// default the summary to the dupes query
Dom.get('short_desc').value = dupes.getSummary();