<% include('elements/svc_Common.html',
'table' => 'svc_phone',
- 'fields' => [qw(
- countrycode
- phonenum
- sip_password
- pin
- phone_name
- )],
+ 'fields' => \@fields,
'labels' => {
'countrycode' => 'Country code',
'phonenum' => 'Phone number',
+ 'domain' => 'Domain',
+ 'pbx_title' => 'PBX',
'sip_password' => 'SIP password',
'pin' => 'PIN',
'phone_name' => 'Name',
%>
<%init>
+my $conf = new FS::Conf;
+
+my @fields = qw( countrycode phonenum );
+push @fields, 'domain' if $conf->exists('svc_phone-domain');
+push @fields, qw( pbx_title sip_password pin phone_name );
+
my $html_foot = sub {
my $svc_phone = shift;
'<TH CLASS="grid" BGCOLOR="#cccccc">Type</TH>'.
'<TH CLASS="grid" BGCOLOR="#cccccc">MAC Addr</TH>'.
'<TH CLASS="grid" BGCOLOR="#cccccc"></TH>'.
+ '<TH CLASS="grid" BGCOLOR="#cccccc"></TH>'.
'</TR>';
my $bgcolor1 = '#eeeeee';
my $bgcolor2 = '#ffffff';
my $td = qq(<TD CLASS="grid" BGCOLOR="$bgcolor">);
my $devicenum = $phone_device->devicenum;
+ my $export_links = join( '<BR>', @{ $phone_device->export_links } );
$devices .= '<TR>'.
$td. $phone_device->part_device->devicename. '</TD>'.
$td. $phone_device->mac_addr. '</TD>'.
+ $td. $export_links. '</TD>'.
"$td( ".
qq(<A HREF="${p}edit/phone_device.html?$devicenum">edit</A> | ).
qq(<A HREF="javascript:areyousure('${p}misc/delete-phone_device.html?$devicenum')">delete</A>).
# "View $_ CDRs</A>";
#} keys(%what);
my @links = map {
- qq(<A HREF="${p}search/cdr.html?cdrbatch=__ALL__;charged_party=$number;freesidestatus=$what{$_}">).
+ qq(<A HREF="${p}search/cdr.html?cdrbatchnum=__ALL__;charged_party=$number;freesidestatus=$what{$_}">).
"View $_ CDRs</A>";
} keys(%what);
- my @ilinks = ( qq(<A HREF="${p}search/cdr.html?cdrbatch=__ALL__;dst=$number">).
+ my @ilinks = ( qq(<A HREF="${p}search/cdr.html?cdrbatchnum=__ALL__;dst=$number">).
'View incoming CDRs</A>' );
###