X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-checkbox.html;h=ed166502b306b3262d4469337693e903b66d22d3;hb=5027e0e807b38364fc10c992ea50a2ad7d934986;hp=2e6d1f10763e2a40c4aef8d373ce286af45832c1;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;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>