residential prospects, RT#7111
[freeside.git] / httemplate / elements / radio.html
diff --git a/httemplate/elements/radio.html b/httemplate/elements/radio.html
new file mode 100644 (file)
index 0000000..9af5332
--- /dev/null
@@ -0,0 +1,19 @@
+<% $opt{'prefix'} %><INPUT TYPE  = "radio"
+                           NAME  = "<% $opt{field} %>"
+                           ID    = "<% $opt{id}.'_'.$opt{value} %>"
+                           VALUE = "<% $opt{value} %>"
+                           <% $opt{curr_value} eq $opt{value}
+                                ? ' CHECKED'
+                                : ''
+                           %>
+                           <% $onchange %>
+                    ><% $opt{'postfix'} %>
+<%init>
+
+my %opt = @_;
+
+my $onchange = $opt{'onchange'}
+                 ? 'onChange="'. $opt{'onchange'}. '(this)"'
+                 : '';
+
+</%init>