49edb27b336194147dcc91743ea242d445807494
[freeside.git] / rt / html / Ticket / Elements / EditCustomers
1 %# BEGIN LICENSE BLOCK
2 %# 
3 %# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
4 %# 
5 %# (Except where explictly superceded by other copyright notices)
6 %# 
7 %# This work is made available to you under the terms of Version 2 of
8 %# the GNU General Public License. A copy of that license should have
9 %# been provided with this software, but in any event can be snarfed
10 %# from www.gnu.org.
11 %# 
12 %# This work is distributed in the hope that it will be useful, but
13 %# WITHOUT ANY WARRANTY; without even the implied warranty of
14 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 %# General Public License for more details.
16 %# 
17 %# Unless otherwise specified, all modifications, corrections or
18 %# extensions to this work which alter its source code become the
19 %# property of Best Practical Solutions, LLC when submitted for
20 %# inclusion in the work.
21 %# 
22 %# 
23 %# END LICENSE BLOCK
24 <TABLE width=100%>
25   <TR>
26     <TD VALIGN=TOP WIDTH=50%>
27       <h3><&|/l&>Current Customers</&></h3>
28
29 <table>
30   <tr>
31     <td><i><&|/l&>(Check box to disassociate)</&></i></td>
32   </tr>
33   <tr>
34     <td class="value">
35 % #while (my $link = $Ticket->MemberOf->Next) {
36 % foreach my $link (
37 %   grep { $_->TargetURI->Resolver->{'fstable'} eq 'cust_main' }
38 %   grep { $_->TargetURI->Scheme eq 'freeside' }
39 %        @{ $Ticket->_Links('Base')->ItemsArrayRef }
40 % ) {
41
42       <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
43 %#        <& ShowLink, URI => $link->TargetURI &><br>
44         <A HREF="<% $link->TargetURI->Resolver->HREF %>"><% $link->TargetURI->Resolver->AsStringLong |n %>
45       <BR>
46 % }
47     </td>
48   </tr>
49 </table>
50                             
51 </TD>
52
53 <TD VALIGN=TOP>
54 <h3><&|/l&>New Customer Links</&></h3>
55 <&|/l&>Find customer</&><BR>
56 <input name="CustomerString">
57 <input type=submit name="OnlySearchForCustomers" value="<&|/l&>Go!</&>">
58 <br><i>cust #, last name, or company</i>
59 <BR>
60 %#<BR>
61 %#<&|/l&>Find service</&><BR>
62 %#<input name="ServiceString">
63 %#<input type=submit name="OnlySearchForServices" value="<&|/l&>Go!</&>">
64 %#<br><i>username, username@domain, domain, or IP address</i>
65 %#<BR>
66
67 <& AddCustomers, Ticket         => $Ticket,
68                  CustomerString => $CustomerString,
69                  ServiceString  => $ServiceString,  &>
70
71 </TD>
72 </TR>
73 </TABLE>
74       
75 <%ARGS>
76 $CustomerString => undef
77 $ServiceString => undef
78 $Ticket => undef
79 </%ARGS>