mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
Keep sending CAPTCHA info if an unrelated save error happens
Bug: T371041 Change-Id: I72c73b0e323c794578edb14efcc9cc06e46a194b
This commit is contained in:
parent
4ff5bf253d
commit
f76e47a3ef
|
@ -498,11 +498,11 @@ CommentController.prototype.onReplySubmit = function ( extraParams ) {
|
|||
* @param {Object} data Error data
|
||||
*/
|
||||
CommentController.prototype.saveFail = function ( code, data ) {
|
||||
this.replyWidget.clearCaptcha();
|
||||
const captchaData = OO.getProp( data, 'discussiontoolsedit', 'edit', 'captcha' );
|
||||
|
||||
if ( captchaData ) {
|
||||
code = 'captcha';
|
||||
this.replyWidget.clearCaptcha();
|
||||
this.replyWidget.setCaptcha( captchaData );
|
||||
} else {
|
||||
this.replyWidget.setSaveErrorMessage( code, data );
|
||||
|
|
Loading…
Reference in a new issue