1 <% include('tr-td-label.html', @_ ) %>
3 % if ( $use_selector && $opt{'curr_value'} ne '' && ! $can_edit ) {
5 <TD BGCOLOR="#dddddd" <% $cell_style %>><% $opt{'formatted_value'} || $opt{'curr_value'} || $opt{'value'} |h %></TD>
7 <% include('hidden.html', %opt ) %>
11 <TD <% $cell_style %>>
12 <% include('/elements/select-did.html', %opt ) %>
22 #warn Dumper(\%opt); if $DEBUG;
23 my $cell_style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
25 #false laziness w/select-did.html
26 #XXX make sure this comes through on errors too
27 my $svcpart = $opt{'svcpart'}
28 || $opt{'object'}->svcpart
29 || $opt{'object'}->cust_svc->svcpart;
31 my $part_svc = qsearchs('part_svc', { 'svcpart'=>$svcpart } );
32 die "unknown svcpart $svcpart" unless $part_svc;
34 my @exports = $part_svc->part_export_did;
35 if ( scalar(@exports) > 1 ) {
36 die "more than one DID-providing export attached to svcpart $svcpart";
39 my $use_selector = scalar(@exports) ? 1 : 0;
41 my $can_edit = scalar(@exports) && $exports[0]->get_dids_can_edit;