diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-07-02 14:24:21 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-07-02 14:24:21 -0700 |
| commit | 85e677b86fc37c54e6de2b06340351a28f5a5916 (patch) | |
| tree | 11148e2c292bd1a43b7cf6c2f5212a6ca8b03e75 /rt/share/html/Elements/SelectUsers | |
| parent | e5ab051ccdb7637d8dd2f0ed9b4fe9aaaf1d1100 (diff) | |
| parent | 92aedddd3684167abb60cd3f1d77bbc156c592e6 (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
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> |
