X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FEditCustomFieldAutocomplete;h=ee53d9299ea0f88101ba3fab19fb01af1e1aca56;hp=aaf551716f59aa9907bc15d579b3e1712dce33fd;hb=7322f2afedcc2f427e997d1535a503613a83f088;hpb=43a06151e47d2c59b833cbd8c26d97865ee850b6 diff --git a/rt/share/html/Elements/EditCustomFieldAutocomplete b/rt/share/html/Elements/EditCustomFieldAutocomplete index aaf551716..ee53d9299 100644 --- a/rt/share/html/Elements/EditCustomFieldAutocomplete +++ b/rt/share/html/Elements/EditCustomFieldAutocomplete @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -46,13 +46,20 @@ %# %# END BPS TAGGED BLOCK }}} % if ( $Multiple ) { - + <%INIT> -my $name = $NamePrefix . $CustomField->Id; +my $name = $Name || $NamePrefix . $CustomField->Id . ( $Multiple ? '-Values' : '-Value' ); if ( $Default && !$Multiple ) { $Default =~ s/\s*\r*\n\s*/ /g; } @@ -92,10 +99,16 @@ if ( $Multiple and $Values ) { $Default .= $value->Content ."\n"; } } +my $Context = ""; +if ($CustomField->ContextObject) { + $Context .= "ContextId=" . $CustomField->ContextObject->Id . "&"; + $Context .= "ContextType=". ref($CustomField->ContextObject) . "&"; +} <%ARGS> $CustomField => undef $NamePrefix => undef +$Name => undef $Default => undef $Values => undef $Multiple => undef