X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_phone.cgi;h=ed95c4cea8e4994d6d97d6e3c8bd21408c923820;hb=54a357b171aa44f9399b4c146acd2afd3b686075;hp=f604daa479390fc7f816a242cb1b11ec2183d163;hpb=668066581971a221b4915a3234ac37964ae43291;p=freeside.git diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi index f604daa47..ed95c4cea 100644 --- a/httemplate/view/svc_phone.cgi +++ b/httemplate/view/svc_phone.cgi @@ -1,51 +1,130 @@ -<% include('elements/svc_Common.html', +<& elements/svc_Common.html, 'table' => 'svc_phone', - 'fields' => [qw( - countrycode - phonenum - sip_password - pin - phone_name - )], - 'labels' => { - 'countrycode' => 'Country code', - 'phonenum' => 'Phone number', - 'sip_password' => 'SIP password', - 'pin' => 'PIN', - 'phone_name' => 'Name', - }, + '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 sim_imsi ); +push @fields, 'domain' if $conf->exists('svc_phone-domain'); +push @fields, qw( pbx_title ); + +if ( $conf->exists('showpasswords') ) { + push @fields, qw( sip_password ); +} else { + push @fields, { 'field' => 'sip_password', #'_HIDDEN_sip_password', + 'type' => 'fixed', + 'value' => '('. mt('hidden') .')', + }; +} + +push @fields, qw( 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"). '