r49814 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49813‎ | r49814 | r49815 >
Date:11:11, 24 April 2009
Author:werdna
Status:ok
Tags:
Comment:
Fix ids for multi-select types
Modified paths:
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HTMLForm.php
@@ -664,8 +664,8 @@
665665 $html .= $this->formatOptions( $info, $value );
666666 } else {
667667 $checkbox = Xml::check( $this->mName.'[]', in_array( $info, $value ),
668 - array( 'id' => $this->mID, 'value' => $info ) );
669 - $checkbox .= ' ' . Xml::tags( 'label', array( 'for' => $this->mID ), $label );
 668+ array( 'id' => $this->mID."-$info", 'value' => $info ) );
 669+ $checkbox .= ' ' . Xml::tags( 'label', array( 'for' => $this->mID."-$info" ), $label );
670670
671671 $html .= Xml::tags( 'p', null, $checkbox );
672672 }

Status & tagging log