Optimize "Customer has a referring customer" condition, RT#74452
[freeside.git] / httemplate / elements / tr-td-label.html
index 77c0484..80dddaa 100644 (file)
@@ -1,10 +1,18 @@
-<TR>
+<%doc>
 
-  <TD ALIGN="right" VALIGN="top" STYLE="<% $style %>" ID="<% $opt{label_id} || $opt{id}. '_label0' %>">
+Actually <TR> <TH> $label </TH>
 
-    <% $opt{label} %>
+Note that this puts the 'label' argument into the document verbatim, with no
+escaping or localization.
 
-  </TD>
+</%doc>
+<TR id="<% $opt{'id'} %>_row" <% $row_style %>>
+
+  <TH ALIGN  = "right"
+      VALIGN = "<% $opt{'valign'} || 'top' %>"
+      STYLE  = "<% $style %>"
+      ID     = "<% $opt{label_id} || $opt{id}. '_label0' %>"
+  ><% $required %><% $opt{label} %></TH>
 
 <%init>
 
@@ -14,4 +22,8 @@ my $style = 'padding-top: 3px';
 $style .= '; '. $opt{'cell_style'}
   if $opt{'cell_style'};
 
+my $row_style = 'style="visibility:collapse;"' if $opt{'hide_onload'};
+
+my $required = $opt{'required'} ? '<font color="#ff0000">*</font>&nbsp;' : '';
+
 </%init>