From c2833f823676e017f2f693364d56d86c49592028 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 13 Apr 2008 20:35:10 +0000 Subject: select-table and select-part_pkg updates so we can use select-part_pkg as an edit/elements/edit.html m2 type --- httemplate/elements/tr-select-part_pkg.html | 44 ++++++++++++++++++----------- 1 file changed, 27 insertions(+), 17 deletions(-) (limited to 'httemplate/elements/tr-select-part_pkg.html') diff --git a/httemplate/elements/tr-select-part_pkg.html b/httemplate/elements/tr-select-part_pkg.html index b6d4d4d9e..db9afd2df 100644 --- a/httemplate/elements/tr-select-part_pkg.html +++ b/httemplate/elements/tr-select-part_pkg.html @@ -1,29 +1,39 @@ -% if ( scalar(@{ $opt{'part_pkg'} }) == 0 ) { +% if ( $opt{'part_pkg'} && scalar(@{ $opt{'part_pkg'} }) == 0 ) { +% unless ( $opt{'js_only'} ) { - + +% } +% % } else { +% +% unless ( $opt{'js_only'} ) { - - <% $opt{'label'} || 'Package definition' %> - - <% include( '/elements/select-table.html', - 'table' => 'part_pkg', - 'name_col' => 'pkg', - 'multiple' => 1, - #N/A 'empty_label' => '(none)', - %opt, - ) - %> - - + <% include('tr-td-label.html', %opt) %> + > -% } +% } +% + <% include( '/elements/select-part_pkg.html', %opt ) %> +% +% unless ( $opt{'js_only'} ) { + + + +% } +% +% } <%init> my( %opt ) = @_; -$opt{'part_pkg'} ||= [ qsearch( 'part_pkg', {} ) ]; # { disabled=>'' } ) +my $cell_style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : ''; + +$opt{'label'} ||= 'Package definition'; + +#taken care of (better) in select-part_pkg now (is there anything using this +# that needs to override the disabed=>'' ??) +#$opt{'part_pkg'} ||= [ qsearch( 'part_pkg', {} ) ]; # { disabled=>'' } ) -- cgit v1.2.1