diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-06-30 01:03:13 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-06-30 01:03:13 -0700 |
| commit | f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7 (patch) | |
| tree | e5e9a077260613e6117d4697dd2985abd9b03d34 /rt/share/html/Elements/SelectUsers | |
| parent | cf7cd8efc7095aadbdfb0cd8e7ea0e2e8b9e9085 (diff) | |
| parent | cd3eb95ed1f3dc3e04cfc2b3b405f75b3ab086da (diff) | |
merging RT 4.0.6
Diffstat (limited to 'rt/share/html/Elements/SelectUsers')
| -rwxr-xr-x | rt/share/html/Elements/SelectUsers | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/rt/share/html/Elements/SelectUsers b/rt/share/html/Elements/SelectUsers index b250ba639..2522a92ed 100755 --- a/rt/share/html/Elements/SelectUsers +++ b/rt/share/html/Elements/SelectUsers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -46,7 +46,7 @@ %# %# END BPS TAGGED BLOCK }}} <select name="UserField"> -% foreach my $col (RT::User->BasicColumns) { +% foreach my $col (@fields) { <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 @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 => '' +$Fields => undef </%ARGS> |
