X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-did.html;h=dd2e8e531fcee6ee47f11b4453d192857f012c29;hb=5f52339b62764ad59fa3e010fad8979dfc3d66ce;hp=062c98a80191044b2e53eeb12d04343a0dd79eb5;hpb=46e04077cc22ff9d31e8e9896cbf97e31f1b0e7d;p=freeside.git
diff --git a/httemplate/elements/select-did.html b/httemplate/elements/select-did.html
index 062c98a80..dd2e8e531 100644
--- a/httemplate/elements/select-did.html
+++ b/httemplate/elements/select-did.html
@@ -13,6 +13,8 @@ Example:
%doc>
% if ( $use_selector ) {
+% if ( $export->option('restrict_selection') eq 'non-tollfree'
+% || !$export->option('restrict_selection') ) {
@@ -58,6 +60,21 @@ Example:
+
+% }
+% if ( $export->option('restrict_selection') eq 'tollfree'
+% || !$export->option('restrict_selection') ) {
+ Toll-free
+ <% include('/elements/select-phonenum.html',
+ 'svcpart' => $svcpart,
+ 'empty' => 'Select phone number',
+ 'tollfree' => 1,
+ 'prefix' => 'tollfree',
+ 'bulknum' => 0,
+ )
+ %>
+% }
+
% if ( $bulknum ) {
% my $i;
@@ -82,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
@@ -100,8 +116,15 @@ if ( scalar(@exports) > 1 ) {
my $use_selector = scalar(@exports) ? 1 : 0;
+my $export;
+$export = $exports[0] if scalar(@exports);
+
my $bulknum = $opt{'bulknum'} || 0;
+my $country = $export->option('country') ||
+ $conf->config('countrydefault') ||
+ 'US';
+
#my $field = $opt{'field'} || 'phonenum';
%init>