X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-did.html;h=a69450c2a43e1405ce4b02c92847fec2bed55906;hb=b431ece7b4a71aa5771f44393da582692f668817;hp=5256ae44de41b163d9592e83b5102b9e63b8d1c9;hpb=7934ac2de21debc15ce89405ed0f4c061c4f0236;p=freeside.git diff --git a/httemplate/elements/select-did.html b/httemplate/elements/select-did.html index 5256ae44d..a69450c2a 100644 --- a/httemplate/elements/select-did.html +++ b/httemplate/elements/select-did.html @@ -13,59 +13,56 @@ Example: % if ( $use_selector ) { -% if ( $export->exporttype eq 'vitelity' && -% ( $export->option('restrict_selection') eq 'non-tollfree' -% || !$export->option('restrict_selection')) ) { +% if ( $export->option('restrict_selection') eq 'non-tollfree' +% || !$export->option('restrict_selection') ) { - - - - - - - - - - -
+ <% include('/elements/select-state.html', 'prefix' => 'phonenum_', #$field.'_', 'country' => $country, + 'svcpart' => $svcpart, 'disable_empty' => 0, 'empty_label' => 'Select state', ) %> +
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-phonenum.html', - 'svcpart' => $svcpart, - 'empty' => 'Select phone number', - 'bulknum' => $bulknum, + 'svcpart' => $svcpart, + 'empty' => 'Select phone number', + 'bulknum' => $bulknum, + 'multiple' => $multiple, ) %> +
Phone number
StateArea codeCity / ExchangePhone number
% } -% if ( $export->exporttype eq 'vitelity' && -% ( $export->option('restrict_selection') eq 'tollfree' -% || !$export->option('restrict_selection')) ) { +% if ( $export->option('restrict_selection') eq 'tollfree' +% || !$export->option('restrict_selection') ) { Toll-free <% include('/elements/select-phonenum.html', 'svcpart' => $svcpart, @@ -101,7 +98,6 @@ Example: my %opt = @_; my $conf = new FS::Conf; -my $country = $conf->config('countrydefault') || 'US'; #false laziness w/tr-select-did.html #XXX make sure this comes through on errors too @@ -116,13 +112,17 @@ my @exports = $part_svc->part_export_did; if ( scalar(@exports) > 1 ) { die "more than one DID-providing export attached to svcpart $svcpart"; } +my $export = ''; +$export = $exports[0] if scalar(@exports); my $use_selector = scalar(@exports) ? 1 : 0; -my $export; -$export = $exports[0] if scalar(@exports); +my $bulknum = $opt{'bulknum'} || 0; #Bulk DID orders via ordering system, vs. +my $multiple = $opt{'multiple'} || 0; #just selecting a bunch at a time -my $bulknum = $opt{'bulknum'} || 0; +my $country = ( $export && $export->option('country') ) + || $conf->config('countrydefault') + || 'US'; #my $field = $opt{'field'} || 'phonenum';