X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Felements%2Fselect-did.html;h=60cfcabbab4eebec8616c5f29c014cc7f96d6725;hb=110e4ab13ff3b0d7df2265a68e92170c59d76e61;hp=fe1e5d1639665b268e21ee7b552eabcb78335a8d;hpb=db3e520bad7240b3f6f0d53a2b55a64ef116890b;p=freeside.git diff --git a/httemplate/elements/select-did.html b/httemplate/elements/select-did.html index fe1e5d163..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' @@ -34,6 +74,7 @@ Example: NAME = "phonenum_which" VALUE = "phonenum" onChange = "phonenum_which_changed(this)" + onClick = "phonenum_which_changed(this)" <% $phonenum_checked %> > Inventory @@ -80,18 +121,18 @@ Example: % # if/when other folks need an areacode-less DID selector that goes % # directly from state to region -