X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FShowCustomFields;h=3fe51c109af46eca4b7fd9c2f99a46865f7f58ac;hb=45d35d5739d05e602bc317739485693e0e9ff0b5;hp=1bb61435ffb4cff2b104fe6d61d31914ec8f38dc;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941;p=freeside.git diff --git a/rt/share/html/Elements/ShowCustomFields b/rt/share/html/Elements/ShowCustomFields index 1bb61435f..3fe51c109 100644 --- a/rt/share/html/Elements/ShowCustomFields +++ b/rt/share/html/Elements/ShowCustomFields @@ -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) @@ -77,11 +77,16 @@ % $m->callback( CallbackName => 'AfterCustomFields', Object => $Object ); <%INIT> $m->callback( + %ARGS, CallbackName => 'MassageCustomFields', Object => $Object, CustomFields => $CustomFields, ); +# don't print anything if there is no custom fields +return unless $CustomFields->First; +$CustomFields->GotoFirstItem; + my $print_value = sub { my ($cf, $value) = @_; my $linked = $value->LinkValueTo; @@ -108,13 +113,13 @@ my $print_value = sub { if ( $cf->IncludeContentForValue ) { my $vid = $value->id; $m->out( '
' ); - $m->print( loc("See also:") ); - $m->out( '' ); - $m->print( $value->IncludeContentForValue ); + $m->out( loc("See also:") ); + $m->out( '' ); + $m->out( $m->interp->apply_escapes($value->IncludeContentForValue, 'h') ); $m->out( qq{
\n} ); - $m->out( qq{\n} ); + $m->out( qq{\n} ); } };