mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-27 17:40:11 +00:00
Merge "Turnstile: Minor cleanup"
This commit is contained in:
commit
3935691f2f
|
@ -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