This commit was manufactured by cvs2svn to create branch
[freeside.git] / rt / share / html / Ticket / Elements / AddCustomers
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 <BR>
14 <%$msg%><br>
15
16 % if (@Customers) {
17
18 <br><i>(Check box to link)<i>
19 <table>
20 % foreach my $customer (@Customers) {
21 <tr>
22   <td>
23     <input type="checkbox" name="Ticket-AddCustomer-<% $customer->{'custnum'} %>" VALUE="1" <% scalar(@Customers) == 1 ? 'CHECKED' : '' %>>
24     <A HREF="<%$freeside_url%>/view/cust_main.cgi?<% $customer->{'custnum'} %>"><% &RT::URI::freeside::small_custview($customer->{'custnum'}, &RT::URI::freeside::FreesideGetConfig('countrydefault'), 1) |n %>
25   </td>
26 </tr>
27 % }
28 </table>
29
30 % }
31
32 <%INIT>
33 my ($msg);
34
35 my $freeside_url = &RT::URI::freeside::FreesideURL();
36
37 my @Customers = ();
38 if ( $CustomerString ) {
39     @Customers = &RT::URI::freeside::smart_search(
40         'search'            => $CustomerString,
41         'no_fuzzy_on_exact' => 1, #pref?
42     );
43 }
44
45 my @Services = ();
46 if ($ServiceString) {
47     @Services = (); #service_search();
48 }
49
50 </%INIT>
51
52 <%ARGS>
53 $CustomerString => undef
54 $ServiceString => undef
55 </%ARGS>