X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftr-checkbox.html;h=ed166502b306b3262d4469337693e903b66d22d3;hp=2e6d1f10763e2a40c4aef8d373ce286af45832c1;hb=11bbf29de447fe39e9d7155fe280a0df70fa8c3c;hpb=eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd 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', + &> + + +% 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'; +}