% $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>
% }
$NamePrefix => "Object-RT::Transaction--CustomField-"
$TicketObj => undef
$QueueObj => undef
+$UILocation => ''
</%ARGS>