X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLCheckField.php;h=4a6b80473089cc0b596a94bf3f7cd094cd707cd7;hb=a465d1dbeb220610bf856228b88b72e6b756a700;hp=13f30c2d06026892340aaba6ad2a3e08dfa0778e;hpb=40a628a501fc05bb00e834fe359ca4061925f320;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLCheckField.php b/includes/htmlform/HTMLCheckField.php index 13f30c2d06..4a6b804730 100644 --- a/includes/htmlform/HTMLCheckField.php +++ b/includes/htmlform/HTMLCheckField.php @@ -56,9 +56,8 @@ class HTMLCheckField extends HTMLFormField { $attr['id'] = $this->mID; $attr['name'] = $this->mName; - $attr += $this->getAttributes( - [ 'disabled', 'tabindex' ], - [ 'tabindex' => 'tabIndex' ] + $attr += OOUI\Element::configFromHtmlAttributes( + $this->getAttributes( [ 'disabled', 'tabindex' ] ) ); if ( $this->mClass !== '' ) { @@ -112,7 +111,7 @@ class HTMLCheckField extends HTMLFormField { /** * @param WebRequest $request * - * @return string + * @return bool */ function loadDataFromRequest( $request ) { $invert = isset( $this->mParams['invert'] ) && $this->mParams['invert']; @@ -126,7 +125,7 @@ class HTMLCheckField extends HTMLFormField { ? !$request->getBool( $this->mName ) : $request->getBool( $this->mName ); } else { - return $this->getDefault(); + return (bool)$this->getDefault(); } } }