1 %# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am>
2 %# Copyright (c) 2008 Freeside Internet Services, Inc.
4 %# This work is made available to you under the terms of Version 2 of
5 %# the GNU General Public License. A copy of that license should have
6 %# been provided with this software, but in any event can be snarfed
9 %# This work is distributed in the hope that it will be useful, but
10 %# WITHOUT ANY WARRANTY; without even the implied warranty of
11 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 %# General Public License for more details.
15 <TD VALIGN=TOP WIDTH=50% ROWSPAN=3>
16 <h3><&|/l&>Current Customers</&></h3>
18 % my %data = $m->comp('Customers', Ticket => $Ticket);
19 % if ( @{ $data{custnums} } ) {
27 <td colspan=2><i><&|/l&>(Check box to disassociate)</&></i></td>
29 % foreach my $custnum ( @{ $data{custnums} } ) {
30 % foreach my $resolver
31 % ( $data{cust_main}{$custnum}, @{ $data{cust_svc}{$custnum} } )
35 % if ( $resolver->URI !~ /cust_main/ or $data{cust_linked}{$custnum} ) {
36 % # don't show a checkbox for implicit cust_main links
37 <input type="checkbox" name="DeleteLink--MemberOf-<% $resolver->URI %>">
41 % if ( $resolver->URI =~ /cust_main/ ) {
42 <% $resolver->AsStringLong |n %>
43 % } elsif ( $resolver->URI =~ /cust_svc/ ) {
44 <% $resolver->ShortLink |n %>
55 <TD VALIGN=TOP WIDTH=50% COLSPAN=2>
56 <h3><&|/l&>New Customer Links</&></h3>
61 <td width=25% style="vertical-align:top">
62 <&|/l&>Find customer</&><br>
63 <input name="CustomerString">
64 <input type=submit name="OnlySearchForCustomers" value="<&|/l&>Go!</&>">
65 <br><i>cust #, name, company or phone</i>
67 <td width=25% style="vertical-align:top">
68 <&|/l&>Find service</&><br>
69 <input name="ServiceString">
70 <input type=submit name="OnlySearchForServices" value="<&|/l&>Go!</&>">
71 <br><i>user, email, ip, mac, phone</i>
77 <& AddCustomers, Ticket => $Ticket,
78 CustomerString => $CustomerString,
79 ServiceString => $ServiceString &>
85 $CustomerString => undef
86 $ServiceString => undef