Merge "Make readonly work for OOUI forms"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 1 Sep 2015 12:51:26 +0000 (12:51 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 1 Sep 2015 12:51:26 +0000 (12:51 +0000)
includes/htmlform/HTMLTextAreaField.php

index aeb4b7c..5cfea63 100644 (file)
@@ -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,