projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 77532 - fixed error where cust main fax not showing, and fixed checking of phonet...
[freeside.git]
/
httemplate
/
elements
/
select-table.html
diff --git
a/httemplate/elements/select-table.html
b/httemplate/elements/select-table.html
index
d86b7ee
..
ecac7f7
100644
(file)
--- a/
httemplate/elements/select-table.html
+++ b/
httemplate/elements/select-table.html
@@
-90,6
+90,7
@@
Example:
<OPTION VALUE=""><% $opt{'empty_label'} || 'all' %></OPTION>
% }
<OPTION VALUE=""><% $opt{'empty_label'} || 'all' %></OPTION>
% }
+% my $curr_option_found;
% foreach my $record (
% # we have the order_by parameter for this
% #sort { $a->$name_col() cmp $b->$name_col()
% foreach my $record (
% # we have the order_by parameter for this
% #sort { $a->$name_col() cmp $b->$name_col()
@@
-108,6
+109,7
@@
Example:
% $selected = ( ref($value) && $value->{$recvalue} )
% || ( $value && $value eq $recvalue ); #not == because of value_col
% }
% $selected = ( ref($value) && $value->{$recvalue} )
% || ( $value && $value eq $recvalue ); #not == because of value_col
% }
+% $curr_option_found = $selected unless $curr_option_found;
<OPTION VALUE="<% $recvalue %>"
<% $selected ? ' SELECTED' : '' %>
% foreach my $att ( @{ $opt{'extra_option_attributes'} } ) {
<OPTION VALUE="<% $recvalue %>"
<% $selected ? ' SELECTED' : '' %>
% foreach my $att ( @{ $opt{'extra_option_attributes'} } ) {
@@
-129,6
+131,11
@@
Example:
<OPTION VALUE="<% $post_opt %>"
<% $selected ? 'SELECTED' : '' %>
><% $post_label %></OPTION>
<OPTION VALUE="<% $post_opt %>"
<% $selected ? 'SELECTED' : '' %>
><% $post_label %></OPTION>
+% }
+
+% my $non_option_label = $opt{'non_option_label'};
+% if (!$curr_option_found && $non_option_label && $value) {
+ <OPTION VALUE="<% $value %>" SELECTED><% $non_option_label %></OPTION>
% }
</SELECT>
% }
</SELECT>