Revision: 48317
Author:   yaron
Date:     2009-03-11 16:38:47 +0000 (Wed, 11 Mar 2009)

Log Message:
-----------
Added handling of 'is_mandatory' to radioButtonHTML()

Modified Paths:
--------------
    trunk/extensions/SemanticForms/includes/SF_FormInputs.inc

Modified: trunk/extensions/SemanticForms/includes/SF_FormInputs.inc
===================================================================
--- trunk/extensions/SemanticForms/includes/SF_FormInputs.inc   2009-03-11 
16:38:02 UTC (rev 48316)
+++ trunk/extensions/SemanticForms/includes/SF_FormInputs.inc   2009-03-11 
16:38:47 UTC (rev 48317)
@@ -532,7 +532,7 @@
   }
 
   static function radioButtonHTML($cur_value, $input_name, $is_mandatory, 
$is_disabled, $other_args) {
-    global $sfgTabIndex;
+    global $sfgTabIndex, $sfgFieldNum;
 
     $disabled_text = ($is_disabled) ? "disabled" : "";
     $check_set = false;
@@ -543,7 +543,9 @@
       $text .= '       <span class="mandatoryFieldsSpan">' . "\n";
 
     // start with an initial "None" value
-    $text .= ' <input type="radio" tabindex="' . $sfgTabIndex . '" name="' . 
$input_name . '" value=""';
+    $input_id = "input_$sfgFieldNum";
+    $info_id = "info_$sfgFieldNum";
+    $text .= ' <input type="radio" id="' . $input_id . '" tabindex="' . 
$sfgTabIndex . '" name="' . $input_name . '" value=""';
     if (! $cur_value) {
       $text .= ' checked="checked"';
       $check_set = true;
@@ -563,6 +565,10 @@
     // close span
     if ($is_mandatory)
       $text .= "       </span>";
+    $text .=<<<END
+       <span id="$info_id" class="errorMessage"></span>
+
+END;
     return array($text, null);
   }
 



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to