From 92c38323e039f7dd842c0a76879480420ae8fe3b Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Fri, 9 Oct 2009 14:22:37 +0000 Subject: [PATCH] * Add file and textarea support to HTMLForm. * Move HTML label generation to separate function, because it needs to be overridden for SpecialUpload --- includes/HTMLForm.php | 72 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 13 deletions(-) diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index fc6ae9980f..3435dd79b5 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -51,6 +51,7 @@ class HTMLForm { # A mapping of 'type' inputs onto standard HTMLFormField subclasses static $typeMappings = array( 'text' => 'HTMLTextField', + 'textarea' => 'HTMLTextAreaField', 'select' => 'HTMLSelectField', 'radio' => 'HTMLRadioField', 'multiselect' => 'HTMLMultiSelectField', @@ -737,17 +738,7 @@ abstract class HTMLFormField { $errors = Html::rawElement( 'span', array( 'class' => 'error' ), $errors ); } - $html = ''; - - # Don't output a for= attribute for labels with no associated input. - # Kind of hacky here, possibly we don't want these to be