r106623 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106622‎ | r106623 | r106624 >
Date:01:43, 19 December 2011
Author:yaron
Status:ok (Comments)
Tags:
Comment:
Put <label> tag around form-name-dropdown label
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_Utils.php
@@ -437,11 +437,11 @@
438438 $namespace_labels = $sfgContLang->getNamespaces();
439439 $form_label = $namespace_labels[SF_NS_FORM];
440440 $form_names = SFUtils::getAllForms();
441 - $select_body = "";
 441+ $select_body = "\n";
442442 foreach ( $form_names as $form_name ) {
443443 $select_body .= "\t" . Xml::element( 'option', null, $form_name ) . "\n";
444444 }
445 - return "\t$form_label" . wfMsg( 'colon-separator' ) . Xml::tags( 'select', array( 'name' => 'form' ), $select_body ) . "\n";
 445+ return "\t" . Xml::tags( 'label', array( 'for' => 'formSelector' ), $form_label . wfMsg( 'colon-separator' ) ) . "\n" . Xml::tags( 'select', array( 'id' => 'formSelector', 'name' => 'form' ), $select_body ) . "\n";
446446 }
447447
448448 /**

Comments

#Comment by Nikerabbit (talk | contribs)   08:45, 19 December 2011

Having the label wrap around the select should also work without having the need to add ids.

Status & tagging log