https://www.mediawiki.org/wiki/Special:Code/MediaWiki/115097
Revision: 115097
Author: yaron
Date: 2012-04-30 21:57:45 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
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:
trunk/extensions/SemanticForms/includes/forminputs/SF_RadioButtonInput.php
===================================================================
--- trunk/extensions/SemanticForms/includes/forminputs/SF_RadioButtonInput.php
2012-04-30 20:48:21 UTC (rev 115096)
+++ trunk/extensions/SemanticForms/includes/forminputs/SF_RadioButtonInput.php
2012-04-30 21:57:45 UTC (rev 115097)
@@ -92,7 +92,13 @@
}
$text .= "\t" . Html::rawElement( 'label', $itemAttrs,
- Html::input( $input_name, $possible_value,
'radio', $radiobutton_attrs ) . " $label" ) . "\n";
+ // Using Xml::radio() here because Html::input()
+ // unfortunately doesn't include the "value="
+ // attribute if the value is blank - which
+ // somehow leads to the string "on" being passed
+ // to the page.
+ //Html::input( $input_name, $possible_value,
'radio', $radiobutton_attrs ) . " $label" ) . "\n";
+ Xml::radio( $input_name, $possible_value,
$radiobutton_attrs ) . " $label" ) . "\n";
}
$spanClass = 'radioButtonSpan';
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs