X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-did.html;h=8e981fde147b777b7108c37beb2043c86ae27309;hb=849a709d89e78bec1ab19997b75de1b574969f1f;hp=546d90e8d78f35854454600a12d2e4252ea9d4cf;hpb=1e1d4445682c0e69781654ea7f2851d861031e9f;p=freeside.git diff --git a/httemplate/elements/select-did.html b/httemplate/elements/select-did.html index 546d90e8d..8e981fde1 100644 --- a/httemplate/elements/select-did.html +++ b/httemplate/elements/select-did.html @@ -13,6 +13,8 @@ Example: % if ( $use_selector ) { +% if ( $export->option('restrict_selection') eq 'non-tollfree' +% || !$export->option('restrict_selection') ) { @@ -59,8 +61,10 @@ Example:
-% if ( $tollfree ) { - or toll-free +% } +% if ( $export->option('restrict_selection') eq 'tollfree' +% || !$export->option('restrict_selection') ) { + Toll-free <% include('/elements/select-phonenum.html', 'svcpart' => $svcpart, 'empty' => 'Select phone number', @@ -95,7 +99,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 @@ -110,14 +113,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 $tollfree = 0; -$tollfree = 1 if (scalar(@exports) && $exports[0]->exporttype eq 'vitelity'); - my $bulknum = $opt{'bulknum'} || 0; +my $country = ( $export && $export->option('country') ) + || $conf->config('countrydefault') + || 'US'; + #my $field = $opt{'field'} || 'phonenum';