#$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.
}
},
'unused_credit_cancel' => {
- 'msg' => q|You must set the 'suspend_credit_type' option in Configuration->Settings to gain access to this option.|,
+ 'msg' => q|You must set the 'cancel_credit_type' option in Configuration->Settings to gain access to this option.|,
'are_met' => sub{
my $conf = new FS::conf;
my @conf_info = qsearch('conf', { 'name' => 'cancel_credit_type' } );
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'});
$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;