diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-06-07 00:56:06 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-06-07 00:56:06 -0700 |
commit | 43a06151e47d2c59b833cbd8c26d97865ee850b6 (patch) | |
tree | 42c51d94e7fa265461b508d061562be204ccc2c1 /rt/share/html/Elements/SelectUsers | |
parent | 6587f6ba7d047ddc1686c080090afe7d53365bd4 (diff) |
starting to work...
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> |