X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLTextAreaField.php;h=4fd198976bbab115dfd9b5a0272ceeb3d4a71870;hb=b941a11623ee1eac9418051a92cc679f41d99c44;hp=89e7be2e927ed9b452890664b359290c705467e0;hpb=e1c2245c6733188e9f7b5f0d4561e8cd3df1d55b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLTextAreaField.php b/includes/htmlform/HTMLTextAreaField.php index 89e7be2e92..4fd198976b 100644 --- a/includes/htmlform/HTMLTextAreaField.php +++ b/includes/htmlform/HTMLTextAreaField.php @@ -24,23 +24,16 @@ class HTMLTextAreaField extends HTMLFormField { $attribs['class'] = $this->mClass; } - if ( !empty( $this->mParams['disabled'] ) ) { - $attribs['disabled'] = 'disabled'; - } - - if ( !empty( $this->mParams['readonly'] ) ) { - $attribs['readonly'] = 'readonly'; - } - - if ( isset( $this->mParams['placeholder'] ) ) { - $attribs['placeholder'] = $this->mParams['placeholder']; - } - - foreach ( array( 'required', 'autofocus' ) as $param ) { - if ( isset( $this->mParams[$param] ) ) { - $attribs[$param] = ''; - } - } + $allowedParams = array( + 'placeholder', + 'tabindex', + 'disabled', + 'readonly', + 'required', + 'autofocus' + ); + + $attribs += $this->getAttributes( $allowedParams ); return Html::element( 'textarea', $attribs, $value ); }