X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-part_referral.html;h=35c5b8047d00448caf18f4337cd9331a535673c1;hp=0108388bc36a1f9a11d3dd4c6e1aaec1ae3e36f8;hb=3ce7691203a7737406bf2d4442f7fd84b81f847e;hpb=15e561850b61b10a92a46d8f3e316d53d4970087 diff --git a/httemplate/elements/tr-select-part_referral.html b/httemplate/elements/tr-select-part_referral.html index 0108388bc..35c5b8047 100644 --- a/httemplate/elements/tr-select-part_referral.html +++ b/httemplate/elements/tr-select-part_referral.html @@ -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!* !; +% +% +% 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!* !; + +% } 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 ) { -%> - - - -<% } else { %> - <%=$r%>Advertising source + <%$r%>Advertising source - <%= include( '/elements/select-part_referral.html', $refnum, + <% include( '/elements/select-part_referral.html', $refnum, 'part_referrals' => $opt{'part_referrals'}, ) %> +% } -<% } %>