From 64aec88c35418b8c630811cdf5afb19b2a1c4299 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 25 Aug 2016 15:06:45 -0700 Subject: usability: customer tags with checkboxes instead of a select-multiple --- httemplate/elements/checkboxes-table.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'httemplate/elements/checkboxes-table.html') 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'} ) { -- cgit v1.2.1