X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Felements%2Fselect-did.html;h=60cfcabbab4eebec8616c5f29c014cc7f96d6725;hb=110e4ab13ff3b0d7df2265a68e92170c59d76e61;hp=c396031567d335f07dd853c0605e9e304d6d7a1e;hpb=54a357b171aa44f9399b4c146acd2afd3b686075;p=freeside.git diff --git a/httemplate/elements/select-did.html b/httemplate/elements/select-did.html index c39603156..60cfcabba 100644 --- a/httemplate/elements/select-did.html +++ b/httemplate/elements/select-did.html @@ -11,6 +11,46 @@ Example: ); %doc> +% if ( $conf->exists('svc_phone-lnp') ) { #ask exports if they can_lnp instead? + <& /elements/selectlayers.html, + 'field' => 'lnp_status', + 'curr_value' => $opt{'lnp_status'}, + 'options' => [ '', 'portingin', 'native', 'portedin', 'portingout', + 'portin-reject', 'portout-reject', + ], + 'labels' => { '' => 'Select new number', + 'portingin' => 'Port an existing number', + 'native' => 'Native', + 'portedin' => 'Ported In', + 'portingout' => 'Porting Out', + 'portin-reject' => 'Port-In Reject', + 'portout-reject' => 'Port-Out Reject', + }, + 'layer_callback' => sub { + my( $layer, $layer_fields, $layer_values, $layer_prefix ) = @_; + if ( $layer eq 'portingin' ) { + $m->scomp('/elements/input-text.html', %opt, 'type'=>'text' ); + } elsif ( $layer ne '' ) { + $m->scomp('/elements/hidden.html', %opt). + $m->scomp('/elements/phonenumber.html', $opt{'curr_value'}, 'callable' => 1); + } else { + $m->scomp('/elements/select-did.html:not_porting', %opt); + } + }, + &> + + +% } else { + <& /elements/select-did.html:not_porting, %opt &> +% } +<%init> + +my %opt = @_; + +my $conf = new FS::Conf; + +%init> +<%method not_porting> % if ( $use_selector ) { % if ( $export->option('restrict_selection') eq 'non-tollfree' @@ -81,18 +121,18 @@ Example: % # if/when other folks need an areacode-less DID selector that goes % # directly from state to region -