Tom Hayakawa
tom_g3x****@users*****
2006年 11月 12日 (日) 14:11:24 JST
Index: xoops2jp/html/class/smarty/plugins/function.xoops_input.php diff -u xoops2jp/html/class/smarty/plugins/function.xoops_input.php:1.1.2.9 xoops2jp/html/class/smarty/plugins/function.xoops_input.php:1.1.2.9.2.1 --- xoops2jp/html/class/smarty/plugins/function.xoops_input.php:1.1.2.9 Fri Aug 25 20:03:32 2006 +++ xoops2jp/html/class/smarty/plugins/function.xoops_input.php Sun Nov 12 14:11:24 2006 @@ -8,7 +8,7 @@ * $params['script']... This function have not impletented that yet. At * implementing, we will have to define the rule about sanitizing. * - * @version $Id: function.xoops_input.php,v 1.1.2.9 2006/08/25 11:03:32 tom_g3x Exp $ + * @version $Id: function.xoops_input.php,v 1.1.2.9.2.1 2006/11/12 05:11:24 tom_g3x Exp $ */ /* @@ -70,7 +70,11 @@ $string .= " class=\"${class}\""; } - $string .= " id=\"{$id}\""; + if ($type == "checkbox" || $type == "radio") { + $string .= " id=\"{$id}_{$value}\""; + }else { + $string .= " id=\"{$id}\""; + } if ($type) { $string .= " type=\"${type}\""; @@ -91,7 +95,7 @@ if (isset($params['default'])) { $default = trim($params['default']); if ($value == $default) { - if ($type = "checkbox" || $type == "radio") { + if ($type == "checkbox" || $type == "radio") { $string .= " checked=\"checked\""; } } Index: xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php diff -u xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php:1.1.2.4.2.1 xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php:1.1.2.4.2.2 --- xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php:1.1.2.4.2.1 Thu Nov 9 18:35:42 2006 +++ xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php Sun Nov 12 14:11:24 2006 @@ -17,6 +17,10 @@ * * ------------------------------------------------------------- */ + +// This overlaps with "xoops_input". +//define ("XOOPS_INPUT_DEFID_PREFIX", "legacy_xoopsform_"); + function smarty_function_xoops_optionsArray($params, &$smarty) { // @@ -40,7 +44,7 @@ } if ($id) { - $t_id = "${id}_${value}"; + $t_id = XOOPS_INPUT_DEFID_PREFIX . $id."_".$value; $tags .= "<option id=\"${t_id}\" value=\"${value}\"${selected}>${label}</option>\n"; } else {