diff options
author | ivan <ivan> | 2009-09-18 22:35:29 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-09-18 22:35:29 +0000 |
commit | 5ea78c9342c376406271472cee971aa971c4a696 (patch) | |
tree | 1166a5b53c666dec21504e2bea29ab69a8bf3e37 /httemplate/elements/select-cust_main-status.html | |
parent | 20727883e43b7abed5160870b3fa3059a7cb1d83 (diff) |
fix customer and package status conditions not sticky on edit, noticed on RT#6150
Diffstat (limited to 'httemplate/elements/select-cust_main-status.html')
-rw-r--r-- | httemplate/elements/select-cust_main-status.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/httemplate/elements/select-cust_main-status.html b/httemplate/elements/select-cust_main-status.html index 2e0b6cb24..bdbaac7f4 100644 --- a/httemplate/elements/select-cust_main-status.html +++ b/httemplate/elements/select-cust_main-status.html @@ -8,7 +8,9 @@ % foreach my $option ( @{ $opt{'statuses'} } ) { <OPTION VALUE="<% $option %>" - <% $option eq $curr_value ? 'SELECTED' : '' %> + <% ref($value) && $value->{$option} || $option eq $value + ? 'SELECTED' : '' + %> ><% $option %> % } @@ -25,6 +27,7 @@ my $onchange = $opt{'onchange'} ? 'onChange="'. $opt{'onchange'}. '(this)"' : ''; -my $curr_value = $opt{'curr_value'} || $opt{'value'}; +my $value = $opt{'curr_value'} || $opt{'value'}; +$value = [ split(/\s*,\s*/, $value) ] if $opt{'multiple'} && $value =~ /,/; </%init> |