% include('tr-td-label.html', @_ ) %>
% if ( $use_selector && $opt{'curr_value'} ne '' && ! $can_edit ) {
><% $opt{'formatted_value'} || $opt{'curr_value'} || $opt{'value'} |h %> |
<% include('hidden.html', %opt ) %>
% } else {
>
<% include('/elements/select-did.html', %opt ) %>
|
% }
<%init>
my %opt = @_;
#warn Dumper(\%opt); if $DEBUG;
my $cell_style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
#false laziness w/select-did.html
#XXX make sure this comes through on errors too
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;
my @exports = $part_svc->part_export_did;
if ( scalar(@exports) > 1 ) {
die "more than one DID-providing export attached to svcpart $svcpart";
}
my $use_selector = scalar(@exports) ? 1 : 0;
my $can_edit = scalar(@exports) && $exports[0]->get_dids_can_edit;
%init>