X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FTicket%2FElements%2FEditTransactionCustomFields;h=89a2fab89060672a096983feadad74755ed2e2b3;hb=ed1f84b4e8f626245995ecda5afcf83092c153b2;hp=e2f42b2c512e4a4297633734974f3e1a3406835a;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941;p=freeside.git diff --git a/rt/share/html/Ticket/Elements/EditTransactionCustomFields b/rt/share/html/Ticket/Elements/EditTransactionCustomFields index e2f42b2c5..89a2fab89 100644 --- a/rt/share/html/Ticket/Elements/EditTransactionCustomFields +++ b/rt/share/html/Ticket/Elements/EditTransactionCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -46,24 +46,37 @@ %# %# END BPS TAGGED BLOCK }}} % $m->callback( CallbackName => 'BeforeTransactionCustomFields', TicketObj => $TicketObj, QueueObj => $QueueObj, NamePrefix => $NamePrefix ); +% if ( $WRAP ) { +<<% $WRAP %> class="edit-transaction-custom-fields"> +% } % if ($CustomFields->Count) { % while (my $CF = $CustomFields->Next()) { +% $CF->SetContextObject($TicketObj || $QueueObj); % next unless $CF->CurrentUserHasRight('ModifyCustomField'); - -<% loc($CF->Name) %>: - +% next unless $CF->UILocation eq $UILocation; +<<% $FIELD %>> +<<% $CELL %> class="label cflabel"> + <% loc($CF->Name) %>:
+% if ( $CF->Type ne 'TimeValue' ) { + <% $CF->FriendlyType %> +% } +> +<<% $CELL %>> <& /Elements/EditCustomField, + %ARGS, CustomField => $CF, - NamePrefix => $NamePrefix + NamePrefix => $NamePrefix, &> -<% $CF->FriendlyType %> % if (my $msg = $m->notes('InvalidField-' . $CF->Id)) {
<% $msg %> % } - - +> +> +% } % } +% if ( $WRAP ) { +> % } % $m->callback( CallbackName => 'AfterTransactionCustomFields', TicketObj => $TicketObj, QueueObj => $QueueObj, NamePrefix => $NamePrefix ); @@ -78,10 +91,23 @@ if ($TicketObj) { $m->callback( CallbackName => 'MassageTransactionCustomFields', CustomFields => $CustomFields ); +$AsTable ||= $InTable; +my $FIELD = $AsTable ? 'tr' : 'div'; +my $CELL = $AsTable ? 'td' : 'div'; +my $WRAP = ''; +if ( $AsTable ) { + $WRAP = 'table' unless $InTable; +} else { + $WRAP = 'div'; +} + <%ARGS> $NamePrefix => "Object-RT::Transaction--CustomField-" $TicketObj => undef $QueueObj => undef +$AsTable => 0 +$InTable => 0 +$UILocation => ''