aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/radio.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input/radio.php')
-rw-r--r--views/default/input/radio.php12
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