X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fselect-did.html;h=8a91d7a6131b10475a7a9374b455ee73bd250e05;hp=a69450c2a43e1405ce4b02c92847fec2bed55906;hb=f2ee4eec34fea420c1c434194e410f31b6c9edb0;hpb=424ae31847c4fd44e6ed55ec275c8e668c7d2b51 diff --git a/httemplate/elements/select-did.html b/httemplate/elements/select-did.html index a69450c2a..8a91d7a61 100644 --- a/httemplate/elements/select-did.html +++ b/httemplate/elements/select-did.html @@ -16,8 +16,32 @@ Example: % if ( $export->option('restrict_selection') eq 'non-tollfree' % || !$export->option('restrict_selection') ) { - + +% my( $phonenum_checked, $manual_checked ) = ( '', '' ); +% if ( $export->get_dids_can_manual ) { +% #not 100% perfect UI on error handling, but it'll do +% if ( $opt{'curr_value'} ) { +% $phonenum_checked = ''; +% $manual_checked = 'CHECKED'; +% } else { +% $phonenum_checked = 'CHECKED'; +% $manual_checked = ''; +% } + + +% } + +% if ( $export->get_dids_npa_select ) { + - - + + + + + +% } 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 + + + + + +% } + + +% if ( $export->get_dids_can_manual ) { + + + + + + + + + +% } +
+ + > Inventory + <% include('/elements/select-state.html', 'prefix' => 'phonenum_', #$field.'_', @@ -25,44 +49,206 @@ Example: '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 +
>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 +
+ <% 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 +
>Phone number
+ + > Manual entry + + <& /elements/input-text.html, + %opt, + field => 'phonenum_manual', + id => 'phonenum_manual', + type => 'text', + disabled => ( $phonenum_checked ? 1 : 0 ), + &> +
% } -% if ( $export->option('restrict_selection') eq 'tollfree' -% || !$export->option('restrict_selection') ) { +% if ( ( $export->option('restrict_selection') eq 'tollfree' +% || !$export->option('restrict_selection') +% ) +% and $export->get_dids_can_tollfree +% ) { Toll-free <% include('/elements/select-phonenum.html', 'svcpart' => $svcpart,