]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #1393 added work around note to checkboxes and radio inputs for integer labels
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 12 Feb 2011 14:37:08 +0000 (14:37 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 12 Feb 2011 14:37:08 +0000 (14:37 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8156 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/input/checkboxes.php
views/default/input/radio.php

index 85c44de54dc5c094432e788890bec345d151c3ac..16d13ef6672a7a0e418cb84329ecf1d7190f7b25 100644 (file)
@@ -2,10 +2,15 @@
 /**
  * Elgg checkbox input
  * Displays a checkbox input field
- * NB: This also includes a hidden input with the same name as the checkboxes
+ *
+ * @note This also includes a hidden input with the same name as the checkboxes
  * to make sure something is sent to the server.  The default value is 0.
  * If using JS, be specific to avoid selecting the hidden default value:
  *     $('input[type=checkbox][name=internalname]')
+ * 
+ * @warning Passing integers as labels does not currently work due to a
+ * deprecated hack that will be removed in Elgg 1.9. To use integer labels,
+ * the labels must be character codes: 1 would be &#0049;
  *
  * @package Elgg
  * @subpackage Core
@@ -50,7 +55,7 @@ if ($options && count($options) > 0) {
 
        echo "<ul class=\"$class\">";
        foreach ($options as $label => $option) {
-               // @deprecated 1.8
+               // @deprecated 1.8 Remove in 1.9
                if (is_integer($label)) {
                        elgg_deprecated_notice('$vars[\'options\'] must be an associative array in input/checkboxes', 1.8);
                        $label = $option;
index 924411aa89426898f6f0daa9fc781d4d9f3c4018..60a2d10a6e4e5491649ac04910afa6d9add375b7 100644 (file)
@@ -3,6 +3,10 @@
  * Elgg radio input
  * Displays a radio input field
  *
+ * @warning Passing integers as labels does not currently work due to a
+ * deprecated hack that will be removed in Elgg 1.9. To use integer labels,
+ * the labels must be character codes: 1 would be &#0049;
+ *
  * @package Elgg
  * @subpackage Core
  *
@@ -42,7 +46,7 @@ if ($options && count($options) > 0) {
                $attributes = elgg_format_attributes($vars);
 
                // handle indexed array where label is not specified
-               // @deprecated 1.8
+               // @deprecated 1.8 Remove in 1.9
                if (is_integer($label)) {
                        elgg_deprecated_notice('$vars[\'options\'] must be an associative array in input/radio', 1.8);
                        $label = $option;