diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2015-10-13 10:10:40 -0700 | 
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2015-10-13 10:10:40 -0700 | 
| commit | 2b2dd969f3c18751afc583ad1e836ab8e6f73b5d (patch) | |
| tree | 72ad19092f9d3a5118add9a55067b8a97c168f46 /httemplate/edit/part_pkg.cgi | |
| parent | d31d59c63c8f4dfd52ca19a02ffcf32fcf49f497 (diff) | |
| parent | cd468ecb9a321ca96254b7204f6dc193b11cd903 (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/edit/part_pkg.cgi')
| -rwxr-xr-x | httemplate/edit/part_pkg.cgi | 23 | 
1 files changed, 15 insertions, 8 deletions
| diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 9f5510d65..570c5ac75 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -989,9 +989,13 @@ my $html_bottom = sub {     #$html .= '</SELECT></TD></TR>';      my $href = $plans{$layer}->{'fields'}; -    my @fields = exists($plans{$layer}->{'fieldorder'}) -                   ? @{$plans{$layer}->{'fieldorder'}} -                   : keys %{ $href }; +    my @fields; +    if ( $plans{$layer}->{'fieldorder'} ) { +      @fields = @{ $plans{$layer}->{'fieldorder'} }; +    } else { +      warn "FS::part_pkg::$layer has no fieldorder.\n"; +      @fields = keys %$href; +    }      # hash of dependencies for each of the Pricing Plan fields.      # make sure NOT to use double-quotes inside the 'msg' value. @@ -1015,7 +1019,7 @@ my $html_bottom = sub {              }          }      }; -     +      foreach my $field ( grep $_ !~ /^(setup|recur)_fee$/, @fields ) {        if(!exists($href->{$field})) { @@ -1029,7 +1033,8 @@ my $html_bottom = sub {          next if !$display;        } -      $html .= '<TR><TD ALIGN="right">'. $href->{$field}{'name'}. '</TD><TD>'; +      $html .= '<TR><TD ALIGN="right">'. $href->{$field}{'name'}. '</TD><TD> +      ';        my $format = sub { shift };        $format = $href->{$field}{'format'} if exists($href->{$field}{'format'}); @@ -1128,9 +1133,11 @@ my $html_bottom = sub {        $html .= '</TD></TR>';      }      $html .= '</TABLE>'; -   -    $html .= qq(<INPUT TYPE="hidden" NAME="${layer}__OPTIONS" VALUE="). -             join(',', keys %{ $href } ). '">'; +  +    $html .= include('/elements/hidden.html', +                field => $layer.'__OPTIONS', +                value => join(',', @fields) +             );      $html; | 
