X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-part_referral.html;h=5041f7f73f9a3ebd89786063333298c19552637c;hp=cd26c254db2f60ca83e1c2212548b313340d366f;hb=833cfe5c9938d33c3e6b97ed610c25a7afa6eb04;hpb=9509e5bfb7f9331303153cac24d7bfecbe2ea9f1 diff --git a/httemplate/elements/tr-select-part_referral.html b/httemplate/elements/tr-select-part_referral.html index cd26c254d..5041f7f73 100644 --- a/httemplate/elements/tr-select-part_referral.html +++ b/httemplate/elements/tr-select-part_referral.html @@ -1,23 +1,25 @@ % 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."; +

+ <% mt('At least one advertising source must be created prior to adding a customer, but none have been created.') |h %> + +% #hack +% my $createlink = qq!!; +% my $createlabel = emt("To create one, see [_1]advertising source listing","XXXLINKXXX").''; +% $createlabel =~ s/XXXLINKXXX/$createlink/; + <% $createlabel %> + + % } elsif ( scalar( @{$opt{'part_referrals'}} ) == 1 ) { % } else { - - -% if ( $opt{'label'} ) { - <% $opt{'label'} %> -% } else { - <%$r%>Advertising source -% } - - <% include( '/elements/select-part_referral.html', + <& /elements/tr-td-label.html, label => 'Advertising source', %opt &> + + <& /elements/select-part_referral.html, 'curr_value' => $refnum, %opt - ) - %> + &> @@ -30,6 +32,8 @@ my $refnum = $opt{'curr_value'} || $opt{'value'}; $opt{'part_referrals'} ||= [ FS::part_referral->all_part_referral( 1 ) ]; #1: include global +my $colspan = delete($opt{'colspan'}) || 1; + my $r = qq!* !;