mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-27 09:30:06 +00:00
Turnstile: Minor cleanup
Bug: T319068 Follows-Up: I0d5a74655619975f0bf61b5b672159afe5f4fb00 Change-Id: I15c26957158f22a0b6d6abb9def0e84e73c63ddc
This commit is contained in:
parent
fbf6c1c7ea
commit
8d3afbd390
|
@ -49,13 +49,12 @@ class HTMLTurnstileField extends HTMLFormField {
|
|||
);
|
||||
Turnstile::addCSPSources( $out->getCSP() );
|
||||
|
||||
$output = Html::element( 'div', [
|
||||
return Html::element( 'div', [
|
||||
'class' => [
|
||||
'cf-turnstile',
|
||||
'mw-confirmedit-captcha-fail' => (bool)$this->error,
|
||||
],
|
||||
'data-sitekey' => $this->key,
|
||||
] );
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace MediaWiki\Extension\ConfirmEdit\Turnstile;
|
||||
|
||||
use Config;
|
||||
use MediaWiki\Config\Config;
|
||||
use MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook;
|
||||
|
||||
class Hooks implements ResourceLoaderGetConfigVarsHook {
|
||||
|
|
|
@ -246,9 +246,9 @@ class Turnstile extends SimpleCaptcha {
|
|||
$captcha = Hooks::getInstance();
|
||||
|
||||
$formDescriptor['captchaWord'] = [
|
||||
'class' => HTMLTurnstileField::class,
|
||||
'key' => $wgTurnstileSiteKey,
|
||||
'error' => $captcha->getError(),
|
||||
] + $formDescriptor['captchaWord'];
|
||||
'class' => HTMLTurnstileField::class,
|
||||
'key' => $wgTurnstileSiteKey,
|
||||
'error' => $captcha->getError(),
|
||||
] + $formDescriptor['captchaWord'];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue