X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_phone.cgi;h=323be63dc93ea36d3db9fae4dcfce16ee6e6be80;hb=bfa1e79d41fe82808c79d064a65633d828c0e0b3;hp=8bd4dba02ed8a6ed54062b84658fd3c6c4d88010;hpb=4a476092eda9c8e42292cc7bf01f5c73cf5abcd0;p=freeside.git diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi index 8bd4dba02..323be63dc 100644 --- a/httemplate/view/svc_phone.cgi +++ b/httemplate/view/svc_phone.cgi @@ -1,35 +1,121 @@ -<% include('elements/svc_Common.html', +<& elements/svc_Common.html, 'table' => 'svc_phone', - 'fields' => [qw( countrycode phonenum pin )], - 'labels' => { - 'countrycode' => 'Country code', - 'phonenum' => 'Phone number', - 'pin' => 'PIN', - }, + 'fields' => \@fields, + 'labels' => \%labels, 'html_foot' => $html_foot, - ) -%> +&> <%init> +my $conf = new FS::Conf; +my $countrydefault = $conf->config('countrydefault') || 'US'; + +my $fields = FS::svc_phone->table_info->{'fields'}; +my %labels = map { $_ => ( ref($fields->{$_}) + ? $fields->{$_}{'label'} + : $fields->{$_} + ); + } keys %$fields; + +my @fields = qw( countrycode phonenum ); +push @fields, 'domain' if $conf->exists('svc_phone-domain'); +push @fields, qw( pbx_title sip_password pin phone_name forwarddst email ); + +if ( $conf->exists('svc_phone-lnp') ) { +push @fields, 'lnp_status', + 'lnp_reject_reason', + { field => 'portable', type => 'checkbox', }, + 'lrn', + { field => 'lnp_desired_due_date', type => 'date', }, + { field => 'lnp_due_date', type => 'date', }, + 'lnp_other_provider', + 'lnp_other_provider_account'; +} + my $html_foot = sub { my $svc_phone = shift; + ### + # E911 Info + ### + + my $e911 = + emt('E911 Information'). + &ntable("#cccccc"). '