X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fcheckboxes-table.html;h=d3bbab430ebd08f5204694cdccde692e7aa068f6;hp=671cd1f9bfe73722e270bd73c2b0d24a8ca47862;hb=64aec88c35418b8c630811cdf5afb19b2a1c4299;hpb=3fc0a546caf38b444b63744726c5080ce5d9bbbb diff --git a/httemplate/elements/checkboxes-table.html b/httemplate/elements/checkboxes-table.html index 671cd1f9b..d3bbab430 100644 --- a/httemplate/elements/checkboxes-table.html +++ b/httemplate/elements/checkboxes-table.html @@ -69,6 +69,7 @@ % 'select' => $opt{'target_table'}. '.*', % 'addl_from' => "LEFT JOIN $opt{'link_table'} USING ( $target_pkey )", % 'extra_sql' => $extra_sql, +% 'order_by' => $opt{'order_by'}, % }) % ) { % @@ -83,7 +84,11 @@ % % } elsif ( !$sourcenum ) { # newly created object, has no links yet % -% $checked = $opt{'default'} ? 'CHECKED' : '' +% if ( ref($opt{'default'}) ) { +% $checked = $opt{'default'}->{$targetnum} ? 'CHECKED' : ''; +% } else { +% $checked = $opt{'default'} ? 'CHECKED' : '' +% } % % } else { % @@ -98,17 +103,12 @@ % % - - VALUE="ON"> +% my $color_col = $opt{'color_col'}; + VALUE="ON">
% if ( $opt{'target_link'} ) { - - -% -% % } % -<% $targetnum %>: % if ( $opt{'name_callback'} ) { @@ -118,7 +118,7 @@ % - <% $target_obj->$name_col() %><% $opt{'target_link'} ? '' : '' %> + <% $target_obj->$name_col() %>
<% $opt{'target_link'} ? '' : '' %> % } % if ( $opt{'disable-able'} ) {