X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-did.html;h=60cfcabbab4eebec8616c5f29c014cc7f96d6725;hb=44158be319024c0f55be4a2f72f79c6c73dc9c54;hp=6e205d8ffd2686aec8c52b32fece19cc736a7e78;hpb=06fb1346ff8076a84f743fa07de31852942e144f;p=freeside.git diff --git a/httemplate/elements/select-did.html b/httemplate/elements/select-did.html index 6e205d8ff..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' @@ -18,6 +58,28 @@ Example:
+ + > Inventory + | +% } + % if ( $export->get_dids_npa_select ) {
@@ -27,9 +89,10 @@ Example:
'svcpart' => $svcpart,
'disable_empty' => 0,
'empty_label' => 'Select state',
+ 'disabled' => ( $manual_checked ? 1 : 0 ),
)
%>
- State + >State |
@@ -39,31 +102,37 @@ Example:
'empty' => 'Select area code',
)
%>
- Area code + >Area code |
<% include('/elements/select-exchange.html',
- 'svcpart' => $svcpart,
- 'empty' => 'Select exchange',
+ 'svcpart' => $svcpart,
+ 'empty' => 'Select exchange',
)
%>
- City / 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);',
- )
- %>
- Province - |
+
+ <% 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',
@@ -72,7 +141,7 @@ Example:
'empty' => 'Select region',
)
%>
- Region + >Region |
% }
@@ -86,10 +155,132 @@ Example:
'region' => ! $export->get_dids_npa_select,
)
%>
-
+ + > Manual entry + | + ++ <& /elements/input-text.html, + %opt, + field => 'phonenum_manual', + id => 'phonenum_manual', + type => 'text', + disabled => ( $phonenum_checked ? 1 : 0 ), + &> + | +