From: Glaisher Date: Tue, 1 Sep 2015 12:37:54 +0000 (+0500) Subject: Make readonly work for OOUI forms X-Git-Tag: 1.31.0-rc.0~10195^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=e25eb30ea81eda82b57a4e3c84f4e1afdf3b6080 Make readonly work for OOUI forms This seems like a hack. Copied from HTMLTextField. Change-Id: I46f3dbd4b60fd9a39ecd7167ec903ae7d1d804bc --- diff --git a/includes/htmlform/HTMLTextAreaField.php b/includes/htmlform/HTMLTextAreaField.php index aeb4b7c22a..5cfea63db3 100644 --- a/includes/htmlform/HTMLTextAreaField.php +++ b/includes/htmlform/HTMLTextAreaField.php @@ -71,6 +71,11 @@ class HTMLTextAreaField extends HTMLFormField { 'readonly' => 'readOnly', ) ); + if ( isset( $attribs['readOnly'] ) ) { + // this needs to be set to a boolean value - hack?? + $attribs['readOnly'] = true; + } + return new OOUI\TextInputWidget( array( 'id' => $this->mID, 'name' => $this->mName,