diff options
Diffstat (limited to 'httemplate/elements/tr-select-cust_class.html')
-rw-r--r-- | httemplate/elements/tr-select-cust_class.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/httemplate/elements/tr-select-cust_class.html b/httemplate/elements/tr-select-cust_class.html new file mode 100644 index 0000000..54a11d7 --- /dev/null +++ b/httemplate/elements/tr-select-cust_class.html @@ -0,0 +1,27 @@ +% if ( scalar(@{ $opt{'cust_class'} }) == 0 ) { + + <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'classnum' %>" VALUE=""> + +% } else { + + <TR> + <TD ALIGN="right"><% $opt{'label'} || 'Customer class' %></TD> + <TD> + <% include( '/elements/select-cust_class.html', + 'curr_value' => $classnum, + %opt + ) + %> + </TD> + </TR> + +% } + +<%init> + +my %opt = @_; +my $classnum = $opt{'curr_value'} || $opt{'value'}; + +$opt{'cust_class'} ||= [ qsearch( 'cust_class', { disabled=>'' } ) ]; + +</%init> |