diff options
| -rw-r--r-- | httemplate/elements/select-cust_main-status.html | 7 | ||||
| -rw-r--r-- | httemplate/elements/select-cust_pkg-status.html | 7 | 
2 files changed, 10 insertions, 4 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> diff --git a/httemplate/elements/select-cust_pkg-status.html b/httemplate/elements/select-cust_pkg-status.html index 2d545c047..ec37eaf67 100644 --- a/httemplate/elements/select-cust_pkg-status.html +++ b/httemplate/elements/select-cust_pkg-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> | 
