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.
16 % if (@Customers or @Services) {
18 <br><i>(Check box to link)</i>
20 % foreach my $customer (@Customers) {
23 <input type="checkbox" name="Ticket-AddCustomer-<% $customer->{'custnum'} %>" VALUE="1" <% scalar(@Customers) == 1 ? 'CHECKED' : '' %>>
24 <& .small_custview, $customer &>
29 % foreach my $service (@Services) {
32 <input type="checkbox" name="Ticket-AddService-<% $service->{'svcnum'} %>" VALUE="1" <% scalar(@Services) == 1 ? 'CHECKED' : '' %>>
33 <& .small_custview, $service &>
34 <& .small_svcview, $service &>
43 my $freeside_url = &RT::URI::freeside::FreesideURL();
46 <%def .small_custview>
48 <A HREF="<%$freeside_url%>/view/cust_main.cgi?<% $cust->{'custnum'}%>"><% &RT::URI::freeside::small_custview($cust->{'custnum'}, &RT::URI::freeside::FreesideGetConfig, 1) |n %></A>
52 <A HREF="<%$freeside_url%>/view/cust_svc.cgi?<% $svc->{'svcnum'}%>"><B><% $svc->{'label'} %></B></A>
58 if ( $CustomerString ) {
59 @Customers = &RT::URI::freeside::smart_search(
60 'search' => $CustomerString,
61 'no_fuzzy_on_exact' => 1, #pref?
67 and $RT::URI::freeside::IntegrationType eq 'Internal' ) {
68 @Services = RT::URI::freeside::service_search(
69 'search' => $ServiceString,
76 $CustomerString => undef
77 $ServiceString => undef