%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
$SearchType => 'Ticket',
</%args>
<select id="<%$Name%>" name="<%$Name%>">
-<option value="" selected> </option>
+<option value="">-</option>
% foreach my $object (@Objects) {
-<optgroup label="<& SearchPrivacy, Object => $object &>">
% my @searches = $object->Attributes->Named('SavedSearch');
+% if ( @searches ) {
+<optgroup label="<& SearchPrivacy, Object => $object &>">
% foreach my $search (@searches) {
% # Skip it if it is not of search type we want.
% next if ($search->SubValue('SearchType')
% }
</optgroup>
% }
+% }
</select>