blob: 833f7c1afda303b1be1a35d159d5808383a16fbd (
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 ( FS::phone_type->get_phone_types() ) {
    $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>
 |