diff options
author | Mark Wells <mark@freeside.biz> | 2012-04-17 15:52:14 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-04-17 15:52:14 -0700 |
commit | 1c59bba12621e154765a8255534e94a041dfd200 (patch) | |
tree | 5f9acae2881b035e9e3b9a21d8bc6bab1f4b2a73 /rt/share/html/Ticket/Elements/AddCustomers | |
parent | 71cbdde5012550846390e9f0ebafdb48e06da5e8 (diff) |
link tickets to services, #17067
Diffstat (limited to 'rt/share/html/Ticket/Elements/AddCustomers')
-rw-r--r-- | rt/share/html/Ticket/Elements/AddCustomers | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/rt/share/html/Ticket/Elements/AddCustomers b/rt/share/html/Ticket/Elements/AddCustomers index 09acdfd3f..3c2c82add 100644 --- a/rt/share/html/Ticket/Elements/AddCustomers +++ b/rt/share/html/Ticket/Elements/AddCustomers @@ -13,15 +13,25 @@ <BR> <%$msg%><br> -% if (@Customers) { +% if (@Customers or @Services) { -<br><i>(Check box to link)<i> +<br><i>(Check box to link)</i> <table> % foreach my $customer (@Customers) { <tr> <td> <input type="checkbox" name="Ticket-AddCustomer-<% $customer->{'custnum'} %>" VALUE="1" <% scalar(@Customers) == 1 ? 'CHECKED' : '' %>> - <A HREF="<%$freeside_url%>/view/cust_main.cgi?<% $customer->{'custnum'} %>"><% &RT::URI::freeside::small_custview($customer->{'custnum'}, &RT::URI::freeside::FreesideGetConfig('countrydefault'), 1) |n %> + <& .small_custview, $customer &> + </td> +</tr> +% } +% +% foreach my $service (@Services) { +<tr> + <td> + <input type="checkbox" name="Ticket-AddService-<% $service->{'svcnum'} %>" VALUE="1" <% scalar(@Services) == 1 ? 'CHECKED' : '' %>> + <& .small_custview, $service &> + <& .small_svcview, $service &> </td> </tr> % } @@ -29,11 +39,21 @@ % } +<%once> +my $freeside_url = &RT::URI::freeside::FreesideURL(); + +</%once> +<%def .small_custview> +% my $cust = shift; +<A HREF="<%$freeside_url%>/view/cust_main.cgi?<% $cust->{'custnum'}%>"><% &RT::URI::freeside::small_custview($cust->{'custnum'}, &RT::URI::freeside::FreesideGetConfig, 1) |n %></A> +</%def> +<%def .small_svcview> +% my $svc = shift; +<A HREF="<%$freeside_url%>/view/cust_svc.cgi?<% $svc->{'svcnum'}%>"><B><% $svc->{'label'} %></B></A> +</%def> <%INIT> my ($msg); -my $freeside_url = &RT::URI::freeside::FreesideURL(); - my @Customers = (); if ( $CustomerString ) { @Customers = &RT::URI::freeside::smart_search( @@ -43,8 +63,11 @@ if ( $CustomerString ) { } my @Services = (); -if ($ServiceString) { - @Services = (); #service_search(); +if ( $ServiceString + and $RT::URI::freeside::IntegrationType eq 'Internal' ) { + @Services = RT::URI::freeside::service_search( + 'search' => $ServiceString, + ); } </%INIT> |