summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-cust-fields.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2019-07-26 11:14:05 -0700
committerIvan Kohler <ivan@freeside.biz>2019-07-26 11:14:05 -0700
commit07ed221540128b8c75f4cb5a2af1e01b25fa8e18 (patch)
treeaeec9af09cc1b47752bdf4bc636ff1b64f41310c /httemplate/elements/select-cust-fields.html
parent14f234a943f1e4b5bbc6fe90254b8f5ca677f028 (diff)
parent2009d9cee8038aeff5b4313113fc23f546455cf5 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/elements/select-cust-fields.html')
-rw-r--r--httemplate/elements/select-cust-fields.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/httemplate/elements/select-cust-fields.html b/httemplate/elements/select-cust-fields.html
index 5e3063877..833f7c1af 100644
--- a/httemplate/elements/select-cust-fields.html
+++ b/httemplate/elements/select-cust-fields.html
@@ -1,8 +1,14 @@
<%init>
my( $cust_fields, %opt ) = @_;
- use FS::ConfDefaults;
- $opt{'avail_fields'} ||= [ FS::ConfDefaults->cust_fields_avail() ];
+ 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>