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