%doc> Example: include('/elements/select-did.html', #can't actuall change from phonenum yet# 'field' => 'phonenum', 'svcpart' => 5, #OR 'object' => $svc_phone, ); %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' % || !$export->option('restrict_selection') ) {
> Inventory | % } % if ( $export->get_dids_npa_select ) {
<% include('/elements/select-state.html',
'prefix' => 'phonenum_', #$field.'_',
'country' => $country,
'svcpart' => $svcpart,
'disable_empty' => 0,
'empty_label' => 'Select state',
'disabled' => ( $manual_checked ? 1 : 0 ),
)
%>
>State |
<% include('/elements/select-areacode.html',
'state_prefix' => 'phonenum_', #$field.'_',
'svcpart' => $svcpart,
'empty' => 'Select area code',
)
%>
>Area code |
<% include('/elements/select-exchange.html',
'svcpart' => $svcpart,
'empty' => 'Select exchange',
)
%>
>City / Exchange |
% } else {
%
% #this code path currently only being used by fibernetics
% # should change "Province" label to "State" or make it configurable
% # if/when other folks need an areacode-less DID selector that goes
% # directly from state to region
<% include('/elements/select.html',
'field' => 'phonenum_state',
'id' => 'phonenum_state',
'options' => [ '', @{ $export->get_dids } ],
'labels' => { '' => 'Select province' },
'onchange' => 'phonenum_state_changed(this);',
'disabled' => ( $manual_checked ? 1 : 0 ),
)
%>
>Province |
<% include('/elements/select-region.html',
'state_prefix' => 'phonenum_', #$field.'_',
'svcpart' => $svcpart,
'empty' => 'Select region',
)
%>
>Region |
% }
<% include('/elements/select-phonenum.html',
'svcpart' => $svcpart,
'empty' => 'Select phone number',
'bulknum' => $bulknum,
'multiple' => $multiple,
'region' => ! $export->get_dids_npa_select,
)
%>
>Phone number |
> Manual entry | <& /elements/input-text.html, %opt, field => 'phonenum_manual', id => 'phonenum_manual', type => 'text', disabled => ( $phonenum_checked ? 1 : 0 ), &> |