Will things ever be the same again?
[freeside.git] / httemplate / elements / tr-select-part_referral.html
index 0108388..35c5b80 100644 (file)
@@ -1,30 +1,30 @@
-<%
-  my( $refnum, %opt ) = @_;
+%
+%  my( $refnum, %opt ) = @_;
+%
+%  $opt{'part_referrals'} ||=
+%    [ FS::part_referral->all_part_referral( 1 ) ]; #1: include global
+%
+%  my $r = qq!<font color="#ff0000">*</font>&nbsp;!;
+%
+%
+% if ( scalar( @{$opt{'part_referrals'}} ) == 0 ) {
+%     eidiot "You have not created any advertising sources.  You must create at least one advertising source before adding a customer.  Go to ". popurl(2). "browse/part_referral.html and create one or more advertising sources.";
+%   } elsif ( scalar( @{$opt{'part_referrals'}} ) == 1 ) {
+%
 
-  $opt{'part_referrals'} ||=
-    [ FS::part_referral->all_part_referral( 1 ) ]; #1: include global
 
-  my $r = qq!<font color="#ff0000">*</font>&nbsp;!;
+     <INPUT TYPE="hidden" NAME="refnum" VALUE="<% $opt{'part_referrals'}->[0]->refnum %>">
+% } else { 
 
-%>
-
-<% if ( scalar( @{$opt{'part_referrals'}} ) == 0 ) {
-     eidiot "You have not created any advertising sources.  You must create at least one advertising source before adding a customer.  Go to ". popurl(2). "browse/part_referral.html and create one or more advertising sources.";
-   } elsif ( scalar( @{$opt{'part_referrals'}} ) == 1 ) {
-%>
-
-     <INPUT TYPE="hidden" NAME="refnum" VALUE="<%= $opt{'part_referrals'}->[0]->refnum %>">
-
-<% } else { %>
 
      <TR>
-       <TH ALIGN="right"><%=$r%>Advertising source</TH>
+       <TH ALIGN="right"><%$r%>Advertising source</TH>
        <TD>
-         <%= include( '/elements/select-part_referral.html', $refnum,
+         <% include( '/elements/select-part_referral.html', $refnum,
                         'part_referrals' => $opt{'part_referrals'},
                     )
          %>
        </TD>
      </TR>
+% } 
 
-<% } %>