RT 3.8.17
[freeside.git] / rt / share / html / Ticket / Elements / EditTransactionCustomFields
index e2f42b2..fae4442 100644 (file)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
 % $m->callback( CallbackName => 'BeforeTransactionCustomFields', TicketObj => $TicketObj, QueueObj => $QueueObj, NamePrefix => $NamePrefix );
 % if ($CustomFields->Count) {
 % while (my $CF = $CustomFields->Next()) {
+% $CF->SetContextObject($TicketObj || $QueueObj);
 % next unless $CF->CurrentUserHasRight('ModifyCustomField');
+% next unless $CF->UILocation eq $UILocation;
 <tr>
-<td class="label"><% loc($CF->Name) %>:</td>
+<td class="label">
+<% loc($CF->Name) %>:
+</td>
 <td>
 <& /Elements/EditCustomField,
     CustomField => $CF,
     NamePrefix => $NamePrefix
 &>
+% if ( $CF->Type ne 'TimeValue' ) {
 <em><% $CF->FriendlyType %></em>
-%  if (my $msg = $m->notes('InvalidField-' . $CF->Id)) {
+% }
+% if (my $msg = $m->notes('InvalidField-' . $CF->Id)) {
         <br />
         <span class="cfinvalidfield"><% $msg %></span>
-%  }
+% }
 </td>
 </td></tr>
 % }
@@ -83,5 +89,6 @@ $m->callback( CallbackName => 'MassageTransactionCustomFields', CustomFields =>
 $NamePrefix => "Object-RT::Transaction--CustomField-"
 $TicketObj => undef
 $QueueObj => undef
+$UILocation => ''
 </%ARGS>