Index: trunk/extensions/FlaggedRevs/flaggedrevs.js |
— | — | @@ -337,29 +337,23 @@ |
338 | 338 | return; |
339 | 339 | } |
340 | 340 | var response = request.responseText; |
341 | | - var success = false; |
342 | 341 | if( msg = response.substr(6) ) { |
343 | 342 | jsMsg( msg, 'review' ); |
344 | 343 | window.scroll(0,0); |
345 | | - success = true; |
346 | 344 | } |
347 | 345 | wgAjaxReview.inprogress = false; |
348 | 346 | if( wgAjaxReview.timeoutID ) { |
349 | 347 | window.clearTimeout(wgAjaxReview.timeoutID); |
350 | 348 | } |
351 | 349 | var submit = document.getElementById("submitreview"); |
352 | | - if( submit ) { |
353 | | - if( success ) |
354 | | - submit.value = wgAjaxReview.sentMsgOk; |
355 | | - else |
356 | | - submit.value = wgAjaxReview.sentMsgBad; |
357 | | - } |
358 | 350 | if( response.indexOf('<suc#>') == 0 ) { |
359 | | - wgAjaxReview.unlockForm(); |
360 | 351 | document.title = wgAjaxReview.actioncomplete; |
| 352 | + if( submit ) submit.value = wgAjaxReview.sentMsgOk; |
361 | 353 | } else { |
362 | 354 | document.title = wgAjaxReview.actionfailed; |
| 355 | + if( submit ) submit.value = wgAjaxReview.sentMsgBad; |
363 | 356 | } |
| 357 | + wgAjaxReview.unlockForm(); |
364 | 358 | }; |
365 | 359 | |
366 | 360 | wgAjaxReview.onLoad = function() { |