summaryrefslogtreecommitdiff
path: root/rt/webrt/Elements/SelectQueue
blob: d63b17b4e91c22591d34a58e0c07a24f850d47dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectQueue,v 1.1 2002-08-12 06:17:08 ivan Exp $

% if ($Lite) {
<INPUT NAME="<%$Name%>" size=25 DEFAULT="<%$d->Name%>">
% } else {
<SELECT NAME ="<%$Name%>">
% if ($ShowNullOption) {
<OPTION VALUE="">-</OPTION>
% }
% while (my $queue=$q->Next) {
% if ($ShowAllQueues || $queue->CurrentUserHasRight('CreateTicket')) {
<OPTION VALUE="<%$queue->Id%>" <%($queue->Id == $Default) && 'SELECTED'%>><%$queue->Name%>
%   if (($Verbose) and ($queue->Description) ){
(<%$queue->Description%>)
%  }
</OPTION>
% }
% }
</SELECT>
% }
<%ARGS>
$ShowNullOption => 1
$ShowAllQueues => 1
$Name => undef
$Verbose => undef
$Default => undef
$Lite => 0
</%ARGS>

<%INIT>

my $q=new RT::Queues($session{'CurrentUser'});
$q->UnLimit;

my $d = new RT::Queue($session{'CurrentUser'});
$d->Load($Default);

</%INIT>