summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-part_pkg.html
diff options
context:
space:
mode:
authorivan <ivan>2008-04-13 20:35:10 +0000
committerivan <ivan>2008-04-13 20:35:10 +0000
commitc2833f823676e017f2f693364d56d86c49592028 (patch)
tree7bfbaa52c2aaefd23354130774c7e47fe73f2ab5 /httemplate/elements/tr-select-part_pkg.html
parent5a50cc44ea44730eb8f286b5063f0446b247381b (diff)
select-table and select-part_pkg updates so we can use select-part_pkg as an edit/elements/edit.html m2 type
Diffstat (limited to 'httemplate/elements/tr-select-part_pkg.html')
-rw-r--r--httemplate/elements/tr-select-part_pkg.html44
1 files changed, 27 insertions, 17 deletions
diff --git a/httemplate/elements/tr-select-part_pkg.html b/httemplate/elements/tr-select-part_pkg.html
index b6d4d4d..db9afd2 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'} ) {
- <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'pkgpart' %>" VALUE="">
+ <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'pkgpart' %>" VALUE="">
+% }
+%
% } else {
+%
+% unless ( $opt{'js_only'} ) {
- <TR>
- <TD ALIGN="right"><% $opt{'label'} || 'Package definition' %></TD>
- <TD>
- <% include( '/elements/select-table.html',
- 'table' => 'part_pkg',
- 'name_col' => 'pkg',
- 'multiple' => 1,
- #N/A 'empty_label' => '(none)',
- %opt,
- )
- %>
- </TD>
- </TR>
+ <% include('tr-td-label.html', %opt) %>
+ <TD <% $cell_style %>>
-% }
+% }
+%
+ <% include( '/elements/select-part_pkg.html', %opt ) %>
+%
+% unless ( $opt{'js_only'} ) {
+
+ </TD>
+ </TR>
+% }
+%
+% }
<%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=>'' } )
</%init>