2 my( $cust_fields, %opt ) = @_;
4 my @fields = FS::ConfDefaults->cust_fields_avail();
5 my $contact_phone_list;
6 foreach my $phone_type ( FS::phone_type->get_phone_types() ) {
7 $contact_phone_list .= " | Contact ".$phone_type->typename." phone(s)";
9 @fields = map {s/ \| Contact phone\(s\)/$contact_phone_list/g; $_; } @fields;
11 $opt{'avail_fields'} ||= [ @fields ];
13 tie my %hash, 'Tie::IxHash', @{ $opt{'avail_fields'} };
16 <SELECT NAME="cust_fields">
18 <OPTION VALUE="">(configured default)
20 % foreach my $value ( keys %hash ) {
21 <OPTION VALUE="<% $value %>"><% $hash{$value} %>