diff --git a/share/html/Elements/AddLinks b/share/html/Elements/AddLinks
index 32cbf9c8fe7..ac8cde57e3b 100644
--- a/share/html/Elements/AddLinks
+++ b/share/html/Elements/AddLinks
@@ -55,7 +55,7 @@ my $id = ($Object and $Object->id)
? $Object->id
: "new";
-my $exclude = qq| data-autocomplete="LinkTargets" data-autocomplete-multiple="1"|;
+my $autocomplete = qq|data-autocomplete="LinkTargets" data-autocomplete-multiple="1"|;
my @excludes;
push @excludes, ( $Object->isa('RT::Asset') ? 'asset:' : '' ) . $id
if $id ne 'new';
@@ -98,7 +98,7 @@ foreach my $exclude_type ( keys %exclude_links ) {
}
}
}
- $exclude_links{$exclude_type} = $exclude . ' data-autocomplete-exclude="' . join( ' ', @excludes, @ids ) . '"'
+ $exclude_links{$exclude_type} = 'data-autocomplete-exclude="' . join( ' ', @excludes, @ids ) . '"'
if @excludes || @ids;
}
%init>
@@ -120,24 +120,24 @@ foreach my $exclude_type ( keys %exclude_links ) {
<&| /Elements/LabeledValue, RawLabel => $m->scomp('ShowRelationLabel', Object => $Object, Label => loc('Depends on'), Relation => 'DependsOn') &>
- " <% $exclude_links{Depend} |n%>/>
+ " <% $autocomplete |n %> <% $exclude_links{Depend} |n%>/>
&>
<&| /Elements/LabeledValue, RawLabel => $m->scomp('ShowRelationLabel', Object => $Object, Label => loc('Depended on by'), Relation => 'DependedOnBy') &>
- " <% $exclude_links{Depend} |n%>/>
+ " <% $autocomplete |n %> <% $exclude_links{Depend} |n%>/>
&>
<&| /Elements/LabeledValue, RawLabel => $m->scomp('ShowRelationLabel', Object => $Object, Label => loc('Parents'), Relation => 'Parents') &>
- " <% $exclude_links{Member} |n%>/>
+ " <% $autocomplete |n %> <% $exclude_links{Member} |n%>/>
&>
<&| /Elements/LabeledValue, RawLabel => $m->scomp('ShowRelationLabel', Object => $Object, Label => loc('Children'), Relation => 'Children') &>
- " <% $exclude_links{Member} |n%>/>
+ " <% $autocomplete |n %> <% $exclude_links{Member} |n%>/>
&>
<&| /Elements/LabeledValue, RawLabel => $m->scomp('ShowRelationLabel', Object => $Object, Label => loc('Refers to'), Relation => 'RefersTo') &>
- " <% $exclude_links{Refer} |n%>/>
+ " <% $autocomplete |n %> <% $exclude_links{Refer} |n%>/>
&>
<&| /Elements/LabeledValue, RawLabel => $m->scomp('ShowRelationLabel', Object => $Object, Label => loc('Referred to by'), Relation => 'ReferredToBy') &>
- " <% $exclude_links{Refer} |n%>/>
+ " <% $autocomplete |n %> <% $exclude_links{Refer} |n%>/>
&>
<& /Elements/EditCustomFields,