From 4e0c1576475390faa2f1fb4c4dc2902a953f440e Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Wed, 25 Feb 2009 12:16:53 +0000 Subject: First commit --- views/default/input/accessRead.php | 61 ++++++++++++++++++++++++++++++++++ views/default/input/cover_checkbox.php | 45 +++++++++++++++++++++++++ views/default/input/multi_radio.php | 42 +++++++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 views/default/input/accessRead.php create mode 100644 views/default/input/cover_checkbox.php create mode 100644 views/default/input/multi_radio.php (limited to 'views/default/input') diff --git a/views/default/input/accessRead.php b/views/default/input/accessRead.php new file mode 100644 index 000000000..81392b19f --- /dev/null +++ b/views/default/input/accessRead.php @@ -0,0 +1,61 @@ + 0) + { + + /* my hacks (pay no attention please =D ) + //allow showing of group for write access + if($vars['group_write']) $vars['options'] = trigger_plugin_hook('access:collections:write','user',array('user_id' => $_SESSION['guid'], 'site_id' => 0),$vars['options']); + */ + + //developer check - to check the value being sent initially + //echo 'given value: '.$vars['value'].'
'; + + //if no value currently set - specify default + if (empty($vars['value']) && $vars['value'] != '0') + $vars['value'] = 2; + + + foreach($vars['options'] as $key => $option) { + if ($key == $vars['value']) { +?> + + class=""> + + \ No newline at end of file diff --git a/views/default/input/cover_checkbox.php b/views/default/input/cover_checkbox.php new file mode 100644 index 000000000..48c7d51cc --- /dev/null +++ b/views/default/input/cover_checkbox.php @@ -0,0 +1,45 @@ + $option) { + + 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 diff --git a/views/default/input/multi_radio.php b/views/default/input/multi_radio.php new file mode 100644 index 000000000..11f4c13b8 --- /dev/null +++ b/views/default/input/multi_radio.php @@ -0,0 +1,42 @@ + $option) { + + if ($vars['set'] != $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