blob: 7396808b1b0cf6e45d654d4203a4e82f3b205022 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<%init>
my( $cust_fields, %opt ) = @_;
my @fields = FS::ConfDefaults->cust_fields_avail();
my $contact_phone_list;
foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
$contact_phone_list .= " | Contact ".$phone_type->typename." phone(s)";
}
@fields = map {s/\| Contact phone\(s\)/$contact_phone_list/g; $_; } @fields;
$opt{'avail_fields'} ||= [ @fields ];
tie my %hash, 'Tie::IxHash', @{ $opt{'avail_fields'} };
</%init>
<SELECT NAME="cust_fields">
<OPTION VALUE="">(configured default)
% foreach my $value ( keys %hash ) {
<OPTION VALUE="<% $value %>"><% $hash{$value} %>
% }
</SELECT>
|