(bug 36049) placeholder attrib for HTMLForm Textarea
authorawjrichards <arichards@wikimedia.org>
Tue, 17 Apr 2012 23:04:24 +0000 (16:04 -0700)
committerAntoine Musso <hashar@free.fr>
Thu, 19 Apr 2012 11:45:17 +0000 (13:45 +0200)
Change-Id: I671b4869ef30734c4bfb0c2beed3841f90ab5d16

includes/HTMLForm.php

index ebaac3c..ec1507c 100644 (file)
@@ -1306,6 +1306,10 @@ class HTMLTextAreaField extends HTMLFormField {
                        $attribs['readonly'] = 'readonly';
                }
 
+               if ( !empty( $this->mParams['placeholder'] ) ) {
+                       $attribs['placeholder'] = $this->mParams['placeholder'];
+               }
+
                foreach ( array( 'required', 'autofocus' ) as $param ) {
                        if ( isset( $this->mParams[$param] ) ) {
                                $attribs[$param] = '';