5 include('/elements/select-did.html',
6 #can't actuall change from phonenum yet# 'field' => 'phonenum',
10 'object' => $svc_phone,
14 % if ( $use_selector ) {
16 % if ( $export->exporttype eq 'vitelity' &&
17 % ( $export->option('restrict_selection') eq 'non-tollfree'
18 % || !$export->option('restrict_selection')) ) {
23 <% include('/elements/select-state.html',
24 'prefix' => 'phonenum_', #$field.'_',
25 'country' => $country,
27 'empty_label' => 'Select state',
32 <% include('/elements/select-areacode.html',
33 'state_prefix' => 'phonenum_', #$field.'_',
34 'svcpart' => $svcpart,
35 'empty' => 'Select area code',
40 <% include('/elements/select-exchange.html',
41 'svcpart' => $svcpart,
42 'empty' => 'Select exchange',
47 <% include('/elements/select-phonenum.html',
48 'svcpart' => $svcpart,
49 'empty' => 'Select phone number',
50 'bulknum' => $bulknum,
57 <TD><FONT SIZE="-1">State</FONT></TD>
58 <TD><FONT SIZE="-1">Area code</FONT></TD>
59 <TD><FONT SIZE="-1">City / Exchange</FONT></TD>
60 <TD><FONT SIZE="-1">Phone number</FONT></TD>
66 % if ( $export->exporttype eq 'vitelity' &&
67 % ( $export->option('restrict_selection') eq 'tollfree'
68 % || !$export->option('restrict_selection')) ) {
69 <font size="-1">Toll-free</font>
70 <% include('/elements/select-phonenum.html',
71 'svcpart' => $svcpart,
72 'empty' => 'Select phone number',
74 'prefix' => 'tollfree',
81 <div id="bulkdid" style="padding-top: 11px">
83 % for($i=0; $i < $bulknum; $i++) {
84 <div id="bulkdid_<%$i%>" style="display: none">
85 <input type="checkbox" id="checkbox_bulkdid_<%$i%>"
86 name="bulkdid" value="">
87 <label for="checkbox_bulkdid_<%$i%>"
88 id="label_bulkdid_<%$i%>"></label>
96 <% include( '/elements/input-text.html', %opt, 'type'=>'text' ) %>
103 my $conf = new FS::Conf;
104 my $country = $conf->config('countrydefault') || 'US';
106 #false laziness w/tr-select-did.html
107 #XXX make sure this comes through on errors too
108 my $svcpart = $opt{'svcpart'}
109 || $opt{'object'}->svcpart
110 || $opt{'object'}->cust_svc->svcpart;
112 my $part_svc = qsearchs('part_svc', { 'svcpart'=>$svcpart } );
113 die "unknown svcpart $svcpart" unless $part_svc;
115 my @exports = $part_svc->part_export_did;
116 if ( scalar(@exports) > 1 ) {
117 die "more than one DID-providing export attached to svcpart $svcpart";
120 my $use_selector = scalar(@exports) ? 1 : 0;
123 $export = $exports[0] if scalar(@exports);
125 my $bulknum = $opt{'bulknum'} || 0;
127 #my $field = $opt{'field'} || 'phonenum';