X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FEditCustomFieldAutocomplete;h=057421982dce4c718aba357b22d422f51c0c220b;hp=13a43ed67b77cb95376404a0995028f76172575e;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941 diff --git a/rt/share/html/Elements/EditCustomFieldAutocomplete b/rt/share/html/Elements/EditCustomFieldAutocomplete index 13a43ed67..057421982 100644 --- a/rt/share/html/Elements/EditCustomFieldAutocomplete +++ b/rt/share/html/Elements/EditCustomFieldAutocomplete @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -46,27 +46,50 @@ %# %# 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; } @@ -76,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