From 3c01acacc0e8a4794f2b925bda80632334fb3ab4 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 15 Aug 2008 14:56:27 +0000 Subject: Closes #224: Install now using failsafe views. Please test from scratch (including blanking setup) and make sure it works for you! git-svn-id: https://code.elgg.org/elgg/trunk@1940 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/failsafe/input/checkboxes.php | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 views/failsafe/input/checkboxes.php (limited to 'views/failsafe/input/checkboxes.php') diff --git a/views/failsafe/input/checkboxes.php b/views/failsafe/input/checkboxes.php new file mode 100644 index 000000000..ff3ab8523 --- /dev/null +++ b/views/failsafe/input/checkboxes.php @@ -0,0 +1,49 @@ + $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\""; + } + } + $labelint = (int) $label; + if ("{$label}" == "{$labelint}") { + $label = $option; + } + + $disabled = ""; + if ($vars['disabled']) $disabled = ' disabled="yes" '; + echo "
"; + } + +?> \ No newline at end of file -- cgit v1.2.3