diff options
author | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-10 15:13:39 +0000 |
---|---|---|
committer | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-10 15:13:39 +0000 |
commit | bbbbad20de5f318a099fb82ae56071073b0596a6 (patch) | |
tree | 8e2f564b78d646652ce8874f092e88b403edaa40 /views/default/input/radio.php | |
parent | 6d69cb048b372e6e79b79ca2fe927b7c3e3efad2 (diff) | |
download | elgg-bbbbad20de5f318a099fb82ae56071073b0596a6.tar.gz elgg-bbbbad20de5f318a099fb82ae56071073b0596a6.tar.bz2 |
some new views
git-svn-id: https://code.elgg.org/elgg/trunk@137 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/input/radio.php')
-rw-r--r-- | views/default/input/radio.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/views/default/input/radio.php b/views/default/input/radio.php new file mode 100644 index 000000000..6c60fab54 --- /dev/null +++ b/views/default/input/radio.php @@ -0,0 +1,12 @@ +<?php
+
+ foreach($vars['options'] as $option => $label) {
+ if ($option != $vars['value']) {
+ $selected = "";
+ } else {
+ $selected = "checked = \"checked\"";
+ }
+ echo "<label><input type=\"radio\" {$vars['js']} name=\"{$vars['internalname']}\" value=\"".htmlentities($option)."\" {$selected} />{$label}</label><br />";
+ }
+
+?>
\ No newline at end of file |