diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-05-08 20:34:47 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-05-08 20:34:47 -0700 |
commit | e4e9e2f1fe6f48cf22486962c6bf84f50d201358 (patch) | |
tree | 9cf0119aee57e7b8568ac2e085c0caa085032562 /httemplate/elements/select-table.html | |
parent | a68564e6856a7ea63763eeaf7962a5cb2df649af (diff) |
fix service definition modifiers (inventory, hardware) w/svc_broadband, RT#17659
Diffstat (limited to 'httemplate/elements/select-table.html')
-rw-r--r-- | httemplate/elements/select-table.html | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/httemplate/elements/select-table.html b/httemplate/elements/select-table.html index c0dde7414..127028ee5 100644 --- a/httemplate/elements/select-table.html +++ b/httemplate/elements/select-table.html @@ -93,10 +93,17 @@ Example: % ) % { % my $recvalue = $record->$key(); +% my $selected; +% if ( $opt{'all_selected'} ) { +% $selected = 1; +% } elsif ( $opt{'compare_sub'} && !ref($value) ) { +% $selected = &{ $opt{'compare_sub'} }( $value, $recvalue ); +% } else { +% $selected = ( ref($value) && $value->{$recvalue} ) +% || ( $value && $value eq $recvalue ); #not == because of value_col +% } <OPTION VALUE="<% $recvalue %>" - <% $opt{'all_selected'} || ref($value) && $value->{$recvalue} || $value && $value eq $recvalue # not == because of value_col - ? ' SELECTED' : '' - %> + <% $selected ? ' SELECTED' : '' %> % foreach my $att ( @{ $opt{'extra_option_attributes'} } ) { data-<% $att %>="<% $record->$att() |h %>" % } |