X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Felements%2Ftr-checkbox.html;h=ed166502b306b3262d4469337693e903b66d22d3;hb=88e9a56677d343392416c262f976f069157b06cb;hp=2e6d1f10763e2a40c4aef8d373ce286af45832c1;hpb=c648976f0b7975f2328ebd7ba8c711fad0ca4195;p=freeside.git
diff --git a/httemplate/elements/tr-checkbox.html b/httemplate/elements/tr-checkbox.html
index 2e6d1f107..ed166502b 100644
--- a/httemplate/elements/tr-checkbox.html
+++ b/httemplate/elements/tr-checkbox.html
@@ -1,16 +1,34 @@
-<% include('tr-td-label.html', @_ ) %>
+<%doc>
-
>
-
- <% $onchange %>
+Example:
+
+ <& /elements/tr-checkbox.html,
+ 'label' => 'Do or do not',
+ 'field' => 'field_name',
+ 'value' => 'Y',
+ &>
+
+%doc>
+% if ( $opt{'box_first'} ) {
+ |
+
+ <& checkbox.html, @_ &>
+ <% $required %><% $opt{label} %>
+ |
+
+% } else {
+<& tr-td-label.html, @_ &>
+
+ >
+ <% include('checkbox.html', @_) %>
|
+% }
<%init>
@@ -20,6 +38,12 @@ my $onchange = $opt{'onchange'}
? 'onChange="'. $opt{'onchange'}. '(this)"'
: '';
-my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
+my $style = 'text-align: left; padding-top: 3px';
+$style .= '; '. $opt{'cell_style'} if $opt{'cell_style'};
+
+my $required = $opt{'required'} ? '* ' : '';
+if ($required) {
+ $style .= ';font-weight: bold';
+}
%init>