projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 77021 - fixed advanced report criteria so agent and other fileds with a . in...
[freeside.git]
/
rt
/
share
/
html
/
Elements
/
SelectUsers
diff --git
a/rt/share/html/Elements/SelectUsers
b/rt/share/html/Elements/SelectUsers
index
b250ba6
..
871f04d
100755
(executable)
--- a/
rt/share/html/Elements/SelectUsers
+++ b/
rt/share/html/Elements/SelectUsers
@@
-2,7
+2,7
@@
%#
%# COPYRIGHT:
%#
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-201
1
Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-201
7
Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@
-46,7
+46,7
@@
%#
%# END BPS TAGGED BLOCK }}}
<select name="UserField">
%#
%# END BPS TAGGED BLOCK }}}
<select name="UserField">
-% foreach my $col (
RT::User->BasicColumn
s) {
+% foreach my $col (
@field
s) {
<option <% ($UserField eq $col->[0]) ? 'selected="selected"' : '' |n %> value="<% $col->[0] %>"><% loc($col->[1]) %></option>
% }
% while (my $CF = $CFs->Next) {
<option <% ($UserField eq $col->[0]) ? 'selected="selected"' : '' |n %> value="<% $col->[0] %>"><% loc($col->[1]) %></option>
% }
% while (my $CF = $CFs->Next) {
@@
-60,9
+60,22
@@
my $CFs = RT::CustomFields->new($session{'CurrentUser'});
$CFs->LimitToChildType('RT::User');
$CFs->OrderBy( FIELD => 'Name' );
my $CFs = RT::CustomFields->new($session{'CurrentUser'});
$CFs->LimitToChildType('RT::User');
$CFs->OrderBy( FIELD => 'Name' );
+
+my @fields = RT::User->BasicColumns;
+
+if ( $Fields and ref $Fields eq 'ARRAY' ) {
+ if ( ref $Fields->[0] eq 'ARRAY' ) {
+ @fields = @$Fields;
+ }
+ else {
+ # make the name equal the label
+ @fields = [ @$Fields, @$Fields ];
+ }
+}
</%INIT>
<%ARGS>
$UserField => ''
$UserOp => ''
$UserString => ''
</%INIT>
<%ARGS>
$UserField => ''
$UserOp => ''
$UserString => ''
+$Fields => undef
</%ARGS>
</%ARGS>