diff options
Diffstat (limited to 'rt/webrt/Elements/SelectOwner')
-rwxr-xr-x | rt/webrt/Elements/SelectOwner | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/rt/webrt/Elements/SelectOwner b/rt/webrt/Elements/SelectOwner new file mode 100755 index 000000000..59ebf3631 --- /dev/null +++ b/rt/webrt/Elements/SelectOwner @@ -0,0 +1,22 @@ +<SELECT NAME="<%$Name%>"> +<OPTION VALUE="">-</OPTION> +<OPTION <% ($RT::Nobody->Id() == $Default) && "SELECTED" %> VALUE="<%$RT::Nobody->Id%>"><%$RT::Nobody->Name%></OPTION> +%while ( my $User = $Users->Next()) { +% if ((!defined $QueueObj) || ($User->HasQueueRight(Right => 'OwnTicket', QueueObj => $QueueObj, TicketObj => $TicketObj))){ +<OPTION VALUE="<%$User->Id()%>" <% ($User->Id() == $Default) && "SELECTED" %>><%$User->Name()%></OPTION> +% } +%} +</SELECT> + +<%INIT> +my $Users = RT::Users->new($session{CurrentUser}); +$Users->LimitToPrivileged; +</%INIT> + +<%ARGS> +$QueueObj => undef +$Name => undef +$Default => undef +$User => undef +$TicketObj => undef +</%ARGS> |