diff options
| author | Mark Wells <mark@freeside.biz> | 2012-09-29 16:36:46 -0700 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2012-09-29 16:36:46 -0700 |
| commit | 33beebf4cb42eba3e1dd868ad5e0af102de961da (patch) | |
| tree | 860712543dcc74ff2402a4ed8d73e8cd553e62d4 /rt/share/html/Ticket/Elements/AddCustomers | |
| parent | 7ac86daf67b0a95153b736d5811f9050363f6553 (diff) | |
update address standardization for cust_location changes
Diffstat (limited to 'rt/share/html/Ticket/Elements/AddCustomers')
| -rw-r--r-- | rt/share/html/Ticket/Elements/AddCustomers | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/rt/share/html/Ticket/Elements/AddCustomers b/rt/share/html/Ticket/Elements/AddCustomers index 09acdfd3f..13fb2f010 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,22 +39,35 @@ % } +<%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( 'search' => $CustomerString, - 'no_fuzzy_on_exact' => 1, #pref? + 'no_fuzzy_on_exact' => ! $FS::CurrentUser::CurrentUser->option('enable_fuzzy_on_exact'), ); } 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> |
