X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-did.html;h=8e981fde147b777b7108c37beb2043c86ae27309;hb=9f2280fbce022ab9bcfc46fe94483730b0aeb0f8;hp=af8d59513e4d608144fbed5983b287e6c5a1e989;hpb=33d0ac01c47763fdc394c2b477c7e8aadbbe4156;p=freeside.git diff --git a/httemplate/elements/select-did.html b/httemplate/elements/select-did.html index af8d59513..8e981fde1 100644 --- a/httemplate/elements/select-did.html +++ b/httemplate/elements/select-did.html @@ -3,7 +3,7 @@ Example: include('/elements/select-did.html', - 'field' => 'phonenum', + #can't actuall change from phonenum yet# 'field' => 'phonenum', 'svcpart' => 5, #OR @@ -13,11 +13,14 @@ Example: % if ( $use_selector ) { +% if ( $export->option('restrict_selection') eq 'non-tollfree' +% || !$export->option('restrict_selection') ) { @@ -42,6 +46,7 @@ Example: <% include('/elements/select-phonenum.html', 'svcpart' => $svcpart, 'empty' => 'Select phone number', + 'bulknum' => $bulknum, ) %> @@ -56,6 +61,34 @@ Example:
<% include('/elements/select-state.html', + 'prefix' => 'phonenum_', #$field.'_', 'country' => $country, 'disable_empty' => 0, 'empty_label' => 'Select state', @@ -26,8 +29,9 @@ Example: <% include('/elements/select-areacode.html', - 'svcpart' => $svcpart, - 'empty' => 'Select area code', + 'state_prefix' => 'phonenum_', #$field.'_', + 'svcpart' => $svcpart, + 'empty' => 'Select area code', ) %>
+% } +% 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; +% for($i=0; $i < $bulknum; $i++) { + +% } +
+% } + % } else { <% include( '/elements/input-text.html', %opt, 'type'=>'text' ) %> @@ -66,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 @@ -81,7 +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 $bulknum = $opt{'bulknum'} || 0; + +my $country = ( $export && $export->option('country') ) + || $conf->config('countrydefault') + || 'US'; + +#my $field = $opt{'field'} || 'phonenum'; +