HTMLTextAreaField: Allow sizes to be overridden by child classes
authorMatt Walker <mwalker@wikimedia.org>
Sat, 13 Apr 2013 23:06:43 +0000 (16:06 -0700)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 23 Apr 2013 07:03:26 +0000 (07:03 +0000)
Change-Id: I51e8bcba95c7b555f072329b01c6577115f246b3

includes/HTMLForm.php

index 2d0cefc..1d9a3d0 100644 (file)
@@ -1623,16 +1623,19 @@ class HTMLTextField extends HTMLFormField {
        }
 }
 class HTMLTextAreaField extends HTMLFormField {
+       const DEFAULT_COLS = 80;
+       const DEFAULT_ROWS = 25;
+
        function getCols() {
                return isset( $this->mParams['cols'] )
                        ? $this->mParams['cols']
-                       : 80;
+                       : static::DEFAULT_COLS;
        }
 
        function getRows() {
                return isset( $this->mParams['rows'] )
                        ? $this->mParams['rows']
-                       : 25;
+                       : static::DEFAULT_ROWS;
        }
 
        function getInputHTML( $value ) {