summaryrefslogtreecommitdiff
path: root/rt/html/Admin/Elements
diff options
context:
space:
mode:
authorivan <ivan>2004-03-11 02:05:38 +0000
committerivan <ivan>2004-03-11 02:05:38 +0000
commit289340780927b5bac2c7604d7317c3063c6dd8cc (patch)
treec4100ab9857ae00c330213af8a46e66c208580e6 /rt/html/Admin/Elements
parent945721f48f74d5cfffef7c7cf3a3d6bc2521f5dd (diff)
import of rt 3.0.9RT_3_0_9
Diffstat (limited to 'rt/html/Admin/Elements')
-rw-r--r--rt/html/Admin/Elements/EditCustomField2
-rw-r--r--rt/html/Admin/Elements/EditCustomFieldValues2
-rw-r--r--rt/html/Admin/Elements/EditCustomFields41
-rw-r--r--rt/html/Admin/Elements/EditScrip9
-rw-r--r--rt/html/Admin/Elements/EditScrips4
-rw-r--r--rt/html/Admin/Elements/SelectGroups3
-rw-r--r--rt/html/Admin/Elements/SelectRights3
-rw-r--r--rt/html/Admin/Elements/SelectStage39
8 files changed, 77 insertions, 26 deletions
diff --git a/rt/html/Admin/Elements/EditCustomField b/rt/html/Admin/Elements/EditCustomField
index a09600ba7..7baed168b 100644
--- a/rt/html/Admin/Elements/EditCustomField
+++ b/rt/html/Admin/Elements/EditCustomField
@@ -24,7 +24,7 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=GET ACTION="CustomField.html">
+<FORM METHOD=POST ACTION="CustomField.html">
<INPUT TYPE=HIDDEN NAME="CustomField" VALUE="<%$id %>">
<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>">
diff --git a/rt/html/Admin/Elements/EditCustomFieldValues b/rt/html/Admin/Elements/EditCustomFieldValues
index 64564adfb..2c9e6d082 100644
--- a/rt/html/Admin/Elements/EditCustomFieldValues
+++ b/rt/html/Admin/Elements/EditCustomFieldValues
@@ -25,7 +25,7 @@
<ul>
% while (my $v = $values->Next) {
<li>
-<font size=-1 color="#336699"><%$v->SortOrder%>:</font>
+<INPUT TYPE="text" SIZE="2" NAME="CustomField-<%$CustomField->Id%>-SortOrder<%$v->Id()%>" VALUE="<%$v->SortOrder()%>">
<input type="checkbox" name="CustomField-<%$CustomField->Id%>-DeleteValue" value="<%$v->id%>">
<%$v->Name%>
% if ($v->Description) {
diff --git a/rt/html/Admin/Elements/EditCustomFields b/rt/html/Admin/Elements/EditCustomFields
index a86b051d0..81c984d29 100644
--- a/rt/html/Admin/Elements/EditCustomFields
+++ b/rt/html/Admin/Elements/EditCustomFields
@@ -26,44 +26,43 @@
<TABLE>
<TR>
<TD VALIGN=TOP>
-<%$caption%>:<BR>
+<h2><%$caption%></h2>
</TD></TR></TABLE>
% if ($CustomFields->Count == 0 ) {
<P><i><&|/l&>(No custom fields)</&></i></P>
% } else {
-<TABLE>
-
-<TR>
-<TD ROWSPAN="<% $CustomFields->Count %>">
-<UL>
-% while (my $CustomFieldObj = $CustomFields->Next) {
-<LI><A HREF="CustomField.html?Queue=<%$id%>&CustomField=<%$CustomFieldObj->id()%>"><b><%$CustomFieldObj->Name%></b></a> (<% $CustomFieldObj->FriendlyType %>)<br>
-<%$CustomFieldObj->Description%>
-</LI>
-% }
-</UL>
-</TD>
-
+<TABLE cellspacing=0 cellpadding=2>
% my $count;
% while (my $CustomFieldObj = $CustomFields->Next) {
+<TR>
+ <TD valign="TOP">
+% if ($CustomFieldObj->Name) {
+ <A HREF="CustomField.html?Queue=<%$id%>&CustomField=<%$CustomFieldObj->id()%>"><b><%$CustomFieldObj->Name%></b></a><br>
+% } else {
+ <A HREF="CustomField.html?Queue=<%$id%>&CustomField=<%$CustomFieldObj->id()%>"><i>(<%loc("no name")%>)</i></a><br>
+% }
+ <%$CustomFieldObj->Description%>
+ </TD>
+ <TD valign="TOP">
+ <i><% $CustomFieldObj->FriendlyType %></i>
+ </TD>
% # show 'move up' unless it's the first item
% if ($count++) {
-<TR><TD>
-<a href="CustomFields.html?id=<%$id%>&CustomField=<%$CustomFieldObj->id%>&Move=-1"><&|/l&>Move up</&></a>
+ <TD valign="TOP">
+ <a href="CustomFields.html?id=<%$id%>&CustomField=<%$CustomFieldObj->id%>&Move=-1"><&|/l&>Move up</&></a>
% } else {
-<TD ALIGN=RIGHT>
+ <TD valign="TOP" ALIGN=RIGHT>
% }
% # show 'move down' unless it's the last item
% if (!$CustomFields->IsLast) {
% $m->print(' | ') if $count > 1;
-<a href="CustomFields.html?id=<%$id%>&CustomField=<%$CustomFieldObj->id%>&Move=1"><&|/l&>Move down</&></a>
+ <a href="CustomFields.html?id=<%$id%>&CustomField=<%$CustomFieldObj->id%>&Move=1"><&|/l&>Move down</&></a>
% }
-</TD></TR>
-% }
-
</TD>
</TR>
+% }
+
</TABLE>
% }
<FORM METHOD=GET ACTION="CustomFields.html">
diff --git a/rt/html/Admin/Elements/EditScrip b/rt/html/Admin/Elements/EditScrip
index 5393ebfde..1f186c233 100644
--- a/rt/html/Admin/Elements/EditScrip
+++ b/rt/html/Admin/Elements/EditScrip
@@ -77,6 +77,14 @@
</TR>
<TR>
<TD ALIGN=RIGHT>
+<&|/l&>Stage</&>:
+</TD>
+<TD>
+<& /Admin/Elements/SelectStage, Name => "Scrip-$id-Stage", Default => $scrip->Stage &>
+</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT>
<&|/l&>Template</&>:
</TD>
<TD>
@@ -123,6 +131,7 @@ elsif ($id) {
ScripAction
ScripCondition
Template
+ Stage
Description
CustomPrepareCode
CustomCommitCode
diff --git a/rt/html/Admin/Elements/EditScrips b/rt/html/Admin/Elements/EditScrips
index 24515d8c1..07a57f47b 100644
--- a/rt/html/Admin/Elements/EditScrips
+++ b/rt/html/Admin/Elements/EditScrips
@@ -48,7 +48,9 @@
</TABLE>
% }
-<& /Elements/Submit &>
+<& /Elements/Submit,
+ Caption => loc("Delete selected scrips"),
+ Label => loc("Delete") &>
</form>
<%init>
my (@actions);
diff --git a/rt/html/Admin/Elements/SelectGroups b/rt/html/Admin/Elements/SelectGroups
index 5df49ad04..3cc909b29 100644
--- a/rt/html/Admin/Elements/SelectGroups
+++ b/rt/html/Admin/Elements/SelectGroups
@@ -29,9 +29,10 @@
<%INIT>
my $groups = new RT::Groups($session{'CurrentUser'});
-$groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'System');
+$groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => $Domain);
</%INIT>
<%ARGS>
$Name => 'groups'
+$Domain => 'UserDefined';
</%ARGS>
diff --git a/rt/html/Admin/Elements/SelectRights b/rt/html/Admin/Elements/SelectRights
index 37a06dc4d..8d87ac9a1 100644
--- a/rt/html/Admin/Elements/SelectRights
+++ b/rt/html/Admin/Elements/SelectRights
@@ -24,7 +24,7 @@
<INPUT TYPE=HIDDEN NAME="CheckACL" VALUE="<%$ACLDesc%>">
<TABLE BORDER=0>
<TR>
-<TD valign=top width="180">
+<TD valign=top width="180" align="left">
<h3><&|/l&>Current rights</&></h3>
% if ($ACLObj->Count() > 0) {
<i>(<&|/l&>Check box to revoke right</&>)</i> <BR>
@@ -71,6 +71,7 @@
$ACLObj->LimitToObject( $Object);
$ACLObj->LimitToPrincipal( Id => $PrincipalId);
+ $ACLObj->OrderBy(FIELD=>'RightName');
if (ref($Object) && UNIVERSAL::can($Object, 'AvailableRights')) {
%Rights = %{$Object->AvailableRights};
diff --git a/rt/html/Admin/Elements/SelectStage b/rt/html/Admin/Elements/SelectStage
new file mode 100644
index 000000000..b62964be4
--- /dev/null
+++ b/rt/html/Admin/Elements/SelectStage
@@ -0,0 +1,39 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<SELECT NAME=<%$Name%>>
+% foreach my $stage (qw(TransactionCreate TransactionBatch)) {
+<OPTION VALUE=<%$stage%>
+<% ($stage eq $Default) && 'SELECTED' %>
+><% loc($stage) %>
+</OPTION>
+% }
+<%INIT>
+if ($Default eq '') {
+ $Default = 'TransactionCreate';
+}
+</%INIT>
+<%ARGS>
+$Default => 'TransactionCreate'
+$Name => 'Stage'
+</%ARGS>