57eb9059d279242df47d6c84f0c17558c394f457
[freeside.git] / rt / html / Elements / EditCustomers
1 %# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am>
2 %# Copyright (c) 2008 Freeside Internet Services, Inc.
3 %# 
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
7 %# from www.gnu.org.
8 %# 
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.
13 <TABLE width=100%>
14   <TR>
15     <TD VALIGN=TOP WIDTH=50%>
16       <h3><&|/l&>Current Customers</&></h3>
17
18 <table>
19   <tr>
20     <td><i><&|/l&>(Check box to disassociate)</&></i></td>
21   </tr>
22   <tr>
23     <td class="value">
24 % #while (my $link = $Object->MemberOf->Next) {
25 % foreach my $link (
26 %   grep { $_->TargetURI->Resolver->{'fstable'} eq 'cust_main' }
27 %   grep { $_->TargetURI->Scheme eq 'freeside' }
28 %        @{ $Object->_Links('Base')->ItemsArrayRef }
29 % ) {
30
31       <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
32 %#        <& ShowLink, URI => $link->TargetURI &><br>
33         <A HREF="<% $link->TargetURI->Resolver->HREF %>"><% $link->TargetURI->Resolver->AsStringLong |n %></A>
34       <BR>
35 % }
36     </td>
37   </tr>
38 </table>
39                             
40 </TD>
41
42 <TD VALIGN=TOP>
43 <h3><&|/l&>New Customer Links</&></h3>
44 <&|/l&>Find customer</&><BR>
45 <input name="CustomerString">
46 <input type=submit name="OnlySearchForCustomers" value="<&|/l&>Go!</&>">
47 <br><i>cust #, name, company or phone</i>
48 <BR>
49 %#<BR>
50 %#<&|/l&>Find service</&><BR>
51 %#<input name="ServiceString">
52 %#<input type=submit name="OnlySearchForServices" value="<&|/l&>Go!</&>">
53 %#<br><i>username, username@domain, domain, or IP address</i>
54 %#<BR>
55
56 <& AddCustomers, Object         => $Object,
57                  CustomerString => $CustomerString,
58                  ServiceString  => $ServiceString,  &>
59
60 </TD>
61 </TR>
62 </TABLE>
63       
64 <%ARGS>
65 $CustomerString => undef
66 $ServiceString => undef
67 $Object => undef
68 </%ARGS>