%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
# Display custom field contents, separated by newlines.
# For Image custom fields we also show a thumbnail here.
-
my $values = $cf->ValuesForObject( $_[0] );
return if $values->Count == 0;
+
my @values;
# it is guaranteed to be the same type for all fields, right?
my $v = $values->First;
+ my $cftype = $v->CustomFieldObj->Type;
do {
- if ($v->Type eq 'Image') {
+ if ($cftype eq 'Image') {
push @values,
\($m->scomp( '/Elements/ShowCustomFieldImage',
Object => $v ));
- } elsif ( $v->Type eq 'Date' or $v->Type eq 'DateTime' ) {
+ } elsif ( $cftype eq 'Date' or $cftype eq 'DateTime' ) {
# then actually return the date object;
# ProcessColumnMapValue will stringify it
my $DateObj = RT::Date->new( $session{'CurrentUser'} );
my $arg = $DECODED_ARGS->{ $name };
my $checked = '';
if ( $arg && ref $arg ) {
- $checked = 'checked="checked"' if grep $_ == $id, @$arg;
+ $checked = 'checked="checked"' if grep $_ == $id, grep { defined and length } @$arg;
}
elsif ( $arg ) {
$checked = 'checked="checked"' if $arg == $id;