aboutsummaryrefslogtreecommitdiffstats
path: root/root/base/radio_group
diff options
context:
space:
mode:
Diffstat (limited to 'root/base/radio_group')
-rw-r--r--root/base/radio_group17
1 files changed, 17 insertions, 0 deletions
diff --git a/root/base/radio_group b/root/base/radio_group
new file mode 100644
index 0000000..b64e5b8
--- /dev/null
+++ b/root/base/radio_group
@@ -0,0 +1,17 @@
+[%
+
+PROCESS field_base;
+
+control_block = 'radiogroup_control';
+
+BLOCK radiogroup_control;
+
+ FOREACH value IN self.values.keys;
+ '<input type="radio" id="[% id_attr %]" [% connect_control(self, 'value');
+ IF self.default == value; ' checked="checked"'; END;
+ process_attrs(attrs); " />\n";
+ END;
+
+END;
+
+%]