projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix Tokenized payinfo on upgrade if we can, RT#71513
[freeside.git]
/
httemplate
/
elements
/
checkboxes-table.html
diff --git
a/httemplate/elements/checkboxes-table.html
b/httemplate/elements/checkboxes-table.html
index
a31bdb9
..
d3bbab4
100644
(file)
--- 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,
% 'select' => $opt{'target_table'}. '.*',
% 'addl_from' => "LEFT JOIN $opt{'link_table'} USING ( $target_pkey )",
% 'extra_sql' => $extra_sql,
+% 'order_by' => $opt{'order_by'},
% })
% ) {
%
% })
% ) {
%
@@
-81,6
+82,14
@@
% ? 'CHECKED'
% : '';
%
% ? 'CHECKED'
% : '';
%
+% } elsif ( !$sourcenum ) { # newly created object, has no links yet
+%
+% if ( ref($opt{'default'}) ) {
+% $checked = $opt{'default'}->{$targetnum} ? 'CHECKED' : '';
+% } else {
+% $checked = $opt{'default'} ? 'CHECKED' : ''
+% }
+%
% } else {
%
% $checked = qsearchs( $opt{'link_table'}, {
% } else {
%
% $checked = qsearchs( $opt{'link_table'}, {
@@
-94,17
+103,12
@@
%
%
%
%
-
- <INPUT TYPE="checkbox" NAME="<% $target_pkey. $targetnum %>" <% $checked %> VALUE="ON">
+% my $color_col = $opt{'color_col'};
+ <INPUT TYPE="checkbox" NAME="<% $target_pkey. $targetnum %>" <% $checked %> VALUE="ON">
<DIV STYLE="display:inline; background-color: #<% $color_col ? $target_obj->$color_col : '' %>">
% if ( $opt{'target_link'} ) {
% if ( $opt{'target_link'} ) {
-
-
<A HREF="<% $opt{'target_link'} %><% $targetnum %>">
<A HREF="<% $opt{'target_link'} %><% $targetnum %>">
-%
-%
% }
%
% }
%
-<% $targetnum %>:
% if ( $opt{'name_callback'} ) {
% if ( $opt{'name_callback'} ) {
@@
-114,7
+118,7
@@
%
%
- <% $target_obj->$name_col() %><% $opt{'target_link'} ? '</A>' : '' %>
+ <% $target_obj->$name_col() %><
/DIV><
% $opt{'target_link'} ? '</A>' : '' %>
% }
% if ( $opt{'disable-able'} ) {
% }
% if ( $opt{'disable-able'} ) {