automatic package changes for supplemental packages, #37102
[freeside.git] / httemplate / view / cust_main / packages / package.html
index 4b56e6f..8aa6403 100644 (file)
@@ -1,7 +1,6 @@
-<TD CLASS="inv package" BGCOLOR="<% $bgcolor %>" VALIGN="top" <%$style%>>
+<TD CLASS="inv package" BGCOLOR="<% $bgcolor %>" VALIGN="top">
+  <% join('', @marker ) %>
   <TABLE CLASS="inv package"> 
-
-
     <TR>
       <TD COLSPAN=2>
         <% $opt{before_pkg_callback}
 %              ) {
               (&nbsp;<%pkg_event_link($cust_pkg)%>&nbsp;)
 %           }
-%         } #!$supplemental
+%         } # a canceled recurring package, or else no_links is in effect
 
         </FONT>
       </TD>
   </TABLE>
 % }
 
+  <% join('', map '</DIV>', @marker ) %>
 </TD>
 
 <%init>
@@ -317,16 +317,12 @@ my $statedefault   = $opt{'statedefault'}
 # if this package is somehow special
 my $supplemental = $opt{'supplemental'} || 0;
 my $change_from = $opt{'change_from'} || 0;
-my $style = '';
-if ( $supplemental or $change_from ) {
-  $style = 'border-left-width: '.($supplemental + $change_from)*30 . 'px; '.
-           'border-color: ';
-  if ( $supplemental ) {
-    $style .= '#bbbbff';
-  } elsif ( $change_from ) {
-    $style .= '#bbffbb';
-  }
-  $style = qq!STYLE="$style"!;
+my @marker;
+if ( $supplemental ) {
+  push @marker, '<DIV CLASS="package-marker-supplemental">';
+}
+if ( $change_from ) {
+  push @marker, '<DIV CLASS="package-marker-change_from">';
 }
 
 $cust_pkg->pkgnum =~ /^(\d+)$/;