X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-did.html;h=af8d59513e4d608144fbed5983b287e6c5a1e989;hb=9d77a21db3642ca66d9a0e545b804b7e6b4090ee;hp=999274feae905c4711ba544396717ab8f74300dd;hpb=9c7dee35f91a386fcce14cb6c3e9d23ba3eee8af;p=freeside.git diff --git a/httemplate/elements/select-did.html b/httemplate/elements/select-did.html index 999274fea..af8d59513 100644 --- a/httemplate/elements/select-did.html +++ b/httemplate/elements/select-did.html @@ -4,7 +4,10 @@ Example: include('/elements/select-did.html', 'field' => 'phonenum', + 'svcpart' => 5, + #OR + 'object' => $svc_phone, ); @@ -15,8 +18,9 @@ Example: <% include('/elements/select-state.html', - 'country' => $country, - 'empty' => 'Select state', + 'country' => $country, + 'disable_empty' => 0, + 'empty_label' => 'Select state', ) %> @@ -64,8 +68,11 @@ 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 -my $svcpart = $opt{'object'}->svcpart; +my $svcpart = $opt{'svcpart'} + || $opt{'object'}->svcpart + || $opt{'object'}->cust_svc->svcpart; my $part_svc = qsearchs('part_svc', { 'svcpart'=>$svcpart } ); die "unknown svcpart $svcpart" unless $part_svc;