summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Snelders <programming@ertai.nl>2012-12-03 19:56:56 +0100
committerRob Snelders <programming@ertai.nl>2012-12-03 19:56:56 +0100
commit2ba273056ae2304cf64aef40c54929eefd689615 (patch)
tree7f81471cf378ae315db020f4c166a160275107f1
parent4f9c84bcd97f8488edac0bf42b09eb9b2ce46e33 (diff)
Get token earlier and clear error on retry of submit
-rw-r--r--bug/bug/bug.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 6452f45..271d2dc 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -217,6 +217,11 @@
element.addClass('initialized');
$.bug.current_step('description');
element.show();
+ if ($.bug.token == '') {
+ $.bug.ajax('GET', $.bug.url + '/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED').pipe(function(data){
+ $.bug.token = data.match(/<input type="hidden" name="token" value="([A-Za-z0-9]{10})">/)[1];
+ });
+ }
}
},
@@ -267,6 +272,7 @@
} else {
$(element).addClass('inprogress');
}
+ error_clear();
var component = $('.state_component .chosen').attr('data').replace('_',' ');
var short_desc = $.bug.subcomponent + ': ' + $('.state_description .short').val();
//Add Operating System