select-table and select-part_pkg updates so we can use select-part_pkg as an edit...
[freeside.git] / httemplate / elements / tr-select-part_pkg.html
1 % if ( $opt{'part_pkg'} && scalar(@{ $opt{'part_pkg'} }) == 0 ) { 
2 %   unless ( $opt{'js_only'} ) {
3
4       <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'pkgpart' %>" VALUE="">
5
6 %   }
7 %
8 % } else { 
9 %
10 %   unless ( $opt{'js_only'} ) {
11
12       <% include('tr-td-label.html', %opt) %>
13         <TD <% $cell_style %>>
14
15 %   }
16 %
17           <% include( '/elements/select-part_pkg.html', %opt ) %>
18 %
19 %   unless ( $opt{'js_only'} ) {
20
21         </TD>
22       </TR>
23
24 %   }
25 %
26 % } 
27 <%init>
28
29 my( %opt ) = @_;
30
31 my $cell_style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
32
33 $opt{'label'} ||= 'Package definition';
34
35 #taken care of (better) in select-part_pkg now (is there anything using this
36 # that needs to override the disabed=>'' ??)
37 #$opt{'part_pkg'} ||= [ qsearch( 'part_pkg', {} ) ]; # { disabled=>'' } )
38
39 </%init>