aboutsummaryrefslogtreecommitdiff
path: root/views/default/input
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-28 10:42:02 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-28 10:42:02 +0000
commit75b8e1b8d659ccbbb644c0d28c642eacc0ffb955 (patch)
tree50888983ebebc09cd01f80da2e16e3a917468132 /views/default/input
parent3b430f5e8fbea176fcfe617f0b49206bb7d8c286 (diff)
downloadelgg-75b8e1b8d659ccbbb644c0d28c642eacc0ffb955.tar.gz
elgg-75b8e1b8d659ccbbb644c0d28c642eacc0ffb955.tar.bz2
Improved checkbox value retention
git-svn-id: https://code.elgg.org/elgg/trunk@2494 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/input')
-rw-r--r--views/default/input/checkboxes.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php
index 2b9970aaa..da53bf271 100644
--- a/views/default/input/checkboxes.php
+++ b/views/default/input/checkboxes.php
@@ -19,18 +19,20 @@
*/
$class = $vars['class'];
- if (!$class) $class = "input-checkboxes";
-
+ if (!$class) $class = "input-checkboxes";
+
foreach($vars['options'] as $label => $option) {
//if (!in_array($option,$vars['value'])) {
if (is_array($vars['value'])) {
- if (!in_array($option,$vars['value'])) {
+ $valarray = $vars['value'];
+ $valarray = array_map('strtolower', $valarray);
+ if (!in_array(strtolower($option),$valarray)) {
$selected = "";
} else {
$selected = "checked = \"checked\"";
}
} else {
- if ($option != $vars['value']) {
+ if (strtolower($option) != strtolower($vars['value'])) {
$selected = "";
} else {
$selected = "checked = \"checked\"";