Merge "(bug 36761) "Mark pages as visited" should submit previously established filte...
[lhc/web/wiklou.git] / includes / HTMLForm.php
index ebaac3c..e56ca2e 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * HTML form generation and submission handling.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
 /**
  * Object handling generic submission, CSRF protection, layout and
  * other logic for UI forms. in a reusable manner.
@@ -1096,6 +1117,11 @@ abstract class HTMLFormField {
                                $msg = wfMessage( array_shift( $helpMessage ), $helpMessage );
 
                                if( $msg->exists() ) {
+                                       if( is_null( $helptext ) ) {
+                                               $helptext = '';
+                                       } else {
+                                               $helptext .= wfMessage( 'word-separator' )->escaped(); // some space
+                                       }
                                        $helptext .= $msg->parse(); // Append message
                                }
                        }
@@ -1306,6 +1332,10 @@ class HTMLTextAreaField extends HTMLFormField {
                        $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] = '';