mw.ArticleTarget: Fix FancyCaptcha reload button

Follows-up 843620632a in ConfirmEdit which now expects a specific class
on one of the image parent elements.

Without this the refresh link is broken as fancyCapatcha.js is
unable to find the image otherwise.

Change-Id: Iad7c8e8c77f58092ca4dbb5cbb3527cacff10f03
This commit is contained in:
Timo Tijhof 2016-08-03 18:25:17 -07:00
parent 35f6c7d5da
commit c2897b5a92

View file

@ -698,8 +698,12 @@ ve.init.mw.ArticleTarget.prototype.saveErrorCaptcha = function ( editApi ) {
$( '<strong>' ).text( mw.msg( 'captcha-label' ) ),
document.createTextNode( mw.msg( 'colon-separator' ) )
);
if ( editApi.captcha.url ) { // FancyCaptcha
if ( editApi.captcha.url ) {
// FancyCaptcha
// Based on FancyCaptcha::getFormInformation() (https://git.io/v6mml) and
// ext.confirmEdit.fancyCaptcha.js in the ConfirmEdit extension.
mw.loader.load( 'ext.confirmEdit.fancyCaptcha' );
$captchaDiv.addClass( 'fancycaptcha-captcha-container' );
$captchaParagraph.append(
$( $.parseHTML( mw.message( 'fancycaptcha-edit' ).parse() ) )
.filter( 'a' ).attr( 'target', '_blank' ).end()