default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / elements / tr-select-cust-fields.html
1 <TR>
2   <TH ALIGN="right"><% $opt{'label'} || mt('Customer fields') |h %></TH>
3   <TD><& /elements/select-cust-fields.html, $cust_fields, %opt &></TD>
4 </TR>
5 <%init>
6
7 my( $cust_fields, %opt ) = @_;
8
9 my @fields = FS::ConfDefaults->cust_fields_avail();
10 my $contact_phone_list;
11 foreach my $phone_type ( FS::phone_type->get_phone_types() ) {
12   $contact_phone_list .= " | Contact ".$phone_type->typename." phone(s)";
13 }
14 @fields = map {s/ \| Contact phone\(s\)/$contact_phone_list/g; $_; } @fields;
15
16 $opt{'avail_fields'} ||= [ @fields ];
17
18 </%init>