5 include('/elements/select-did.html',
6 #can't actuall change from phonenum yet# 'field' => 'phonenum',
10 'object' => $svc_phone,
14 % if ( $use_selector ) {
20 <% include('/elements/select-state.html',
21 'prefix' => 'phonenum_', #$field.'_',
22 'country' => $country,
24 'empty_label' => 'Select state',
29 <% include('/elements/select-areacode.html',
30 'state_prefix' => 'phonenum_', #$field.'_',
31 'svcpart' => $svcpart,
32 'empty' => 'Select area code',
37 <% include('/elements/select-exchange.html',
38 'svcpart' => $svcpart,
39 'empty' => 'Select exchange',
44 <% include('/elements/select-phonenum.html',
45 'svcpart' => $svcpart,
46 'empty' => 'Select phone number',
47 'bulknum' => $bulknum,
54 <TD><FONT SIZE="-1">State</FONT></TD>
55 <TD><FONT SIZE="-1">Area code</FONT></TD>
56 <TD><FONT SIZE="-1">City / Exchange</FONT></TD>
57 <TD><FONT SIZE="-1">Phone number</FONT></TD>
64 <% include('/elements/select-phonenum.html',
65 'svcpart' => $svcpart,
66 'empty' => 'Select phone number',
68 'prefix' => 'tollfree',
75 <div id="bulkdid" style="padding-top: 11px">
77 % for($i=0; $i < $bulknum; $i++) {
78 <div id="bulkdid_<%$i%>" style="display: none">
79 <input type="checkbox" id="checkbox_bulkdid_<%$i%>"
80 name="bulkdid" value="">
81 <label for="checkbox_bulkdid_<%$i%>"
82 id="label_bulkdid_<%$i%>"></label>
90 <% include( '/elements/input-text.html', %opt, 'type'=>'text' ) %>
97 my $conf = new FS::Conf;
98 my $country = $conf->config('countrydefault') || 'US';
100 #false laziness w/tr-select-did.html
101 #XXX make sure this comes through on errors too
102 my $svcpart = $opt{'svcpart'}
103 || $opt{'object'}->svcpart
104 || $opt{'object'}->cust_svc->svcpart;
106 my $part_svc = qsearchs('part_svc', { 'svcpart'=>$svcpart } );
107 die "unknown svcpart $svcpart" unless $part_svc;
109 my @exports = $part_svc->part_export_did;
110 if ( scalar(@exports) > 1 ) {
111 die "more than one DID-providing export attached to svcpart $svcpart";
114 my $use_selector = scalar(@exports) ? 1 : 0;
117 $tollfree = 1 if (scalar(@exports) && $exports[0]->exporttype eq 'vitelity');
119 my $bulknum = $opt{'bulknum'} || 0;
121 #my $field = $opt{'field'} || 'phonenum';