r115097 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r115096‎ | r115097 | r115098 >
Date:21:57, 30 April 2012
Author:yaron
Status:resolved
Tags:
Comment:
Follow-up to r109076 - replaced Html::input() call with Xml::radio(), because Html::input() (possibly only in MW 1.18+?) doesn't include a "value=" attribute if the value is empty, which leads to the string "on" showing up in the page.
Modified paths:
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_RadioButtonInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/forminputs/SF_RadioButtonInput.php
@@ -92,7 +92,13 @@
9393 }
9494
9595 $text .= "\t" . Html::rawElement( 'label', $itemAttrs,
96 - Html::input( $input_name, $possible_value, 'radio', $radiobutton_attrs ) . " $label" ) . "\n";
 96+ // Using Xml::radio() here because Html::input()
 97+ // unfortunately doesn't include the "value="
 98+ // attribute if the value is blank - which
 99+ // somehow leads to the string "on" being passed
 100+ // to the page.
 101+ //Html::input( $input_name, $possible_value, 'radio', $radiobutton_attrs ) . " $label" ) . "\n";
 102+ Xml::radio( $input_name, $possible_value, $radiobutton_attrs ) . " $label" ) . "\n";
97103 }
98104
99105 $spanClass = 'radioButtonSpan';

Follow-up revisions

RevisionCommit summaryAuthorDate
r115098Fix for r115097 - fixed call to Xml::radio()yaron01:52, 1 May 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109076Overhaul of HTML: replaced most calls to methods in Xml class with calls to H...yaron23:12, 16 January 2012

Status & tagging log