From 7f01270ba106937300cf491927839d3428360d0a Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 5 Oct 2010 10:53:40 +0000 Subject: moved installation to its own viewtype git-svn-id: http://code.elgg.org/elgg/trunk@7010 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/installation/input/checkboxes.php | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 views/installation/input/checkboxes.php (limited to 'views/installation/input/checkboxes.php') diff --git a/views/installation/input/checkboxes.php b/views/installation/input/checkboxes.php new file mode 100644 index 000000000..0792f09ce --- /dev/null +++ b/views/installation/input/checkboxes.php @@ -0,0 +1,50 @@ + $option) { + //if (!in_array($option,$vars['value'])) { + if (is_array($vars['value'])) { + if (!in_array($option,$vars['value'])) { + $selected = ""; + } else { + $selected = "checked = \"checked\""; + } + } else { + if ($option != $vars['value']) { + $selected = ""; + } else { + $selected = "checked = \"checked\""; + } + } + + // handle indexed array where label is not specified + // @todo deprecate in Elgg 1.8 + if (is_integer($label)) { + $label = $option; + } + + $disabled = ""; + if ($vars['disabled']) { + $disabled = ' disabled="yes" '; + } + echo "
"; +} \ No newline at end of file -- cgit v1.2.3