From: Mark Holmquist Date: Mon, 13 May 2013 17:47:45 +0000 (-0700) Subject: Disambiguate buildForm docs, add TODO X-Git-Tag: 1.31.0-rc.0~19693^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=5b5f8927348f3a867269222e7f657d7fb3dcf59c;p=lhc%2Fweb%2Fwiklou.git Disambiguate buildForm docs, add TODO Xml::buildForm needs some love. I've given it a better documentation string, but left a TODO for accessibility: We need to use labels for input labelling, not table elements. Change-Id: I4a9ff174e83c8ca3242c82bbe7cb0da0b8be7785 --- diff --git a/includes/Xml.php b/includes/Xml.php index c62cbdf635..3eedeb20b5 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -739,8 +739,8 @@ class Xml { /** * Generate a form (without the opening form element). * Output optionally includes a submit button. - * @param array $fields Associative array, key is message corresponding to a description for the field (colon is in the message), value is appropriate input. - * @param string $submitLabel A message containing a label for the submit button. + * @param array $fields Associative array, key is the name of a message that contains a description for the field, value is an HTML string containing the appropriate input. + * @param string $submitLabel The name of a message containing a label for the submit button. * @return string HTML form. */ public static function buildForm( $fields, $submitLabel = null ) { @@ -750,6 +750,11 @@ class Xml { foreach ( $fields as $labelmsg => $input ) { $id = "mw-$labelmsg"; $form .= Xml::openElement( 'tr', array( 'id' => $id ) ); + + // TODO use a