summaryrefslogtreecommitdiff
path: root/rt/html
diff options
context:
space:
mode:
Diffstat (limited to 'rt/html')
-rw-r--r--rt/html/Admin/CustomFields/GroupRights.html44
-rw-r--r--rt/html/Admin/CustomFields/Modify.html82
-rw-r--r--rt/html/Admin/CustomFields/Objects.html14
-rw-r--r--rt/html/Admin/CustomFields/UserRights.html28
-rw-r--r--rt/html/Admin/CustomFields/index.html35
-rw-r--r--rt/html/Admin/Elements/AddCustomFieldValue44
-rw-r--r--rt/html/Admin/Elements/CreateUserCalled10
-rw-r--r--rt/html/Admin/Elements/CustomFieldTabs6
-rw-r--r--rt/html/Admin/Elements/EditCustomField56
-rw-r--r--rt/html/Admin/Elements/EditCustomFieldValues24
-rw-r--r--rt/html/Admin/Elements/EditCustomFields34
-rw-r--r--rt/html/Admin/Elements/EditQueueWatchers12
-rw-r--r--rt/html/Admin/Elements/EditScrip242
-rw-r--r--rt/html/Admin/Elements/EditScrips34
-rw-r--r--rt/html/Admin/Elements/EditTemplates50
-rw-r--r--rt/html/Admin/Elements/EditUserComments14
-rwxr-xr-xrt/html/Admin/Elements/GlobalCustomFieldTabs6
-rw-r--r--rt/html/Admin/Elements/GroupTabs6
-rw-r--r--rt/html/Admin/Elements/Header6
-rw-r--r--rt/html/Admin/Elements/ListGlobalCustomFields8
-rw-r--r--rt/html/Admin/Elements/ListGlobalScrips19
-rw-r--r--rt/html/Admin/Elements/ModifyTemplate56
-rw-r--r--rt/html/Admin/Elements/ObjectCustomFields6
-rw-r--r--rt/html/Admin/Elements/PickCustomFields40
-rw-r--r--rt/html/Admin/Elements/PickObjects39
-rw-r--r--rt/html/Admin/Elements/QueueRightsForUser12
-rw-r--r--rt/html/Admin/Elements/QueueTabs6
-rw-r--r--rt/html/Admin/Elements/SelectCustomFieldLookupType12
-rw-r--r--rt/html/Admin/Elements/SelectCustomFieldType12
-rw-r--r--rt/html/Admin/Elements/SelectGroups12
-rw-r--r--rt/html/Admin/Elements/SelectModifyGroup8
-rw-r--r--rt/html/Admin/Elements/SelectModifyQueue8
-rw-r--r--rt/html/Admin/Elements/SelectModifyUser8
-rw-r--r--rt/html/Admin/Elements/SelectNewGroupMembers24
-rw-r--r--rt/html/Admin/Elements/SelectRights40
-rw-r--r--rt/html/Admin/Elements/SelectScrip18
-rw-r--r--rt/html/Admin/Elements/SelectScripAction19
-rw-r--r--rt/html/Admin/Elements/SelectScripCondition20
-rw-r--r--rt/html/Admin/Elements/SelectSingleOrMultiple6
-rw-r--r--rt/html/Admin/Elements/SelectStage12
-rw-r--r--rt/html/Admin/Elements/SelectTemplate24
-rw-r--r--rt/html/Admin/Elements/SelectUsers12
-rw-r--r--rt/html/Admin/Elements/SystemTabs11
-rw-r--r--rt/html/Admin/Elements/Tabs6
-rwxr-xr-xrt/html/Admin/Elements/ToolTabs6
-rw-r--r--rt/html/Admin/Elements/UserTabs9
-rw-r--r--rt/html/Admin/Global/CustomFields/Groups.html47
-rwxr-xr-xrt/html/Admin/Global/CustomFields/Queue-Tickets.html47
-rwxr-xr-xrt/html/Admin/Global/CustomFields/Queue-Transactions.html47
-rw-r--r--rt/html/Admin/Global/CustomFields/Users.html47
-rw-r--r--rt/html/Admin/Global/CustomFields/index.html8
-rw-r--r--rt/html/Admin/Global/GroupRights.html62
-rw-r--r--rt/html/Admin/Global/Scrip.html45
-rw-r--r--rt/html/Admin/Global/Scrips.html6
-rw-r--r--rt/html/Admin/Global/Template.html16
-rw-r--r--rt/html/Admin/Global/Templates.html6
-rw-r--r--rt/html/Admin/Global/UserRights.html30
-rw-r--r--rt/html/Admin/Global/index.html16
-rw-r--r--rt/html/Admin/Groups/CustomFields.html6
-rw-r--r--rt/html/Admin/Groups/GroupRights.html48
-rw-r--r--rt/html/Admin/Groups/History.html8
-rw-r--r--rt/html/Admin/Groups/Members.html78
-rw-r--r--rt/html/Admin/Groups/Modify.html54
-rw-r--r--rt/html/Admin/Groups/UserRights.html32
-rw-r--r--rt/html/Admin/Groups/index.html38
-rw-r--r--rt/html/Admin/Queues/CustomField.html6
-rw-r--r--rt/html/Admin/Queues/CustomFields.html6
-rw-r--r--rt/html/Admin/Queues/GroupRights.html60
-rw-r--r--rt/html/Admin/Queues/Modify.html96
-rw-r--r--rt/html/Admin/Queues/People.html50
-rw-r--r--rt/html/Admin/Queues/Scrip.html67
-rw-r--r--rt/html/Admin/Queues/Scrips.html8
-rw-r--r--rt/html/Admin/Queues/Template.html16
-rw-r--r--rt/html/Admin/Queues/Templates.html6
-rw-r--r--rt/html/Admin/Queues/UserRights.html28
-rw-r--r--rt/html/Admin/Queues/index.html24
-rw-r--r--rt/html/Admin/Tools/Configuration.html10
-rw-r--r--rt/html/Admin/Tools/index.html6
-rw-r--r--rt/html/Admin/Users/CustomFields.html6
-rw-r--r--rt/html/Admin/Users/History.html8
-rw-r--r--rt/html/Admin/Users/Memberships.html6
-rw-r--r--rt/html/Admin/Users/Modify.html306
-rw-r--r--rt/html/Admin/Users/index.html28
-rw-r--r--rt/html/Admin/autohandler6
-rw-r--r--rt/html/Admin/index.html12
-rw-r--r--rt/html/Approvals/Display.html14
-rw-r--r--rt/html/Approvals/Elements/Approve70
-rw-r--r--rt/html/Approvals/Elements/PendingMyApproval35
-rw-r--r--rt/html/Approvals/Elements/ShowDependency28
-rw-r--r--rt/html/Approvals/Elements/Tabs6
-rw-r--r--rt/html/Approvals/index.html8
-rw-r--r--rt/html/Download/CustomFieldValue/dhandler6
-rw-r--r--rt/html/Download/Tabular/dhandler6
-rw-r--r--rt/html/Elements/BevelBoxRaisedEnd10
-rw-r--r--rt/html/Elements/BevelBoxRaisedStart12
-rw-r--r--rt/html/Elements/Callback6
-rw-r--r--rt/html/Elements/Checkbox8
-rw-r--r--rt/html/Elements/CollectionAsTable/Header20
-rw-r--r--rt/html/Elements/CollectionAsTable/ParseFormat6
-rw-r--r--rt/html/Elements/CollectionAsTable/Row23
-rw-r--r--rt/html/Elements/CreateTicket12
-rw-r--r--rt/html/Elements/EditCustomField16
-rw-r--r--rt/html/Elements/EditCustomFieldBinary10
-rw-r--r--rt/html/Elements/EditCustomFieldFreeform22
-rw-r--r--rt/html/Elements/EditCustomFieldImage12
-rw-r--r--rt/html/Elements/EditCustomFieldSelect84
-rw-r--r--rt/html/Elements/EditCustomFieldText10
-rw-r--r--rt/html/Elements/EditCustomFieldWikitext10
-rwxr-xr-xrt/html/Elements/EditLinks115
-rw-r--r--rt/html/Elements/EmailInput0
-rw-r--r--rt/html/Elements/Error22
-rw-r--r--rt/html/Elements/Footer47
-rw-r--r--rt/html/Elements/GotoTicket8
-rw-r--r--rt/html/Elements/Header119
-rw-r--r--rt/html/Elements/ListActions30
-rw-r--r--rt/html/Elements/Login80
-rw-r--r--rt/html/Elements/Menu128
-rw-r--r--rt/html/Elements/MessageBox10
-rw-r--r--rt/html/Elements/MyRT2
-rw-r--r--rt/html/Elements/MyRequests33
-rw-r--r--rt/html/Elements/MyTickets34
-rw-r--r--rt/html/Elements/PageLayout211
-rw-r--r--rt/html/Elements/QueryString13
-rw-r--r--rt/html/Elements/QuickCreate37
-rw-r--r--rt/html/Elements/Quicksearch57
-rw-r--r--rt/html/Elements/RT__Ticket/ColumnMap39
-rw-r--r--rt/html/Elements/Refresh22
-rw-r--r--rt/html/Elements/ScrubHTML8
-rw-r--r--rt/html/Elements/Section15
-rw-r--r--rt/html/Elements/SelectAttachmentField18
-rw-r--r--rt/html/Elements/SelectBoolean17
-rw-r--r--rt/html/Elements/SelectCustomFieldOperator18
-rw-r--r--rt/html/Elements/SelectCustomFieldValue10
-rw-r--r--rt/html/Elements/SelectDate14
-rw-r--r--rt/html/Elements/SelectDateRelation16
-rw-r--r--rt/html/Elements/SelectDateType26
-rw-r--r--rt/html/Elements/SelectEqualityOperator16
-rw-r--r--rt/html/Elements/SelectGroups12
-rw-r--r--rt/html/Elements/SelectLang16
-rw-r--r--rt/html/Elements/SelectLinkType16
-rw-r--r--rt/html/Elements/SelectMatch18
-rw-r--r--rt/html/Elements/SelectNewTicketQueue45
-rw-r--r--rt/html/Elements/SelectOwner16
-rw-r--r--rt/html/Elements/SelectQueue69
-rw-r--r--rt/html/Elements/SelectResultsPerPage17
-rw-r--r--rt/html/Elements/SelectSortOrder14
-rw-r--r--rt/html/Elements/SelectStatus14
-rw-r--r--rt/html/Elements/SelectTicketSortBy12
-rw-r--r--rt/html/Elements/SelectTicketTypes12
-rw-r--r--rt/html/Elements/SelectUsers12
-rw-r--r--rt/html/Elements/SelectWatcherType14
-rw-r--r--rt/html/Elements/SetupSessionCookie128
-rw-r--r--rt/html/Elements/ShowCustomFieldBinary6
-rw-r--r--rt/html/Elements/ShowCustomFieldImage8
-rw-r--r--rt/html/Elements/ShowCustomFieldWikitext9
-rw-r--r--rt/html/Elements/ShowCustomFields37
-rw-r--r--rt/html/Elements/ShowLink8
-rwxr-xr-xrt/html/Elements/ShowLinks17
-rw-r--r--rt/html/Elements/ShowMemberships6
-rw-r--r--rt/html/Elements/SimpleSearch12
-rw-r--r--rt/html/Elements/Submit65
-rw-r--r--rt/html/Elements/Tabs15
-rw-r--r--rt/html/Elements/TicketList46
-rw-r--r--rt/html/Elements/TitleBox11
-rw-r--r--rt/html/Elements/TitleBoxEnd21
-rw-r--r--rt/html/Elements/TitleBoxStart49
-rw-r--r--rt/html/Helpers/EmailAutocomplete0
-rw-r--r--rt/html/NoAuth/Logout.html36
-rw-r--r--rt/html/NoAuth/Reminder.html6
-rw-r--r--rt/html/NoAuth/css/3.5-default/titlebox.css14
-rw-r--r--rt/html/NoAuth/css/dhandler30
-rw-r--r--rt/html/NoAuth/images/autohandler20
-rw-r--r--rt/html/NoAuth/images/bplogo.gifbin825 -> 755 bytes
-rw-r--r--rt/html/NoAuth/images/css/fieldbg-autocomplete.gifbin0 -> 1164 bytes
-rw-r--r--rt/html/NoAuth/js/scriptaculous/controls.js0
-rw-r--r--rt/html/NoAuth/js/scriptaculous/effects.js0
-rw-r--r--rt/html/NoAuth/js/scriptaculous/prototype.js0
-rw-r--r--rt/html/NoAuth/js/scriptaculous/scriptaculous.js0
-rw-r--r--rt/html/REST/1.0/Forms/queue/default6
-rw-r--r--rt/html/REST/1.0/Forms/queue/ns6
-rw-r--r--rt/html/REST/1.0/Forms/ticket/attachments17
-rw-r--r--rt/html/REST/1.0/Forms/ticket/default71
-rw-r--r--rt/html/REST/1.0/Forms/ticket/history27
-rw-r--r--rt/html/REST/1.0/Forms/ticket/links10
-rw-r--r--rt/html/REST/1.0/Forms/user/default6
-rw-r--r--rt/html/REST/1.0/Forms/user/ns6
-rw-r--r--rt/html/REST/1.0/NoAuth/mail-gateway19
-rw-r--r--rt/html/REST/1.0/autohandler6
-rw-r--r--rt/html/REST/1.0/dhandler21
-rw-r--r--rt/html/REST/1.0/logout6
-rw-r--r--rt/html/REST/1.0/search/dhandler6
-rw-r--r--rt/html/REST/1.0/search/ticket31
-rw-r--r--rt/html/REST/1.0/ticket/comment8
-rw-r--r--rt/html/REST/1.0/ticket/link11
-rw-r--r--rt/html/REST/1.0/ticket/merge6
-rw-r--r--rt/html/Search/Build.html313
-rw-r--r--rt/html/Search/Bulk.html482
-rw-r--r--rt/html/Search/Chart68
-rwxr-xr-xrt/html/Search/Edit.html12
-rw-r--r--rt/html/Search/Elements/BuildFormatString27
-rw-r--r--rt/html/Search/Elements/DisplayOptions73
-rw-r--r--rt/html/Search/Elements/EditFormat30
-rw-r--r--rt/html/Search/Elements/EditQuery24
-rw-r--r--rt/html/Search/Elements/EditSearches59
-rw-r--r--rt/html/Search/Elements/NewListActions14
-rw-r--r--rt/html/Search/Elements/PickBasics65
-rw-r--r--rt/html/Search/Elements/PickCFs6
-rw-r--r--rt/html/Search/Elements/PickCriteria20
-rw-r--r--rt/html/Search/Elements/SearchPrivacy6
-rw-r--r--rt/html/Search/Elements/SelectAndOr10
-rw-r--r--rt/html/Search/Elements/SelectGroup14
-rw-r--r--rt/html/Search/Elements/SelectLinks12
-rw-r--r--rt/html/Search/Elements/SelectPersonType16
-rw-r--r--rt/html/Search/Elements/SelectSearchObject6
-rw-r--r--rt/html/Search/Elements/SelectSearchesForObjects11
-rwxr-xr-xrt/html/Search/Results.html89
-rw-r--r--rt/html/Search/Results.rdf8
-rw-r--r--rt/html/Search/Results.tsv109
-rw-r--r--rt/html/Search/Simple.html18
-rw-r--r--rt/html/SelfService/Attachment/dhandler6
-rw-r--r--rt/html/SelfService/Closed.html15
-rw-r--r--rt/html/SelfService/Create.html92
-rwxr-xr-xrt/html/SelfService/CreateTicketInQueue.html6
-rw-r--r--rt/html/SelfService/Display.html64
-rw-r--r--rt/html/SelfService/Elements/GotoTicket8
-rw-r--r--rt/html/SelfService/Elements/Header6
-rw-r--r--rt/html/SelfService/Elements/MyRequests67
-rw-r--r--rt/html/SelfService/Elements/Tabs37
-rw-r--r--rt/html/SelfService/Error.html16
-rw-r--r--rt/html/SelfService/Prefs.html18
-rw-r--r--rt/html/SelfService/Update.html36
-rw-r--r--rt/html/SelfService/index.html14
-rw-r--r--rt/html/Ticket/Attachment/dhandler6
-rw-r--r--rt/html/Ticket/Create.html409
-rw-r--r--rt/html/Ticket/Display.html47
-rw-r--r--rt/html/Ticket/Elements/AddWatchers18
-rw-r--r--rt/html/Ticket/Elements/BulkLinks66
-rw-r--r--rt/html/Ticket/Elements/EditBasics75
-rw-r--r--rt/html/Ticket/Elements/EditCustomField6
-rw-r--r--rt/html/Ticket/Elements/EditCustomFields54
-rw-r--r--rt/html/Ticket/Elements/EditDates50
-rw-r--r--rt/html/Ticket/Elements/EditPeople32
-rw-r--r--rt/html/Ticket/Elements/EditWatchers17
-rwxr-xr-xrt/html/Ticket/Elements/FindAttachments6
-rwxr-xr-xrt/html/Ticket/Elements/LoadTextAttachments10
-rwxr-xr-xrt/html/Ticket/Elements/PreviewScrips21
-rw-r--r--rt/html/Ticket/Elements/ShowAttachments17
-rw-r--r--rt/html/Ticket/Elements/ShowBasics14
-rw-r--r--rt/html/Ticket/Elements/ShowCustomFields6
-rw-r--r--rt/html/Ticket/Elements/ShowDates68
-rw-r--r--rt/html/Ticket/Elements/ShowDependencies14
-rw-r--r--rt/html/Ticket/Elements/ShowGroupMembers13
-rw-r--r--rt/html/Ticket/Elements/ShowHistory74
-rw-r--r--rt/html/Ticket/Elements/ShowMembers19
-rw-r--r--rt/html/Ticket/Elements/ShowMessageHeaders42
-rw-r--r--rt/html/Ticket/Elements/ShowMessageStanza29
-rw-r--r--rt/html/Ticket/Elements/ShowPeople14
-rw-r--r--rt/html/Ticket/Elements/ShowQueue9
-rw-r--r--rt/html/Ticket/Elements/ShowRequestor29
-rw-r--r--rt/html/Ticket/Elements/ShowSummary91
-rw-r--r--rt/html/Ticket/Elements/ShowTransaction62
-rw-r--r--rt/html/Ticket/Elements/ShowTransactionAttachments23
-rw-r--r--rt/html/Ticket/Elements/ShowUserEntry12
-rw-r--r--rt/html/Ticket/Elements/Tabs94
-rw-r--r--rt/html/Ticket/History.html10
-rw-r--r--rt/html/Ticket/Modify.html22
-rw-r--r--rt/html/Ticket/ModifyAll.html71
-rw-r--r--rt/html/Ticket/ModifyDates.html19
-rw-r--r--rt/html/Ticket/ModifyLinks.html22
-rw-r--r--rt/html/Ticket/ModifyPeople.html16
-rw-r--r--rt/html/Ticket/ShowEmailRecord.html8
-rw-r--r--rt/html/Ticket/Update.html76
-rw-r--r--rt/html/Tools/Elements/Tabs40
-rw-r--r--rt/html/Tools/MyDay.html80
-rw-r--r--rt/html/Tools/Offline.html38
-rw-r--r--rt/html/User/Delegation.html6
-rw-r--r--rt/html/User/Elements/DelegateRights18
-rw-r--r--rt/html/User/Elements/GroupTabs6
-rw-r--r--rt/html/User/Elements/Tabs12
-rw-r--r--rt/html/User/Groups/Members.html54
-rw-r--r--rt/html/User/Groups/Modify.html38
-rw-r--r--rt/html/User/Groups/index.html14
-rw-r--r--rt/html/User/Prefs.html168
-rw-r--r--rt/html/Widgets/SavedSearch12
-rw-r--r--rt/html/Widgets/SelectionBox9
-rwxr-xr-xrt/html/Widgets/TitleBoxStart2
-rw-r--r--rt/html/autohandler343
-rw-r--r--rt/html/index.html87
-rw-r--r--rt/html/l6
289 files changed, 5771 insertions, 4019 deletions
diff --git a/rt/html/Admin/CustomFields/GroupRights.html b/rt/html/Admin/CustomFields/GroupRights.html
index 380fee479..a416327c5 100644
--- a/rt/html/Admin/CustomFields/GroupRights.html
+++ b/rt/html/Admin/CustomFields/GroupRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,46 +53,46 @@
&>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="GroupRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $CustomFieldObj->id %>">
+ <form method="post" action="GroupRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $CustomFieldObj->id %>" />
<h1><&|/l&>System groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToSystemInternalGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $CustomFieldObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>User defined groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToUserDefinedGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $Group->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $CustomFieldObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/CustomFields/Modify.html b/rt/html/Admin/CustomFields/Modify.html
index 4c3c92114..0202f0ad6 100644
--- a/rt/html/Admin/CustomFields/Modify.html
+++ b/rt/html/Admin/CustomFields/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,15 +53,15 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD="POST" ACTION="Modify.html" NAME="ModifyCustomField">
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<%$id %>">
+<form method="post" action="Modify.html" name="ModifyCustomField">
+<input type="hidden" class="hidden" name="id" value="<%$id %>" />
<table>
<tr>
<td class="label"><&|/l&>Name</&></td>
-<td><input name="Name" VALUE="<%$CustomFieldObj->Name%>" SIZE=20></td></tr>
+<td><input name="Name" value="<%$CustomFieldObj->Name%>" size="20" /></td></tr>
<tr>
<td class="label"><&|/l&>Description</&></td>
-<td><input name="Description" VALUE="<%$CustomFieldObj->Description%>" SIZE=80></td>
+<td><input name="Description" value="<%$CustomFieldObj->Description%>" size="80" /></td>
</tr>
<tr>
@@ -77,23 +79,64 @@
</td>
</tr>
<tr>
+<td class="label"><&|/l&>Validation</&></td>
+<td>
+<& /Widgets/ComboBox,
+ Name => 'Pattern',
+ Default => $CustomFieldObj->Pattern,
+ Size => 20,
+ Values => [
+ '(?#Mandatory).',
+ '(?#Digits)^[\d.]+$',
+ '(?#Year)^[12]\d{3}$',
+ ],
+&>
+</td></tr>
+</tr>
+<tr>
<td class="label">&nbsp;</td>
<td>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
+<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
+</td>
+</tr>
+<tr>
+<td class="label"><&|/l&>Link values to</&></td>
+</td>
+<td><input size="60" name="LinkValueTo" value="<%$CustomFieldObj->LinkValueTo%>" />
+<div class="hints">
+<&|/l&>RT can make this custom field's values into hyperlinks to another service.</&>
+<&|/l&>Fill in this field with a URL.</&>
+<&|/l&>RT will replace <tt>__id__</tt> and <tt>__CustomField__</tt> with the record id and custom field value, respectively</&>
+</div>
</td>
</tr>
+<tr>
+<td class="label"><&|/l&>Include page</&></td>
+</td>
+<td><input size="60" name="IncludeContentForValue" value="<%$CustomFieldObj->IncludeContentForValue%>" />
+<div class="hints">
+<&|/l&>RT can include content from another web service when showing this custom field.</&>
+<&|/l&>Fill in this field with a URL.</&>
+<&|/l&>RT will replace <tt>__id__</tt> and <tt>__CustomField__</tt> with the record id and custom field value, respectively</&>
+<i><&|/l&>Some browsers may only load content from the same domain as your RT server.</&></i>
+</div>
+</td>
+</tr>
+
+
+
</table>
-<BR>
-% if ($CustomFieldObj->Id && $CustomFieldObj->Type =~ /^Select/i) {
-<H2><&|/l&>Values</&></H2>
+<br />
+% if ($CustomFieldObj->Id && $CustomFieldObj->IsSelectionType) {
+<h2><&|/l&>Values</&></h2>
<div>
<& /Admin/Elements/EditCustomFieldValues, CustomField => $CustomFieldObj &>
<& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &>
</div>
% }
<&/Elements/Submit&>
-</FORM>
+</form>
@@ -115,7 +158,8 @@ else {
my ( $val, $msg ) = $CustomFieldObj->Create(Name => $Name,
TypeComposite => $TypeComposite,
LookupType => $LookupType,
- Description => $Description,);
+ Description => $Description,
+ Pattern => $Pattern,);
$m->comp("/Elements/Error", Why => loc( "Could not create CustomField", $msg ) ) unless ($val);
push @results, $msg;
$title = loc( 'Created CustomField [_1]', $CustomFieldObj->Name() );
@@ -124,7 +168,7 @@ else {
$CustomFieldObj->Load($id) || $m->comp("/Elements/Error", Why => loc('No CustomField') );
$title = loc( 'Editing CustomField [_1]', $CustomFieldObj->Name() );
- my @attribs = qw( Name TypeComposite LookupType Description);
+ my @attribs = qw( Pattern Name TypeComposite LookupType Description LinkValueTo IncludeContentForValue);
my @aresults = UpdateRecordObject( AttributesRef => \@attribs,
Object => $CustomFieldObj,
ARGSRef => \%ARGS );
@@ -167,7 +211,7 @@ foreach my $key (keys %ARGS) {
# Update any existing values
my $values = $CustomFieldObj->ValuesObj;
while (my $value = $values->Next) {
- foreach my $attr qw(Name Description SortOrder) {
+ foreach my $attr qw(Name Description SortOrder Category) {
my $param = $paramtag.$value->Id."-".$attr;
if ( $ARGS{$param} && ($value->$attr() ne $ARGS{$param})) {
@@ -184,9 +228,10 @@ while (my $value = $values->Next) {
# Add any new values
if ($ARGS{$paramtag."new-Name"}) {
- my ($id, $msg) = $CustomFieldObj->AddValue ( Name => $ARGS{$paramtag."new-Name"},
- Description => $ARGS{$paramtag."new-Description"},
- SortOrder => $ARGS{$paramtag."new-SortOrder"});
+ my ($id, $msg) = $CustomFieldObj->AddValue (
+ map { $_ => $ARGS{$paramtag."new-$_"} }
+ qw( Name Description SortOrder Category )
+ );
push (@results, $msg);
}
@@ -206,6 +251,7 @@ $LookupType => undef
$MaxValues => undef
$SortOrder => undef
$Description => undef
+$Pattern => undef
$Name => undef
$SetEnabled => undef
$Enabled => undef
diff --git a/rt/html/Admin/CustomFields/Objects.html b/rt/html/Admin/CustomFields/Objects.html
index 8f9e3657b..d829a0da3 100644
--- a/rt/html/Admin/CustomFields/Objects.html
+++ b/rt/html/Admin/CustomFields/Objects.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,9 +54,9 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="Objects.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<% $id %>">
-<INPUT TYPE=HIDDEN NAME="UpdateObjs" VALUE="1">
+<form action="Objects.html" method="post">
+<input type="hidden" class="hidden" name="id" value="<% $id %>" />
+<input type="hidden" class="hidden" name="UpdateObjs" value="1" />
<h2><&|/l&>Selected objects</&></h2>
<& /Admin/Elements/PickObjects, Objects => \@AssignedObjs, id => $id, Checked => 1 &>
@@ -62,7 +64,7 @@
<& /Admin/Elements/PickObjects, Objects => \@UnassignedObjs, id => $id &>
<& /Elements/Submit, CheckAll => 1, ClearAll => 1 &>
-</FORM>
+</form>
<%INIT>
my $CF = RT::CustomField->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/CustomFields/UserRights.html b/rt/html/Admin/CustomFields/UserRights.html
index e2df3a058..a7145977c 100644
--- a/rt/html/Admin/CustomFields/UserRights.html
+++ b/rt/html/Admin/CustomFields/UserRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,31 +51,31 @@ current_tab => "Admin/CustomFields/UserRights.html?id=".$id,
Title => $title, &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="UserRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $CustomFieldObj->id %>">
+ <form method="post" action="UserRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $CustomFieldObj->id %>" />
-<TABLE>
+<table>
% while (my $Member = $Users->Next()) {
% my $UserObj = $Member->MemberObj->Object();
% my $group = RT::Group->new($session{'CurrentUser'});
% $group->LoadACLEquivalenceGroup($Member->MemberObj);
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $UserObj->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId,
Object => $CustomFieldObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
- </TABLE>
+ </table>
<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/CustomFields/index.html b/rt/html/Admin/CustomFields/index.html
index 9854fb0ec..badee95a7 100644
--- a/rt/html/Admin/CustomFields/index.html
+++ b/rt/html/Admin/CustomFields/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,29 +50,44 @@
current_tab => 'Admin/CustomFields/',
Title => loc('Select a Custom Field') &>
+% my @types;
% my $prev_lookup = '';
% while (my $CustomFieldObj = $CustomFields->Next) {
% $CustomFieldObj->CurrentUserHasRight('AdminCustomField') or next;
% my $lookup = $CustomFieldObj->FriendlyLookupType;
% if ($lookup ne $prev_lookup) {
% if ($prev_lookup) {
-</UL>
+</ul>
% }
-<H2><% loc("Custom Fields for [_1]", $lookup) %></H2>
-<UL>
+<h2><% loc("Custom Fields for [_1]", $lookup) %></h2>
+<ul>
% $prev_lookup = $lookup;
+% push @types, [$lookup, $CustomFieldObj->LookupType];
% }
%
-<LI>
-<A HREF="Modify.html?id=<%$CustomFieldObj->id()%>"><%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></a>
-</LI>
+<li>
+<a href="Modify.html?id=<%$CustomFieldObj->id()%>"><%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></a>
+</li>
% }
% if ($prev_lookup) {
-</UL>
+</ul>
% }
+<form action="<%$RT::WebPath%>/Admin/CustomFields/index.html" method="get">
+<&|/l&>Only show custom fields for:</&>
+<select name="type">
+% for (@types) {
+<option value="<% $_->[1] %>"><% $_->[0] %></option>
+% }
+</select> <input type="submit" value="<%loc('Go!')%>" />
+</form>
+
+<%args>
+$type => undef
+</%args>
<%INIT>
my $CustomFields = RT::CustomFields->new($session{'CurrentUser'});
$CustomFields->UnLimit();
+$CustomFields->LimitToLookupType($type) if defined $type;
$CustomFields->OrderByCols( { FIELD => 'LookupType' }, { FIELD => 'Name' } );
</%INIT>
diff --git a/rt/html/Admin/Elements/AddCustomFieldValue b/rt/html/Admin/Elements/AddCustomFieldValue
index 3e3f414b3..39916e5ab 100644
--- a/rt/html/Admin/Elements/AddCustomFieldValue
+++ b/rt/html/Admin/Elements/AddCustomFieldValue
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,22 +45,28 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<b><&|/l&>Add Value</&></b></b></b></b>
-<TABLE BORDER="0">
-<TR><TD><small>
-<&|/l&>Sort</&>:<br>
-<input size=3 name="CustomField-<%$CustomField->Id%>-Value-new-SortOrder" >
-</TD>
-<TD><small>
-<&|/l&>Name</&>:<br>
-<input type="text" size=30 name="CustomField-<%$CustomField->Id%>-Value-new-Name" >
-</TD>
-<TD><small>
-<&|/l&>Description</&>:<br>
-<input type="text" size=50 name="CustomField-<%$CustomField->Id%>-Value-new-Description">
-</TD></TR>
-</TABLE>
-
+<b><&|/l&>Add Value</&></b>
+<table border="0">
+<tr><td>
+<&|/l&>Sort</&>:<br />
+<input size="3" name="CustomField-<%$CustomField->Id%>-Value-new-SortOrder" />
+</td>
+<td>
+<&|/l&>Name</&>:<br />
+<input type="text" size="30" name="CustomField-<%$CustomField->Id%>-Value-new-Name" />
+</td>
+<td>
+<&|/l&>Description</&>:<br />
+<input type="text" size="50" name="CustomField-<%$CustomField->Id%>-Value-new-Description" />
+</td>
+% if ($CustomField->Type ne 'Combobox') {
+<td>
+<&|/l&>Category</&>:<br />
+<input type="text" size="10" name="CustomField-<%$CustomField->Id%>-Value-new-Category" />
+</td>
+% }
+</tr>
+</table>
<%init>
</%init>
<%args>
diff --git a/rt/html/Admin/Elements/CreateUserCalled b/rt/html/Admin/Elements/CreateUserCalled
index 0dc6ac792..69183258e 100644
--- a/rt/html/Admin/Elements/CreateUserCalled
+++ b/rt/html/Admin/Elements/CreateUserCalled
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,6 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<FORM METHOD=get ACTION="<% $RT::WebPath %>/Admin/Users/Create.html">
-<&|/l&>New user called</&> <INPUT NAME="Name" size=10><input type=submit value="<&|/l&>Create</&>">
+<form method="get" action="<% $RT::WebPath %>/Admin/Users/Create.html">
+<&|/l&>New user called</&> <input name="Name" size="10" /><input type="submit" class="button" value="<&|/l&>Create</&>" />
</form>
diff --git a/rt/html/Admin/Elements/CustomFieldTabs b/rt/html/Admin/Elements/CustomFieldTabs
index d7acf33cc..078dbe0de 100644
--- a/rt/html/Admin/Elements/CustomFieldTabs
+++ b/rt/html/Admin/Elements/CustomFieldTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/EditCustomField b/rt/html/Admin/Elements/EditCustomField
index d8c5b29b2..d6dda06f3 100644
--- a/rt/html/Admin/Elements/EditCustomField
+++ b/rt/html/Admin/Elements/EditCustomField
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,43 +48,43 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="CustomField.html">
-<INPUT TYPE=HIDDEN NAME="CustomField" VALUE="<%$id %>">
-<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>">
+<form method="post" action="CustomField.html">
+<input type="hidden" class="hidden" name="CustomField" value="<%$id %>" />
+<input type="hidden" class="hidden" name="Queue" value="<%$Queue%>" />
-<TABLE WIDTH="100%" BORDER="0">
-<TR><TD ALIGN="RIGHT">
+<table width="100%" border="0">
+<tr><td align="right">
<&|/l&>Name</&>:
-</TD><TD>
-<input name="Name" VALUE="<%$CustomFieldObj->Name%>" SIZE=20>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Name" value="<%$CustomFieldObj->Name%>" size="20" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Description</&>:
-</TD><TD>
-<input name="Description" VALUE="<%$CustomFieldObj->Description%>" SIZE=80>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Description" value="<%$CustomFieldObj->Description%>" size="80" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Type</&>:
-</TD><TD>
+</td><td>
<& /Admin/Elements/SelectCustomFieldType, Name => "Type", Default => $CustomFieldObj->Type &>
-</TD></TR>
-<TR><TD>
-</TD><TD>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
-</TD></TR>
-</TABLE>
-
-<P>
+</td></tr>
+<tr><td>
+</td><td>
+<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
+</td></tr>
+</table>
+
+<p>
% if ($CustomFieldObj->Id and $CustomFieldObj->Type =~ /Select/) {
<h2><&|/l&>Values</&></h2>
-<font size=-1>
+<font size="-1">
<& /Admin/Elements/EditCustomFieldValues, CustomField => $CustomFieldObj &>
<& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &>
</font>
% }
<&/Elements/Submit, Label => loc('Create') &>
-</FORM>
+</form>
diff --git a/rt/html/Admin/Elements/EditCustomFieldValues b/rt/html/Admin/Elements/EditCustomFieldValues
index 9cc3858b9..e7da87cf7 100644
--- a/rt/html/Admin/Elements/EditCustomFieldValues
+++ b/rt/html/Admin/Elements/EditCustomFieldValues
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -54,23 +56,33 @@
<td><&|/l&>Sort</&></td>
<td><&|/l&>Name</&></td>
<td><&|/l&>Description</&></td>
+% if ($CustomField->Type ne 'Combobox') {
+<td><&|/l&>Category</&></td>
+% }
</tr>
% while (my $value = $values->Next) {
<tr>
<td>
-<input type="checkbox" name="Delete-CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>">
+<input type="checkbox" class="checkbox" name="Delete-CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>" />
+</td>
+<td>
+<input size="3" name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-SortOrder" value="<%$value->SortOrder%>" />
</td>
<td>
-<input size=3 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-SortOrder" value="<%$value->SortOrder%>">
+<input type="text" size="30" name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Name" value="<%$value->Name%>" />
</td>
<td>
-<input type="text" size=30 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Name" value="<%$value->Name%>">
+<font size="-1">
+<input type="text" size="50" name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Description" value="<%$value->Description%>" />
+</font>
</td>
+% if ($CustomField->Type ne 'Combobox') {
<td>
<font size="-1">
-<input type="text" size=50 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Description" value="<%$value->Description%>">
+<input type="text" size="10" name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Category" value="<%$value->Category%>" />
</font>
</td>
+% }
</tr>
% }
</table>
diff --git a/rt/html/Admin/Elements/EditCustomFields b/rt/html/Admin/Elements/EditCustomFields
index 1cd3df568..9b1176a40 100644
--- a/rt/html/Admin/Elements/EditCustomFields
+++ b/rt/html/Admin/Elements/EditCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,11 +47,11 @@
%# END BPS TAGGED BLOCK }}}
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="<%$RT::WebPath%><% $m->request_comp->path |n %>" METHOD="POST" NAME="EditCustomFields">
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<% $Object->Id %>"/>
-<INPUT TYPE=HIDDEN NAME="ObjectType" VALUE="<% $ObjectType %>"/>
-<INPUT TYPE=HIDDEN NAME="SubType" VALUE="<% $SubType %>"/>
-<INPUT TYPE=HIDDEN NAME="UpdateCFs" VALUE="1"/>
+<form action="<%$RT::WebPath%><% $m->request_comp->path |n %>" method="post" name="EditCustomFields">
+<input type="hidden" class="hidden" name="id" value="<% $Object->Id %>" />
+<input type="hidden" class="hidden" name="ObjectType" value="<% $ObjectType %>" />
+<input type="hidden" class="hidden" name="SubType" value="<% $SubType %>" />
+<input type="hidden" class="hidden" name="UpdateCFs" value="1" />
% if ($Object->Id) {
<h2><&|/l&>Global Custom Fields</&></h2>
@@ -61,7 +63,7 @@
<& PickCustomFields, CustomFields => \@UnassignedCFs, id => $id, SubType => $SubType &>
<& /Elements/Submit, CheckAll => 1, ClearAll => 1 &>
-</FORM>
+</form>
<%INIT>
@@ -71,7 +73,7 @@ my (@GlobalCFs, @UnassignedCFs);
my $id = $Object->Id;
if ($id and !$Object->CurrentUserHasRight('AssignCustomFields')) {
- $m->out('<P><i>', loc('(No custom fields)'), '</i></P>');
+ $m->out('<p><i>', loc('(No custom fields)'), '</i></p>');
return;
}
@@ -88,6 +90,20 @@ $ObjectCFs->UnLimit;
$ObjectCFs->LimitToObjectId($id);
$ObjectCFs->LimitToLookupType($lookup);
+# Check sanity of SortOrders
+my %SortOrders;
+$SortOrders{$_->SortOrder}++
+ while ($_ = $ObjectCFs->Next);
+
+# If there are duplicates, run though and squash them
+if (grep {$_ > 1} values %SortOrders) {
+ my $i = 1;
+ while (my $ObjectCF = $ObjectCFs->Next) {
+ $ObjectCF->SetSortOrder($i++);
+ }
+ $ObjectCFs->GotoFirstItem;
+}
+
# {{{ deal with moving sortorder of custom fields
if ($CustomField and $Move) {
my $SourceObj = RT::ObjectCustomField->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/EditQueueWatchers b/rt/html/Admin/Elements/EditQueueWatchers
index c93bf81f5..dc076f58a 100644
--- a/rt/html/Admin/Elements/EditQueueWatchers
+++ b/rt/html/Admin/Elements/EditQueueWatchers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,12 +49,12 @@
<ul>
<li><i><&|/l&>none</&></i>
% } else {
-<i><&|/l&>(Check box to delete)</&></i><br><BR>
+<i><&|/l&>(Check box to delete)</&></i><br /><br />
<ul>
% while (my $watcher=$Members->Next) {
<li>
-<INPUT TYPE=CHECKBOX NAME="Queue-<%$QueueObj->Id%>-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1"
- UNCHECKED>
+<input type="checkbox" class="checkbox" name="Queue-<%$QueueObj->Id%>-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1"
+ unchecked />
% if ($watcher->MemberObj->IsUser) {
<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->MemberObj->ObjectId%>">
% } else {
diff --git a/rt/html/Admin/Elements/EditScrip b/rt/html/Admin/Elements/EditScrip
index 907ae9a92..edf949ba3 100644
--- a/rt/html/Admin/Elements/EditScrip
+++ b/rt/html/Admin/Elements/EditScrip
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,150 +46,95 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Elements/ListActions, actions => \@actions &>
-
-<FORM METHOD=POST ACTION="Scrip.html">
-<input type="hidden" name="id" value="<%$id%>">
-<input type="hidden" name="Queue" value="<%$Queue%>">
-<& /Elements/TitleBoxStart, title => loc('Scrip Fields') &>
-<TABLE>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Description</&>:
-</TD>
-<TD>
-<input Name="Scrip-<%$id%>-Description" value="<%$scrip->Description%>">
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Condition</&>:
-</TD>
-<TD>
-<& /Admin/Elements/SelectScripCondition, Name => "Scrip-$id-ScripCondition", Default => $scrip->ConditionObj->Id &><BR>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Action</&>:
-</TD>
-<TD>
-<& /Admin/Elements/SelectScripAction, Name => "Scrip-$id-ScripAction", Default => $scrip->ActionObj->Id &>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Template</&>:
-</TD>
-<TD>
-<& /Admin/Elements/SelectTemplate, Name => "Scrip-$id-Template", Default => $scrip->TemplateObj->Id, Queue => $Queue &>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Stage</&>:
-</TD>
-<TD>
-<& /Admin/Elements/SelectStage, Name => "Scrip-$id-Stage", Default => $scrip->Stage &>
-</TD>
-</TR>
+<form method="post" action="Scrip.html">
+<input type="hidden" class="hidden" name="id" value="<% $id %>" />
+<input type="hidden" class="hidden" name="Queue" value="<% $Queue %>" />
+
+<&| /Widgets/TitleBox, title => loc('Scrip Fields') &>
+<table>
+
+<tr><td align="right"><&|/l&>Description</&>:</td><td>
+<input name="Scrip-<% $id %>-Description" value="<% $ARGS{"Scrip-$id-Description"} || $scrip->Description %>" />
+</td></tr>
+
+<tr><td align="right"><&|/l&>Condition</&>:</td><td>
+<& /Admin/Elements/SelectScripCondition,
+ Name => "Scrip-$id-ScripCondition",
+ Default => $ARGS{"Scrip-$id-ScripCondition"} || $scrip->ConditionObj->Id,
+&></td></tr>
+
+<tr><td align="right"><&|/l&>Action</&>:</td><td>
+<& /Admin/Elements/SelectScripAction,
+ Name => "Scrip-$id-ScripAction",
+ Default => $ARGS{"Scrip-$id-ScripAction"} || $scrip->ActionObj->Id,
+&></td></tr>
+
+<tr><td align="right"><&|/l&>Template</&>:</td><td>
+<& /Admin/Elements/SelectTemplate,
+ Name => "Scrip-$id-Template",
+ Default => $ARGS{"Scrip-$id-Template"} || $scrip->TemplateObj->Id,
+ Queue => $Queue,
+&></td></tr>
+
+<tr><td align="right"><&|/l&>Stage</&>:</td><td>
+<& /Admin/Elements/SelectStage,
+ Name => "Scrip-$id-Stage",
+ Default => $ARGS{"Scrip-$id-Stage"} || $scrip->Stage,
+&></td></tr>
+
</table>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+</&>
+
+<& /Elements/Submit,
+ Label => $SubmitLabel,
+ Caption => loc("Be sure to save your changes"),
+ Reset => 1,
+&><br />
-<br>
-<& /Elements/TitleBoxStart, title => loc('User Defined conditions and actions') &>
+<&| /Widgets/TitleBox, title => loc('User Defined conditions and actions') &>
<table>
-<TR>
-<TD colspan=2>
+<tr><td colspan="2">
<i><&|/l&>(Use these fields when you choose 'User Defined' for a condition or action)</&></i>
-</TD>
-</TR>
-<TR>
-<TD class=labeltop>
-<&|/l&>Custom condition</&>:
-</TD>
-<TD>
-<TEXTAREA COLS=80 ROWS=5 NAME="Scrip-<%$id%>-CustomIsApplicableCode"><%$scrip->CustomIsApplicableCode%></TEXTAREA>
-</TD>
-</TR>
-<TR>
-<TD class=labeltop>
-<&|/l&>Custom action preparation code</&>:
-</TD>
-<TD>
-<TEXTAREA COLS=80 ROWS=5 NAME="Scrip-<%$id%>-CustomPrepareCode"><%$scrip->CustomPrepareCode%></TEXTAREA>
-</TD>
-</TR>
-<TR>
-<TD class=labeltop>
-<&|/l&>Custom action cleanup code</&>:
-</TD>
-<TD>
-<TEXTAREA COLS=80 ROWS=5 NAME="Scrip-<%$id%>-CustomCommitCode"><%$scrip->CustomCommitCode%></TEXTAREA>
-</TD>
-</TR>
+</td></tr>
+
+<tr><td class="labeltop"><&|/l&>Custom condition</&>:</td><td>
+<textarea cols="80" rows="5" name="Scrip-<% $id %>-CustomIsApplicableCode"><% $ARGS{"Scrip-$id-CustomIsApplicableCode"} || $scrip->CustomIsApplicableCode %></textarea>
+</td></tr>
+
+<tr><td class="labeltop"><&|/l&>Custom action preparation code</&>:</td><td>
+<textarea cols="80" rows="5" name="Scrip-<% $id %>-CustomPrepareCode"><% $ARGS{"Scrip-$id-CustomPrepareCode"} || $scrip->CustomPrepareCode %></textarea>
+</td></tr>
+
+<tr><td class="labeltop"><&|/l&>Custom action cleanup code</&>:</td><td>
+<textarea cols="80" rows="5" name="Scrip-<% $id %>-CustomCommitCode"><% $ARGS{"Scrip-$id-CustomCommitCode"} || $scrip->CustomCommitCode %></textarea>
+</td></tr>
+
</table>
-<& /Elements/TitleBoxEnd &>
+</&>
-<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
+<& /Elements/Submit, Label => $SubmitLabel, Reset => 1 &>
-</FORM>
+</form>
<%init>
-my (@actions);
+my (@actions, $SubmitLabel);
-my $scrip = new RT::Scrip($session{'CurrentUser'});
-
-if ( $id eq 'new' ) {
+my $scrip = RT::Scrip->new( $session{'CurrentUser'} );
- my ( $retval, $msg ) = $scrip->Create(
- Queue => $Queue,
- ScripAction => $ARGS{"Scrip-new-ScripAction"},
- ScripCondition => $ARGS{"Scrip-new-ScripCondition"},
- Template => $ARGS{"Scrip-new-Template"},
- Description => $ARGS{"Scrip-new-Description"},
- CustomPrepareCode => $ARGS{"Scrip-new-CustomPrepareCode"},
- CustomCommitCode => $ARGS{"Scrip-new-CustomCommitCode"},
- CustomIsApplicableCode => $ARGS{"Scrip-new-CustomIsApplicableCode"},
- );
- if ( defined $retval ) {
- push @actions, $msg;
- $id = $scrip->id;
- }
- else {
- Abort( $msg);
- }
-}
-elsif ($id) {
- my ($val,$msg) =$scrip->Load($id);
- if ($val) {
- $id = $scrip->id;
- } else {
- Abort ($msg);
+if ( $id ) {
+ $scrip->Load( $id );
+ unless ( $id = $scrip->id ) {
+ push @actions, loc("Couldn't load scrip #[_1]", $id);
}
- my @attribs = qw (
- Queue
- ScripAction
- ScripCondition
- Template
- Stage
- Description
- CustomPrepareCode
- CustomCommitCode
- CustomIsApplicableCode
- );
- my @results = UpdateRecordObject( AttributesRef => \@attribs,
- AttributePrefix => 'Scrip-'.$scrip->Id,
- Object => $scrip,
- ARGSRef => \%ARGS );
- push (@actions, @results);
+ $SubmitLabel = loc('Update');
}
-elsif ($ARGS{'create'}) {
+unless ( $id ) {
$id = 'new';
+ $SubmitLabel = loc('Create');
}
-# }}}
</%init>
<%ARGS>
@@ -195,3 +142,42 @@ $id => undef
$title => undef
$Queue => 0
</%ARGS>
+
+<%METHOD Process>
+<%ARGS>
+$id => undef
+$Queue => undef
+</%ARGS>
+<%INIT>
+return ($id) unless $id;
+
+my $scrip = RT::Scrip->new( $session{'CurrentUser'} );
+if ( $id eq 'new' ) {
+ return $scrip->Create(
+ Queue => $Queue,
+ ScripAction => $ARGS{"Scrip-new-ScripAction"},
+ ScripCondition => $ARGS{"Scrip-new-ScripCondition"},
+ Template => $ARGS{"Scrip-new-Template"},
+ Description => $ARGS{"Scrip-new-Description"},
+ CustomPrepareCode => $ARGS{"Scrip-new-CustomPrepareCode"},
+ CustomCommitCode => $ARGS{"Scrip-new-CustomCommitCode"},
+ CustomIsApplicableCode => $ARGS{"Scrip-new-CustomIsApplicableCode"},
+ );
+}
+else {
+ $scrip->Load( $id );
+ return (undef, loc("Couldn't load scrip #[_1]", $id))
+ unless $scrip->id;
+
+ my @attribs = qw(Queue ScripAction ScripCondition Template Stage
+ Description CustomPrepareCode CustomCommitCode CustomIsApplicableCode);
+ my @results = UpdateRecordObject(
+ AttributesRef => \@attribs,
+ AttributePrefix => 'Scrip-'.$scrip->Id,
+ Object => $scrip,
+ ARGSRef => \%ARGS
+ );
+ return ($scrip->id, @results);
+}
+</%INIT>
+</%METHOD>
diff --git a/rt/html/Admin/Elements/EditScrips b/rt/html/Admin/Elements/EditScrips
index 9526118b5..f3ef8fbe5 100644
--- a/rt/html/Admin/Elements/EditScrips
+++ b/rt/html/Admin/Elements/EditScrips
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,34 +48,35 @@
<& /Elements/ListActions, actions => \@actions &>
<form action="Scrips.html" method="post">
-<input type="hidden" name="id" value="<%$id%>">
+<input type="hidden" class="hidden" name="id" value="<%$id%>" />
<h2><&|/l&>Current Scrips</&></h2>
% if ($Scrips->Count == 0 ) {
-<P><i><&|/l&>(No scrips)</&></i></P>
+<p><i><&|/l&>(No scrips)</&></i></p>
% } else {
-<TABLE>
-<P><i><&|/l&>(Check box to delete)</&></i></P>
+<table width="100%">
+<p><i><&|/l&>(Check box to delete)</&></i></p>
% while (my $scrip = $Scrips->Next ) {
-<TR>
-<TD>
-<input type="checkbox" name="DeleteScrip-<%$scrip->Id%>" value="1">
-</TD>
-<TD>
-<a href="Scrip.html?id=<%$scrip->Id%>&Queue=<%$id%>"><% $scrip->Description || "<i>(".loc('no value').")</i>" |n %></a><br>
+<tr>
+<td>
+<input type="checkbox" class="checkbox" name="DeleteScrip-<%$scrip->Id%>" value="1" />
+</td>
+<td>
+<a href="Scrip.html?id=<%$scrip->Id%>&Queue=<%$id%>"><% $scrip->Description || "<i>(".loc('no value').")</i>" |n %></a><br />
<small><&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name) &>[_1] [_2] with template [_3]</&></small>
-</TD>
-</TR>
+</td>
+</tr>
% }
-</TABLE>
+</table>
% }
<& /Elements/Submit,
Caption => loc("Delete selected scrips"),
Label => loc("Delete") &>
</form>
+
<%init>
my (@actions);
@@ -92,6 +95,7 @@ else {
$Scrips->LimitToGlobal();
}
+$Scrips->OrderBy( FIELD => 'description' );
diff --git a/rt/html/Admin/Elements/EditTemplates b/rt/html/Admin/Elements/EditTemplates
index 207ffd001..5d770ef75 100644
--- a/rt/html/Admin/Elements/EditTemplates
+++ b/rt/html/Admin/Elements/EditTemplates
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,39 +47,39 @@
%# END BPS TAGGED BLOCK }}}
<& /Elements/ListActions, actions => \@actions &>
-<FORM METHOD=GET ACTION="Templates.html">
-<INPUT TYPE="Hidden" NAME="id" VALUE="<%$id%>">
+<form method="get" action="Templates.html">
+<input type="hidden" class="hidden" name="id" value="<%$id%>" />
% if ($Templates->Count == 0 ) {
-<P><i><&|/l&>(No templates)</&></i></P>
+<p><i><&|/l&>(No templates)</&></i></p>
% } else {
-<TABLE>
-<TR>
-<TH>
+<table width="100%">
+<tr>
+<th>
<i><&|/l&>(Check box to delete)</&></i>
-</TH>
-<TH>
-</TH>
-</TR>
+</th>
+<th>
+</th>
+</tr>
% my $count;
% while (my $TemplateObj = $Templates->Next) {
-<TR>
-<TD>
-<input type="checkbox" name="DeleteTemplate-<%$TemplateObj->Id%>" value="1">
-</TD>
-<TD>
-<A HREF="Template.html?Queue=<%$id%>&Template=<%$TemplateObj->id()%>">
-<B><% loc($TemplateObj->Name) %></B></A>
-<br><% loc($TemplateObj->Description) %>
-</TD>
-</TR>
+<tr>
+<td>
+<input type="checkbox" class="checkbox" name="DeleteTemplate-<%$TemplateObj->Id%>" value="1" />
+</td>
+<td>
+<a href="Template.html?Queue=<%$id%>&Template=<%$TemplateObj->id()%>">
+<strong><% loc($TemplateObj->Name) %></strong></a>
+<br /><% loc($TemplateObj->Description) %>
+</td>
+</tr>
% }
-</TABLE>
+</table>
% }
<& /Elements/Submit, Label => loc('Delete Template') &>
-</FORM>
+</form>
<%INIT>
my $Templates = RT::Templates->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/EditUserComments b/rt/html/Admin/Elements/EditUserComments
index fb96dc09a..5035189da 100644
--- a/rt/html/Admin/Elements/EditUserComments
+++ b/rt/html/Admin/Elements/EditUserComments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,10 +46,10 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Elements/Header, Title => "Comments about $name" &>
-<&|/l&>These comments aren't generally visible to the user</&>:<br>
-<input type="hidden" name="id" value="<%$id%>">
-<TEXTAREA COLS=60 ROWS=15 WRAP=SOFT NAME="Comments"><% $UserObj->Comments %></TEXTAREA>
-</FORM>
+<&|/l&>These comments aren't generally visible to the user</&>:<br />
+<input type="hidden" class="hidden" name="id" value="<%$id%>" />
+<textarea cols="60" rows="15" wrap="soft" name="Comments"><% $UserObj->Comments %></textarea>
+</form>
<%ARGS>
$UserObj => undef
diff --git a/rt/html/Admin/Elements/GlobalCustomFieldTabs b/rt/html/Admin/Elements/GlobalCustomFieldTabs
index 8d4eaca23..db69df817 100755
--- a/rt/html/Admin/Elements/GlobalCustomFieldTabs
+++ b/rt/html/Admin/Elements/GlobalCustomFieldTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/GroupTabs b/rt/html/Admin/Elements/GroupTabs
index 60edda40e..bf6a1cfa5 100644
--- a/rt/html/Admin/Elements/GroupTabs
+++ b/rt/html/Admin/Elements/GroupTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/Header b/rt/html/Admin/Elements/Header
index b80908094..e9b0356a1 100644
--- a/rt/html/Admin/Elements/Header
+++ b/rt/html/Admin/Elements/Header
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/ListGlobalCustomFields b/rt/html/Admin/Elements/ListGlobalCustomFields
index 3df9d6292..24308fcd8 100644
--- a/rt/html/Admin/Elements/ListGlobalCustomFields
+++ b/rt/html/Admin/Elements/ListGlobalCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,7 +49,7 @@
% while (my $CustomFieldObj = $CustomFields->Next) {
% $count++;
<font size="-1"><%$CustomFieldObj->id%>/<% loc($CustomFieldObj->Type) %>/<%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></font>
-<BR>
+<br />
% }
% if (!$count) {
<font size="-1"><&|/l&>(No custom fields)</&></font>
diff --git a/rt/html/Admin/Elements/ListGlobalScrips b/rt/html/Admin/Elements/ListGlobalScrips
index 2e3791257..e2e8b15aa 100644
--- a/rt/html/Admin/Elements/ListGlobalScrips
+++ b/rt/html/Admin/Elements/ListGlobalScrips
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,29 +45,28 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-
% if ($Scrips->Count == 0) {
-<P><i><&|/l&>(No scrips)</&></i></P>
+<p><i><&|/l&>(No scrips)</&></i></p>
% } else {
-<UL>
+<ul>
% while (my $scrip = $Scrips->Next ) {
-<LI>
+<li>
<a href="<%$RT::WebPath%>/Admin/Global/Scrip.html?id=<%$scrip->Id%>&Queue=<%0%>">
% if ($scrip->Description) {
<% $scrip->Description %>
% } else {
<i>(<&|/l, $scrip->Id&>Scrip #[_1]</&>)</i>
% }
-</a><br>
+</a><br />
<small><&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name) &>[_1] [_2] with template [_3]</&></small>
-</LI>
+</li>
% }
-</UL>
+</ul>
% }
diff --git a/rt/html/Admin/Elements/ModifyTemplate b/rt/html/Admin/Elements/ModifyTemplate
index 6749f3e65..b667e056b 100644
--- a/rt/html/Admin/Elements/ModifyTemplate
+++ b/rt/html/Admin/Elements/ModifyTemplate
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,33 +45,33 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
-<TR>
-<TD ALIGN=RIGHT>
+<table>
+<tr>
+<td align="right">
<&|/l&>Name</&>:
-</TD>
-<TD>
-<input name="Name" VALUE="<%$Name%>" SIZE=20><BR>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
+</td>
+<td>
+<input name="Name" value="<%$Name%>" size="20" /><br />
+</td>
+</tr>
+<tr>
+<td align="right">
<&|/l&>Description</&>:
-</TD>
-<TD>
-<input name="Description" VALUE="<%$Description%>" SIZE=80><BR>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT VALIGN=TOP>
-<&|/l&>Content</&>:<BR>
-</TD>
-<TD>
-<TEXTAREA NAME=Content ROWS=25 COLS=80 WRAP=SOFT>
-<%$Content%></TEXTAREA>
-</TD>
-</TR>
-</TABLE>
+</td>
+<td>
+<input name="Description" value="<%$Description%>" size="80" /><br />
+</td>
+</tr>
+<tr>
+<td align="right" valign="top">
+<&|/l&>Content</&>:<br />
+</td>
+<td>
+<textarea name="Content" rows="25" cols="80" wrap="soft">
+<%$Content%></textarea>
+</td>
+</tr>
+</table>
<%INIT>
diff --git a/rt/html/Admin/Elements/ObjectCustomFields b/rt/html/Admin/Elements/ObjectCustomFields
index a87e1579d..61a10cd2b 100644
--- a/rt/html/Admin/Elements/ObjectCustomFields
+++ b/rt/html/Admin/Elements/ObjectCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/PickCustomFields b/rt/html/Admin/Elements/PickCustomFields
index c2a30f9a3..7b88433f1 100644
--- a/rt/html/Admin/Elements/PickCustomFields
+++ b/rt/html/Admin/Elements/PickCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,35 +48,35 @@
% if (@CustomFields == 0) {
<p><i><&|/l&>(None)</&></i></p>
% } else {
-<TABLE cellspacing=0 cellpadding=2>
+<table cellspacing="0" cellpadding="2">
% my $count;
% foreach my $CustomFieldObj (@CustomFields) {
-<TR>
+<tr>
% if (!$ReadOnly) {
- <TD valign="TOP">
-<input type="checkbox" name="Object-<%$id%>-CF-<%$CustomFieldObj->Id%>" value="1" <% $Checked ? 'CHECKED' : '' %>
->
- </TD>
+ <td valign="top">
+<input type="checkbox" class="checkbox" name="Object-<%$id%>-CF-<%$CustomFieldObj->Id%>" value="1" <% $Checked ? 'CHECKED' : '' %>
+/>
+ </td>
% }
- <TD valign="TOP">
- <A HREF="<%$RT::WebPath%>/Admin/CustomFields/Modify.html?id=<%$CustomFieldObj->id()%>">
+ <td valign="top">
+ <a href="<%$RT::WebPath%>/Admin/CustomFields/Modify.html?id=<%$CustomFieldObj->id()%>">
% if ($CustomFieldObj->Name) {
<b><%$CustomFieldObj->Name%></b>
% } else {
<i>(<&|/l&>no name</&>)</i>
% }
-</a><br>
+</a><br />
<%$CustomFieldObj->Description%>
- </TD>
- <TD valign="TOP">
+ </td>
+ <td valign="top">
<i><% $CustomFieldObj->FriendlyTypeComposite %></i>
- </TD>
+ </td>
% # show 'move up' unless it's the first item
% if ($count++ and $Checked) {
- <TD valign="TOP">
+ <td valign="top">
[<a href="<%$RT::WebPath%><% $m->request_comp->path |n %>?id=<%$id%>&SubType=<%$SubType%>&CustomField=<%$CustomFieldObj->id%>&Move=-1"><&|/l&>Move up</&></a>]
% } else {
- <TD valign="TOP" ALIGN=RIGHT>
+ <td valign="top" align="right">
% }
% # show 'move down' unless it's the last item
@@ -82,10 +84,10 @@
% $m->print(' | ') if $count > 1;
[<a href="<%$RT::WebPath%><% $m->request_comp->path |n %>?id=<%$id%>&SubType=<%$SubType%>&CustomField=<%$CustomFieldObj->id%>&Move=1"><&|/l&>Move down</&></a>]
% }
- </TD>
-</TR>
+ </td>
+</tr>
% }
-</TABLE>
+</table>
% }
<%ARGS>
@CustomFields
diff --git a/rt/html/Admin/Elements/PickObjects b/rt/html/Admin/Elements/PickObjects
index b07a88240..5fc086350 100644
--- a/rt/html/Admin/Elements/PickObjects
+++ b/rt/html/Admin/Elements/PickObjects
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,33 +46,32 @@
%#
%# END BPS TAGGED BLOCK }}}
% if (@Objects == 0) {
-<P><i><&|/l&>(None)</&></i></P>
+<p><i><&|/l&>(None)</&></i></p>
% } else {
-<TABLE cellspacing=0 cellpadding=2>
+<table cellspacing="0" cellpadding="2">
% my $count;
% foreach my $Object (@Objects) {
-<TR>
+<tr>
+% my $id = "Object-".$Object->id."-CF-".$id;
% if (!$ReadOnly) {
- <TD valign="TOP">
-<input type="checkbox" name="Object-<%$Object->id%>-CF-<%$id%>" value="1" <% $Checked ? 'CHECKED' : ''%>
->
- </TD>
+ <td valign="top">
+<input type="checkbox" id="<% $id %>" name="<% $id %>" value="1" <% $Checked ? 'CHECKED' : ''%>
+/>
+ </td>
% }
- <TD valign="TOP">
+ <td valign="top">
+ <label for="<% $id %>">
% if ($Object->Name) {
- <b><%$Object->Name%></b><br>
+ <b><%$Object->Name%></b><br />
% } else {
- <i>(<%loc("no name")%>)</i><br>
+ <i>(<%loc("no name")%>)</i><br />
% }
<%$Object->can('Description') && $Object->Description%>
- </TD>
-%# <TD valign="TOP">
-%# <i><% $CustomFieldObj->FriendlyTypeComposite %></i>
-%# </TD>
- </TD>
-</TR>
+ </label>
+ </td>
+</tr>
% }
-</TABLE>
+</table>
% }
<%ARGS>
@Objects
diff --git a/rt/html/Admin/Elements/QueueRightsForUser b/rt/html/Admin/Elements/QueueRightsForUser
index 01f294a59..15af78464 100644
--- a/rt/html/Admin/Elements/QueueRightsForUser
+++ b/rt/html/Admin/Elements/QueueRightsForUser
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,13 +45,13 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<UL>
+<ul>
%while(my $ACE = $ACL->Next) {
-<LI><checkbox name="delete_ace_<%$ACE->id%>" value="1"> <% loc($ACE->RightName) %> (<%$ACE->UserObj->RealName%>)
+<li><checkbox name="delete_ace_<%$ACE->id%>" value="1"> <% loc($ACE->RightName) %> (<%$ACE->UserObj->RealName%>)
%}
-</UL>
+</ul>
<%INIT>
my $ACL = new RT::ACL($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/QueueTabs b/rt/html/Admin/Elements/QueueTabs
index 93522d0a2..0d0670468 100644
--- a/rt/html/Admin/Elements/QueueTabs
+++ b/rt/html/Admin/Elements/QueueTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/SelectCustomFieldLookupType b/rt/html/Admin/Elements/SelectCustomFieldLookupType
index ec9f740b9..ff8bfdb3b 100644
--- a/rt/html/Admin/Elements/SelectCustomFieldLookupType
+++ b/rt/html/Admin/Elements/SelectCustomFieldLookupType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
%for my $option ($cf->LookupTypes) {
-<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyLookupType($option) %></OPTION>
+<option value="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyLookupType($option) %></option>
%}
-</SELECT>
+</select>
<%INIT>
my $cf = RT::CustomField->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SelectCustomFieldType b/rt/html/Admin/Elements/SelectCustomFieldType
index 3f25b8e71..c913979e9 100644
--- a/rt/html/Admin/Elements/SelectCustomFieldType
+++ b/rt/html/Admin/Elements/SelectCustomFieldType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
%for my $option ($cf->TypeComposites) {
-<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyTypeComposite($option) %></OPTION>
+<option value="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyTypeComposite($option) %></option>
%}
-</SELECT>
+</select>
<%INIT>
my $cf = RT::CustomField->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SelectGroups b/rt/html/Admin/Elements/SelectGroups
index 92bd47587..662273a0a 100644
--- a/rt/html/Admin/Elements/SelectGroups
+++ b/rt/html/Admin/Elements/SelectGroups
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT MULTIPLE NAME="<%$Name%>" SIZE=10>
+<select multiple name="<%$Name%>" size="10">
%while (my $group = $groups->Next) {
-<OPTION VALUE="<%$group->id%>"><%$group->Name%>
+<option value="<%$group->id%>"><%$group->Name%>
%}
-</SELECT>
+</select>
<%INIT>
my $groups = new RT::Groups($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SelectModifyGroup b/rt/html/Admin/Elements/SelectModifyGroup
index 272e1f0c7..4db67c53a 100644
--- a/rt/html/Admin/Elements/SelectModifyGroup
+++ b/rt/html/Admin/Elements/SelectModifyGroup
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
%while ( $Group = $Groups->Next) {
-<A HREF="Modify.html?id=<%$Group->id%>"><%$Group->id%>: <%$Group->Name%></a><BR>
+<a href="Modify.html?id=<%$Group->id%>"><%$Group->id%>: <%$Group->Name%></a><br />
%}
<%INIT>
my ($Group);
diff --git a/rt/html/Admin/Elements/SelectModifyQueue b/rt/html/Admin/Elements/SelectModifyQueue
index 3a30d09c8..c3e6a98e4 100644
--- a/rt/html/Admin/Elements/SelectModifyQueue
+++ b/rt/html/Admin/Elements/SelectModifyQueue
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
%while ( $queue = $queues->Next) {
-<A HREF="Modify.html?id=<%$queue->id%>"><%$queue->id%>: <%$queue->Name%></a><BR>
+<a href="Modify.html?id=<%$queue->id%>"><%$queue->id%>: <%$queue->Name%></a><br />
%}
<%INIT>
my ($queue);
diff --git a/rt/html/Admin/Elements/SelectModifyUser b/rt/html/Admin/Elements/SelectModifyUser
index fc6c01205..2b28402f9 100644
--- a/rt/html/Admin/Elements/SelectModifyUser
+++ b/rt/html/Admin/Elements/SelectModifyUser
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
%while ( $user = $users->Next) {
-<A HREF="Modify.html?id=<%$user->id%>"><%$user->id%>: <%$user->Name%></a><BR>
+<a href="Modify.html?id=<%$user->id%>"><%$user->id%>: <%$user->Name%></a><br />
%}
<%INIT>
my ($user);
diff --git a/rt/html/Admin/Elements/SelectNewGroupMembers b/rt/html/Admin/Elements/SelectNewGroupMembers
index 95056aec9..34d711fd0 100644
--- a/rt/html/Admin/Elements/SelectNewGroupMembers
+++ b/rt/html/Admin/Elements/SelectNewGroupMembers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,20 +47,22 @@
%# END BPS TAGGED BLOCK }}}
% if ($Show ne 'Groups') {
<b><&|/l&>Users</&></b>
-<SELECT MULTIPLE NAME="<%$Name%>Users" SIZE=10>
+<select multiple name="<%$Name%>Users" size="10">
%while (my $user = $users->Next) {
-<OPTION VALUE="User-<%$user->id%>"><%$user->Name%></OPTION>
+%next if $SkipUsers->{$user->id};
+<option value="User-<%$user->id%>"><%$user->Name%></option>
%}
-</SELECT>
-<br>
+</select>
+<br />
% }
% if ($Show ne 'Users') {
<b><&|/l&>Groups</&></b>
-<SELECT MULTIPLE NAME="<%$Name%>Groups" SIZE=10>
+<select multiple name="<%$Name%>Groups" size="10">
%while (my $group = $groups->Next) {
-<OPTION VALUE="Group-<%$group->id%>"><%$group->Name%></OPTION>
+%next if $SkipGroups->{$group->id};
+<option value="Group-<%$group->id%>"><%$group->Name%></option>
%}
-</SELECT>
+</select>
% }
<%INIT>
@@ -90,4 +94,6 @@ $groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined');
$Name => 'Users'
$Show => 'All'
$Group
+$SkipUsers => {}
+$SkipGroups => {}
</%ARGS>
diff --git a/rt/html/Admin/Elements/SelectRights b/rt/html/Admin/Elements/SelectRights
index 3e61d5071..a0a5736f0 100644
--- a/rt/html/Admin/Elements/SelectRights
+++ b/rt/html/Admin/Elements/SelectRights
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,37 +45,37 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<INPUT TYPE=HIDDEN NAME="CheckACL" VALUE="<%$ACLDesc%>">
- <TABLE BORDER=0>
-<TR>
-<TD valign=top width="180" align="left">
+<input type="hidden" class="hidden" name="CheckACL" value="<%$ACLDesc%>" />
+ <table border="0">
+<tr>
+<td valign="top" width="180" align="left">
% my %current_rights;
<h3><&|/l&>Current rights</&></h3>
% if ($ACLObj->Count() == 0) {
-<i><&|/l&>No rights granted.</&></i> <BR>
+<i><&|/l&>No rights granted.</&></i> <br />
% } else {
-<i>(<&|/l&>Check box to revoke right</&>)</i> <BR>
+<i>(<&|/l&>Check box to revoke right</&>)</i> <br />
% while (my $right = $ACLObj->Next()) {
% if ($right->RightName) {
% $current_rights{$right->RightName} = 1;
-<input type=checkbox value="<%$right->Id%>" name="RevokeRight-<%$ACLDesc%>-<%$right->RightName%>"> <% loc($right->RightName) %><br>
+<input type="checkbox" class="checkbox" value="<%$right->Id%>" name="RevokeRight-<%$ACLDesc%>-<%$right->RightName%>" /> <% loc($right->RightName) %><br />
% }
% }
% }
-</TD>
-<TD valign=top>
+</td>
+<td valign="top">
<h3><&|/l&>New rights</&></h3>
-<SELECT SIZE=5 MULTIPLE NAME="GrantRight-<%$ACLDesc%>">
+<select size="5" multiple name="GrantRight-<%$ACLDesc%>">
% foreach $right (sort keys %Rights) {
% next if $current_rights{$right};
- <OPTION VALUE="<%$right%>"
- ><% loc($right) %></OPTION>
+ <option value="<%$right%>"
+ ><% loc($right) %></option>
% }
-<OPTION VALUE="" SELECTED><&|/l&>(no value)</&></OPTION>
-</SELECT>
-</TD>
-</TR>
-</TABLE>
+<option value="" selected><&|/l&>(no value)</&></option>
+</select>
+</td>
+</tr>
+</table>
<%INIT>
my ($right, $ACLDesc, $AppliesTo, %Rights);
diff --git a/rt/html/Admin/Elements/SelectScrip b/rt/html/Admin/Elements/SelectScrip
index a9e979699..027efba3f 100644
--- a/rt/html/Admin/Elements/SelectScrip
+++ b/rt/html/Admin/Elements/SelectScrip
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,17 +45,17 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
+<select name="<%$Name%>">
+<option value=""
<% $Default eq undef && 'SELECTED' %>
->-</OPTION>
+>-</option>
%while (my $Scrip = $Scrips->Next) {
-<OPTION VALUE=<% $Scrip->Id %>
+<option value="<% $Scrip->Id %>"
<% $Scrip->Id == $Default && 'SELECTED' %>
><% loc($Scrip->Name) %>
-</OPTION>
+</option>
%}
-</SELECT>
+</select>
<%INIT>
my $Scrips = RT::Scrips->new($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SelectScripAction b/rt/html/Admin/Elements/SelectScripAction
index 8d88d6458..3bf2f174e 100644
--- a/rt/html/Admin/Elements/SelectScripAction
+++ b/rt/html/Admin/Elements/SelectScripAction
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,21 +45,22 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
+<select name="<%$Name%>">
+<option value=""
<% ! defined $Default && 'SELECTED' %>
->-</OPTION>
+>-</option>
%while (my $ScripAction = $ScripActions->Next) {
-<OPTION VALUE=<%$ScripAction->Id%>
+<option value="<%$ScripAction->Id%>"
<% defined $Default && $ScripAction->Id == $Default && 'SELECTED' %>
><% loc($ScripAction->Name) %>
-</OPTION>
+</option>
%}
-</SELECT>
+</select>
<%INIT>
my $ScripActions = RT::ScripActions->new($session{'CurrentUser'});
$ScripActions->UnLimit;
+$ScripActions->OrderBy(FIELD => 'Name');
diff --git a/rt/html/Admin/Elements/SelectScripCondition b/rt/html/Admin/Elements/SelectScripCondition
index faa99fda6..3068730b8 100644
--- a/rt/html/Admin/Elements/SelectScripCondition
+++ b/rt/html/Admin/Elements/SelectScripCondition
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,22 +45,22 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
+<select name="<%$Name%>">
+<option value=""
<% ! defined $Default && 'SELECTED' %>
->-</OPTION>
+>-</option>
%while (my $ScripCondition = $ScripConditions->Next) {
-<OPTION VALUE=<%$ScripCondition->Id%>
+<option value="<%$ScripCondition->Id%>"
<% defined $Default && $ScripCondition->Id == $Default && 'SELECTED' %>
><% loc($ScripCondition->Name) %>
-</OPTION>
+</option>
%}
-</SELECT>
+</select>
<%INIT>
my $ScripConditions = RT::ScripConditions->new($session{'CurrentUser'});
$ScripConditions->UnLimit;
-
+$ScripConditions->OrderBy(FIELD => 'Name');
</%INIT>
diff --git a/rt/html/Admin/Elements/SelectSingleOrMultiple b/rt/html/Admin/Elements/SelectSingleOrMultiple
index 571695091..4844b8dc5 100644
--- a/rt/html/Admin/Elements/SelectSingleOrMultiple
+++ b/rt/html/Admin/Elements/SelectSingleOrMultiple
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/SelectStage b/rt/html/Admin/Elements/SelectStage
index 0fbf5c609..68bf48511 100644
--- a/rt/html/Admin/Elements/SelectStage
+++ b/rt/html/Admin/Elements/SelectStage
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,12 +45,12 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME=<%$Name%>>
+<select name="<%$Name%>">
% foreach my $stage (@stages) {
-<OPTION VALUE=<%$stage%>
+<option value="<%$stage%>"
<% ($stage eq $Default) && 'SELECTED' %>
><% loc($stage) %>
-</OPTION>
+</option>
% }
<%INIT>
if ($Default eq '') {
diff --git a/rt/html/Admin/Elements/SelectTemplate b/rt/html/Admin/Elements/SelectTemplate
index 7d83b6768..4f002c73a 100644
--- a/rt/html/Admin/Elements/SelectTemplate
+++ b/rt/html/Admin/Elements/SelectTemplate
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,23 +45,23 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
+<select name="<%$Name%>">
+<option value=""
<% $Default eq 'none' && 'SELECTED' %>
->-</OPTION>
+>-</option>
%while (my $Template = $PrimaryTemplates->Next) {
-<OPTION VALUE=<%$Template->Id%>
+<option value="<%$Template->Id%>"
<% ($Template->Id == $Default) && 'SELECTED' %>
><% loc($Template->Name) %>
-</OPTION>
+</option>
%}
%while (my $Template = $OtherTemplates->Next) {
-<OPTION VALUE=<%$Template->Id%>
+<option value="<%$Template->Id%>"
<% ($Template->Id == $Default) && 'SELECTED'%>
><&|/l, loc($Template->Name) &>Global template: [_1]</&>
-</OPTION>
+</option>
%}
-</SELECT>
+</select>
<%INIT>
@@ -67,10 +69,12 @@
my $PrimaryTemplates = RT::Templates->new($session{'CurrentUser'});
if ($Queue != 0) {
$PrimaryTemplates->LimitToQueue($Queue);
+$PrimaryTemplates->OrderBy(FIELD => 'Name');
}
my $OtherTemplates = RT::Templates->new($session{'CurrentUser'});
$OtherTemplates->LimitToGlobal($DefaultQueue);
+$OtherTemplates->OrderBy(FIELD => 'Name');
</%INIT>
<%ARGS>
diff --git a/rt/html/Admin/Elements/SelectUsers b/rt/html/Admin/Elements/SelectUsers
index a88aa8ff7..103ab30fc 100644
--- a/rt/html/Admin/Elements/SelectUsers
+++ b/rt/html/Admin/Elements/SelectUsers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT MULTIPLE NAME="<%$Name%>" SIZE=10>
+<select multiple name="<%$Name%>" size="10">
%while (my $user = $users->Next) {
-<OPTION VALUE="<%$user->id%>"><%$user->Name%>
+<option value="<%$user->id%>"><%$user->Name%>
%}
-</SELECT>
+</select>
<%INIT>
my $users = new RT::Users($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/SystemTabs b/rt/html/Admin/Elements/SystemTabs
index 646f552f5..fd317c4fb 100644
--- a/rt/html/Admin/Elements/SystemTabs
+++ b/rt/html/Admin/Elements/SystemTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -67,7 +69,10 @@
},
H => { title => loc('User Rights'),
path => 'Admin/Global/UserRights.html',
- }
+ },
+ I => { title => loc('RT at a glance'),
+ path => 'Admin/Global/MyRT.html',
+ },
};
diff --git a/rt/html/Admin/Elements/Tabs b/rt/html/Admin/Elements/Tabs
index f90a629a2..40df82ac3 100644
--- a/rt/html/Admin/Elements/Tabs
+++ b/rt/html/Admin/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/ToolTabs b/rt/html/Admin/Elements/ToolTabs
index 773b81099..37ba33e8e 100755
--- a/rt/html/Admin/Elements/ToolTabs
+++ b/rt/html/Admin/Elements/ToolTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Elements/UserTabs b/rt/html/Admin/Elements/UserTabs
index 0ffd29b0f..f5f8d0e68 100644
--- a/rt/html/Admin/Elements/UserTabs
+++ b/rt/html/Admin/Elements/UserTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -64,6 +66,9 @@ subtabs => {
History => { title => loc('History'),
path => "Admin/Users/History.html?id=".$id
},
+ 'MyRT' => { title => loc('RT at a glance'),
+ path => "Admin/Users/MyRT.html?id=".$id
+ },
# Scrips => { title => loc('Rights'),
# path => "Admin/Users/Rights.html?id=".$id
# }
diff --git a/rt/html/Admin/Global/CustomFields/Groups.html b/rt/html/Admin/Global/CustomFields/Groups.html
index bffde016f..62bd31cb2 100644
--- a/rt/html/Admin/Global/CustomFields/Groups.html
+++ b/rt/html/Admin/Global/CustomFields/Groups.html
@@ -1,3 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# 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.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GlobalCustomFieldTabs,
current_tab => "Admin/Global/CustomFields/Groups.html",
diff --git a/rt/html/Admin/Global/CustomFields/Queue-Tickets.html b/rt/html/Admin/Global/CustomFields/Queue-Tickets.html
index 396559a17..3feb4242f 100755
--- a/rt/html/Admin/Global/CustomFields/Queue-Tickets.html
+++ b/rt/html/Admin/Global/CustomFields/Queue-Tickets.html
@@ -1,3 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# 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.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GlobalCustomFieldTabs,
current_tab => "Admin/Global/CustomFields/Queue-Tickets.html",
diff --git a/rt/html/Admin/Global/CustomFields/Queue-Transactions.html b/rt/html/Admin/Global/CustomFields/Queue-Transactions.html
index 63b4cfe6b..5f58a1833 100755
--- a/rt/html/Admin/Global/CustomFields/Queue-Transactions.html
+++ b/rt/html/Admin/Global/CustomFields/Queue-Transactions.html
@@ -1,3 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# 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.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GlobalCustomFieldTabs,
current_tab => "Admin/Global/CustomFields/Queue-Transactions.html",
diff --git a/rt/html/Admin/Global/CustomFields/Users.html b/rt/html/Admin/Global/CustomFields/Users.html
index 6b79743d2..6f965b755 100644
--- a/rt/html/Admin/Global/CustomFields/Users.html
+++ b/rt/html/Admin/Global/CustomFields/Users.html
@@ -1,3 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# 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.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GlobalCustomFieldTabs,
current_tab => "Admin/Global/CustomFields/Users.html",
diff --git a/rt/html/Admin/Global/CustomFields/index.html b/rt/html/Admin/Global/CustomFields/index.html
index 9cdcfd549..b5c9fe8f3 100644
--- a/rt/html/Admin/Global/CustomFields/index.html
+++ b/rt/html/Admin/Global/CustomFields/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,7 +51,7 @@
<ul>
% foreach my $key (sort keys %$tabs) {
-<li><font size="+2"><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></font><br>
+<li><span><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></span><br />
<% $tabs->{$key}{text} %>
</li>
% }
diff --git a/rt/html/Admin/Global/GroupRights.html b/rt/html/Admin/Global/GroupRights.html
index 8d71432e0..7c863d53a 100644
--- a/rt/html/Admin/Global/GroupRights.html
+++ b/rt/html/Admin/Global/GroupRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,63 +51,63 @@
Title => loc('Modify global group rights') &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="GroupRights.html">
+ <form method="post" action="GroupRights.html">
-<& /Elements/TitleBoxStart, title => loc('Modify global group rights.')&>
+<&| /Widgets/TitleBox, title => loc('Modify global group rights.')&>
<h1><&|/l&>System groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToSystemInternalGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object =>$RT::System &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>Roles</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToRolesForSystem();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $RT::System &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>User defined groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToUserDefinedGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $Group->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $RT::System &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
- <& /Elements/TitleBoxEnd &>
+ </&>
<& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Global/Scrip.html b/rt/html/Admin/Global/Scrip.html
index 4e0c1f466..fc72ca969 100644
--- a/rt/html/Admin/Global/Scrip.html
+++ b/rt/html/Admin/Global/Scrip.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,33 +45,40 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/Scrips.html',
current_subtab => $current_subtab,
subtabs => $subtabs,
Title => $title &>
-<& /Admin/Elements/EditScrip, title => $title, %ARGS &>
+<& /Elements/ListActions, actions => \@results &>
+<& /Admin/Elements/EditScrip, title => $title, %ARGS, id => $id &>
<%init>
-my ($title, $current_subtab);
my $subtabs = {
- A => { title => loc('Select scrip'),
- path => "Admin/Global/Scrips.html",
- },
- B => { title => loc('New scrip'),
- path => "Admin/Global/Scrip.html?create=1&Queue=0",
- separator => 1,
- }
- };
+ A => {
+ title => loc('Select scrip'),
+ path => "Admin/Global/Scrips.html",
+ },
+ B => {
+ title => loc('New scrip'),
+ path => "Admin/Global/Scrip.html?create=1&Queue=0",
+ separator => 1,
+ },
+};
+
+my $scrip = RT::Scrip->new( $session{'CurrentUser'} );
+my ($id, @results) = $m->comp( '/Admin/Elements/EditScrip:Process', %ARGS );
-if ($ARGS{'id'}) {
- $current_subtab = "Admin/Global/Scrip.html?id=".$ARGS{'id'}."&Queue=0";
+my ($title, $current_subtab);
+if ( $id ) {
+ $current_subtab = "Admin/Global/Scrip.html?id=$id&Queue=0";
$title = loc("Modify a scrip which applies to all queues");
- $subtabs->{"C"} = { title => loc('Scrip #[_1]', $ARGS{'id'}),
- path => "Admin/Global/Scrip.html?id=".$ARGS{'id'}."&Queue=0"
- }
+ $subtabs->{"C"} = {
+ title => loc('Scrip #[_1]', $id),
+ path => "Admin/Global/Scrip.html?id=$id&Queue=0",
+ };
}
else {
$current_subtab = "Admin/Global/Scrip.html?create=1&Queue=0";
diff --git a/rt/html/Admin/Global/Scrips.html b/rt/html/Admin/Global/Scrips.html
index dcfa6ff07..a5fe26757 100644
--- a/rt/html/Admin/Global/Scrips.html
+++ b/rt/html/Admin/Global/Scrips.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Global/Template.html b/rt/html/Admin/Global/Template.html
index 17da59b9e..9d5a40916 100644
--- a/rt/html/Admin/Global/Template.html
+++ b/rt/html/Admin/Global/Template.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,20 +54,20 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="Template.html">
+<form method="post" action="Template.html">
%if ($Create ) {
-<INPUT TYPE=HIDDEN NAME="Template" VALUE="new">
+<input type="hidden" class="hidden" name="Template" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME="Template" VALUE="<%$TemplateObj->Id%>">
+<input type="hidden" class="hidden" name="Template" value="<%$TemplateObj->Id%>" />
% }
%# hang onto the queue id
-<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>">
+<input type="hidden" class="hidden" name="Queue" value="<%$Queue%>" />
<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description => $TemplateObj->Description, Content => $TemplateObj->Content &>
<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
-</FORM>
+</form>
diff --git a/rt/html/Admin/Global/Templates.html b/rt/html/Admin/Global/Templates.html
index 387326cd1..afd290d3c 100644
--- a/rt/html/Admin/Global/Templates.html
+++ b/rt/html/Admin/Global/Templates.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Global/UserRights.html b/rt/html/Admin/Global/UserRights.html
index 14a4de368..9276b1a19 100644
--- a/rt/html/Admin/Global/UserRights.html
+++ b/rt/html/Admin/Global/UserRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,32 +51,32 @@
Title => loc('Modify global user rights') &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="UserRights.html">
+ <form method="post" action="UserRights.html">
-<& /Elements/TitleBoxStart, title => loc('Modify global user rights.') &>
+<&| /Widgets/TitleBox, title => loc('Modify global user rights.') &>
-<TABLE>
+<table>
% while (my $Member = $Users->Next()) {
% my $UserObj = $Member->MemberObj->Object();
% my $group = RT::Group->new($session{'CurrentUser'});
% $group->LoadACLEquivalenceGroup($Member->MemberObj);
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $UserObj->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $group->PrincipalId,
Object => $RT::System &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
- <& /Elements/TitleBoxEnd &>
+ </&>
<& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Global/index.html b/rt/html/Admin/Global/index.html
index af7a9ddd9..77e9caa9c 100644
--- a/rt/html/Admin/Global/index.html
+++ b/rt/html/Admin/Global/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,7 +52,7 @@
<ul>
% foreach my $key (sort keys %$tabs) {
-<li><font size="+2"><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></font><br>
+<li><span><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></span><br />
<% $tabs->{$key}{text} %>
</li>
% }
@@ -80,7 +82,13 @@
H => { title => loc('User Rights'),
text => loc('Modify global user rights'),
path => 'UserRights.html',
- }
+ },
+ I => { title => loc('RT at a glance'),
+ text => loc('Modify the default "RT at a glance" view'),
+ path => 'MyRT.html',
+ },
+
+
};
</%INIT>
diff --git a/rt/html/Admin/Groups/CustomFields.html b/rt/html/Admin/Groups/CustomFields.html
index c2336b042..8ffa54aab 100644
--- a/rt/html/Admin/Groups/CustomFields.html
+++ b/rt/html/Admin/Groups/CustomFields.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Groups/GroupRights.html b/rt/html/Admin/Groups/GroupRights.html
index d95bdae07..b81b6a938 100644
--- a/rt/html/Admin/Groups/GroupRights.html
+++ b/rt/html/Admin/Groups/GroupRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,50 +52,50 @@
Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="GroupRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $GroupObj->id %>">
+ <form method="post" action="GroupRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $GroupObj->id %>" />
-<& /Elements/TitleBoxStart, title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
+<&| /Widgets/TitleBox, title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
<h1><&|/l&>System groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToSystemInternalGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
PrincipalType => 'Group',
Object => $GroupObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>User defined groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToUserDefinedGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $Group->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
PrincipalType => 'Group',
Object => $GroupObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
- <& /Elements/TitleBoxEnd &>
+ </&>
<& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Groups/History.html b/rt/html/Admin/Groups/History.html
index 40dab46e9..ee1d5539c 100644
--- a/rt/html/Admin/Groups/History.html
+++ b/rt/html/Admin/Groups/History.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,7 +54,7 @@
<& /Ticket/Elements/ShowHistory,
Ticket => $GroupObj,
- ShowHeaderModes => 0,
+ ShowDisplayModes => 0,
&>
<%INIT>
diff --git a/rt/html/Admin/Groups/Members.html b/rt/html/Admin/Groups/Members.html
index fd25b2d7f..77c3fb09f 100644
--- a/rt/html/Admin/Groups/Members.html
+++ b/rt/html/Admin/Groups/Members.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,36 +52,37 @@
<& /Elements/ListActions, actions => \@results &>
-<& /Elements/TitleBoxStart, title => loc('Editing membership for group [_1]', $Group->Name) &>
+<&| /Widgets/TitleBox, title => loc('Editing membership for group [_1]', $Group->Name) &>
-<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Members.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
-<TABLE WIDTH="100%">
-<TR>
-<TD>
+<form action="<%$RT::WebPath%>/Admin/Groups/Members.html" method="post">
+<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
+<table width="100%">
+<tr>
+<td>
<h3><&|/l&>Current members</&></h3>
-</TD>
-<TD>
+</td>
+<td>
<h3><&|/l&>Add members</&></h3>
-</TD>
-</TR>
+</td>
+</tr>
-<TR>
-<TD VALIGN=TOP>
+<tr>
+<td valign="top">
% if ($Group->MembersObj->Count == 0 ) {
-<i><&|/l&>(No members)</&></i>
+<em><&|/l&>(No members)</&></em>
% } else {
-<i><&|/l&>(Check box to delete)</&></i>
-<br>
-<br>
+<em><&|/l&>(Check box to delete)</&></em>
+<br />
+<br />
<&|/l&>Users</&>
-% my $UserMembers = $Group->MembersObj;
-% $UserMembers->LimitToUsers();
-<UL>
-% while (my $member = $UserMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
-<%$member->MemberObj->Object->Name%> (<%$member->MemberObj->Object->RealName%>)
+% my $Users = $Group->UserMembersObj;
+% $Users->OrderBy( FIELD => $UserOrderBy, ORDER => $UserOrder );
+<ul>
+% while (my $user = $Users->Next()) {
+% $UsersSeen{$user->id} = 1 if $SkipSeenUsers;
+<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$user->PrincipalObj->Id%>" value="1" />
+<%$user->Name%> (<%$user->RealName%>)
% }
</ul>
<&|/l&>Groups</&>
@@ -87,18 +90,20 @@
% my $GroupMembers = $Group->MembersObj;
% $GroupMembers->LimitToGroups();
% while (my $member = $GroupMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+% $GroupsSeen{$member->MemberId} = 1 if $SkipSeenGroups;
+<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$member->MemberId%>" value="1" />
<%$member->MemberObj->Object->Name%>
% }
+</ul>
% }
-</UL>
-</TD>
-<TD VALIGN=TOP>
-<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group &>
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
+</td>
+<td valign="top">
+<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group,
+ SkipUsers => \%UsersSeen, SkipGroups => \%GroupsSeen &>
+</td>
+</tr>
+</table>
+</&>
<& /Elements/Submit, Label => loc('Modify Members'), Reset => 1 &>
</form>
@@ -146,6 +151,9 @@ foreach my $member (@AddMembers) {
push (@results, $msg);
}
+my %UsersSeen;
+my %GroupsSeen;
+$GroupsSeen{$Group->id} = 1; # can't be a member of ourself
</%INIT>
@@ -153,4 +161,8 @@ foreach my $member (@AddMembers) {
$AddMembersUsers => undef
$AddMembersGroups => undef
$id => undef
+$UserOrderBy => 'Name'
+$UserOrder => 'ASC'
+$SkipSeenUsers => 1
+$SkipSeenGroups => 1
</%ARGS>
diff --git a/rt/html/Admin/Groups/Modify.html b/rt/html/Admin/Groups/Modify.html
index 94c0203b1..f3c13fe6f 100644
--- a/rt/html/Admin/Groups/Modify.html
+++ b/rt/html/Admin/Groups/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -53,38 +55,42 @@
-<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST ENCTYPE="multipart/form-data">
+<form action="<%$RT::WebPath%>/Admin/Groups/Modify.html" method="post" enctype="multipart/form-data">
%unless ($Group->Id) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
+<input type="hidden" class="hidden" name="id" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
+<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
% }
-<TABLE>
-<TR><TD ALIGN=RIGHT>
+<table>
+<tr><td align="right">
<&|/l&>Name</&>:
-</TD>
-<TD><INPUT name="Name" value="<%$Group->Name%>"></TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$Group->Description%>" size=60></TD>
-</TR>
+</td>
+<td><input name="Name" value="<%$Group->Name%>" /></td>
+</tr>
+<tr>
+<td align="right">
+<&|/l&>Description</&>:</td><td colspan="3"><input name="Description" value="<%$Group->Description%>" size="60" /></td>
+</tr>
% my $CFs = $Group->CustomFields;
% while (my $CF = $CFs->Next) {
-<TR VALIGN="TOP"><TD ALIGN="RIGHT">
+<tr valign="top"><td align="right">
<% $CF->Name %>:
-</TD><TD>
-<& /Elements/EditCustomField, CustomField => $CF, Object => $Group &>
-</TD></TR>
+</td><td>
+<& /Elements/EditCustomField, CustomField => $CF,
+ Object => $Group,
+ ($Create ? (NamePrefix => 'Object-RT::Group--CustomField-')
+ : () )&>
+</td></tr>
% }
-<TR>
-<TD COLSPAN=2>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this group)</&><BR>
-</TR>
+<tr>
+<td colspan="2">
+<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this group)</&><br />
+</td>
+</tr>
<& /Elements/Callback, GroupObj => $Group, results => \@results, %ARGS &>
-</TABLE>
+</table>
<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
</form>
<%INIT>
diff --git a/rt/html/Admin/Groups/UserRights.html b/rt/html/Admin/Groups/UserRights.html
index 5237b1578..b77edb011 100644
--- a/rt/html/Admin/Groups/UserRights.html
+++ b/rt/html/Admin/Groups/UserRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,32 +52,32 @@
Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="UserRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $GroupObj->id %>">
+ <form method="post" action="UserRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $GroupObj->id %>" />
-<& /Elements/TitleBoxStart, title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
+<&| /Widgets/TitleBox, title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
-<TABLE>
+<table>
% while (my $Member = $Users->Next()) {
% my $UserObj = $Member->MemberObj->Object();
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $UserObj->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Member->MemberObj->Id,
PrincipalType => 'User',
Object => $GroupObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
- </TABLE>
+ </table>
- <& /Elements/TitleBoxEnd &>
+ </&>
<& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Groups/index.html b/rt/html/Admin/Groups/index.html
index 50857e5f4..384092bdf 100644
--- a/rt/html/Admin/Groups/index.html
+++ b/rt/html/Admin/Groups/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,31 +49,31 @@
<& /Admin/Elements/GroupTabs, current_tab => 'Admin/Groups/',
current_subtab => 'Admin/Groups/',
Title => $title &>
-<%$caption%>:<BR> <UL>
+<%$caption%>:<br /> <ul>
%if ($Groups->Count == 0) {
-<LI> <i><&|/l&>No groups matching search criteria found.</&></i>
+<li> <em><&|/l&>No groups matching search criteria found.</&></em>
% }
%my @ids;
%while ( my $Group = $Groups->Next) {
% push @ids, $Group->Id;
-<LI><A HREF="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><BR>
+<li><a href="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><br />
%}
-</UL>
+</ul>
%if (my $ids = join(',', @ids)) {
-<em>(<a href="<%$RT::WebPath%>/Download/Tabular/Group/<% $ids %>/Groups.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br>
+<em>(<a href="<%$RT::WebPath%>/Download/Tabular/Group/<% $ids %>/Groups.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br />
%}
-<br><br>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Groups/index.html">
-<input type="checkbox" name="FindDisabledGroups" value="1"> <&|/l&>Include disabled groups in listing.</&>
-<BR>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
+<br /><br />
+<form method="post" action="<% $RT::WebPath %>/Admin/Groups/index.html">
+<input type="checkbox" class="checkbox" name="FindDisabledGroups" value="1" /> <&|/l&>Include disabled groups in listing.</&>
+<br />
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
-<br><br>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Groups/index.html">
-<&|/l&>Find groups whose</&> <& /Elements/SelectGroups &><BR>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
+<br /><br />
+<form method="post" action="<% $RT::WebPath %>/Admin/Groups/index.html">
+<&|/l&>Find groups whose</&> <& /Elements/SelectGroups &><br />
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
<%INIT>
my $Groups = RT::Groups->new($session{'CurrentUser'});
$Groups->LimitToUserDefinedGroups();
diff --git a/rt/html/Admin/Queues/CustomField.html b/rt/html/Admin/Queues/CustomField.html
index 5beba58c8..52829277e 100644
--- a/rt/html/Admin/Queues/CustomField.html
+++ b/rt/html/Admin/Queues/CustomField.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Queues/CustomFields.html b/rt/html/Admin/Queues/CustomFields.html
index 4d7e08875..8ce4f525d 100644
--- a/rt/html/Admin/Queues/CustomFields.html
+++ b/rt/html/Admin/Queues/CustomFields.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Queues/GroupRights.html b/rt/html/Admin/Queues/GroupRights.html
index c5a12bfa3..85075bdea 100644
--- a/rt/html/Admin/Queues/GroupRights.html
+++ b/rt/html/Admin/Queues/GroupRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,63 +52,63 @@
Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="GroupRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $QueueObj->id %>">
+ <form method="post" action="GroupRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $QueueObj->id %>" />
<h1><&|/l&>System groups</&></h1>
-<TABLE>
+<table>
<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToSystemInternalGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $QueueObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>Roles</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToRolesForQueue($QueueObj->Id);
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $QueueObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>User defined groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToUserDefinedGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $Group->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
Object => $QueueObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Queues/Modify.html b/rt/html/Admin/Queues/Modify.html
index 5517a80c0..e84d14fa4 100644
--- a/rt/html/Admin/Queues/Modify.html
+++ b/rt/html/Admin/Queues/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,62 +54,62 @@
-<FORM ACTION="<%$RT::WebPath%>/Admin/Queues/Modify.html" METHOD=POST>
+<form action="<%$RT::WebPath%>/Admin/Queues/Modify.html" method="post">
%if ($Create ) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
+<input type="hidden" class="hidden" name="id" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>">
+<input type="hidden" class="hidden" name="id" value="<%$QueueObj->Id%>" />
% }
-<TABLE>
-<TR><TD ALIGN=RIGHT>
+<table>
+<tr><td align="right">
<&|/l&>Queue Name</&>:
-</TD>
-<TD><INPUT name="Name" value="<% ($Create) ? "" : $QueueObj->Name %>"></TD>
-</TR><TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<% ($Create) ? "" : $QueueObj->Description %>" size=60></TD></TR>
-<TR>
-<TD ALIGN=RIGHT>
+</td>
+<td><input name="Name" value="<% ($Create) ? "" : $QueueObj->Name %>" /></td>
+</tr><tr>
+<td align="right">
+<&|/l&>Description</&>:</td><td colspan="3"><input name="Description" value="<% ($Create) ? "" : $QueueObj->Description %>" size="60" /></td></tr>
+<tr>
+<td align="right">
<&|/l&>Reply Address</&>:
-</TD><TD>
-<INPUT name="CorrespondAddress" value="<% ($Create) ? "" : $QueueObj->CorrespondAddress %>">
-<BR><font size="-1"><i><&|/l , $RT::CorrespondAddress&>(If left blank, will default to [_1])</&></i></font>
-</TD>
-<TD ALIGN=RIGHT>
-
-<&|/l&>Comment Address</&>: </TD><TD>
-<INPUT NAME="CommentAddress" value="<% ($Create) ? "" : $QueueObj->CommentAddress %>">
-<BR><font size="-1"><i><&|/l , $RT::CommentAddress&>(If left blank, will default to [_1])</&></i></font>
-</TD>
-</TR><TR>
-
-<TD ALIGN=RIGHT>
+</td><td>
+<input name="CorrespondAddress" value="<% ($Create) ? "" : $QueueObj->CorrespondAddress %>" />
+<br /><span><em><&|/l , $RT::CorrespondAddress&>(If left blank, will default to [_1])</&></em></span>
+</td>
+<td align="right">
+
+<&|/l&>Comment Address</&>: </td><td>
+<input name="CommentAddress" value="<% ($Create) ? "" : $QueueObj->CommentAddress %>" />
+<br /><span><em><&|/l , $RT::CommentAddress&>(If left blank, will default to [_1])</&></em></span>
+</td>
+</tr><tr>
+
+<td align="right">
<&|/l&>Priority starts at</&>:
-</TD><TD><INPUT NAME="InitialPriority" value="<% ($Create) ? "" : $QueueObj->InitialPriority %>">
-</TD>
-<TD ALIGN=RIGHT>
+</td><td><input name="InitialPriority" value="<% ($Create) ? "" : $QueueObj->InitialPriority %>" />
+</td>
+<td align="right">
<&|/l&>Over time, priority moves toward</&>:
-</TD><TD><INPUT NAME="FinalPriority" value="<% ($Create) ? "" : $QueueObj->FinalPriority %>">
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
+</td><td><input name="FinalPriority" value="<% ($Create) ? "" : $QueueObj->FinalPriority %>" />
+</td>
+</tr>
+<tr>
+<td align="right">
<&|/l&>Requests should be due in</&>:
-</TD><TD>
-<INPUT NAME="DefaultDueIn" VALUE="<% ($Create) ? "" : $QueueObj->DefaultDueIn%>"> <&|/l&>days</&>.
-</TD>
-</TR>
-<TR>
-<TD>
-</TD>
-<TD COLSPAN=4><INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this queue)</&><BR>
+</td><td>
+<input name="DefaultDueIn" value="<% ($Create) ? "" : $QueueObj->DefaultDueIn%>" /> <&|/l&>days</&>.
+</td>
+</tr>
+<tr>
+<td>
+</td>
+<td colspan="4"><input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this queue)</&><br />
<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &>
-</TD>
-</TR>
+</td>
+</tr>
-</TABLE>
+</table>
<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
diff --git a/rt/html/Admin/Queues/People.html b/rt/html/Admin/Queues/People.html
index e29b9d34f..4eeda3c4f 100644
--- a/rt/html/Admin/Queues/People.html
+++ b/rt/html/Admin/Queues/People.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,12 +54,12 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="People.html">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>">
+<form method="post" action="People.html">
+<input type="hidden" class="hidden" name="id" value="<%$QueueObj->Id%>" />
-<TABLE WIDTH=100%>
-<TR>
-<TD VALIGN=TOP >
+<table width="100%">
+<tr>
+<td valign="top" >
<h3><&|/l&>Current watchers</&></h3>
@@ -71,25 +73,25 @@
<& /Admin/Elements/EditQueueWatchers, QueueObj => $QueueObj, Watchers => $QueueObj->AdminCc &>
-</TD>
-<TD VALIGN=TOP>
+</td>
+<td valign="top">
<h3><&|/l&>New watchers</&></h3>
-<&|/l&>Find people whose</&><BR>
+<&|/l&>Find people whose</&><br />
<& /Elements/SelectUsers &>
-<input type=submit name="OnlySearchForPeople" value="<&|/l&>Go!</&>">
-<BR>
-<&|/l&>Find groups whose</&><BR>
+<input type="submit" class="button" name="OnlySearchForPeople" value="<&|/l&>Go!</&>" />
+<br />
+<&|/l&>Find groups whose</&><br />
<& /Elements/SelectGroups &>
-<input type=submit name="OnlySearchForGroup" value="<&|/l&>Go!</&>">
+<input type="submit" class="button" name="OnlySearchForGroup" value="<&|/l&>Go!</&>" />
<p>
-<&|/l&>Add new watchers</&>:<br>
+<&|/l&>Add new watchers</&>:<br />
<p>
-<b><&|/l&>Users</&></b>
+<strong><&|/l&>Users</&></strong>
% if ($user_msg) {
-<br>
-<i><%$user_msg%></i>
+<br />
+<em><%$user_msg%></em>
% } elsif ($Users) {
<ul>
% while (my $u = $Users->Next ) {
@@ -101,11 +103,11 @@
% }
<p>
-<b><&|/l&>Groups</&></b>
+<strong><&|/l&>Groups</&></strong>
% if ($group_msg) {
-<br>
-<i><%$group_msg%></i>
+<br />
+<em><%$group_msg%></em>
% } elsif ($Groups) {
<ul>
% while (my $g = $Groups->Next ) {
@@ -116,9 +118,9 @@
</ul>
% }
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
diff --git a/rt/html/Admin/Queues/Scrip.html b/rt/html/Admin/Queues/Scrip.html
index 1223fbfed..190be8b48 100644
--- a/rt/html/Admin/Queues/Scrip.html
+++ b/rt/html/Admin/Queues/Scrip.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,46 +46,55 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/QueueTabs, id => $QueueObj->Id,
- QueueObj => $QueueObj,
- current_tab => 'Admin/Queues/Scrips.html?id='.$QueueObj->id,
- current_subtab => $current_subtab,
- subtabs => $subtabs,
+<& /Admin/Elements/QueueTabs, id => $QueueObj->Id,
+ QueueObj => $QueueObj,
+ current_tab => 'Admin/Queues/Scrips.html?id='.$QueueObj->id,
+ current_subtab => $current_subtab,
+ subtabs => $subtabs,
Title => $title &>
-<& /Admin/Elements/EditScrip, title => $title, %ARGS &>
+<& /Elements/ListActions, actions => \@results &>
+<& /Admin/Elements/EditScrip, title => $title, %ARGS, id => $id &>
+
<%init>
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
-$QueueObj->Load($Queue);
+my $QueueObj = RT::Queue->new( $session{'CurrentUser'} );
+$QueueObj->Load( $Queue );
+unless( $QueueObj->id ) {
+ Abort(loc("Queue [_1] not found", $id));
+}
my ($title, $current_subtab);
-my $subtabs = {
- A => { title => loc('Select scrip'),
- path => "Admin/Queues/Scrips.html?id=".$QueueObj->id,
- },
- B => { title => loc('New scrip'),
- path => "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id,
- separator => 1,
- },
- };
+my $subtabs = {
+ A => {
+ title => loc('Select scrip'),
+ path => "Admin/Queues/Scrips.html?id=".$QueueObj->id,
+ },
+ B => {
+ title => loc('New scrip'),
+ path => "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id,
+ separator => 1,
+ },
+};
-unless($QueueObj->id) {
- Abort(loc("Queue [_1] not found",$id));
-}
-if ($id) {
- $current_subtab = "Admin/Queues/Scrip.html?id=".$id."&Queue=".$QueueObj->id;
+my $scrip = RT::Scrip->new( $session{'CurrentUser'} );
+($id, my @results) = $m->comp( '/Admin/Elements/EditScrip:Process', %ARGS );
+
+if ( $id ) {
+ $current_subtab = "Admin/Queues/Scrip.html?id=$id&Queue=". $QueueObj->id;
$title = loc("Modify a scrip for queue [_1]", $QueueObj->Name);
- $subtabs->{"C"} = { title => loc("Scrip #[_1]",$id),
- path => "Admin/Queues/Scrip.html?id=$id&Queue=".$QueueObj->id };
+ $subtabs->{"C"} = {
+ title => loc("Scrip #[_1]",$id),
+ path => "Admin/Queues/Scrip.html?id=$id&Queue=".$QueueObj->id
+ };
} else {
$current_subtab = "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id;
$title = loc("Create a scrip for queue [_1]", $QueueObj->Name);
}
-
+
</%init>
<%ARGS>
-$id => undef
+$id => undef
$Queue => undef
</%ARGS>
diff --git a/rt/html/Admin/Queues/Scrips.html b/rt/html/Admin/Queues/Scrips.html
index e7092fb22..8fb0db400 100644
--- a/rt/html/Admin/Queues/Scrips.html
+++ b/rt/html/Admin/Queues/Scrips.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -54,7 +56,7 @@
% if (!$QueueObj->Disabled) { # Global scrips does not apply to disabled queues
<h2><&|/l&>Scrips which apply to all queues</&></h2>
<& /Admin/Elements/ListGlobalScrips &>
-<BR>
+<br />
% }
<& /Admin/Elements/EditScrips, title => $title, %ARGS &>
<%init>
diff --git a/rt/html/Admin/Queues/Template.html b/rt/html/Admin/Queues/Template.html
index c60a90900..2d6343f99 100644
--- a/rt/html/Admin/Queues/Template.html
+++ b/rt/html/Admin/Queues/Template.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,19 +54,19 @@
Title => $title &>
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="Template.html">
+<form method="post" action="Template.html">
%if ($Create ) {
-<INPUT TYPE=HIDDEN NAME="Template" VALUE="new">
+<input type="hidden" class="hidden" name="Template" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME="Template" VALUE="<%$TemplateObj->Id%>">
+<input type="hidden" class="hidden" name="Template" value="<%$TemplateObj->Id%>" />
% }
%# hang onto the queue id
-<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>">
+<input type="hidden" class="hidden" name="Queue" value="<%$Queue%>" />
<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description =>
$TemplateObj->Description, Content => $TemplateObj->Content &>
<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
-</FORM>
+</form>
<%INIT>
diff --git a/rt/html/Admin/Queues/Templates.html b/rt/html/Admin/Queues/Templates.html
index 888fdbc8a..d62b4971c 100644
--- a/rt/html/Admin/Queues/Templates.html
+++ b/rt/html/Admin/Queues/Templates.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Queues/UserRights.html b/rt/html/Admin/Queues/UserRights.html
index 399992ae2..c277f1797 100644
--- a/rt/html/Admin/Queues/UserRights.html
+++ b/rt/html/Admin/Queues/UserRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,31 +52,31 @@
Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="UserRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $QueueObj->id %>">
+ <form method="post" action="UserRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $QueueObj->id %>" />
-<TABLE>
+<table>
<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &>
% while (my $Member = $Users->Next()) {
% my $UserObj = $Member->MemberObj->Object();
% my $group = RT::Group->new($session{'CurrentUser'});
% $group->LoadACLEquivalenceGroup($Member->MemberObj);
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $UserObj->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId,
Object => $QueueObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
- </TABLE>
+ </table>
<& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Queues/index.html b/rt/html/Admin/Queues/index.html
index 28adf531c..bfa760409 100644
--- a/rt/html/Admin/Queues/index.html
+++ b/rt/html/Admin/Queues/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,19 +54,19 @@
<h1><%$caption%></h1>
<p><&|/l&>Select a queue</&>:</p>
-<UL>
+<ul>
%if ($queues->Count == 0) {
-<li><i><&|/l&>No queues matching search criteria found.</&></i></li>
+<li><em><&|/l&>No queues matching search criteria found.</&></em></li>
% }
%while ( $queue = $queues->Next) {
-<li><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></li>
+<li><a href="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></li>
%}
-</UL>
-<BR>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Queues/index.html">
-<input type="checkbox" name="FindDisabledQueues" value="1"> <&|/l&>Include disabled queues in listing.</&>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
+</ul>
+<br />
+<form method="post" action="<% $RT::WebPath %>/Admin/Queues/index.html">
+<input type="checkbox" class="checkbox" name="FindDisabledQueues" value="1" /> <&|/l&>Include disabled queues in listing.</&>
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
<%INIT>
my ($queue, $caption);
diff --git a/rt/html/Admin/Tools/Configuration.html b/rt/html/Admin/Tools/Configuration.html
index bc5ca69a1..205b9a0b2 100644
--- a/rt/html/Admin/Tools/Configuration.html
+++ b/rt/html/Admin/Tools/Configuration.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -65,7 +67,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
<pre>
% my $report = Module::Versions::Report::report();
% my @report = grep { /v\d/ } split("\n",$report);
-<%join('<br>', @report)|n%>
+<%join('<br />', @report)|n%>
</pre>
@@ -81,7 +83,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
<tr><td>RT::<%$key%></td>
<td>
% if ($key =~ /Password(?!Length)/i) {
-<i>Password not printed</i>
+<em>Password not printed</em>
% } else {
<%${'RT::'.$key} %>
% }
diff --git a/rt/html/Admin/Tools/index.html b/rt/html/Admin/Tools/index.html
index 49cfac3ee..3b4ec62c6 100644
--- a/rt/html/Admin/Tools/index.html
+++ b/rt/html/Admin/Tools/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Users/CustomFields.html b/rt/html/Admin/Users/CustomFields.html
index 5662c6c16..1455c1de6 100644
--- a/rt/html/Admin/Users/CustomFields.html
+++ b/rt/html/Admin/Users/CustomFields.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Users/History.html b/rt/html/Admin/Users/History.html
index 024a90b00..e47f67e78 100644
--- a/rt/html/Admin/Users/History.html
+++ b/rt/html/Admin/Users/History.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,7 +54,7 @@
<& /Ticket/Elements/ShowHistory,
Ticket => $UserObj,
- ShowHeaderModes => 0,
+ ShowDisplayModes => 0,
&>
<%INIT>
diff --git a/rt/html/Admin/Users/Memberships.html b/rt/html/Admin/Users/Memberships.html
index 3e632393f..493cb0f12 100644
--- a/rt/html/Admin/Users/Memberships.html
+++ b/rt/html/Admin/Users/Memberships.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Users/Modify.html b/rt/html/Admin/Users/Modify.html
index 8a24f9c4a..d97588c83 100644
--- a/rt/html/Admin/Users/Modify.html
+++ b/rt/html/Admin/Users/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,188 +54,191 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="<%$RT::WebPath%>/Admin/Users/Modify.html" METHOD=POST ENCTYPE="multipart/form-data">
+<form action="<%$RT::WebPath%>/Admin/Users/Modify.html" method="post" enctype="multipart/form-data">
%if ($Create) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
+<input type="hidden" class="hidden" name="id" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$UserObj->Id%>">
+<input type="hidden" class="hidden" name="id" value="<%$UserObj->Id%>" />
% }
-<TABLE WIDTH=100% BORDER=0>
-<TR>
+<table width="100%" border="0">
+<tr>
-<TD VALIGN=TOP class="boxcontainer">
-<& /Elements/TitleBoxStart, title => loc('Identity') &>
+<td valign="top" class="boxcontainer">
+<&| /Widgets/TitleBox, title => loc('Identity') &>
-<TABLE>
-<TR><TD ALIGN="RIGHT">
+<table>
+<tr><td align="right">
<&|/l&>Username</&>:
-</TD><TD>
-<input name="Name" value="<%$UserObj->Name%>"> <b><&|/l&>(required)</&></b>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Name" value="<%$UserObj->Name%>" /> <strong><&|/l&>(required)</&></strong>
+</td></tr>
+<tr><td align="right">
<&|/l&>Email</&>:
-</TD><TD>
-<input name="EmailAddress" value="<%$UserObj->EmailAddress%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="EmailAddress" value="<%$UserObj->EmailAddress%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Real Name</&>:
-</TD><TD>
-<input name="RealName" value="<%$UserObj->RealName%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="RealName" value="<%$UserObj->RealName%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Nickname</&>:
-</TD><TD>
-<input name="NickName" value="<%$UserObj->NickName%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="NickName" value="<%$UserObj->NickName%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Unix login</&>:
-</TD><TD>
-<input name="Gecos" value="<%$UserObj->Gecos%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Gecos" value="<%$UserObj->Gecos%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Language</&>:
-</TD><TD>
+</td><td>
<& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td></tr>
+<tr><td align="right">
<&|/l&>Extra info</&>:
-</TD><TD>
-<textarea name="FreeformContactInfo" cols=20 rows=5><%$UserObj->FreeformContactInfo%></TEXTAREA>
-</TD></TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<br>
-<& /Elements/TitleBoxStart, title => loc('Access control') &>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>>
-<&|/l&>Let this user access RT</&><BR>
-
-
-<INPUT TYPE=HIDDEN NAME="SetPrivileged" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Privileged" VALUE="1" <%$PrivilegedChecked%>> <&|/l&>Let this user be granted rights</&><BR>
+</td><td>
+<textarea name="FreeformContactInfo" cols="20" rows="5"><%$UserObj->FreeformContactInfo%></textarea>
+</td></tr>
+</table>
+</&>
+<br />
+<&| /Widgets/TitleBox, title => loc('Access control') &>
+<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> />
+<&|/l&>Let this user access RT</&><br />
+
+
+<input type="hidden" class="hidden" name="SetPrivileged" value="1" />
+<input type="checkbox" class="checkbox" name="Privileged" value="1" <%$PrivilegedChecked%> /> <&|/l&>Let this user be granted rights</&><br />
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-<TABLE>
-<TR>
-<TD ALIGN=RIGHT>
+<table>
+<tr>
+<td align="right">
<&|/l&>New Password</&>:
-</TD>
-<TD ALIGN=LEFT>
-<input type=password name="Pass1">
-</TD>
-</TR>
-<TR><TD ALIGN=RIGHT>
+</td>
+<td align="left">
+<input type="password" name="Pass1" />
+</td>
+</tr>
+<tr><td align="right">
<&|/l&>Retype Password</&>:
-</TD>
-<TD>
-<input type=password name="Pass2">
-</TD>
-</TR>
-</TABLE>
+</td>
+<td>
+<input type="password" name="Pass2" />
+</td>
+</tr>
+</table>
% }
-<& /Elements/TitleBoxEnd &>
-</TD>
-
-<TD VALIGN=TOP class="boxcontainer">
-<& /Elements/TitleBoxStart, title => loc('Location') &>
-<TABLE>
-<TR><TD ALIGN="RIGHT">
+</&>
+<& /Elements/Callback, _CallbackName => 'LeftColumnBottom', UserObj => $UserObj, %ARGS &>
+</td>
+
+<td valign="top" class="boxcontainer">
+<&| /Widgets/TitleBox, title => loc('Location') &>
+<table>
+<tr><td align="right">
<&|/l&>Organization</&>:
-</TD><TD>
-<input name="Organization" value="<%$UserObj->Organization%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Organization" value="<%$UserObj->Organization%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Address1</&>:
-</TD><TD>
-<input name="Address1" value="<%$UserObj->Address1%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Address1" value="<%$UserObj->Address1%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Address2</&>:
-</TD><TD>
-<input name="Address2" value="<%$UserObj->Address2%>">
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Address2" value="<%$UserObj->Address2%>" />
+</td></tr>
+<tr><td align="right">
<&|/l&>City</&>:
-</TD><TD>
-<input name="City" value="<%$UserObj->City%>" size=14>
+</td><td>
+<input name="City" value="<%$UserObj->City%>" size="14" />
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td></tr>
+<tr><td align="right">
<&|/l&>State</&>:
-</TD><TD>
-<input name="State" value="<%$UserObj->State%>" size=3>
+</td><td>
+<input name="State" value="<%$UserObj->State%>" size="3" />
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td></tr>
+<tr><td align="right">
<&|/l&>Zip</&>:
-</TD><TD>
-<input name="Zip" value="<%$UserObj->Zip%>" size=9>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Zip" value="<%$UserObj->Zip%>" size="9" />
+</td></tr>
+<tr><td align="right">
<&|/l&>Country</&>:
-</TD><TD>
-<input name="Country" value="<%$UserObj->Country%>">
-</TD></TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<br>
-<& /Elements/TitleBoxStart, title => loc('Phone numbers') &>
-<TABLE>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="Country" value="<%$UserObj->Country%>" />
+</td></tr>
+</table>
+</&>
+<br />
+<&| /Widgets/TitleBox, title => loc('Phone numbers') &>
+<table>
+<tr><td align="right">
<&|/l&>Residence</&>:
-</TD><TD>
-<input name="HomePhone" value="<%$UserObj->HomePhone%>" size=13><br>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="HomePhone" value="<%$UserObj->HomePhone%>" size="13" /><br />
+</td></tr>
+<tr><td align="right">
<&|/l&>Work</&>:
-</TD><TD>
-<input name="WorkPhone" value="<%$UserObj->WorkPhone%>" size=13><br>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="WorkPhone" value="<%$UserObj->WorkPhone%>" size="13" /><br />
+</td></tr>
+<tr><td align="right">
<&|/l&>Mobile</&>:
-</TD><TD>
-<input name="MobilePhone" value="<%$UserObj->MobilePhone%>" size=13><br>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
+</td><td>
+<input name="MobilePhone" value="<%$UserObj->MobilePhone%>" size="13" /><br />
+</td></tr>
+<tr><td align="right">
<&|/l&>Pager</&>:
-</TD><TD>
-<input name="PagerPhone" value="<%$UserObj->PagerPhone%>" size=13><br>
-<& /Elements/TitleBoxEnd &>
-</TD>
-
-<TR>
-</TR>
-</TABLE>
-<BR>
-<& /Elements/TitleBoxStart, title => loc('Custom Fields') &>
-<TABLE>
+</td><td>
+<input name="PagerPhone" value="<%$UserObj->PagerPhone%>" size="13" /><br />
+</td>
+</tr>
+</table>
+</&>
+<br />
+<&| /Widgets/TitleBox, title => loc('Custom Fields') &>
+<table>
% my $CFs = $UserObj->CustomFields;
% while (my $CF = $CFs->Next) {
-<TR VALIGN="TOP"><TD ALIGN="RIGHT">
+<tr valign="top"><td align="right">
<% $CF->Name %>:
-</TD><TD>
+</td><td>
+% if ($UserObj->id) {
<& /Elements/EditCustomField, %ARGS, Object => $UserObj, CustomField => $CF &>
-</TD></TR>
+% } else {
+<& /Elements/EditCustomField, %ARGS, NamePrefix => 'Object-RT::User-new-CustomField-', CustomField => $CF &>
+% }
+</td></tr>
% }
-<TR>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<TR>
-<TD colspan="2">
-<& /Elements/TitleBoxStart, title => loc('Comments about this user') &>
-<TEXTAREA class="comments" name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL><%$UserObj->Comments%></TEXTAREA>
-<& /Elements/TitleBoxEnd &>
+</table>
+</&>
+<& /Elements/Callback, _CallbackName => 'RightColumnBottom', UserObj => $UserObj, %ARGS &>
+</td></tr>
+<tr>
+<td colspan="2">
+<&| /Widgets/TitleBox, title => loc('Comments about this user') &>
+<textarea class="comments" name="Comments" cols="80" rows="5" wrap="virtual"><%$UserObj->Comments%></textarea>
+</&>
%if ($UserObj->Privileged) {
-<BR>
-<& /Elements/TitleBoxStart, title => loc('Signature') &>
-<TEXTAREA class="signature" COLS=80 ROWS=5 name="Signature" WRAP=HARD><%$UserObj->Signature%></TEXTAREA>
-<& /Elements/TitleBoxEnd &>
+<br />
+<&| /Widgets/TitleBox, title => loc('Signature') &>
+<textarea class="signature" cols="80" rows="5" name="Signature" wrap="hard"><%$UserObj->Signature%></textarea>
+</&>
% }
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
@@ -289,12 +294,19 @@ else {
if ($val) {
push @results, $msg;
+ foreach my $key ( keys %ARGS) {
+ # Convert custom fields on the "new" object to custom fields on the one we've just created
+ if ($key =~ /^Object-RT::User-new-CustomField-(.*)$/) {
+ $ARGS{'Object-RT::User-'.$val.'-CustomField-'.$1} = delete $ARGS{$key};
+ }
+ }
+ push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj );
} else {
push @results, loc('User could not be created: [_1]', $msg);
}
} else {
- $UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'");
- $val = $UserObj->Id();
+ $UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'");
+ $val = $UserObj->Id();
}
if ($val) {
diff --git a/rt/html/Admin/Users/index.html b/rt/html/Admin/Users/index.html
index 1bbe867f7..bc47d4fef 100644
--- a/rt/html/Admin/Users/index.html
+++ b/rt/html/Admin/Users/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,26 +54,26 @@
<p><&|/l&>Select a user</&>:</p>
<ul>
%if ($users->Count == 0) {
-<li><i><&|/l&>No users matching search criteria found.</&></i></li>
+<li><em><&|/l&>No users matching search criteria found.</&></em></li>
% }
%my @ids;
%while ( $user = $users->Next) {
% push @ids, $user->Id;
-<LI><A HREF="Modify.html?id=<%$user->id%>"><%$user->Name || loc('(no name listed)')%></a></LI>
+<li><a href="Modify.html?id=<%$user->id%>"><%$user->Name || loc('(no name listed)')%></a></li>
%}
-</UL>
+</ul>
%if (my $ids = join(',', @ids)) {
-<em>(<a href="<%$RT::WebPath%>/Download/Tabular/User/<% $ids %>/Users.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br>
+<em>(<a href="<%$RT::WebPath%>/Download/Tabular/User/<% $ids %>/Users.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br />
%}
-<br><br>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Users/index.html">
+<br /><br />
+<form method="post" action="<% $RT::WebPath %>/Admin/Users/index.html">
-<&|/l&>Find people whose</&> <& /Elements/SelectUsers &><BR>
-<input type="checkbox" name="FindDisabledUsers" value="1"> <&|/l&>Include disabled users in search.</&>
-<BR>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
+<&|/l&>Find people whose</&> <& /Elements/SelectUsers &><br />
+<input type="checkbox" class="checkbox" name="FindDisabledUsers" value="1" /> <&|/l&>Include disabled users in search.</&>
+<br />
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
<%INIT>
my ($user, $caption);
diff --git a/rt/html/Admin/autohandler b/rt/html/Admin/autohandler
index def61010a..b346cbc20 100644
--- a/rt/html/Admin/autohandler
+++ b/rt/html/Admin/autohandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/index.html b/rt/html/Admin/index.html
index 01ba24d2d..c89a88350 100644
--- a/rt/html/Admin/index.html
+++ b/rt/html/Admin/index.html
@@ -2,10 +2,10 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
-%# (Except where explicitly superseded by other copyright notices),
+%# (Except where explicitly superseded by other copyright notices)
%#
%#
%# LICENSE:
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -31,7 +33,7 @@
%# to you to modify and distribute this software under the terms of
%# the GNU General Public License and is only of importance to you if
%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.),
+%# community by submitting them to Best Practical Solutions, LLC.)
%#
%# By intentionally submitting any modifications, corrections or
%# derivatives to this work, or any other work intended for use with
@@ -48,7 +50,7 @@
<ul>
% foreach my $key (sort keys %$tabs) {
-<li><font size="+2"><a href="<%$RT::WebPath%>/<%$tabs->{$key}->{'path'}|n %>"><%$tabs->{$key} ->{'title'}%></a></font><br>
+<li><span><a href="<%$RT::WebPath%>/<%$tabs->{$key}->{'path'}|n %>"><%$tabs->{$key} ->{'title'}%></a></span><br />
<%$tabs->{$key}->{description}%>
</li>
%}
diff --git a/rt/html/Approvals/Display.html b/rt/html/Approvals/Display.html
index d9d6df582..477959798 100644
--- a/rt/html/Approvals/Display.html
+++ b/rt/html/Approvals/Display.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,15 +50,13 @@
<& Elements/Tabs,
current_tab => "Approvals/Display.html",
Title => $title &>
-<form method=post action="<%$RT::WebPath%>/Approvals/index.html">
+<form method="post" action="<%$RT::WebPath%>/Approvals/index.html">
-<& /Elements/TitleBoxStart, title => $title &>
+<&| /Widgets/TitleBox, title => $title &>
<& /Ticket/Elements/ShowHistory , Ticket => $Ticket, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &>
<hr>
-<table width=100%>
<& Elements/Approve, ticket => $Ticket, ShowApproving => 0 &>
-</table>
-<& /Elements/TitleBoxEnd &>
+</&>
<& /Elements/Submit&>
</form>
<& Elements/ShowDependency, Ticket => $Ticket &>
diff --git a/rt/html/Approvals/Elements/Approve b/rt/html/Approvals/Elements/Approve
index bf786fb03..6dd562a32 100644
--- a/rt/html/Approvals/Elements/Approve
+++ b/rt/html/Approvals/Elements/Approve
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,36 +45,50 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<tr bgcolor="#b9b9ff">
-<td colspan=2><font size="3">
-<a href="<%$RT::WebPath%>/Approvals/Display.html?id=<%$ticket->Id%>"><% loc("#[_1]: [_2]", $ticket->Id, $ticket->Subject) %></a> (<%loc($ticket->Status)%>)</font></td>
-</tr>
+<div class="approval">
+ <div class="name">
+ <a href="<%$RT::WebPath%>/Approvals/Display.html?id=<%$ticket->Id%>"><% loc("#[_1]: [_2]", $ticket->Id, $ticket->Subject) %></a> (<%loc($ticket->Status)%>)
+ </div>
% if ($ShowApproving) {
% foreach my $approving ( $ticket->AllDependedOnBy( Type => 'ticket' ) ) {
-<tr bgcolor="#e9e9e9">
-<td colspan=2>
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<% $approving->Id %>"><&|/l, $approving->Id, $approving->Subject &>Originating ticket: #[_1]</&></a>
-</td>
-</tr>
-<tr><td colspan=2>
-<& /Ticket/Elements/ShowCustomFields, Ticket => $approving &>
-<& /Ticket/Elements/ShowHistory, Ticket => $approving, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &>
-</td></tr>
+ <div class="originating-ticket">
+ <span class="link"><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<% $approving->Id %>"><&|/l, $approving->Id, $approving->Subject &>Originating ticket: #[_1]</&></a></span>
+ <div class="info">
+% if ($ShowCustomFields) {
+ <& /Ticket/Elements/ShowCustomFields, Ticket => $approving &>
+% }
+% if ($ShowHistory) {
+ <& /Ticket/Elements/ShowHistory, Ticket => $approving, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &>
+% }
+ </div>
+ </div>
% }
% }
-<tr <%$class && "class=\"$class\""%>>
-<td valign=top>
-<input type="radio" name="Approval-<%$ticket->Id%>-Action" value="approve"><&|/l&>Approve</&><br>
-<input type="radio" name="Approval-<%$ticket->Id%>-Action" value="deny"><&|/l&>Deny</&><br>
-<input type="radio" name="Approval-<%$ticket->Id%>-Action" value="none" checked><&|/l&>No action</&>
-</td>
-<td>
-<&|/l&>Notes</&><br>
-<textarea name="Approval-<%$ticket->Id%>-Notes" rows=2 cols=70></textarea>
-</td>
-</tr>
+ <div class="form">
+ <div class="action">
+ <div>
+ <input type="radio" class="radio" id="Approval-<%$ticket->Id%>-Action-approve" name="Approval-<%$ticket->Id%>-Action" value="approve" />
+ <label for="Approval-<%$ticket->Id%>-Action-approve"><&|/l&>Approve</&></label>
+ </div>
+ <div>
+ <input type="radio" class="radio" id="Approval-<%$ticket->Id%>-Action-deny" name="Approval-<%$ticket->Id%>-Action" value="deny" />
+ <label for="Approval-<%$ticket->Id%>-Action-deny"><&|/l&>Deny</&></label>
+ </div>
+ <div>
+ <input type="radio" class="radio" id="Approval-<%$ticket->Id%>-Action-none" name="Approval-<%$ticket->Id%>-Action" value="none" checked="checked" />
+ <label for="Approval-<%$ticket->Id%>-Action-none"><&|/l&>No action</&></label>
+ </div>
+ </div>
+ <div class="notes">
+ <label for="Approval-<%$ticket->Id%>-Notes"><&|/l&>Notes</&></label>
+ <textarea name="Approval-<%$ticket->Id%>-Notes" id="Approval-<%$ticket->Id%>-Notes" rows="2" cols="70"></textarea>
+ </div>
+ <div class="clear"></div>
+ </div>
+</div>
<%ARGS>
$ShowApproving => 1
+$ShowCustomFields => 1
+$ShowHistory => 1
$ticket => undef
-$class => undef
</%ARGS>
diff --git a/rt/html/Approvals/Elements/PendingMyApproval b/rt/html/Approvals/Elements/PendingMyApproval
index 8d19399ab..e03145e18 100644
--- a/rt/html/Approvals/Elements/PendingMyApproval
+++ b/rt/html/Approvals/Elements/PendingMyApproval
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,33 +45,32 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table width="100%">
-% my ($i, $class);
+<script type="text/javascript"><!--
+ onLoadHook('createCalendarLink("CreatedBefore");');
+ onLoadHook('createCalendarLink("CreatedAfter");');
+--></script>
% my %done;
% foreach ($tickets, $group_tickets) {
% while (my $ticket = $_->Next() ) {
% next if !$ARGS{'ShowDependent'} and $ticket->HasUnresolvedDependencies( Type => 'approval' );
% next if $done{$ticket->Id}++; # don't show duplicate tickets
-% $i++;
-% $class = ($i%2) ? "oddline" : "evenline";
-<& Approve, ticket => $ticket, class => $class &>
+<& Approve, ticket => $ticket &>
% }
% }
-</table>
-<& /Elements/TitleBoxStart, title => loc("Search for approvals") &>
-<input type=checkbox value="1" name="ShowPending"
+<&| /Widgets/TitleBox, title => loc("Search for approvals") &>
+<input type="checkbox" class="checkbox" value="1" name="ShowPending"
<%((!$ARGS{'ShowRejected'} && !$ARGS{'ShowResolved'}) ||
$ARGS{'ShowPending'})
- && "checked"%>> <&|/l&>Show pending requests</&><br>
-<input type=checkbox value="1" name="ShowResolved" <%$ARGS{'ShowResolved'} && "checked"%>> <&|/l&>Show approved requests</&><br>
-<input type=checkbox value="1" name="ShowRejected" <%$ARGS{'ShowRejected'} && "checked"%>> <&|/l&>Show denied requests</&><br>
-<input type=checkbox value="1" name="ShowDependent" <%$ARGS{'ShowDependent'} && "checked"%>> <&|/l&>Show requests awaiting other approvals</&><br>
+ && "checked"%> /> <&|/l&>Show pending requests</&><br />
+<input type="checkbox" class="checkbox" value="1" name="ShowResolved" <%$ARGS{'ShowResolved'} && "checked"%> /> <&|/l&>Show approved requests</&><br />
+<input type="checkbox" class="checkbox" value="1" name="ShowRejected" <%$ARGS{'ShowRejected'} && "checked"%> /> <&|/l&>Show denied requests</&><br />
+<input type="checkbox" class="checkbox" value="1" name="ShowDependent" <%$ARGS{'ShowDependent'} && "checked"%> /> <&|/l&>Show requests awaiting other approvals</&><br />
-<&|/l,"<input size='15' value='".($created_before->Unix > 0 &&$created_before->ISO)."' name='CreatedBefore'>"&>Only show approvals for requests created before [_1]</&><br>
+<&|/l,"<input size='15' value='".($created_before->Unix > 0 &&$created_before->ISO)."' name='CreatedBefore' id='CreatedBefore' />"&>Only show approvals for requests created before [_1]</&><br />
-<&|/l, "<input size='15' value='".( $created_after->Unix >0 && $created_after->ISO)."' name='CreatedAfter'>"&>Only show approvals for requests created after [_1]</&>
-<& /Elements/TitleBoxEnd &>
+<&|/l, "<input size='15' value='".( $created_after->Unix >0 && $created_after->ISO)."' name='CreatedAfter' id='CreatedAfter' />"&>Only show approvals for requests created after [_1]</&>
+</&>
<%init>
my $tickets = RT::Tickets->new( $session{'CurrentUser'} );
diff --git a/rt/html/Approvals/Elements/ShowDependency b/rt/html/Approvals/Elements/ShowDependency
index e8d0b00d5..6da28f180 100644
--- a/rt/html/Approvals/Elements/ShowDependency
+++ b/rt/html/Approvals/Elements/ShowDependency
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,9 +49,9 @@
% if ($approving->Count) {
<h3><&|/l&>Tickets which depend on this approval:</&></h3>
-<table width=100%>
-<TR>
-<TD WIDTH="25" bgcolor="#999999">&nbsp;</TD><TD>
+<table width="100%">
+<tr>
+<td width="25" bgcolor="#999999">&nbsp;</td><td>
<%PERL>
my %show;
while (my $link = $approving->Next()) {
@@ -60,22 +62,22 @@ while (my $link = $approving->Next()) {
my $dep = $m->scomp('ShowDependency', Ticket => $link->BaseObj, _seen => $_seen);
if ($type eq 'approval') {
- $head .= $m->scomp('/Elements/TitleBoxStart', title => loc("Approval #[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
+ $head .= $m->scomp('/Widgets/TitleBoxStart', title => loc("Approval #[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
$text .= $head;
$text .= $m->scomp('/Ticket/Elements/ShowCustomFields', Ticket => $link->BaseObj);
} elsif ($type eq 'ticket') {
- $head .= $m->scomp('/Elements/TitleBoxStart', title => loc("Ticket #[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
+ $head .= $m->scomp('/Widgets/TitleBoxStart', title => loc("Ticket #[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
$text .= $head;
$text .= $m->scomp('/Ticket/Elements/ShowSummary', Ticket => $link->BaseObj);
} else {
- $head .= $m->scomp('/Elements/TitleBoxStart', title => loc("#[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
+ $head .= $m->scomp('/Widgets/TitleBoxStart', title => loc("#[_1]: [_2]", $link->BaseObj->Id, $link->BaseObj->Subject));
$text .= $head;
}
$text .= $m->scomp('/Ticket/Elements/ShowHistory' , Ticket => $link->BaseObj, Collapsed => ($type ne 'ticket'), ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0);
- $head .= $m->scomp('/Elements/TitleBoxEnd');
- $text .= $m->scomp('/Elements/TitleBoxEnd');
+ $head .= $m->scomp('/Widgets/TitleBoxEnd');
+ $text .= $m->scomp('/Widgets/TitleBoxEnd');
$text .= $dep;
$text .= '</a>';
$show{$link->BaseObj->Id} = {
@@ -96,9 +98,9 @@ foreach my $id (sort keys %show) {
$m->print($refer);
</%PERL>
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
% }
<%ARGS>
diff --git a/rt/html/Approvals/Elements/Tabs b/rt/html/Approvals/Elements/Tabs
index 03bdc262e..9ba425059 100644
--- a/rt/html/Approvals/Elements/Tabs
+++ b/rt/html/Approvals/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Approvals/index.html b/rt/html/Approvals/index.html
index 88c277c1e..ab91ffe97 100644
--- a/rt/html/Approvals/index.html
+++ b/rt/html/Approvals/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,7 +51,7 @@
<& /Elements/ListActions, actions => \@actions &>
<form method="post">
<& Elements/PendingMyApproval, %ARGS &>
-<& /Elements/Submit, Label => loc('Show Approvals') &>
+<& /Elements/Submit, Label => loc('Go!') &>
</form>
<%init>
diff --git a/rt/html/Download/CustomFieldValue/dhandler b/rt/html/Download/CustomFieldValue/dhandler
index 521968024..461267e00 100644
--- a/rt/html/Download/CustomFieldValue/dhandler
+++ b/rt/html/Download/CustomFieldValue/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Download/Tabular/dhandler b/rt/html/Download/Tabular/dhandler
index 3965a990e..0abb8f9db 100644
--- a/rt/html/Download/Tabular/dhandler
+++ b/rt/html/Download/Tabular/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/BevelBoxRaisedEnd b/rt/html/Elements/BevelBoxRaisedEnd
index e1d1edb7c..b1ba8f69b 100644
--- a/rt/html/Elements/BevelBoxRaisedEnd
+++ b/rt/html/Elements/BevelBoxRaisedEnd
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,6 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
- </TD>
-</TR>
+ </td>
+</tr>
</table>
diff --git a/rt/html/Elements/BevelBoxRaisedStart b/rt/html/Elements/BevelBoxRaisedStart
index 6c5a6137e..b690c1d74 100644
--- a/rt/html/Elements/BevelBoxRaisedStart
+++ b/rt/html/Elements/BevelBoxRaisedStart
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,6 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table cellspacing=0 cellpadding=0 width=100% height=100%>
- <TR>
- <TD width=100% height=100%>
+<table cellspacing="0" cellpadding="0" width="100%" height="100%">
+ <tr>
+ <td width="100%" height="100%">
diff --git a/rt/html/Elements/Callback b/rt/html/Elements/Callback
index c7aeb9f5d..b498f2816 100644
--- a/rt/html/Elements/Callback
+++ b/rt/html/Elements/Callback
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/Checkbox b/rt/html/Elements/Checkbox
index f2256fb78..5593c7a71 100644
--- a/rt/html/Elements/Checkbox
+++ b/rt/html/Elements/Checkbox
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<INPUT TYPE="Checkbox" NAME="<%$Name%>" value="1" <%$IsChecked%>>
+<input type="checkbox" class="checkbox" name="<%$Name%>" value="1" <%$IsChecked%> />
<%ARGS>
$Name => undef
diff --git a/rt/html/Elements/CollectionAsTable/Header b/rt/html/Elements/CollectionAsTable/Header
index 9ed4be8ec..a3277b317 100644
--- a/rt/html/Elements/CollectionAsTable/Header
+++ b/rt/html/Elements/CollectionAsTable/Header
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -54,7 +56,7 @@ $Rows => undef
$Page => undef
$maxitems => undef
</%ARGS>
-<TR class="collection-as-table">
+<tr class="collection-as-table">
<%perl>
my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format => $FormatString );
@@ -62,18 +64,18 @@ my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format
my $item = 0;
foreach my $col (@Format) {
$item++;
- if ( $col->{title} eq 'NEWLINE' ) {
+ if ( $col->{title} && ($col->{title} eq 'NEWLINE') ) {
while ( $item < $maxitems ) {
$m->out(qq{<th class="collection-as-table">&nbsp;</th>\n});
$item++;
}
$item = 0;
- $m->out(qq{</TR>\n<TR class="collection-as-table">});
+ $m->out(qq{</tr>\n<tr class="collection-as-table">});
}
else {
- $m->out('<TH class="collection-as-table">');
- my $title = $col->{title};
+ $m->out('<th class="collection-as-table">');
+ my $title = $col->{title} || '';
$title =~ s/^__(.*)__$/$1/o;
$title = (
$m->comp(
@@ -116,8 +118,8 @@ foreach my $col (@Format) {
else {
$m->out( loc($title) );
}
- $m->out('</TH>');
+ $m->out('</th>');
}
}
</%perl>
-</TR>
+</tr>
diff --git a/rt/html/Elements/CollectionAsTable/ParseFormat b/rt/html/Elements/CollectionAsTable/ParseFormat
index be56dea76..227076093 100644
--- a/rt/html/Elements/CollectionAsTable/ParseFormat
+++ b/rt/html/Elements/CollectionAsTable/ParseFormat
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/CollectionAsTable/Row b/rt/html/Elements/CollectionAsTable/Row
index 0de362ea8..d8492265e 100644
--- a/rt/html/Elements/CollectionAsTable/Row
+++ b/rt/html/Elements/CollectionAsTable/Row
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -53,23 +55,26 @@ $Warning => undef
</%ARGS>
<%PERL>
-$m->out('<TR class="' . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' ) . '" >' );
+use HTML::Entities;
+$m->out('<tr class="' . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' ) . '" >' );
my $item;
foreach my $column (@Format) {
- if ( $column->{title} eq 'NEWLINE' ) {
+ if ( defined $column->{title} && $column->{title} eq 'NEWLINE' ) {
while ( $item < $maxitems ) {
$m->out(qq{<td class="collection-as-table">&nbsp;</td>\n});
$item++;
}
$item = 0;
- $m->out('</TR>');
- $m->out('<TR class="'
+ $m->out('</tr>');
+ $m->out('<tr class="'
. ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' )
. '" >' );
next;
}
$item++;
- $m->out('<td class="collection-as-table" ');
+ my $class = $column->{class}
+ ? encode_entities($column->{class}, q{'"&<>}) : 'collection-as-table';
+ $m->out(qq{<td class="$class" });
$m->out( 'align="' . $column->{align} . '"' ) if ( $column->{align} );
$m->out( 'style="' . $column->{style} . '"' ) if ( $column->{style} );
$m->out('>');
@@ -99,7 +104,7 @@ foreach my $column (@Format) {
# Simple value; just escape it.
@out = $m->interp->apply_escapes( $value => 'h' );
}
- s/\n/<br>/gs for @out;
+ s/\n/<br \/>/gs for @out;
$m->out( @out );
}
else {
@@ -108,5 +113,5 @@ foreach my $column (@Format) {
}
$m->out('</td>');
}
-$m->out('</TR>');
+$m->out('</tr>');
</%PERL>
diff --git a/rt/html/Elements/CreateTicket b/rt/html/Elements/CreateTicket
index bd60bbddf..644df223a 100644
--- a/rt/html/Elements/CreateTicket
+++ b/rt/html/Elements/CreateTicket
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,6 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<FORM ACTION="<% $RT::WebPath %>/Ticket/Create.html" NAME="CreateTicketInQueue">
-<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&><input type="submit" value="New ticket in">&nbsp;[_1]</&>
-</FORM>
+<form action="<% $RT::WebPath %>/Ticket/Create.html" name="CreateTicketInQueue">
+<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&><input type="submit" class="button" value="New ticket in" />&nbsp;[_1]</&>
+</form>
diff --git a/rt/html/Elements/EditCustomField b/rt/html/Elements/EditCustomField
index e443c764e..d247c63f1 100644
--- a/rt/html/Elements/EditCustomField
+++ b/rt/html/Elements/EditCustomField
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,7 +47,7 @@
%# END BPS TAGGED BLOCK }}}
<%INIT>
my $Values;
-if ($Object) {
+if ($Object and $Object->id) {
$Values = $Object->CustomFieldValues($CustomField->id);
$Values->Columns( qw( id CustomField ObjectType ObjectId Disabled Content ContentType ContentEncoding ) );
$NamePrefix ||= join('-', 'Object', ref($Object), $Object->Id, 'CustomField', '');
@@ -67,10 +69,14 @@ if ($MaxValues == 1 and $Object and $Values) {
}
# The "Magic" hidden input causes RT to know that we were trying to edit the field, even if
# we don't see a value later, since browsers aren't compelled to submit empty form fields
-$m->out("\n".'<input type="hidden" name="'.$NamePrefix.$CustomField->Id.'-Values-Magic" value="1">'."\n");
+$m->out("\n".'<input type="hidden" class="hidden" name="'.$NamePrefix.$CustomField->Id.'-Values-Magic" value="1" />'."\n");
+
+my $EditComponent = "EditCustomField$Type";
+$m->comp('/Elements/Callback', _CallbackName => 'EditComponentName', Name => \$EditComponent, CustomField => $CustomField, Object => $Object );
+$EditComponent = "EditCustomField$Type" unless $m->comp_exists($EditComponent);
return $m->comp(
- "EditCustomField$Type",
+ $EditComponent,
%ARGS,
Rows => $Rows,
Cols => $Cols,
diff --git a/rt/html/Elements/EditCustomFieldBinary b/rt/html/Elements/EditCustomFieldBinary
index 002825660..485457c25 100644
--- a/rt/html/Elements/EditCustomFieldBinary
+++ b/rt/html/Elements/EditCustomFieldBinary
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,10 +47,10 @@
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
%# XXX - let user download the file(s) here?
-<input type="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>"><a href="<%$RT::WebPath%>/Download/CustomFieldValue/<% $value->Id %>/<% $value->Content %>"><% $value->Content %></a><br>
+<input type="checkbox" class="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>" /><a href="<%$RT::WebPath%>/Download/CustomFieldValue/<% $value->Id %>/<% $value->Content %>"><% $value->Content %></a><br />
% }
% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload">
+<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload" />
% }
<%ARGS>
$Object => undef
diff --git a/rt/html/Elements/EditCustomFieldFreeform b/rt/html/Elements/EditCustomFieldFreeform
index c097ee0a9..279632dcc 100644
--- a/rt/html/Elements/EditCustomFieldFreeform
+++ b/rt/html/Elements/EditCustomFieldFreeform
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,17 +45,21 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+% my $name = $NamePrefix . $CustomField->Id . '-Value';
% if ($Multiple) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><%$Default%></textarea>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$name%>s" id="<%$name%>s" ><%$Default%></textarea>
% } else {
-<input name="<%$NamePrefix%><%$CustomField->Id%>-Value" size="<%$Cols%>" value="<%$Default ? $Default : ''%>">
+<input name="<%$name%>" id="<%$name%>" size="<%$Cols%>" value="<%$Default ? $Default : ''%>" />
% }
<%INIT>
if ($Multiple and $Values) {
- $Default = '';
- while (my $value = $Values->Next ) {
- $Default .= $value->Content."\n";
- }
+ $Default = '';
+ while (my $value = $Values->Next ) {
+ $Default .= $value->Content."\n";
+ }
+}
+elsif ( ! $Multiple ) {
+ $Default =~ s/\s*\n\s*/ /g if $Default;
}
</%INIT>
<%ARGS>
diff --git a/rt/html/Elements/EditCustomFieldImage b/rt/html/Elements/EditCustomFieldImage
index b378ceae6..b6a30c659 100644
--- a/rt/html/Elements/EditCustomFieldImage
+++ b/rt/html/Elements/EditCustomFieldImage
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,11 +46,11 @@
%#
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
-<input type="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>"><& ShowCustomFieldImage, Object => $value &>
-<br>
+<input type="checkbox" class="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>" /><& ShowCustomFieldImage, Object => $value &>
+<br />
% }
% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload">
+<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload" />
% }
<%ARGS>
$Object => undef
diff --git a/rt/html/Elements/EditCustomFieldSelect b/rt/html/Elements/EditCustomFieldSelect
index 5dd4d0d69..815e977a0 100644
--- a/rt/html/Elements/EditCustomFieldSelect
+++ b/rt/html/Elements/EditCustomFieldSelect
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,30 +45,84 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
- <select name="<%$NamePrefix%><%$CustomField->Id%>-Values"
+%# Build up the set of cascading select boxes as "guides"
+%# each one limits the options of the final one a bit
+%# (perhaps by tweaking the .display style?)
+% my $selected = 0;
+% my @category;
+% my $id = $NamePrefix . $CustomField->Id;
+% my $out = $m->scomp('SELF:options', %ARGS, SelectedRef => \$selected, CategoryRef => \@category);
+% if (@category) {
+<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/cascaded.js"></script>
+%# XXX - Hide this select from w3m?
+ <select onchange="filter_cascade('<% $id %>-Values', this.value)" name="<%$id%>-Category">
+ <option value="" <% !$selected && 'SELECTED' %>><&|/l&>-</&></option>
+% foreach my $cat (@category) {
+% my ($depth, $name) = @$cat;
+ <option value="<% $name %>"><% '&nbsp;' x $depth |n %><%$name%></option>
+% }
+ </select><br />
+% }
+ <select name="<%$id%>-Values" id="<%$id%>-Values"
+% if ($Multiple or !@category) {
size="<%$Rows%>"
+% }
<% $Multiple && 'MULTIPLE' %>>
+ <option value="" <% !$selected && 'SELECTED' %>><&|/l&>(no value)</&></option>
+% $m->out($out);
+ </select>
+<%ARGS>
+$Object => undef
+$CustomField => undef
+$NamePrefix => undef
+$Default => undef
+$Values => undef
+$Multiple => 0
+$Rows => undef
+</%ARGS>
+
+<%method options>
% my $selected;
% my $CFVs = $CustomField->Values;
+% my @levels;
% while ($CFVs and my $value = $CFVs->Next ) {
+% my $category = $value->Category;
+% if (1) { # length $category) {
+% my $level = (split(/:/, $category || ''))[0];
+% while (@levels) {
+% if ($levels[-1] eq $level) {
+% undef $level;
+% last;
+% } elsif (index($level, $levels[-1]) != 0) {
+ </optgroup>
+% pop @levels;
+% } else {
+% last;
+% }
+% }
+% if ($level) {
+% push @$CategoryRef, [0+@levels, $level];
+ <optgroup style="padding-left: <% @levels/2 %>em" label="<%$category%>">
+% push @levels, $level;
+% }
+% }
<option value="<%$value->Name%>"
% if ($Values) {
- <% ($Values->HasEntry($value->Name)||'') && ($selected = 1) && 'SELECTED' %>
+ <% ($Values->HasEntry($value->Name)||'') && ($$SelectedRef = 1) && 'SELECTED' %>
% } elsif ($Default) {
<% (ref $Default ? (grep {$_ eq $value->Name} @{$Default}) : ($Default eq $value->Name))
- && ($selected = 1) && 'SELECTED' %>
+ && ($$SelectedRef = 1) && 'SELECTED' %>
% }
><% $value->Name%></option>
% }
- <option value="" <% !$selected && 'SELECTED' %>><&|/l&>(no value)</&></option>
- </select>
-<%ARGS>
-$Object => undef
+% for (@levels) {
+ </optgroup>
+% }
+<%args>
$CustomField => undef
-$NamePrefix => undef
$Default => undef
$Values => undef
-$Multiple => 0
-$Cols
-$Rows
-</%ARGS>
+$SelectedRef => undef
+$CategoryRef => undef
+</%args>
+</%method>
diff --git a/rt/html/Elements/EditCustomFieldText b/rt/html/Elements/EditCustomFieldText
index 1aac3283b..b7569b003 100644
--- a/rt/html/Elements/EditCustomFieldText
+++ b/rt/html/Elements/EditCustomFieldText
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,10 +46,10 @@
%#
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br />
% }
% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea>
% }
<%INIT>
# XXX - MultiValue textarea is for now outlawed.
diff --git a/rt/html/Elements/EditCustomFieldWikitext b/rt/html/Elements/EditCustomFieldWikitext
index 1aac3283b..b7569b003 100644
--- a/rt/html/Elements/EditCustomFieldWikitext
+++ b/rt/html/Elements/EditCustomFieldWikitext
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,10 +46,10 @@
%#
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br />
% }
% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea>
% }
<%INIT>
# XXX - MultiValue textarea is for now outlawed.
diff --git a/rt/html/Elements/EditLinks b/rt/html/Elements/EditLinks
index 68c08dd16..7670ffa24 100755
--- a/rt/html/Elements/EditLinks
+++ b/rt/html/Elements/EditLinks
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,9 +45,9 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE width=100%>
- <TR>
- <TD VALIGN=TOP WIDTH=50%>
+<table width="100%">
+ <tr>
+ <td valign="top" width="50%">
<h3><&|/l&>Current Links</&></h3>
<table>
@@ -57,8 +59,8 @@
<td class="labeltop"><&|/l&>Depends on</&>:</td>
<td class="value">
% while (my $link = $Object->DependsOn->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1">
- <& ShowLink, URI => $link->TargetURI &><br>
+ <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" />
+ <& ShowLink, URI => $link->TargetURI &><br />
% }
</td>
</tr>
@@ -66,9 +68,8 @@
<td class="labeltop"><&|/l&>Depended on by</&>:</td>
<td class="value">
% while (my $link = $Object->DependedOnBy->Next) {
-% my $member = $link->BaseObj;
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1">
- <& ShowLink, URI => $link->BaseURI &><br>
+ <input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" />
+ <& ShowLink, URI => $link->BaseURI &><br />
% }
</td>
</tr>
@@ -76,8 +77,8 @@
<td class="labeltop"><&|/l&>Parents</&>:</td>
<td class="value">
% while (my $link = $Object->MemberOf->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1">
- <& ShowLink, URI => $link->TargetURI &><br>
+ <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" />
+ <& ShowLink, URI => $link->TargetURI &><br />
% }
</td>
</tr>
@@ -85,8 +86,8 @@
<td class="labeltop"><&|/l&>Children</&>:</td>
<td class="value">
% while (my $link = $Object->Members->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1">
- <& ShowLink, URI => $link->BaseURI &><br>
+ <input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" />
+ <& ShowLink, URI => $link->BaseURI &><br />
% }
</td>
</tr>
@@ -94,8 +95,8 @@
<td class="labeltop"><&|/l&>Refers to</&>:</td>
<td class="value">
% while (my $link = $Object->RefersTo->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1">
- <& ShowLink, URI => $link->TargetURI &><br>
+ <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" />
+ <& ShowLink, URI => $link->TargetURI &><br />
%}
</td>
</tr>
@@ -103,61 +104,63 @@
<td class="labeltop"><&|/l&>Referred to by</&>:</td>
<td class="value">
% while (my $link = $Object->ReferredToBy->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1">
- <& ShowLink, URI => $link->BaseURI &><br>
+% # Skip reminders
+% next if (UNIVERSAL::isa($link->BaseObj, 'RT::Ticket') && $link->BaseObj->Type eq 'reminder');
+ <input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" />
+ <& ShowLink, URI => $link->BaseURI &><br />
% }
</td>
</tr>
</table>
-</TD>
-<TD VALIGN=TOP>
+</td>
+<td valign="top">
<h3><&|/l&>New Links</&></h3>
% if (ref($Object) eq 'RT::Ticket') {
<i><&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.</&>
<& /Elements/Callback, _CallbackName => 'ExtraLinkInstructions' &>
-</i><br>
+</i><br />
% } elsif (ref($Object) eq 'RT::Queue') {
<i><&|/l&>Enter queues or URIs to link queues to. Separate multiple entries with spaces.</&>
-</i><br>
+</i><br />
% } else {
-<i><&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.</&></i><br>
+<i><&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.</&></i><br />
% }
-<TABLE>
+<table>
% if ($Merge) {
- <TR>
- <TD class="label"><&|/l&>Merge into</&>:</TD>
- <TD class="entry"><input name="<%$id%>-MergeInto"> <i><&|/l&>(only one ticket)</&></i></TD>
- </TR>
+ <tr>
+ <td class="label"><&|/l&>Merge into</&>:</td>
+ <td class="entry"><input name="<%$id%>-MergeInto" /> <i><&|/l&>(only one ticket)</&></i></td>
+ </tr>
% }
- <TR>
- <TD class="label"><&|/l&>Depends on</&>:</TD>
- <TD class="entry"><input name="<%$id%>-DependsOn"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Depended on by</&>:</TD>
- <TD class="entry"><input name="DependsOn-<%$id%>"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Parents</&>:</TD>
- <TD class="entry"><input name="<%$id%>-MemberOf"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Children</&>:</TD>
- <TD class="entry"> <input name="MemberOf-<%$id%>"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Refers to</&>:</TD>
- <TD class="entry"><input name="<%$id%>-RefersTo"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Referred to by</&>:</TD>
- <TD class="entry"> <input name="RefersTo-<%$id%>"></TD>
- </TR>
-</TABLE>
-</TD>
-</TR>
-</TABLE>
+ <tr>
+ <td class="label"><&|/l&>Depends on</&>:</td>
+ <td class="entry"><input name="<%$id%>-DependsOn" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Depended on by</&>:</td>
+ <td class="entry"><input name="DependsOn-<%$id%>" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Parents</&>:</td>
+ <td class="entry"><input name="<%$id%>-MemberOf" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Children</&>:</td>
+ <td class="entry"> <input name="MemberOf-<%$id%>" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Refers to</&>:</td>
+ <td class="entry"><input name="<%$id%>-RefersTo" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Referred to by</&>:</td>
+ <td class="entry"> <input name="RefersTo-<%$id%>" /></td>
+ </tr>
+</table>
+</td>
+</tr>
+</table>
<%INIT>
my $id;
diff --git a/rt/html/Elements/EmailInput b/rt/html/Elements/EmailInput
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/rt/html/Elements/EmailInput
diff --git a/rt/html/Elements/Error b/rt/html/Elements/Error
index bc5a1880a..369327406 100644
--- a/rt/html/Elements/Error
+++ b/rt/html/Elements/Error
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,15 +46,13 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Elements/Callback, %ARGS, error => $error &>
-<& /Elements/Header, Code => $Code, Why => $Why &>
-<& /Elements/Tabs &>
-<& /Elements/TitleBoxStart, class=> "error", title => $Title &>
+<& /Elements/Header, Code => $Code, Why => $Why, Title => $Title &>
+<& /Elements/Tabs, Title => $Title &>
+<div class="error">
<%$Why%>
-<br>
-<font size=-1>
+<br />
<%$Details%>
-</font>
-<& /Elements/TitleBoxEnd &>
+</div>
<%cleanup>
$m->comp('/Elements/Footer');
@@ -61,7 +61,7 @@ $m->abort();
<%args>
$Code => undef
-$Details => undef
+$Details =>''
$Title => loc("RT Error")
$Why => loc("the calling component did not specify why")
</%args>
@@ -77,7 +77,7 @@ if ($] >= 5.007001) {
$RT::Logger->error($error);
-if ( $session{'SessionType'} eq 'REST' ) {
+if ( defined ($session{'SessionType'}) && $session{'SessionType'} eq 'REST' ) {
$r->content_type('text/plain');
$m->out( "Error: " . $Why . "\n" );
$m->out( $Details . "\n" );
diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer
index 4c90acfa3..16f13f9fc 100644
--- a/rt/html/Elements/Footer
+++ b/rt/html/Elements/Footer
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,19 +45,26 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% if ($Menu) {
-</td>
-</tr>
-<tr>
-<td>
-% }
+%# End of div#body from /Elements/PageLayout
+</div>
<& /Elements/Callback, %ARGS &>
-<div class="bpscredits">
-<&|/l, '&#187;&#124;&#171;', $RT::VERSION, '2005', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&><br>
+<div id="footer">
+ <p id="time">
+ <span><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%></span>
+ </p>
+
+ <p id="bpscredits">
+ <span>
+<&|/l, '&#187;&#124;&#171;', $RT::VERSION, '2006', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&>
+</span>
+</p>
% if (!$Menu) {
-<&|/l&>Distributed under version 2 <a href="http://www.gnu.org/copyleft/gpl.html"> of the GNU GPL.</a></&><br>
-<&|/l, '<a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a>' &>To inquire about support, training, custom development or licensing, please contact [_1].</&><br>
+ <p id="legal">
+<&|/l&>Distributed under version 2 <a href="http://www.gnu.org/copyleft/gpl.html"> of the GNU GPL.</a></&><br />
+<&|/l, '<a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a>' &>To inquire about support, training, custom development or licensing, please contact [_1].</&><br />
+ </p>
% }
+
</div>
% if ($Debug >= 2 ) {
% require Data::Dumper;
@@ -64,17 +73,9 @@
<%$d->Dump() %>
</pre>
% }
-<div class="page-stats"><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%></div>
-% if ($Menu) {
-</TD>
-</TR>
-</TABLE>
-</TD>
-</TR>
-</TABLE>
-% }
-</BODY>
-</HTML>
+
+ </body>
+</html>
% $m->abort();
<%ARGS>
diff --git a/rt/html/Elements/GotoTicket b/rt/html/Elements/GotoTicket
index 869d57ef1..ad6ad1b15 100644
--- a/rt/html/Elements/GotoTicket
+++ b/rt/html/Elements/GotoTicket
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,4 +45,4 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<FORM ACTION="<%$RT::WebPath%>/Ticket/Display.html"><input type=submit value="<&|/l&>Goto ticket</&>">&nbsp;<input size=5 name=id accesskey="0"></FORM>
+<form action="<%$RT::WebPath%>/Ticket/Display.html"><input type="submit" class="button" value="<&|/l&>Goto ticket</&>" />&nbsp;<input size="5" name="id" accesskey="0" /></form>
diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header
index f5a616ece..d8db26cb2 100644
--- a/rt/html/Elements/Header
+++ b/rt/html/Elements/Header
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,78 +45,89 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-%#<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<HTML>
-<HEAD>
-<TITLE><%$Title%></TITLE>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
+
+<title><%$Title%></title>
+
% if ($Refresh && $Refresh > 0) {
-<META HTTP-EQUIV="REFRESH" CONTENT="<%$Refresh%>">
+ <meta http-equiv="refresh" content="<%$Refresh%>" />
% }
<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png" />
-<link media="all" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css" />
-<link media="print" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/printrt.css" type="text/css" />
+<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/<% $RT::WebDefaultStylesheet %>/main-squished.css" type="text/css" media="all" />
+<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/print.css" type="text/css" media="print" />
-<script>
-function hideshow(num) {
- idstring = "element-" + num;
- chunk = document.getElementById(idstring);
- if ( chunk.style.display == "none") {
- chunk.style.display = chunk.style.tag;
- } else {
- chunk.style.tag = chunk.style.display;
- chunk.style.display = "none";
- }
-}
-</script>
-<& /Elements/Callback, _CallbackName => 'Head', %ARGS &>
-</HEAD>
-<BODY BGCOLOR="<%$BgColor%>"
-% if ($Focus) {
-ONLOAD="
- var tmp = (document.getElementsByName('<% $Focus %>'));
- if (tmp.length > 0) tmp[tmp.length-1].focus();
-"
+% if ( $RSSAutoDiscovery ) {
+ <link rel="alternate" href="<%$RSSAutoDiscovery%>" type="application/rss+xml" title="RSS RT Search" />
% }
->
-<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
- <tr>
- <td colspan=2><a href="http://bestpractical.com"><img src="<%$RT::WebImagesURL%>/bplogo.gif" alt="<%loc("Best Practical Solutions, LLC corporate logo")%>" width="230" height="50"></a></td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td width="50%" align="right">
-% if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) {
-<SPAN STYLE="display: none"><A HREF="#skipnav"><&|/l&>Skip Menu</&></A> |</SPAN>
-%if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) {
-<A HREF="<%$RT::WebPath%><% $Prefs %>" ><&|/l&>Preferences</&></A>
+
+<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/util.js"></script>
+<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/ahah.js"></script>
+<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/titlebox-state.js"></script>
+<script type="text/javascript"><!--
+ onLoadHook("loadTitleBoxStates()");
+% if ( $Focus ) {
+ onLoadHook("focusElementById('<% $Focus %>')");
% }
-<& /Elements/Callback, %ARGS &>
-% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-| <A HREF="<%$RT::WebPath%>/NoAuth/Logout.html<%$URL ? "?URL=".$URL : ''%>"><&|/l&>Logout</&></a>
+% if ( $onload ) {
+ onLoadHook("<% $onload |n %>");
% }
-<BR>
-<&|/l, "<b>".$session{'CurrentUser'}->Name."</b>" &>Logged in as [_1]</&>
+--></script>
+
+<& /Elements/Callback, _CallbackName => 'Head', %ARGS &>
+
+</head>
+ <body<% $id && qq[ id="comp-$id"] |n %>>
+
+% if ($ShowBar) {
+<& /Elements/Logo &>
+
+<div id="quickbar">
+ <div id="quick-personal">
+ <span class="hide"><a href="#skipnav"><&|/l&>Skip Menu</&></a> | </span>
+% if ($session{'CurrentUser'}->Name) {
+ <&|/l, "<span>".$session{'CurrentUser'}->Name."</span>" &>Logged in as [_1]</&>
+% if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) {
+ | <a href="<%$RT::WebPath%><%$Prefs%>"><&|/l&>Preferences</&></a>
+% }
% } else {
-<&|/l&>Not logged in.</&>
+ <&|/l&>Not logged in.</&>
+% }
+ <& /Elements/Callback, %ARGS &>
+% unless (!$session{'CurrentUser'}->Name
+% or ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth)) {
+ | <a href="<%$RT::WebPath%>/NoAuth/Logout.html<%$URL ? "?URL=".$URL : ''%>"><&|/l&>Logout</&></a>
+% }
+ </div>
% }
- </td>
- </tr>
-</table>
-<%INIT>
+<%INIT>
$r->headers_out->{'Pragma'} = 'no-cache';
$r->headers_out->{'Cache-control'} = 'no-cache';
+
+my $id = $m->request_comp->path;
+$id =~ s|^/||g;
+$id =~ s|/|-|g;
+$id =~ s|\.html$||g;
+$id =~ s|index$||g
+ if $id ne 'index';
+$id =~ s|-$||g;
</%INIT>
<%ARGS>
$Prefs => '/User/Prefs.html'
-$Focus => 'focus'
+#$Focus => 'focus'
+$Focus => ''
$Title => 'RT'
$Code => undef
$Refresh => 0
$Why => undef
-$BgColor => '#ffffff'
$ShowBar => 1
-$LoggedIn => 1
$URL => undef
+$RSSAutoDiscovery => undef
+$onload => undef
</%ARGS>
diff --git a/rt/html/Elements/ListActions b/rt/html/Elements/ListActions
index 8433d17e0..24f923a8a 100644
--- a/rt/html/Elements/ListActions
+++ b/rt/html/Elements/ListActions
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,22 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% if ($actions[0] ) {
-<& /Elements/TitleBoxStart, title => loc('Results') &>
-<UL>
+<&| /Widgets/TitleBox, title => loc('Results') &>
+ <ul class="action-results">
% foreach my $action (@actions) {
-% next unless ($action);
-% my $skip = 0;
-% $m->comp('/Elements/Callback', _CallbackName => 'ModifyRow', row => \$action, skip => \$skip, %ARGS);
-% next if $skip;
-<LI><%$action%></LI>
-% }
-</UL>
-<& /Elements/TitleBoxEnd &>
-<BR>
+% next unless $action;
+% my $skip = 0;
+% $m->comp('/Elements/Callback', _CallbackName => 'ModifyRow', row => \$action, skip => \$skip, %ARGS);
+% next if $skip;
+ <li><%$action%></li>
% }
+ </ul>
+</&>
<%init>
-@actions = grep (/./,@actions);
+@actions = grep $_, @actions;
+return unless @actions;
</%init>
<%ARGS>
@actions => undef
diff --git a/rt/html/Elements/Login b/rt/html/Elements/Login
index 1d4bfd5ec..cd39b87d8 100644
--- a/rt/html/Elements/Login
+++ b/rt/html/Elements/Login
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,36 +53,58 @@ if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') {
$m->out("\n$Error\n") if $Error;
$m->abort;
}
+
+my $req_uri;
+
+if (UNIVERSAL::can($r, 'uri') and $r->uri =~ m{.*/(.*)}) {
+ $req_uri = $1;
+}
+
+my $form_action = defined $goto ? $goto
+ : defined $req_uri ? $req_uri
+ : $RT::WebPath
+ ;
</%INIT>
<& /Elements/Callback, %ARGS, _CallbackName => 'Header' &>
<& /Elements/Header, Title => loc('Login'), Focus => 'user' &>
-<DIV ALIGN=CENTER>
+%# End of div#quickbar from /Elements/Header
+</div>
+
+<div id="body" class="login-body">
+
% if ($Error) {
-<& /Elements/TitleBoxStart, title => loc('Error') &>
+<&| "/Widgets/TitleBox", title => loc('Error'), hideable => 0 &>
<% $Error %>
-<& /Elements/TitleBoxEnd &>
+</&>
% }
-<BR>
-<& /Elements/TitleBoxStart, width=> "40%", titleright => loc("RT [_1]", $RT::VERSION), title => loc('Login') ,
-contentbg=>"#cccccc" &>
+
+<& /Elements/Callback, %ARGS, _CallbackName => 'BeforeForm' &>
+
+<div id="login-box">
+<&| /Widgets/TitleBox, title => loc('Login'), titleright => $RT::VERSION, hideable => 0 &>
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-<FORM id="login" name="login" METHOD=POST ACTION="<% (UNIVERSAL::can($r, 'uri') && ($r->uri) =~ m!.*/(.*)!) %>" >
-<TABLE BORDER=0 WIDTH=100%>
-<TR ALIGN=RIGHT>
-<TD ALIGN=RIGHT><&|/l&>Username</&>:</TD><TD ALIGN=LEFT><input name=user value="<%$user%>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Password</&>:</TD><TD ALIGN=LEFT><input type=password name=pass></TD></TR>
-<TR><TD colspan=2 align=right>
-<input type=submit Value="<&|/l&>Login</&>">
-</TD></TR>
-</TABLE>
+<form id="login" name="login" method="post" action="<% $form_action %>">
+
+<div class="input-row">
+ <span class="label"><&|/l&>Username</&>:</span>
+ <span class="input"><input name="user" value="<%$user%>" id="user" /></span>
+</div>
+
+<div class="input-row">
+ <span class="label"><&|/l&>Password</&>:</span>
+ <span class="input"><input type="password" name="pass" /></span>
+</div>
+
+<div class="button-row">
+ <span class="input"><input type="submit" class="button" value="<&|/l&>Login</&>" /></span>
+</div>
%# Give callbacks a chance to add more control elements
<& /Elements/Callback, %ARGS &>
-<&/Elements/TitleBoxEnd&>
% # From mason 1.0.1 forward, this doesn't work. in fact, it breaks things.
% # But on Mason 1.15 it's fixed again, so we still use it.
% # The code below iterates through everything in the passed in arguments
@@ -92,27 +116,19 @@ contentbg=>"#cccccc" &>
% if (($key ne 'user') and ($key ne 'pass')) {
% if (ref($ARGS{$key}) =~ /ARRAY/) {
% foreach $val (@{$ARGS{$key}}) {
-<input type=hidden name="<%$key %>" value="<% $val %>">
+<input type="hidden" class="hidden" name="<%$key %>" value="<% $val %>" />
% }
% }
% else {
-<input type="hidden" name="<% $key %>" value="<% $ARGS{$key} %>">
+<input type="hidden" class="hidden" name="<% $key %>" value="<% $ARGS{$key} %>" />
% }
% }
% }
-</FORM>
+</form>
% }
-</DIV>
-
-<BR>
-<!-- TODO: not yet implemented
-If you've forgotten your username or password, RT can <A
-href="/NoAuth/Reminder.html">send you a reminder</a>.
--->
-<BR>
-<BR>
-<BR>
-<HR>
+</&>
+</div><!-- #login-box -->
+<& /Elements/Callback, %ARGS, _CallbackName => 'AfterForm' &>
<& /Elements/Footer, Menu => 0 &>
<%ARGS>
$user => ""
diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu
index 398e3ab07..b5b2bdad5 100644
--- a/rt/html/Elements/Menu
+++ b/rt/html/Elements/Menu
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,66 +45,90 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-%# font size depends on level
-% if ($level ge 3) {
-% $size = $basesize-(6);
-% } elsif ($level gt 0) {
-% $size = $basesize-($level * 2);
-% $padding = 2;
-% }
-% else {
-% $size = $basesize;
-% $padding = 5;
-% }
-<ul class="topnav" >
-% my $sep=0;
-% my $accesskey="1";
+<ul<% !$level ? ' id="system-menu"' : ''|n %><% $menu_class ? qq[ class="$menu_class"] : ''|n %>>
+<div<% $menu_class ? qq[ class="$menu_class"] : ''|n %>><div class="wrapper">
+% my $sep = 0;
+% my $postsep = 0;
+% my $accesskey = 1;
+%
+% $count = 0;
+% $class = {};
+%
% foreach $tab (sort keys %{$toptabs}) {
-% my $current = $current_toptab || "";
-% my $path = $toptabs->{$tab}->{'path'} || "";
-% $path =~ s#/index.html$##gi;
-% $current =~ s#/index.html$##gi;
-% if ( $path eq $current) {
-% $class="currenttopnav"
-% } else {
-% $class="topnav"
-% }
-% my $style="";
-% if ($sep) {
-% $style="minor";
-% } elsif ($level == 0 ) {
-% $style="major";
-% }
-% if ($toptabs->{$tab}->{'separator'}) {
-% $sep=1;
-% } else {
-% $sep=0;
-% }
-% my $url = $toptabs->{$tab}->{'path'} =~ /^https?:/i ? $toptabs->{$tab}->{'path'} : $RT::WebPath . "/" . $toptabs->{$tab}->{'path'};
-<li class="<%$class%>-<%$level%>-<%$style%>"><A HREF="<% $url %>" class="<%$class%>-<%$level%>"
-<%($class eq 'currenttopnav') ? "name='focus'" : ""|n %>
-<% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%></A>
+% $count++;
+%
+% my $current = $current_toptab || "";
+% my $path = $toptabs->{$tab}->{'path'} || "";
+%
+% $path =~ s#/index.html$##gi;
+% $current =~ s#/index.html$##gi;
+%
+% $sep = $toptabs->{$tab}->{'separator'} ? 1 : 0;
+%
+% my @aclass;
+% push @aclass, 'selected'
+% if $path eq $current;
+%
+% push @aclass, 'odd'
+% if $level % 2;
+%
+% $class->{a} = join ' ', @aclass;
+%
+% my @li;
+% push @li, 'first'
+% if $count == 1;
+%
+% push @li, 'pre-separator'
+% if $sep;
+%
+% push @li, 'post-separator'
+% if $postsep;
+%
+% $class->{li} = join ' ', @li;
+%
+% my $url = ($toptabs->{$tab}->{'path'}||'') =~ /^https?:/i
+% ? $toptabs->{$tab}->{'path'} || ''
+% : $RT::WebPath . "/" . $toptabs->{$tab}->{'path'};
+%
+ <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>>
+ <% $count > 1 && !$postsep && qq[<span class="bullet">&#183; </span>]|n%>
+ <a href="<% $url %>"
+ <% $class->{a} && qq[ class="$class->{a}"] |n%>
+ <% !$level && " accesskey='".$accesskey++."'" |n%>>
+ <% $toptabs->{$tab}->{'title'} || ''%></a>
%# Second-level items
-%# if ($current_toptab eq $toptabs->{$tab}->{'path'}) {
-%# commented out by jesse on 4 jan 2003 so that tickets/search and ticket/# can
-%# both have menu items
-% if ($toptabs->{$tab}->{'subtabs'}) {
- <& /Elements/Menu, level => $level+1,
- current_toptab => $toptabs->{$tab}->{'current_subtab'},
- toptabs => $toptabs->{$tab}->{'subtabs'} &></li>
-% }
-%# }
+% if ($toptabs->{$tab}->{'subtabs'}
+% and keys %{$toptabs->{$tab}->{'subtabs'}})
+% {
+ <& /Elements/Menu, level => $level+1,
+ current_toptab => $toptabs->{$tab}->{'current_subtab'},
+ toptabs => $toptabs->{$tab}->{'subtabs'},
+ last_level => $toptabs->{$tab}->{last_system_menu_level} &>
+% }
+ </li>
+% if ($sep) {
+ <li class="separator">&#183;&#183;&#183;</li>
+% }
+%
+% $postsep = $sep;
% }
+</div></div>
</ul>
<%INIT>
-my ($tab, $subtab, $class, $size, $padding);
-my $basesize=16;
+my ($tab, $class, $count);
+my @ul;
+push @ul, 'last-menu-level'
+ if $last_level;
+push @ul, 'odd'
+ if $level % 2;
+my $menu_class = join ' ', @ul;
</%INIT>
<%ARGS>
$current_toptab => ""
$toptabs => undef
$level => 0
+$last_level => 0
</%ARGS>
diff --git a/rt/html/Elements/MessageBox b/rt/html/Elements/MessageBox
index dd48bec9a..0149e1b30 100644
--- a/rt/html/Elements/MessageBox
+++ b/rt/html/Elements/MessageBox
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,10 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<textarea class="messagebox" COLS=<%$Width%> ROWS=<%$Height%> WRAP=<%$Wrap%> NAME="<%$Name%>"><& /Elements/Callback, %ARGS &><% $Default %><%$message%><%$IncludeSignature ? $signature : ''%></textarea>
+<textarea class="messagebox" cols="<%$Width%>" rows="<%$Height%>" wrap="<%$Wrap%>" name="<%$Name%>"><& /Elements/Callback, %ARGS &><% $Default %><%$message%><%$IncludeSignature ? $signature : ''%></textarea>
<%INIT>
-my ($message);
+my $message = '';
if ($QuoteTransaction) {
my $transaction=RT::Transaction->new($session{'CurrentUser'});
diff --git a/rt/html/Elements/MyRT b/rt/html/Elements/MyRT
index be487a433..3fde555c2 100644
--- a/rt/html/Elements/MyRT
+++ b/rt/html/Elements/MyRT
@@ -48,7 +48,7 @@
<table border="0" width="100%">
<tr valign="top">
-<td class="boxcontainer" width="70%" <% $summary? 'width="70%"': '' %>>
+<td class="boxcontainer" <% $summary? 'width="70%"': '' |n %>>
% $show_cb->($_) foreach @$body;
</td>
diff --git a/rt/html/Elements/MyRequests b/rt/html/Elements/MyRequests
index 172b4a4fa..fc1e27095 100644
--- a/rt/html/Elements/MyRequests
+++ b/rt/html/Elements/MyRequests
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,28 +45,5 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&|/Elements/TitleBox,
- title => loc("[_1] newest unowned tickets", $rows),
- title_href => "Search/Results.html".$QueryString &>
-<& /Elements/TicketList,
- Format => "'<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__id__</a>/TITLE:#', '<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__Subject__</a>/TITLE:Subject', QueueName, ExtendedStatus, CreatedRelative, '<A HREF=\"$RT::WebPath/Ticket/Display.html?Action=Take&id=__id__\">".loc('Take')."</a>/TITLE:&nbsp;' ",
- Query => $Query,
- OrderBy => 'Created',
- Order => 'DESC',
- ShowNavigation => 0,
- Rows => $rows
-
- &>
-</&>
-<%init>
-my $rows = $RT::MyRequestsLength;
-
-my $Query = "Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')";
-
-my $QueryString = "";
-$QueryString = '?' . $m->comp('/Elements/QueryString',
- Query => $Query,
- Order => 'DESC',
- OrderBy => 'Priority') if ($Query);
-
-</%init>
+%# DEPRECATED
+<& /Elements/ShowSearch, Name => 'My Requests' &>
diff --git a/rt/html/Elements/MyTickets b/rt/html/Elements/MyTickets
index cf5225abc..8d657db3d 100644
--- a/rt/html/Elements/MyTickets
+++ b/rt/html/Elements/MyTickets
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,29 +45,5 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&|/Elements/TitleBox,
- title => loc('[_1] highest priority tickets I own', $rows),
- title_href => "Search/Results.html".$QueryString &>
-<& /Elements/TicketList,
- Format => "'<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__id__</a>/TITLE:#', '<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__Subject__</a>/TITLE:Subject', Priority, QueueName, ExtendedStatus",
-
- Query => $Query,
- OrderBy => 'Priority',
- Order => 'DESC',
- Rows => $rows,
- ShowNavigation => 0
- &>
-</&>
-<%init>
-my $rows = $RT::MyTicketsLength;
-
-my $Query = " Owner = '".$session{'CurrentUser'}->Id."' AND ( Status = 'new' OR Status = 'open')";
-
-my $QueryString = "";
-$QueryString = '?' . $m->comp('/Elements/QueryString',
- Query => $Query,
- Order => 'DESC',
- OrderBy => 'Priority') if ($Query);
-
-</%init>
-
+%# DEPRECATED
+<& /Elements/ShowSearch, Name => 'My Tickets' &>
diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout
index 3d7241dad..c2765811b 100644
--- a/rt/html/Elements/PageLayout
+++ b/rt/html/Elements/PageLayout
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,60 +45,126 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table class="darkblue" border=0 cellspacing=0 cellpadding=0 width="100%">
- <th class="titlebox" align="left"><span class="rtname"><%$AppName%></span>
- </th>
- <span class="topactions">
-% foreach my $action (sort keys %{$topactions}) {
- <td class="darkblueright">
- <%$topactions->{"$action"}->{'html'} |n %>
- </td>
+ <div id="topactions">
+% foreach my $action (reverse sort keys %{$topactions}) {
+ <span class="topaction">
+% $m->out($topactions->{"$action"}->{'html'});
+ </span>
% }
- </span>
-</table>
-<table border=0 cellspacing=0 cellpadding=0 width="100%" height="100%">
-%# Vertical menu
-<TR height="100%">
-<TD valign="top" width="140" class="blue">
- <& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &>
-</TD>
-<td valign="top">
-<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
-<tr>
- <td class="blue" valign="top">
- <span class="title"><%$title%></span>
-</td>
-</tr>
-<tr>
-<td class="blueright" valign="top">
- <span class="nav">
-% if ($actions) {
-% my @actions;
-% foreach my $action (sort keys %{$actions}) {
-% if ($actions->{"$action"}->{'html'}) {
-% push @actions, $actions->{"$action"}->{'html'};
+ </div>
+
+%# End of div#quickbar from /Elements/Header
+</div>
+
+% if ( $show_menu ) {
+<div id="nav">
+<& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &>
+</div>
+% }
+
+<div id="header">
+ <h1><%$title%></h1>
+
+% my $sep = 0;
+% my $postsep = 0;
+% my $count = 0;
+% my $class = { };
+%
+ <ul id="page-menu"<% (($actions && %$actions) || ($subactions && %$subactions)) && q[ class="actions-present"] | n %>>
+ <div><div><div>
+% if ($page_tabs) {
+% foreach my $tab (sort keys %{$page_tabs}) {
+% next if $tab =~ /^(?:current_toptab|this)$/;
+% $count++;
+%
+% my $current = $page_tabs->{current_toptab} || "";
+% my $path = $page_tabs->{$tab}->{'path'} || "";
+%
+% $path =~ s#/index.html$##gi;
+% $current =~ s#/index.html$##gi;
+%
+% $sep = $toptabs->{$tab}->{'separator'} ? 1 : 0;
+%
+% $class->{a} = $path eq $current ? ' class="selected"' : undef;
+%
+% my @li;
+% push @li, 'first'
+% if $count == 1;
+%
+% push @li, 'pre-separator'
+% if $sep;
+%
+% push @li, 'post-separator'
+% if $postsep;
+%
+% $class->{li} = join ' ', @li;
+%
+%
+ <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && "&#183; "|n%><a href="<%$RT::WebPath%>/<%$page_tabs->{$tab}->{'path'}%>"<%$class->{a}|n%><% $class->{a} ? ' name="focus"' : ''|n %>><% $page_tabs->{$tab}->{'title'} %></a></li>
+%
+% if ($sep) {
+ <li class="separator">&#183;&#183;&#183;</li>
+% }
+% $postsep = $sep;
+% }
% } else {
-% push @actions, qq|<a class="nav" href="|.$RT::WebPath."/".$actions->{$action}->{'path'}.qq|">|.$actions->{$action}->{'title'}."</a>";
+&nbsp;
% }
-% }
-<% join(" | ", @actions) | n %>
-% if ($subactions) {
-% my @actions;
-% foreach my $action (sort keys %{$subactions}) {
-% push @actions, $subactions->{"$action"}->{'html'};
-% }
-<% join(" | ", @actions) | n %>
+ </div></div></div>
+ </ul>
+
+% if (($actions && %$actions) || ($subactions && %$subactions)) {
+ <ul id="actions-menu">
+ <div><div><div>
+% $sep = 0;
+% $postsep = 0;
+% $count = 0;
+% $class = { };
+%
+% for my $type ($actions, $subactions) {
+%
+% if ($type && %$type) {
+% foreach my $action (sort keys %{$type}) {
+% $count++;
+%
+% $sep = $type->{$action}->{'separator'} ? 1 : 0;
+%
+% my @li;
+% push @li, 'first'
+% if $count == 1;
+%
+% push @li, 'pre-separator'
+% if $sep;
+%
+% push @li, 'post-separator'
+% if $postsep;
+%
+% $class->{li} = join ' ', @li;
+%
+ <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && qq[<span class="bullet">&#183; </span>]|n%>
+% if ($type->{"$action"}->{'html'}) {
+ <% $type->{"$action"}->{'html'} | n %>
+% } else {
+ <a href="<%$RT::WebPath%>/<%$type->{$action}->{'path'}%>"<% $type->{$action}->{class} && ' class="'.$type->{$action}->{class}.'"' |n %><% $type->{$action}->{id} && ' id="'.$type->{$action}->{id}.'"' |n %>><%$type->{$action}->{'title'}%></a>
+% }
+ </li>
+% if ($sep) {
+ <li class="separator">&#183;&#183;&#183;</li>
+% }
+% $postsep = $sep;
+% }
% }
% }
- </span>
- </td>
-</tr>
-<TR valign="top">
-<TD valign="top" width="100%" height="100%" class="mainbody" >
+ </div></div></div>
+ </ul>
+% }
+</div>
+
+<div id="body">
<& /Elements/Callback, _CallbackName => 'BeforeBody', %ARGS &>
%$m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
-<%INIT>
+<%INIT>
foreach my $tab (sort keys %{$toptabs}) {
if ($current_toptab && $toptabs->{$tab}->{'path'} eq $current_toptab) {
$toptabs->{$tab}->{"subtabs"} = $tabs;
@@ -108,7 +176,53 @@ if (! defined($AppName)) {
$AppName = loc("RT for [_1]", $RT::rtname);
}
+my ($menu_depth, $almost_last, $page_tabs);
+
+if ($RT::WebDefaultStylesheet ne '3.4-compat') {
+ ($menu_depth, $almost_last) = @{$m->comp('.menu_recurse', data => $toptabs)};
+
+ if (defined $almost_last->{subtabs} and %{$almost_last->{subtabs}}) {
+ $page_tabs = {
+ current_toptab => $almost_last->{current_subtab},
+ %{$almost_last->{subtabs}},
+ };
+
+ delete $almost_last->{subtabs};
+ delete $almost_last->{current_subtab};
+ }
+}
</%INIT>
+
+%# There's probably a better way to do this that involves three times as
+%# much work and redoing the whole menu/tab system... which would seem a
+%# bit out of scope.
+%#
+%# This function recurses through the menu and returns the second to
+%# last menu, that is, the menu holding the last reference to
+%# and submenu. It also returns the number of menu levels minus
+%# the last submenu.
+<%def .menu_recurse>
+ <%args>
+ $data => { }
+ $pdata => { }
+ $ppdata => { }
+ $level => 0
+ </%args>
+ <%init>
+ for my $key (keys %$data) {
+ return $m->comp('.menu_recurse', data => $data->{$key}->{subtabs},
+ pdata => $data->{$key},
+ ppdata => $pdata,
+ level => $level+1)
+ if ref($data->{$key}) eq 'HASH'
+ and defined $data->{$key}->{subtabs}
+ and %{$data->{$key}->{subtabs}};
+ }
+ $ppdata->{last_system_menu_level}++;
+ return [$level, $pdata];
+ </%init>
+</%def>
+
<%ARGS>
$current_toptab => undef
$current_tab => undef
@@ -119,4 +233,5 @@ $actions => undef
$subactions => undef
$title => $m->callers(-1)->path
$AppName => undef
+$show_menu => 1
</%ARGS>
diff --git a/rt/html/Elements/QueryString b/rt/html/Elements/QueryString
index 1ddab85de..0176180d2 100644
--- a/rt/html/Elements/QueryString
+++ b/rt/html/Elements/QueryString
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,7 +51,12 @@ while ( my ($key, $value) = each %ARGS ){
if( UNIVERSAL::isa( $value, 'ARRAY' ) ) {
push @params, map $key."=".$m->interp->apply_escapes($_,'u'), @$value;
} else {
- push @params, $key."=".$m->interp->apply_escapes($value,'u');
+ if (ref $value eq "ARRAY") {
+ push @params, $key."=".$m->interp->apply_escapes($_, 'u')
+ for @{$value};
+ } else {
+ push @params, $key."=".$m->interp->apply_escapes($value||"",'u');
+ }
}
}
return(join('&',@params));
diff --git a/rt/html/Elements/QuickCreate b/rt/html/Elements/QuickCreate
index 3e58f852a..bad7503b7 100644
--- a/rt/html/Elements/QuickCreate
+++ b/rt/html/Elements/QuickCreate
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,28 +45,27 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/TitleBoxStart, title => loc('Quick ticket creation') &>
+<div class="quick-create">
+<&| /Widgets/TitleBox, title => loc('Quick ticket creation') &>
<form method="post" action="<%$RT::WebPath%>/index.html">
-<input type="hidden" name="QuickCreate" value="1">
+<input type="hidden" class="hidden" name="QuickCreate" value="1" />
<table>
-<tr>
-<td>
-<font size="-2"><&|/l&>Subject</&>:<br><input size="15" name="Subject"></font>
-</td>
-<td>
-<font size="-2"><&|/l&>Queue</&>:<br><& /Elements/SelectNewTicketQueue, Name => 'Queue' &></font>
-</td>
-<td>
-<font size="-2"><&|/l&>Owner</&>:<br>
+<tr><td>
+<&|/l&>Subject</&>:<br /><input size="15" name="Subject" />
+</td><td>
+<&|/l&>Queue</&>:<br /><& /Elements/SelectNewTicketQueue, Name => 'Queue', ShowNullOption => 0 &>
+</td><td>
+<&|/l&>Owner</&>:<br />
<select type="select" name="Owner">
-<option value="<%$session{'CurrentUser'}->id%>" SELECTED><%$session{'CurrentUser'}->Name %></option>
+<option value="<%$session{'CurrentUser'}->id%>" selected><%$session{'CurrentUser'}->Name %></option>
<option value="<%$RT::Nobody->id%>"><%loc('Nobody')%></option>
</select>
-</font>
</td>
</tr>
-%#<tr><td colspan="3"><font size="-2"><textarea cols="50" rows="3"></textarea></font></td></tr>
+%#<tr><td colspan="3"><textarea cols="50" rows="3"></textarea></td></tr>
</table>
-<div align="right"><input type="submit" value="<%loc('Create')%>"></div>
+<div align="right"><input type="submit" class="button" value="<%loc('Create')%>" /></div>
</form>
-<& /Elements/TitleBoxEnd &>
+</&>
+</div>
+
diff --git a/rt/html/Elements/Quicksearch b/rt/html/Elements/Quicksearch
index 5f1af0f2d..4acbc204d 100644
--- a/rt/html/Elements/Quicksearch
+++ b/rt/html/Elements/Quicksearch
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,44 +45,17 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/TitleBoxStart, title => loc("Quick search"), bodyclass => "" &>
-
-<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
-<tr>
- <th class="collection-as-table" align=left><&|/l&>Queue</&></th>
- <th class="collection-as-table" align=right><&|/l&>New</&></th>
- <th class="collection-as-table" align=right><&|/l&>Open</&></th>
-</tr>
-
-<%PERL>
-my $i;
-while (my $queue = $Queues->Next) {
- next unless ($queue->CurrentUserHasRight('ShowTicket'));
-
- my $qid = $queue->Id;
- my $new_q = "Queue = '$qid' AND Status = 'new'";
- my $open_q = "Queue = '$qid' AND Status = 'open'";
- my $all_q = "Queue = '$qid' AND (Status = 'open' OR Status = 'new')";
-
- $Tickets->FromSQL($open_q);
- my $open = $Tickets->Count();
-
- $Tickets->FromSQL($new_q);
- my $new = $Tickets->Count();
-
- $i++;
-</%PERL>
-<TR class="<% $i%2 ? 'oddline' : 'evenline'%>" >
-<td><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$all_q |nu%>&Rows=50" TITLE="<% $queue->Description %>"><%$queue->Name%></a></TD>
-<td align="right"><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$new_q |nu%>&Rows=50"><%$new%></a></TD>
-<td align="right"><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$open_q |nu%>&Rows=50"><%$open%></a></TD>
-</TR>
-% }
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
+<div class="ticket-overview">
+<&|/Widgets/TitleBox, title => loc("Quick search"), bodyclass => "",
+ titleright => loc("Edit"), titleright_href => $RT::WebPath.'/Prefs/Quicksearch.html' &>
+<& /Elements/QueueSummary,
+ cache => 'quick_search_queues',
+ queue_filter => sub { $_->CurrentUserHasRight('ShowTicket') && !exists $unwanted->{$_->Name} },
+ conditions => [ {cond => "Status = 'new'", name => loc ('new') },
+ {cond => "Status = 'open'", name => loc ('open') },
+ {cond => "Status = 'stalled'", name => loc ('stalled') }] &>
+</&>
+</div>
<%INIT>
-my $Queues = RT::Queues->new($session{'CurrentUser'});
-$Queues->UnLimit();
-my $Tickets = RT::Tickets->new($session{'CurrentUser'});
+my $unwanted = $session{'CurrentUser'}->UserObj->Preferences('QuickSearch', {});
</%INIT>
diff --git a/rt/html/Elements/RT__Ticket/ColumnMap b/rt/html/Elements/RT__Ticket/ColumnMap
index 80e3c693c..21dc2a753 100644
--- a/rt/html/Elements/RT__Ticket/ColumnMap
+++ b/rt/html/Elements/RT__Ticket/ColumnMap
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,7 +54,7 @@ $Attr => undef
<%ONCE>
our ( $COLUMN_MAP );
-sub ColumnMap {
+my $ColumnMap = sub {
my $name = shift;
my $attr = shift;
@@ -77,20 +79,22 @@ sub ColumnMap {
# For Image custom fields we also show a thumbnail here.
return sub {
my $values = $_[0]->CustomFieldValues($field);
- return map {
+ my @values = map {
(
($_->CustomFieldObj->Type eq 'Image')
? \($m->scomp( '/Elements/ShowCustomFieldImage', Object => $_ ))
: $_->Content
),
- \'<br>',
- } @{ $values->ItemsArrayRef }
+ \'<br />',
+ } @{ $values->ItemsArrayRef };
+ pop @values; # Remove that last <br />
+ return @values;
};
}
}
-}
+};
-sub LinkCallback {
+my $LinkCallback = sub {
my $method = shift;
my $mode = $RT::Ticket::LINKTYPEMAP{$method}{Mode};
@@ -101,14 +105,14 @@ sub LinkCallback {
return sub {
map {
- \'<A HREF="',
+ \'<a href="',
$_->$mode_uri->Resolver->HREF,
\'">',
( $_->$mode_uri->IsLocal ? $_->$local_type : $_->$mode ),
- \'</A><BR>',
+ \'</a><br />',
} @{ $_[0]->Links($other_mode,$type)->ItemsArrayRef }
}
-}
+};
$COLUMN_MAP = {
QueueName => {
@@ -194,12 +198,15 @@ $COLUMN_MAP = {
value => sub { return $_[0]->TimeEstimated }
},
Requestors => {
+ attribute => 'Requestor.EmailAddress',
value => sub { return $_[0]->Requestors->MemberEmailAddressesAsString }
},
Cc => {
+ attribute => 'Cc.EmailAddress',
value => sub { return $_[0]->Cc->MemberEmailAddressesAsString }
},
AdminCc => {
+ attribute => 'AdminCc.EmailAddress',
value => sub { return $_[0]->AdminCc->MemberEmailAddressesAsString }
},
StartsRelative => {
@@ -286,16 +293,22 @@ $COLUMN_MAP = {
# Everything from LINKTYPEMAP
(map {
- $_ => { value => LinkCallback( $_ ) }
+ $_ => { value => $LinkCallback->( $_ ) }
} keys %RT::Ticket::LINKTYPEMAP),
'_CLASS' => {
value => sub { return $_[1] % 2 ? 'oddline' : 'evenline' }
},
+ '_CHECKBOX' => {
+ attribute => 'checkbox',
+ title => loc('Update'),
+ align => 'right',
+ value => sub { return \('<input type="checkbox" class="checkbox" name="UpdateTicket'.$_[0]->id.'" value="1" checked />') }
+ },
};
</%ONCE>
<%init>
$m->comp( '/Elements/Callback', COLUMN_MAP => $COLUMN_MAP, _CallbackName => 'ColumnMap');
-return ColumnMap($Name, $Attr);
+return $ColumnMap->( $Name, $Attr );
</%init>
diff --git a/rt/html/Elements/Refresh b/rt/html/Elements/Refresh
index 9f241d279..6edec0967 100644
--- a/rt/html/Elements/Refresh
+++ b/rt/html/Elements/Refresh
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,20 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
-<OPTION VALUE="-1"
+<select name="<%$Name%>">
+<option value="-1"
%unless ($Default) {
- SELECTED
+ selected
%}
-><&|/l&>Don't refresh this page.</&></OPTION>
+><&|/l&>Don't refresh this page.</&></option>
%foreach my $value (@refreshevery) {
-<OPTION VALUE="<%$value%>"
+<option value="<%$value%>"
% if ( $Default && ($value == $Default)) {
-SELECTED
+selected
% }
-><&|/l, $value/60 &>Refresh this page every [_1] minutes.</&></OPTION>
+><&|/l, $value/60 &>Refresh this page every [_1] minutes.</&></option>
%}
-</SELECT>
+</select>
<%INIT>
my @refreshevery = qw(120 300 600 1200 3600 7200);
diff --git a/rt/html/Elements/ScrubHTML b/rt/html/Elements/ScrubHTML
index 443ded9c4..f382cc273 100644
--- a/rt/html/Elements/ScrubHTML
+++ b/rt/html/Elements/ScrubHTML
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,8 +54,8 @@ $scrubber->default(
'*' => 0,
id => 1,
class => 1,
- href => qr{^(?:http:|ftp:|https:|/)}i,
# Match http, ftp and relative urls
+ href => qr{^(?:http:|ftp:|https:|/|__Web(?:Path|BaseURL|URL)__)}i,
face => 1,
size => 1,
target => 1
diff --git a/rt/html/Elements/Section b/rt/html/Elements/Section
index afbb9cf38..befe2475f 100644
--- a/rt/html/Elements/Section
+++ b/rt/html/Elements/Section
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,14 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE WIDTH=100%>
-<TR>
-<TD>
-<font size=+4><%$title%></font>
-</TD>
-</TR>
-</TABLE>
-
+<h1><%$title%></h1>
<%ARGS>
$title => undef
</%ARGS>
diff --git a/rt/html/Elements/SelectAttachmentField b/rt/html/Elements/SelectAttachmentField
index ea1528c03..8a37ca504 100644
--- a/rt/html/Elements/SelectAttachmentField
+++ b/rt/html/Elements/SelectAttachmentField
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,12 +45,12 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
-<OPTION VALUE="Subject"><&|/l&>Subject</&></OPTION>
-<OPTION VALUE="Content"><&|/l&>Content</&></OPTION>
-<OPTION VALUE="ContentType"><&|/l&>Content-Type</&></OPTION>
-<OPTION VALUE="Filename"><&|/l&>Filename</&></OPTION>
-</SELECT>
+<select name="<%$Name%>">
+<option value="Subject"><&|/l&>Subject</&></option>
+<option value="Content"><&|/l&>Content</&></option>
+<option value="ContentType"><&|/l&>Content-Type</&></option>
+<option value="Filename"><&|/l&>Filename</&></option>
+</select>
<%ARGS>
$Name => 'AttachmentField'
</%ARGS>
diff --git a/rt/html/Elements/SelectBoolean b/rt/html/Elements/SelectBoolean
index a3f08fdbc..b34e07a14 100644
--- a/rt/html/Elements/SelectBoolean
+++ b/rt/html/Elements/SelectBoolean
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,10 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="<%$TrueVal%>" <%$TrueDefault%>><%$True%></OPTION>
-<OPTION VALUE="<%$FalseVal%>" <%$FalseDefault%>><%$False%></OPTION>
-</SELECT>
+<select NAME ="<%$Name%>">
+<option value="<%$TrueVal%>" <%$TrueDefault%>><%$True%></option>
+<option value="<%$FalseVal%>" <%$FalseDefault%>><%$False%></option>
+</select>
<%ARGS>
$Name => undef
@@ -58,7 +60,8 @@ $False => loc("isn't")
</%ARGS>
<%INIT>
-my ($TrueDefault, $FalseDefault);
+my $TrueDefault = '';
+my $FalseDefault ='';
if ($Default && $Default !~ /true/i) {
$FalseDefault = "SELECTED";
}
diff --git a/rt/html/Elements/SelectCustomFieldOperator b/rt/html/Elements/SelectCustomFieldOperator
index 8f7ea618b..ecb306c58 100644
--- a/rt/html/Elements/SelectCustomFieldOperator
+++ b/rt/html/Elements/SelectCustomFieldOperator
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,20 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
% while (my $option = shift @Options) {
% my $value = shift @Values;
-<OPTION VALUE="<%$value%>"
+<option value="<%$value%>"
% if ($Default eq $value) {
-SELECTED
+selected
% }
-><%$option%></OPTION>
+><%$option%></option>
% }
-</SELECT>
+</select>
<%ARGS>
$Name => undef
@Options => ( loc('contains'), loc("doesn't contain"), loc('is'), loc("isn't"), loc('less than'), loc('greater than'))
@Values => ('LIKE', 'NOT LIKE', '=', '!=', '<', '>')
-$Default => undef
+$Default => ''
</%ARGS>
diff --git a/rt/html/Elements/SelectCustomFieldValue b/rt/html/Elements/SelectCustomFieldValue
index 27d6c4995..2bcb35e9a 100644
--- a/rt/html/Elements/SelectCustomFieldValue
+++ b/rt/html/Elements/SelectCustomFieldValue
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,7 +49,7 @@
% if ($CustomField->Type =~ /Select/i) {
% my $values = $CustomField->Values;
<select name="<%$Name%>">
-<option value="" SELECTED>-</option>
+<option value="" selected>-</option>
<option value="NULL"><&|/l&>(no value)</&></option>
% while (my $value = $values->Next) {
<option value="<%$value->Name%>"><%$value->Name%></option>
@@ -55,7 +57,7 @@
</select>
% }
% else {
-<input name="<%$Name%>" size="20">
+<input name="<%$Name%>" size="20" />
% }
<%args>
$Name => undef
diff --git a/rt/html/Elements/SelectDate b/rt/html/Elements/SelectDate
index d3815798b..b43f324ac 100644
--- a/rt/html/Elements/SelectDate
+++ b/rt/html/Elements/SelectDate
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,8 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<INPUT NAME="<%$Name%>" VALUE="<%$Default%>" size=<%$Size%>>
-
+<script type="text/javascript"><!--
+ onLoadHook('createCalendarLink("<% $Name %>");');
+--></script>
+<input type="text" id="<% $Name %>" name="<% $Name %>" value="<% $Default %>" size="<% $Size %>" />
<%init>
unless ((defined $Default) or
($current <= 0)) {
@@ -65,7 +69,7 @@ unless ($Name) {
$ShowTime => undef
$menu_prefix=>''
$current=>time
-$Default => undef
+$Default => ''
$Name => undef
$Size => 16
</%args>
diff --git a/rt/html/Elements/SelectDateRelation b/rt/html/Elements/SelectDateRelation
index ccf0c1121..9c80be4d7 100644
--- a/rt/html/Elements/SelectDateRelation
+++ b/rt/html/Elements/SelectDateRelation
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="&lt;"><%$Before%></OPTION>
-<OPTION VALUE="="><%$On%></OPTION>
-<OPTION VALUE="&gt;"><%$After%></OPTION>
-</SELECT>
+<select NAME ="<%$Name%>">
+<option value="&lt;"><%$Before%></option>
+<option value="="><%$On%></option>
+<option value="&gt;"><%$After%></option>
+</select>
<%ARGS>
$Name => undef
diff --git a/rt/html/Elements/SelectDateType b/rt/html/Elements/SelectDateType
index 7b3f0990f..653949a83 100644
--- a/rt/html/Elements/SelectDateType
+++ b/rt/html/Elements/SelectDateType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,16 +45,16 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
-<OPTION VALUE="Created"><&|/l&>Created</&></OPTION>
-<OPTION VALUE="Started"><&|/l&>Started</&></OPTION>
-<OPTION VALUE="Resolved"><&|/l&>Resolved</&></OPTION>
-<OPTION VALUE="Told"><&|/l&>Last Contacted</&></OPTION>
-<OPTION VALUE="LastUpdated"><&|/l&>Last Updated</&></OPTION>
-<OPTION VALUE="Starts"><&|/l&>Starts</&></OPTION>
-<OPTION VALUE="Due"><&|/l&>Due</&></OPTION>
-<OPTION VALUE="Updated"><&|/l&>Updated</&></OPTION>
-</SELECT>
+<select name="<%$Name%>">
+<option value="Created"><&|/l&>Created</&></option>
+<option value="Started"><&|/l&>Started</&></option>
+<option value="Resolved"><&|/l&>Resolved</&></option>
+<option value="Told"><&|/l&>Last Contacted</&></option>
+<option value="LastUpdated"><&|/l&>Last Updated</&></option>
+<option value="Starts"><&|/l&>Starts</&></option>
+<option value="Due"><&|/l&>Due</&></option>
+<option value="Updated"><&|/l&>Updated</&></option>
+</select>
<%ARGS>
$Name => 'DateType'
</%ARGS>
diff --git a/rt/html/Elements/SelectEqualityOperator b/rt/html/Elements/SelectEqualityOperator
index 0f8deea89..851add309 100644
--- a/rt/html/Elements/SelectEqualityOperator
+++ b/rt/html/Elements/SelectEqualityOperator
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,16 +45,16 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
% while (my $option = shift @Options) {
% my $value = shift @Values;
-<OPTION VALUE="<%$value%>"
+<option value="<%$value%>"
% if ($Default eq $value) {
-SELECTED
+selected
% }
-><%$option%></OPTION>
+><%$option%></option>
% }
-</SELECT>
+</select>
<%ARGS>
$Name => undef
diff --git a/rt/html/Elements/SelectGroups b/rt/html/Elements/SelectGroups
index bc37fd69a..c1fb9df2a 100644
--- a/rt/html/Elements/SelectGroups
+++ b/rt/html/Elements/SelectGroups
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,14 +47,14 @@
%# END BPS TAGGED BLOCK }}}
<select name="GroupField">
% foreach my $col (RT::Group->BasicColumns) {
-<option value="<% $col->[0] %>"><% loc($col->[1]) %>
+<option value="<% $col->[0] %>"><% loc($col->[1]) %></option>
% }
% while (my $CF = $CFs->Next) {
-<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %>
+<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %></option>
% }
</select>
<& /Elements/SelectMatch, Name=> 'GroupOp' &>
-<input size=8 name="GroupString">
+<input size="8" name="GroupString" />
<%INIT>
my $CFs = RT::CustomFields->new($session{'CurrentUser'});
$CFs->LimitToChildType('RT::Group');
diff --git a/rt/html/Elements/SelectLang b/rt/html/Elements/SelectLang
index a439ea330..7640744c9 100644
--- a/rt/html/Elements/SelectLang
+++ b/rt/html/Elements/SelectLang
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,18 +45,18 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
% if ($ShowNullOption) {
-<OPTION VALUE="">-</OPTION>
+<option value="">-</option>
% }
% foreach my $lang (@lang) {
-<OPTION VALUE="<%$lang%>" <%($Default && ($lang eq $Default)) && 'SELECTED'%>><% $lang_to_desc{$lang} %>
+<option value="<%$lang%>" <%($Default && ($lang eq $Default)) && 'SELECTED'%>><% $lang_to_desc{$lang} %>
% if (($Verbose) and (my $description = I18N::LangTags::List::native_name($lang)) ){
(<%$description%>)
% }
-</OPTION>
+</option>
% }
-</SELECT>
+</select>
<%ARGS>
$ShowNullOption => 1
$ShowAllQueues => 1
diff --git a/rt/html/Elements/SelectLinkType b/rt/html/Elements/SelectLinkType
index 28cb4419a..4617e7c1c 100644
--- a/rt/html/Elements/SelectLinkType
+++ b/rt/html/Elements/SelectLinkType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="MemberOf"><&|/l&>Member of</&></OPTION>
-<OPTION VALUE="DependsOn"><&|/l&>Depends on</&></OPTION>
-<OPTION VALUE="RefersTo"><&|/l&>Refers to</&></OPTION>
-</SELECT>
+<select NAME ="<%$Name%>">
+<option value="MemberOf"><&|/l&>Member of</&></option>
+<option value="DependsOn"><&|/l&>Depends on</&></option>
+<option value="RefersTo"><&|/l&>Refers to</&></option>
+</select>
<%ARGS>
$Name => "LinkType"
diff --git a/rt/html/Elements/SelectMatch b/rt/html/Elements/SelectMatch
index 60949d979..646ad4e31 100644
--- a/rt/html/Elements/SelectMatch
+++ b/rt/html/Elements/SelectMatch
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,12 +45,12 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="LIKE" <%$LikeDefault%>><%$Like%></OPTION>
-<OPTION VALUE="NOT LIKE" <%$NotLikeDefault%>><%$NotLike%></OPTION>
-<OPTION VALUE="=" <%$TrueDefault%>><%$True%></OPTION>
-<OPTION VALUE="!=" <%$FalseDefault%>><%$False%></OPTION>
-</SELECT>
+<select NAME ="<%$Name%>">
+<option value="LIKE" <%$LikeDefault%>><%$Like%></option>
+<option value="NOT LIKE" <%$NotLikeDefault%>><%$NotLike%></option>
+<option value="=" <%$TrueDefault%>><%$True%></option>
+<option value="!=" <%$FalseDefault%>><%$False%></option>
+</select>
<%ARGS>
$Name => undef
diff --git a/rt/html/Elements/SelectNewTicketQueue b/rt/html/Elements/SelectNewTicketQueue
index 51b89b2a6..55dc7d2ea 100644
--- a/rt/html/Elements/SelectNewTicketQueue
+++ b/rt/html/Elements/SelectNewTicketQueue
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,39 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<LABEL ACCESSKEY="9">
-<SELECT NAME ="<%$Name%>">
-% foreach my $queue (@{$session{'create_in_queues'}}) {
-<OPTION
- VALUE="<%$queue->{'id'}%>"
- <% $Default && $queue->{'id'} == $Default ? 'SELECTED': ''%>>
-<%$queue->{'Name'}%>
-% if (($Verbose) and ($queue->{'Description'}) ){
-(<%$queue->{'Description'}%>)
-% }
-</OPTION>
-% }
-</SELECT>
-</LABEL>
-
-<%INIT>
-unless ($session{'create_in_queues'}) {
-
-@{$session{'create_in_queues'}} = ();
-my $q=new RT::Queues($session{'CurrentUser'});
-$q->UnLimit;
-while (my $queue=$q->Next) {
- if ($queue->CurrentUserHasRight('CreateTicket')) {
- my $ds = { Name => $queue->Name, Description => $queue->Description, id => $queue->id };
- push (@{$session{'create_in_queues'}}, $ds);
- }
-}
-}
-</%INIT>
-
-
-<%ARGS>
-$Name => 'Queue'
-$Verbose => 0
-$Default => 0
-</%ARGS>
+<label accesskey="9">
+ <& /Elements/SelectQueue, Name => 'Queue', %ARGS, ShowNullOption => 0, ShowAllQueues => 0 &>
+</label>
diff --git a/rt/html/Elements/SelectOwner b/rt/html/Elements/SelectOwner
index 85843e5f0..f33b346dc 100644
--- a/rt/html/Elements/SelectOwner
+++ b/rt/html/Elements/SelectOwner
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,20 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
%if ($DefaultValue) {
-<OPTION <% !$Default ? "SELECTED" : '' %> VALUE=""><%$DefaultLabel%></OPTION>
+<option <% !$Default ? "SELECTED" : '' %> value=""><%$DefaultLabel%></option>
%}
%foreach my $User ( @users) {
-<OPTION <% ($User->Id == $Default) ? "SELECTED" : ''%>
+<option <% ($User->Id == $Default) ? "SELECTED" : ''%>
%if ($ValueAttribute eq 'id') {
value="<%$User->id%>"
%} elsif ($ValueAttribute eq 'Name') {
value="<%$User->Name%>"
%}
-><%$User->Name()%></OPTION>
+><%$User->Name()%></option>
%}
-</SELECT>
+</select>
<%INIT>
my @objects;
my @users;
diff --git a/rt/html/Elements/SelectQueue b/rt/html/Elements/SelectQueue
index 56aede89f..0decb5bc9 100644
--- a/rt/html/Elements/SelectQueue
+++ b/rt/html/Elements/SelectQueue
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,26 +46,26 @@
%#
%# END BPS TAGGED BLOCK }}}
% if ($Lite) {
-% my $d = new RT::Queue($session{'CurrentUser'});
-% $d->Load($Default);
-<INPUT NAME="<%$Name%>" size=25 DEFAULT="<%$d->Name%>">
-% } else {
-<SELECT NAME ="<%$Name%>">
-% if ($ShowNullOption) {
-<OPTION VALUE="">-</OPTION>
+% my $d = new RT::Queue($session{'CurrentUser'});
+% $d->Load($Default);
+<input name="<%$Name%>" size="25" value="<%$d->Name%>" />
% }
-% while (my $queue=$q->Next) {
-% if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) {
-<OPTION VALUE="<%($NamedValues ? $queue->Name : $queue->Id) %>" <%( $queue->Id eq $Default ? 'SELECTED' : '')%>><%$queue->Name%>
-% if (($Verbose) and ($queue->Description) ){
-(<%$queue->Description%>)
-% }
-</OPTION>
+% else {
+<select name="<%$Name%>">
+% if ($ShowNullOption) {
+ <option value="">-</option>
+% }
+% for my $queue (@{$session{$cache_key}}) {
+ <option value="<% ($NamedValues ? $queue->{Name} : $queue->{Id}) %>" <% ($queue->{Id} eq $Default ? 'selected="selected"' : '') |n %>>
+ <%$queue->{Name}%>
+% if ($Verbose and $queue->{Description}) {
+ (<%$queue->{Description}%>)
+% }
+ </option>
+% }
+</select>
% }
-% }
-</SELECT>
-% }
-<%ARGS>
+<%args>
$CheckQueueRight => 'CreateTicket'
$ShowNullOption => 1
$ShowAllQueues => 1
@@ -72,11 +74,24 @@ $Verbose => undef
$NamedValues => 0
$Default => 0
$Lite => 0
-</%ARGS>
-
-<%INIT>
-
-my $q=new RT::Queues($session{'CurrentUser'});
-$q->UnLimit;
+</%args>
+<%init>
+my $cache_key = "SelectQueue---"
+ . $session{'CurrentUser'}->Id
+ . "---$CheckQueueRight---$ShowAllQueues";
-</%INIT>
+if (not defined $session{$cache_key} and not $Lite) {
+ my $q = new RT::Queues($session{'CurrentUser'});
+ $q->UnLimit;
+
+ while (my $queue = $q->Next) {
+ if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) {
+ push @{$session{$cache_key}}, {
+ Id => $queue->Id,
+ Name => $queue->Name,
+ Description => $queue->Description,
+ };
+ }
+ }
+}
+</%init>
diff --git a/rt/html/Elements/SelectResultsPerPage b/rt/html/Elements/SelectResultsPerPage
index 65ed536d6..a83cfaab7 100644
--- a/rt/html/Elements/SelectResultsPerPage
+++ b/rt/html/Elements/SelectResultsPerPage
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,17 +47,18 @@
%# END BPS TAGGED BLOCK }}}
%# TODO: Better default handling
-<SELECT NAME ="<%$Name%>">
-% foreach my $value (@values) {
-<OPTION VALUE="<%$value%>" <% $value == $Default && 'SELECTED' %>>
+<select name="<% $Name %>">
+% foreach my $value ( @values ) {
+<option value="<% $value %>" <% $value == $Default? 'selected': '' %>>
<% shift @labels %>
-</OPTION>
+</option>
% }
-</SELECT>
+</select>
<%INIT>
my @values = qw(0 10 25 50 100);
my @labels = (loc('Unlimited'), qw(10 25 50 100));
+$Default = 50 unless defined $Default;
</%INIT>
<%ARGS>
diff --git a/rt/html/Elements/SelectSortOrder b/rt/html/Elements/SelectSortOrder
index f6dd70ded..2a2771777 100644
--- a/rt/html/Elements/SelectSortOrder
+++ b/rt/html/Elements/SelectSortOrder
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,13 +45,13 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
%foreach my $order (@orders) {
-<OPTION VALUE="<%$order%>" <%$order eq $Default && 'SELECTED' %>>
+<option value="<%$order%>" <%$order eq $Default && 'SELECTED' %>>
<% shift @order_names %>
-</OPTION>
+</option>
% }
-</SELECT>
+</select>
<%INIT>
my @orders = qw (ASC DESC);
diff --git a/rt/html/Elements/SelectStatus b/rt/html/Elements/SelectStatus
index fa76a3e5d..5f861af4f 100644
--- a/rt/html/Elements/SelectStatus
+++ b/rt/html/Elements/SelectStatus
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,15 +45,15 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
%if ($DefaultValue) {
-<OPTION <% !$Default && "SELECTED" %> VALUE=""><%$DefaultLabel%></OPTION>
+<option <% !$Default && "SELECTED" %> value=""><%$DefaultLabel%></option>
%}
%foreach my $status (@status) {
%next if ($SkipDeleted && $status eq 'deleted');
-<OPTION <% ($status eq $Default) && "SELECTED" %> VALUE="<%$status%>"><%loc($status)%></OPTION>
+<option <% ($status eq $Default) && "SELECTED" %> value="<%$status%>"><%loc($status)%></option>
% }
-</SELECT>
+</select>
<%ONCE>
my $queue = new RT::Queue($session{'CurrentUser'});
my @status = $queue->StatusArray();
diff --git a/rt/html/Elements/SelectTicketSortBy b/rt/html/Elements/SelectTicketSortBy
index 3e05dcce9..aca98f878 100644
--- a/rt/html/Elements/SelectTicketSortBy
+++ b/rt/html/Elements/SelectTicketSortBy
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
% foreach my $field (@sortfields) {
-<OPTION VALUE="<%$field%>" <% $field eq $Default && 'SELECTED'%>><% loc($field) %></OPTION>
+<option value="<%$field%>" <% $field eq $Default && 'SELECTED'%>><% loc($field) %></option>
% }
-</SELECT>
+</select>
<%INIT>
my $tickets = new RT::Tickets($session{'CurrentUser'});
diff --git a/rt/html/Elements/SelectTicketTypes b/rt/html/Elements/SelectTicketTypes
index a905f6067..5bacccf6c 100644
--- a/rt/html/Elements/SelectTicketTypes
+++ b/rt/html/Elements/SelectTicketTypes
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
%foreach (@Types) {
-<OPTION VALUE="<% $_ %>" <% ($_ eq $Default) && "SELECTED" %>><&|/l&><% $_ %></&>
+<option value="<% $_ %>" <% ($_ eq $Default) && "SELECTED" %>><&|/l&><% $_ %></&>
%}
-</SELECT>
+</select>
<%ARGS>
$Name => 'TickType'
diff --git a/rt/html/Elements/SelectUsers b/rt/html/Elements/SelectUsers
index dfe816e49..52febb837 100644
--- a/rt/html/Elements/SelectUsers
+++ b/rt/html/Elements/SelectUsers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,14 +47,14 @@
%# END BPS TAGGED BLOCK }}}
<select name="UserField">
% foreach my $col (RT::User->BasicColumns) {
-<option value="<% $col->[0] %>"><% loc($col->[1]) %>
+<option value="<% $col->[0] %>"><% loc($col->[1]) %></option>
% }
% while (my $CF = $CFs->Next) {
-<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %>
+<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %></option>
% }
</select>
<& /Elements/SelectMatch, Name=> 'UserOp' &>
-<input size=8 name="UserString">
+<input size="8" name="UserString" />
<%INIT>
my $CFs = RT::CustomFields->new($session{'CurrentUser'});
$CFs->LimitToChildType('RT::User');
diff --git a/rt/html/Elements/SelectWatcherType b/rt/html/Elements/SelectWatcherType
index 6ba9c7aa0..26854a782 100644
--- a/rt/html/Elements/SelectWatcherType
+++ b/rt/html/Elements/SelectWatcherType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,14 +45,14 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
% if ($AllowNull) {
-<OPTION VALUE="">-</OPTION>
+<option value="">-</option>
% }
%for my $option (@types) {
-<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><%loc($option)%></OPTION>
+<option value="<%$option%>" <%defined($Default) && $option eq $Default && "SELECTED"%>><%loc($option)%></option>
%}
-</SELECT>
+</select>
<%INIT>
my @types;
diff --git a/rt/html/Elements/SetupSessionCookie b/rt/html/Elements/SetupSessionCookie
index bd7861355..63101af5a 100644
--- a/rt/html/Elements/SetupSessionCookie
+++ b/rt/html/Elements/SetupSessionCookie
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,69 +48,79 @@
<%init>
return if $m->is_subrequest; # avoid reentrancy, as suggested by masonbook
-my %cookies = CGI::Cookie->fetch();
-my $cookiename = "RT_SID_".$RT::rtname.".".$ENV{'SERVER_PORT'};
-my %backends = (
- mysql => 'Apache::Session::MySQL',
- Pg => 'Apache::Session::Postgres',
-# Oracle => 'Apache::Session::Oracle',
-) unless $RT::WebSessionClass;
-my $session_class = $RT::WebSessionClass || $backends{$RT::DatabaseType} || 'Apache::Session::File';
-my $pm = "$session_class.pm"; $pm =~ s|::|/|g; require $pm;
+my %cookies = CGI::Cookie->fetch();
+my $cookiename = "RT_SID_" . $RT::rtname . "." . $ENV{'SERVER_PORT'};
+$SessionCookie ||= $cookies{$cookiename} ? $cookies{$cookiename}->value : undef;
- # morning bug avoidance attempt -- pdh 20030815
- unless ($RT::Handle->dbh && $RT::Handle->dbh->ping) {
- $RT::Handle->Connect();
- }
+my %backends = (
+ mysql => 'Apache::Session::MySQL',
+ Pg => 'Apache::Session::Postgres',
+
+ # Oracle => 'Apache::Session::Oracle',
+);
+
+my $session_class = $RT::WebSessionClass
+ || $backends{$RT::DatabaseType}
+ || 'Apache::Session::File';
+my $pm = "$session_class.pm";
+$pm =~ s|::|/|g;
+require $pm;
+
+# morning bug avoidance attempt -- pdh 20030815
+unless ( $RT::Handle->dbh && $RT::Handle->dbh->ping ) {
+ $RT::Handle->Connect();
+}
+
+my $session_properties;
+if ( $session_class eq 'Apache::Session::File' ) {
+ $session_properties = {
+ Directory => $RT::MasonSessionDir,
+ LockDirectory => $RT::MasonSessionDir,
+ Transaction => 1
+ };
+} else {
+ $session_properties = {
+ Handle => $RT::Handle->dbh,
+ LockHandle => $RT::Handle->dbh,
+ Transaction => 1
+ };
+}
+
+eval {
+ tie %session, $session_class, $SessionCookie, $session_properties
+};
+if ($@) {
+
+ # If the session is invalid, create a new session.
eval {
- tie %session, $session_class,
- $SessionCookie || ( $cookies{$cookiename} ? $cookies{$cookiename}->value() : undef ),
- $backends{$RT::DatabaseType} ? {
- Handle => $RT::Handle->dbh,
- LockHandle => $RT::Handle->dbh,
- } : {
- Directory => $RT::MasonSessionDir,
- LockDirectory => $RT::MasonSessionDir,
- };
+ tie %session, $session_class, undef, $session_properties;
+ undef $cookies{$cookiename};
};
- if ($@) {
+}
- # If the session is invalid, create a new session.
- if ( $@ =~ /Object does not/i ) {
- tie %session, $session_class, undef, $backends{$RT::DatabaseType}
- ? {
- Handle => $RT::Handle->dbh,
- LockHandle => $RT::Handle->dbh,
- }
- : {
- Directory => $RT::MasonSessionDir,
- LockDirectory => $RT::MasonSessionDir,
- };
- undef $cookies{$cookiename};
- }
- else {
- die loc("RT couldn't store your session.") . "\n"
- . loc(
-"This may mean that that the directory '[_1]' isn't writable or a database table is missing or corrupt.",
- $RT::MasonSessionDir
- )
- . "\n\n"
- . $@;
- }
- }
+if ($@) {
+ die loc("RT couldn't store your session.") . "\n"
+ . loc(
+ "This may mean that that the directory '[_1]' isn't writable or a database table is missing or corrupt.",
+ $RT::MasonSessionDir
+ )
+ . "\n\n"
+ . $@;
+}
- if ( !$cookies{$cookiename} ) {
- my $cookie = new CGI::Cookie(
- -name => $cookiename,
- -value => $session{_session_id},
- -path => '/',
- );
- $r->headers_out->{'Set-Cookie'} = $cookie->as_string;
+if ( !$cookies{$cookiename} ) {
+ my $cookie = new CGI::Cookie(
+ -name => $cookiename,
+ -value => $session{_session_id},
+ -path => $RT::WebPath,
+ -secure => ($RT::WebSecureCookies ? 1 :0)
+ );
+ $r->headers_out->{'Set-Cookie'} = $cookie->as_string;
- }
+}
- return();
+return ();
</%init>
<%args>
-$SessionCookie => ''
+$SessionCookie => undef
</%args>
diff --git a/rt/html/Elements/ShowCustomFieldBinary b/rt/html/Elements/ShowCustomFieldBinary
index ea9e5ae83..9dd5faaf1 100644
--- a/rt/html/Elements/ShowCustomFieldBinary
+++ b/rt/html/Elements/ShowCustomFieldBinary
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/ShowCustomFieldImage b/rt/html/Elements/ShowCustomFieldImage
index 7fa5e46d1..c49ae0ecf 100644
--- a/rt/html/Elements/ShowCustomFieldImage
+++ b/rt/html/Elements/ShowCustomFieldImage
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,7 +47,7 @@
%# END BPS TAGGED BLOCK }}}
% my $url = $RT::WebPath . "/Download/CustomFieldValue/".$Object->Id.'/'.$Object->Content;
<a href="<% $url %>"><% $Object->Content %></a>
-<img type="<% $Object->ContentType %>" height=64 src="<% $url %>" align="middle">
+<img type="<% $Object->ContentType %>" height="64" src="<% $url %>" align="middle" />
<%ARGS>
$Object
</%ARGS>
diff --git a/rt/html/Elements/ShowCustomFieldWikitext b/rt/html/Elements/ShowCustomFieldWikitext
index ab7c27b8b..1ddd7da1f 100644
--- a/rt/html/Elements/ShowCustomFieldWikitext
+++ b/rt/html/Elements/ShowCustomFieldWikitext
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,7 +47,8 @@
%# END BPS TAGGED BLOCK }}}
% my $content = $Object->LargeContent || $Object->Content;
% $content = $m->comp('/Elements/ScrubHTML', Content => $content);
-% my $wiki_content = Text::WikiFormat::format( $content."\n" , {}, { extended => 1, absolute_links => 1 });
+% my $base = $Object->Object->WikiBase;
+% my $wiki_content = Text::WikiFormat::format( $content."\n" , {}, { extended => 1, absolute_links => 1, implicit_links => $RT::WikiImplicitLinks, prefix => $base} );
<%$wiki_content|n%>
<%init>
use Text::WikiFormat;
diff --git a/rt/html/Elements/ShowCustomFields b/rt/html/Elements/ShowCustomFields
index 199fe3606..743c9999b 100644
--- a/rt/html/Elements/ShowCustomFields
+++ b/rt/html/Elements/ShowCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,7 +49,7 @@
% while ( my $CustomField = $CustomFields->Next ) {
% my $Values = $Object->CustomFieldValues( $CustomField->Id );
% my $count = $Values->Count;
- <tr>
+ <tr id="CF-<%$CustomField->id%>-ShowRow">
<td class="label"><% $CustomField->Name %>:</td>
<td class="value">
% unless ( $count ) {
@@ -57,7 +59,9 @@
% } else {
<ul>
% while ( my $Value = $Values->Next ) {
-<li><% $print_value->( $CustomField, $Value ) |n %></li>
+<li>
+% $print_value->( $CustomField, $Value );
+</li>
% }
</ul>
% }
@@ -72,12 +76,37 @@ $m->comp('/Elements/Callback', _CallbackName => 'MassageCustomFields',
my $print_value = sub {
my ($cf, $value) = @_;
+ my $linked = $cf->LinkValueTo;
+ if ( $linked ) {
+ $m->out('<a href="'. $value->LinkValueTo .'" target="_new">');
+ }
my $comp = "ShowCustomField". $cf->Type;
+ $m->comp('/Elements/Callback',
+ _CallbackName => 'ShowComponentName',
+ Name => \$comp,
+ CustomField => $cf,
+ Object => $Object
+ );
if ( $m->comp_exists( $comp ) ) {
$m->comp( $comp, Object => $value );
} else {
$m->print( $value->Content );
}
+ $m->out('</a>') if $linked;
+
+ # This section automatically populates a div with the "IncludeContentForValue" for this custom
+ # field if it's been defined
+ if ( $cf->IncludeContentForValue ) {
+ my $vid = $value->id;
+ $m->out( '<div class="object_cf_value_include" id="object_cf_value_'. $vid .'">' );
+ $m->print( loc("See also:") );
+ $m->out( '<a href="'. $value->IncludeContentForValue .'">' );
+ $m->print( $value->IncludeContentForValue );
+ $m->out( qq{</a></div>\n} );
+ $m->out( qq{<script><!--\nahah('} );
+ $m->print( $value->IncludeContentForValue );
+ $m->out( qq{', 'object_cf_value_$vid');\n--></script>\n} );
+ }
};
</%INIT>
diff --git a/rt/html/Elements/ShowLink b/rt/html/Elements/ShowLink
index 5929a968e..a1d6bdf97 100644
--- a/rt/html/Elements/ShowLink
+++ b/rt/html/Elements/ShowLink
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<A href="<%$URI->Resolver->HREF%>">
+<a href="<%$URI->Resolver->HREF%>">
% if ($URI->IsLocal) {
% my $member = $URI->Object;
% if (UNIVERSAL::isa($member, "RT::Ticket")) {
diff --git a/rt/html/Elements/ShowLinks b/rt/html/Elements/ShowLinks
index c9279a5db..800e82ea2 100755
--- a/rt/html/Elements/ShowLinks
+++ b/rt/html/Elements/ShowLinks
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,7 +51,7 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->DependsOn->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
+<li><& ShowLink, URI => $Link->TargetURI &></li>
% }
</ul>
</td>
@@ -59,7 +61,7 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->DependedOnBy->Next) {
-<li><& ShowLink, URI => $Link->BaseURI &>
+<li><& ShowLink, URI => $Link->BaseURI &></li>
% }
</ul>
</td>
@@ -69,7 +71,7 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->MemberOf->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
+<li><& ShowLink, URI => $Link->TargetURI &></li>
% }
</ul>
</td>
@@ -83,7 +85,7 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->RefersTo->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
+<li><& ShowLink, URI => $Link->TargetURI &></li>
% }
</ul>
</td>
@@ -93,7 +95,8 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->ReferredToBy->Next) {
-<li><& ShowLink, URI => $Link->BaseURI &>
+% next if (UNIVERSAL::isa($Link->BaseObj, 'RT::Ticket') && $Link->BaseObj->Type eq 'reminder');
+<li><& ShowLink, URI => $Link->BaseURI &></li>
% }
</ul>
</td>
diff --git a/rt/html/Elements/ShowMemberships b/rt/html/Elements/ShowMemberships
index 3936d5080..f6b2817d7 100644
--- a/rt/html/Elements/ShowMemberships
+++ b/rt/html/Elements/ShowMemberships
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/SimpleSearch b/rt/html/Elements/SimpleSearch
index 2b34d3a24..78abce467 100644
--- a/rt/html/Elements/SimpleSearch
+++ b/rt/html/Elements/SimpleSearch
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<form action="<% $RT::WebPath %>/index.html">
-<input size="12" name="q" autocomplete="off" accesskey="0">
-<input type="submit" value="<&|/l&>Search</&>">&nbsp;
+<form action="<% $RT::WebPath %>/Search/Simple.html">
+ <input size="12" name="q" autocomplete="off" accesskey="0" class="field" />
+ <input type="submit" class="button" value="<&|/l&>Search</&>" />
</form>
diff --git a/rt/html/Elements/Submit b/rt/html/Elements/Submit
index 9d8dca20f..ee3e8b6f6 100644
--- a/rt/html/Elements/Submit
+++ b/rt/html/Elements/Submit
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,54 +45,32 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% if ($CheckAll or $ClearAll) {
-<script><!--
-function set_checkbox (obj, val) {
- var i;
- var myfield = obj.form.getElementsByTagName('input');
- for (i = 0; i < myfield.length; i++) {
- if (myfield[i].type == 'checkbox') {
- myfield[i].checked = val;
- }
- }
-}
---></script>
-% }
-<TABLE WIDTH=100% BGCOLOR="<%$color%>" CELLSPACING=0 BORDER=0 CELLPADDING=0 >
-<TR>
-<TD>
+<div class="submit">
+ <div class="extra-buttons">
% if ($CheckAll) {
-<INPUT TYPE=BUTTON VALUE="<%$CheckAllLabel%>" ONCLICK="set_checkbox(this, true)">
+ <input type="button" value="<%$CheckAllLabel%>" onclick="setCheckbox(this.form, '<% $CheckboxName %>', true);return false;" class="button" />
% }
% if ($ClearAll) {
-<INPUT TYPE=BUTTON VALUE="<%$ClearAllLabel%>" ONCLICK="set_checkbox(this, false)">
+ <input type="button" value="<%$ClearAllLabel%>" onclick="setCheckbox(this.form, '<% $CheckboxName %>', false);return false;" class="button" />
% }
% if ($Reset) {
-<INPUT TYPE=RESET VALUE="<%$ResetLabel%>">
-%}
-</TD>
-<TD>
-&nbsp;
-</TD>
-<TD ALIGN=RIGHT VALIGN=CENTER><FONT COLOR=#ffd800>
-% if ($AlternateLabel) {
-<B><%$AlternateCaption%>
-<INPUT TYPE=SUBMIT
-%if ($Name) {
-NAME="<%$Name%>"
-%}
-VALUE='<%$AlternateLabel%>'></B>
+ <input type="reset" value="<%$ResetLabel%>" class="button" />
% }
-<B><%$Caption%> <INPUT TYPE=SUBMIT
-%if ($Name) {
-NAME="<%$Name%>"
+ </div>
+ <div class="buttons">
+% if ($AlternateLabel) {
+ <span class="caption"><%$AlternateCaption%></span>
+ <input type="submit" <% $Name && qq[ name="$Name"] | n %> value="<%$AlternateLabel%>" class="button" />
+% } else {
+ <span class="caption"><%$Caption%></span>
+ <input type="submit" <% $Name && qq[ name="$Name"] | n %> value="<%$Label%>" class="button" />
% }
- VALUE='<%$Label%>'></B></FONT>
-</TD>
-</TR>
-</TABLE>
+ </div>
+ <div class="submit-clear"></div>
+</div>
+
<%ARGS>
-$color => "#336699"
+$color => undef
$Caption => ''
$AlternateCaption => undef
$AlternateLabel => undef
@@ -100,6 +80,7 @@ $CheckAll => undef
$CheckAllLabel => loc('Check All')
$ClearAll => undef
$ClearAllLabel => loc('Clear All')
+$CheckboxName => ''
$Reset => undef
$ResetLabel => loc('Reset')
</%ARGS>
diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs
index b2081edca..863cdd8ee 100644
--- a/rt/html/Elements/Tabs
+++ b/rt/html/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,7 +53,8 @@
tabs => $tabs,
actions => $actions,
subactions => $subactions,
- title => $Title
+ title => $Title,
+ show_menu => $show_menu,
&>
<a name="skipnav" id="skipnav" accesskey="8"></a>
<%INIT>
@@ -65,11 +68,14 @@ my $basetopactions = {
my $basetabs = { A => { title => loc('Homepage'),
path => '',
},
+ Ab => { title => loc('Simple Search'),
+ path => 'Search/Simple.html'
+ },
B => { title => loc('Tickets'),
path => 'Search/Build.html'
},
C => { title => loc('Tools'),
- path => 'Tools/Offline.html'
+ path => 'Tools/index.html'
},
P => { title => loc('Approval'),
path => 'Approvals/'
@@ -112,4 +118,5 @@ $tabs => undef
$actions => undef
$subactions => undef
$Title => undef
+$show_menu => 1
</%ARGS>
diff --git a/rt/html/Elements/TicketList b/rt/html/Elements/TicketList
index 1a531274f..593a77bc9 100644
--- a/rt/html/Elements/TicketList
+++ b/rt/html/Elements/TicketList
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
+<table border="0" cellspacing="0" cellpadding="1" width="100%">
% if ($ShowHeader) {
<& /Elements/CollectionAsTable/Header,
@@ -67,7 +69,7 @@
<& /Elements/CollectionAsTable/Row, Format => \@Format, i => $i, record => $record, maxitems => $maxitems &>
% }
-</TABLE>
+</table>
% if ($Rows && $ShowNavigation) {
<hr>
@@ -75,7 +77,9 @@
% if (($TotalFound % $Rows) == 0) {
% $oddRows = 0;
% } else { $oddRows = 1; }
-<&|/l, $Page, int($TotalFound/$Rows)+$oddRows&>Page [_1] of [_2]</&>
+% my $pages = int($TotalFound/$Rows)+$oddRows;
+% $pages = 1 if $pages < 1;
+<&|/l, $Page, $pages &>Page [_1] of [_2]</&>
<%perl>
my $prev = $m->comp(
@@ -98,18 +102,27 @@ my $next = $m->comp(
);
</%perl>
% if ($Page > 1) {
-<A href="<%$BaseURL%><%$prev%>"><&|/l&>Previous Page</&></a>
+<a href="<%$BaseURL%><%$prev%>"><&|/l&>Previous Page</&></a>
% }
% if (($Page * $Rows) < $TotalFound) {
-<A href="<%$BaseURL%><%$next%>"><&|/l&>Next Page</&></a>
+<a href="<%$BaseURL%><%$next%>"><&|/l&>Next Page</&></a>
% }
% }
<%INIT>
my $maxitems = 0;
$Format ||= $RT::DefaultSearchResultFormat;
+
+# DisplayFormat lets us use a "temporary" format for display, while
+# still using our original format for next/prev page links.
+# bulk update uses this feature to add checkboxes
+
+
+$DisplayFormat ||= $Format;
+
# Scrub the html of the format string to remove any potential nasties.
$Format = $m->comp('/Elements/ScrubHTML', Content => $Format);
+$DisplayFormat = $m->comp('/Elements/ScrubHTML', Content => $DisplayFormat);
unless ($Collection) {
@@ -117,13 +130,13 @@ unless ($Collection) {
$Collection->FromSQL($Query);
}
-my (@Format) = $m->comp('/Elements/CollectionAsTable/ParseFormat', Format => $Format);
+my (@Format) = $m->comp('/Elements/CollectionAsTable/ParseFormat', Format => $DisplayFormat);
# Find the maximum number of items in any row, so we can pad the table.
my $item = 0;
foreach my $col (@Format) {
$item++;
- if ( $col->{title} eq 'NEWLINE' ) {
+ if ( $col->{title} && ($col->{title} eq 'NEWLINE') ) {
$item = 0;
}
else {
@@ -131,10 +144,20 @@ foreach my $col (@Format) {
}
}
+if ($OrderBy =~ /\|/) {
+ # Multiple Sorts
+ my @OrderBy = split /\|/,$OrderBy;
+ my @Order = split /\|/,$Order;
+ $Collection->OrderByCols(
+ map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } } ( 0
+ .. $#OrderBy ) );;
+} else {
+ $Collection->OrderBy(FIELD => $OrderBy, ORDER => $Order);
+}
-$Collection->OrderBy(FIELD => $OrderBy, ORDER => $Order);
$Collection->RowsPerPage($Rows) if ($Rows);
-$Collection->GotoPage($Page-1); # SB uses page 0 as the first page
+$Page = 1 unless $Page > 0; # workaround problems with Page = '' or undef
+$Collection->GotoPage( $Page - 1 ); # SB uses page 0 as the first page
my $TotalFound = $Collection->CountAll();
</%INIT>
@@ -149,6 +172,7 @@ $Order => undef
$OrderBy => undef
$BaseURL => undef
$Format => $RT::DefaultSearchResultFormat
+$DisplayFormat => undef
$ShowNavigation => 1
$ShowHeader => 1
</%ARGS>
diff --git a/rt/html/Elements/TitleBox b/rt/html/Elements/TitleBox
index 3c638e2d3..dfab9ea82 100644
--- a/rt/html/Elements/TitleBox
+++ b/rt/html/Elements/TitleBox
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,4 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& TitleBoxStart, %ARGS&><%$m->content|n%><& TitleBoxEnd&>
+<%init>
+# For compatibility with 3.4
+$m->comp('/Widgets/TitleBox', %ARGS );
+</%init>
diff --git a/rt/html/Elements/TitleBoxEnd b/rt/html/Elements/TitleBoxEnd
index d791e3a4f..933d77000 100644
--- a/rt/html/Elements/TitleBoxEnd
+++ b/rt/html/Elements/TitleBoxEnd
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,14 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
- </TD>
- </TR>
-</TABLE>
-% #Manually flush the content buffer after each titlebox is displayed
-% $m->flush_buffer();
-
-<%ARGS>
-$title => undef
-$content => undef
-</%ARGS>
-
+<%init>
+# For compatibility with 3.4
+$m->comp('/Widgets/TitleBoxEnd', %ARGS );
+</%init>
diff --git a/rt/html/Elements/TitleBoxStart b/rt/html/Elements/TitleBoxStart
index 804e5cfaa..ba24fd92e 100644
--- a/rt/html/Elements/TitleBoxStart
+++ b/rt/html/Elements/TitleBoxStart
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,46 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE CLASS="box <%$class|n%>"
- BGCOLOR="<%$color%>"
- CELLSPACING=0
- BORDER=0
- WIDTH="<%$width%>"
- CELLPADDING="0">
-
- <TR>
- <TH
- <%$color && "style=\"color: $color;\""|n%>
- <%$class ? "class=\"$class\"" : "class=\"titlebox\""|n%>>
- <span class="titleboxclose">
- <a href="#" onClick="hideshow('<%$id%>')">X</A></span>&nbsp;
- <span class="titleboxtitle">
- <b><% $title_href && "<A $title_class HREF=\"$title_href\">"|n%><%$title |n %><% $title_href && "</A>" |n%></b>
- </span>
- </TH>
- <TH
- <%$color && "style=\"color: $color;\""|n%>
- <%$class ? "class=\"$class\"": "class=\"titleboxright\""|n%>>
- <span class="titleboxright"><%$titleright ? $titleright : '&nbsp;' |n %></span>
- </TH>
- </TR>
- <tr id="element-<%$id%>">
- <td bgcolor="<%$contentbg%>" colspan="3" class="<%defined($bodyclass) ? $bodyclass : $class|n%>">
-<%ARGS>
-$width => "100%"
-$class => undef
-$bodyclass => undef
-$title_href => undef
-$title => undef
-$title_class => ''
-
-$titleright_href => undef
-$titleright => undef
-$contentbg => "#dddddd"
-$color => "#336699"
-</%ARGS>
<%init>
-my $id = rand(2000);
-
-$title_class = "CLASS=\"$title_class\"" if $title_class;
+# For compatibility with 3.4
+$m->comp('/Widgets/TitleBoxStart', %ARGS );
</%init>
diff --git a/rt/html/Helpers/EmailAutocomplete b/rt/html/Helpers/EmailAutocomplete
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/rt/html/Helpers/EmailAutocomplete
diff --git a/rt/html/NoAuth/Logout.html b/rt/html/NoAuth/Logout.html
index b6a238bac..49b7a4e59 100644
--- a/rt/html/NoAuth/Logout.html
+++ b/rt/html/NoAuth/Logout.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,25 +45,29 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<HTML>
-<HEAD>
-<TITLE>RT: Logout</TITLE>
- <META HTTP-EQUIV="Refresh" CONTENT="0;URL=<%$URL%>">
-</HEAD>
-<BODY>
+<html>
+<head>
+<title>RT: Logout</title>
+ <meta HTTP-EQUIV="Refresh" content="0;URL=<%$URL%>">
+</head>
+<body>
<p><&|/l&>You have been logged out of RT.</&>
-<br>
-<br>
-<A HREF="<%$URL%>"><&|/l&>You're welcome to login again</&></a>
+<br />
+<br />
+<a href="<%$URL%>"><&|/l&>You're welcome to login again</&></a>.
+% $m->abort();
+
+<%INIT>
+$m->comp('/Elements/Callback', _CallbackName => 'BeforeSessionDelete', %ARGS);
-<%PERL>
if (defined %session) {
- tied(%session)->delete;
+ tied(%session)->delete;
}
-$m->abort();
-</%PERL>
+
+$m->comp('/Elements/Callback', _CallbackName => 'AfterSessionDelete', %ARGS);
+</%INIT>
<%ARGS>
$URL => $RT::WebPath."/"
diff --git a/rt/html/NoAuth/Reminder.html b/rt/html/NoAuth/Reminder.html
index 0793f6c96..dc935d45e 100644
--- a/rt/html/NoAuth/Reminder.html
+++ b/rt/html/NoAuth/Reminder.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/NoAuth/css/3.5-default/titlebox.css b/rt/html/NoAuth/css/3.5-default/titlebox.css
index d4320c090..79d8040a7 100644
--- a/rt/html/NoAuth/css/3.5-default/titlebox.css
+++ b/rt/html/NoAuth/css/3.5-default/titlebox.css
@@ -51,22 +51,12 @@
.titlebox .titlebox-content {
margin-top: -1px;
+ padding: 1em 2em 0.5em 2em;
margin: 0;
/*margin: 1em 2em 0.5em 2em;*/
}
-.titlebox .titlebox-content .titlebox-content table {
- margin: 1em 2em 0.5em 2em;
-}
-.titlebox th {
- font-size: 0.8em;
-
-}
-
-.titlebox .titlebox-content table {
-
-}
-
+.titlebox th { font-size: 0.8em; }
%# TRS: I wish there was a more elegant way to do this... I essentially need to
%# select all elements X that do NOT have element Y as a descendant... which I can
diff --git a/rt/html/NoAuth/css/dhandler b/rt/html/NoAuth/css/dhandler
new file mode 100644
index 000000000..4c8ba3405
--- /dev/null
+++ b/rt/html/NoAuth/css/dhandler
@@ -0,0 +1,30 @@
+<%ONCE>
+my $squisher;
+</%ONCE>
+<%INIT>
+my $arg = $m->dhandler_arg;
+my $path;
+if ( $arg =~ m{^(.*)-squished(\.[^\.]+)$} ) {
+ $path = $m->current_comp->dir_path .'/'. $1 . $2;
+}
+else {
+ return $m->decline;
+}
+
+$squisher = new RT::CSS::Squish unless $squisher;
+$squisher->{'mason'} = $m;
+
+$m->out( $squisher->concatenate( $path ) );
+
+package RT::CSS::Squish;
+use CSS::Squish '0.06';
+use base qw(CSS::Squish);
+sub file_handle {
+ my $self = shift;
+ my $file = shift;
+ my $content = $self->{'mason'}->scomp($file);
+ open my $fh, '<', \$content or die "$!";
+ return $fh;
+}
+
+</%INIT>
diff --git a/rt/html/NoAuth/images/autohandler b/rt/html/NoAuth/images/autohandler
index 2e428c157..720979830 100644
--- a/rt/html/NoAuth/images/autohandler
+++ b/rt/html/NoAuth/images/autohandler
@@ -1,24 +1,28 @@
-<%init>
+<%INIT>
+&RT::Interface::Web::StaticFileHeaders();
# This autohandler will spit out RT's images if the user hasn't
# properly configured their webserver to stop RT from passing
# images through the mason handler.
-
my $file = $m->base_comp->source_file;
-my $type = "application/octet-stream";
+
+my $type = "application/octet-stream";
if ($file =~ /\.(gif|png|jpe?g)$/i) {
$type = "image/$1";
$type =~ s/jpg/jpeg/gi;
}
-die unless (-f $file && -r $file);
+die "file not found" unless -f $file && -r _;
+
$r->content_type($type);
-open (FILE, "<$file") || die;
+open my $fh, "<$file" or die "couldn't open file: $!";
+binmode($fh);
{
local $/ = \16384;
- $m->out($_) while (<FILE>);
- close(FILE);
+ $m->out($_) while (<$fh>);
+ $m->flush_buffer;
}
+close $fh;
$m->abort;
-</%init>
+</%INIT>
diff --git a/rt/html/NoAuth/images/bplogo.gif b/rt/html/NoAuth/images/bplogo.gif
index e2cf49c42..1bb0adfb4 100644
--- a/rt/html/NoAuth/images/bplogo.gif
+++ b/rt/html/NoAuth/images/bplogo.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/fieldbg-autocomplete.gif b/rt/html/NoAuth/images/css/fieldbg-autocomplete.gif
new file mode 100644
index 000000000..aa7eed061
--- /dev/null
+++ b/rt/html/NoAuth/images/css/fieldbg-autocomplete.gif
Binary files differ
diff --git a/rt/html/NoAuth/js/scriptaculous/controls.js b/rt/html/NoAuth/js/scriptaculous/controls.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/rt/html/NoAuth/js/scriptaculous/controls.js
diff --git a/rt/html/NoAuth/js/scriptaculous/effects.js b/rt/html/NoAuth/js/scriptaculous/effects.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/rt/html/NoAuth/js/scriptaculous/effects.js
diff --git a/rt/html/NoAuth/js/scriptaculous/prototype.js b/rt/html/NoAuth/js/scriptaculous/prototype.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/rt/html/NoAuth/js/scriptaculous/prototype.js
diff --git a/rt/html/NoAuth/js/scriptaculous/scriptaculous.js b/rt/html/NoAuth/js/scriptaculous/scriptaculous.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/rt/html/NoAuth/js/scriptaculous/scriptaculous.js
diff --git a/rt/html/REST/1.0/Forms/queue/default b/rt/html/REST/1.0/Forms/queue/default
index c87c33cce..cfc4b5291 100644
--- a/rt/html/REST/1.0/Forms/queue/default
+++ b/rt/html/REST/1.0/Forms/queue/default
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/Forms/queue/ns b/rt/html/REST/1.0/Forms/queue/ns
index b0ba0036a..227318944 100644
--- a/rt/html/REST/1.0/Forms/queue/ns
+++ b/rt/html/REST/1.0/Forms/queue/ns
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/Forms/ticket/attachments b/rt/html/REST/1.0/Forms/ticket/attachments
index ca75ce0d1..4ee409bdc 100644
--- a/rt/html/REST/1.0/Forms/ticket/attachments
+++ b/rt/html/REST/1.0/Forms/ticket/attachments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,7 +51,7 @@
$id
$args => undef
</%ARGS>
-<%perl>
+<%INIT>
my @data;
my ($c, $o, $k, $e) = ("", [], {}, "");
my $ticket = new RT::Ticket $session{CurrentUser};
@@ -80,7 +82,12 @@ if ($aid) {
return [ "# Invalid attachment id: $aid", [], {}, 1 ];
}
if ($content) {
- $c = $attachment->OriginalContent;
+ $c = $attachment->OriginalContent;
+ # if we're sending a binary attachment (and only the attachment)
+ # flag it so bin/rt knows to special case it
+ if ($attachment->ContentType !~ /^text\//) {
+ $r->content_type($attachment->ContentType);
+ }
} else {
my @data;
push @data, [ id => $attachment->Id ];
@@ -125,4 +132,4 @@ else {
}
return [ $c, $o, $k, $e ];
-</%perl>
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/ticket/default b/rt/html/REST/1.0/Forms/ticket/default
index 7d515e51f..2bfc43d9a 100644
--- a/rt/html/REST/1.0/Forms/ticket/default
+++ b/rt/html/REST/1.0/Forms/ticket/default
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,8 +51,9 @@
$id
$changes => {}
$fields => undef
+$args => undef
</%ARGS>
-<%perl>
+<%INIT>
use MIME::Entity;
my @comments;
@@ -83,7 +86,7 @@ if ($id ne 'new') {
}
}
else {
- if (%data == 0) {
+ if (!keys(%data)) {
# GET ticket/new: Return a suitable default form.
# We get defaults from queue/1 (XXX: What if it isn't there?).
my $due = new RT::Date $session{CurrentUser};
@@ -127,11 +130,26 @@ else {
if (exists $create{lc $k}) {
$v{$create{lc $k}} = delete $data{$k};
}
+ # Set custom field
+ elsif ($k =~ /^CF-/i) {
+ my $cf = RT::CustomField->new( $RT::SystemUser );
+ my $cfk = $k;
+ $cfk =~ s/^CF-//i;
+ unless($cf->LoadByName( Name => $cfk )) {
+ push @comments, "# Invalid custom field name ($cfk)";
+ delete $data{$k};
+ next;
+ }
+ $v{"CustomField-".$cf->Id()} = delete $data{$k};
+ }
elsif (lc $k eq 'text') {
$text = delete $data{$k};
}
}
+ # people fields allow multiple values
+ $v{$_} = vsplit($v{$_}) foreach ( grep $create{lc $_}, @people );
+
if ($text) {
$v{MIMEObj} =
MIME::Entity->build(
@@ -141,20 +159,23 @@ else {
);
}
- $ticket->Create(%v);
- unless ($ticket->Id) {
- return [ "# Could not create ticket.", [], {}, 1 ];
+ my($tid,$trid,$terr) = $ticket->Create(%v);
+ unless ($tid) {
+ push(@comments, "# Could not create ticket.");
+ push(@comments, "# " . $terr);
+ goto DONE;
}
delete $data{id};
$id = $ticket->Id;
push(@comments, "# Ticket $id created.");
- goto DONE if %data == 0;
+ # see if the hash is empty
+ goto DONE if ! keys(%data);
}
}
# Now we know we're dealing with an existing ticket.
-if (%data == 0) {
+if (!keys(%data)) {
my ($time, $key, $val, @data);
push @data, [ id => "ticket/".$ticket->Id ];
@@ -171,7 +192,7 @@ if (%data == 0) {
}
foreach $key (@people) {
- next unless (!%$fields || (exists $fields->{lc $key}));
+ next unless (!%$fields || (exists $fields->{lc $key}));
push @data, [ $key => [ $ticket->$key->MemberEmailAddresses ] ];
}
@@ -186,10 +207,22 @@ if (%data == 0) {
foreach $key (qw(TimeEstimated TimeWorked TimeLeft)) {
next unless (!%$fields || (exists $fields->{lc $key}));
$val = $ticket->$key || 0;
- $val = $time->DurationAsString($val*60) if $val;
+ $val = "$val minutes" if $val;
push @data, [ $key => $val ];
}
+ # Display custom fields
+ my $CustomFields = $ticket->QueueObj->TicketCustomFields();
+ while (my $cf = $CustomFields->Next()) {
+ next unless (!%$fields || (exists $fields->{"cf-".lc $cf->Name}));
+ my $vals = $ticket->CustomFieldValues($cf->Id());
+ my @out = ();
+ while (my $v = $vals->Next()) {
+ push @out, $v->Content;
+ }
+ push @data, [ 'CF-' . $cf->Name => join ',', @out ];
+ }
+
my %k = map {@$_} @data;
$o = [ map {$_->[0]} @data ];
$k = \%k;
@@ -271,6 +304,20 @@ else {
$s =~ s/^# //;
}
}
+ # Set custom field
+ elsif ($key =~ /^CF-/i) {
+ my $cf = RT::CustomField->new( $RT::SystemUser );
+ $key =~ s/^CF-//i;
+ if (not $cf->LoadByName( Name => $key )) {
+ $n = 0;
+ $s = "Unknown custom field.";
+ }
+ else {
+ ($n, $s) = $ticket->AddCustomFieldValue(
+ Field => $cf, Value => $val );
+ $s =~ s/^# // if defined $s;
+ }
+ }
elsif ($key ne 'id' && $key ne 'type' && $key ne 'creator') {
$n = 0;
$s = "Unknown field.";
@@ -295,4 +342,4 @@ DONE:
$c ||= join("\n", @comments) if @comments;
return [$c, $o, $k, $e];
-</%perl>
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/ticket/history b/rt/html/REST/1.0/Forms/ticket/history
index 4663e97ee..5dd7417d0 100644
--- a/rt/html/REST/1.0/Forms/ticket/history
+++ b/rt/html/REST/1.0/Forms/ticket/history
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,7 +53,7 @@ $args => undef
$format => undef
$fields => undef
</%ARGS>
-<%perl>
+<%INIT>
my $ticket = new RT::Ticket $session{CurrentUser};
my ($c, $o, $k, $e) = ("", [], {}, "");
@@ -94,7 +96,19 @@ if ($type) {
if ($tid) {
my @data;
my $t = new RT::Transaction $session{CurrentUser};
- $t->Load($tid);
+
+ # this paragraph limits the transaction ID query to transactions on this ticket.
+ # Otherwise you can query any transaction from any ticket, which makes no sense.
+ my $Transactions = $ticket->Transactions;
+ my $tok=0;
+ while (my $T = $Transactions->Next()) {
+ $tok=1 if ($T->Id == $tid)
+ }
+ if ($tok) {
+ $t->Load($tid);
+ } else {
+ return [ "# Transaction $tid is not related to Ticket $id", [], {}, 1 ];
+ }
push @data, [ id => $t->Id ];
push @data, [ Ticket => $t->Ticket ]
@@ -168,8 +182,7 @@ if ($tid) {
$fieldstring .= $key;
}
my ($content, $forms);
-
- $m->subexec("$RT::WebPath/REST/1.0/show",
+ $m->subexec("/REST/1.0/show",
id => \@tid,
format => $format,
fields => $fieldstring);
@@ -184,4 +197,4 @@ if (!$c) {
return [ $c, $o, $k, $e ];
-</%perl>
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/ticket/links b/rt/html/REST/1.0/Forms/ticket/links
index 9f14da4e3..6b2ed222d 100644
--- a/rt/html/REST/1.0/Forms/ticket/links
+++ b/rt/html/REST/1.0/Forms/ticket/links
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,7 +52,7 @@ $id
$format => 's'
$changes => undef
</%ARGS>
-<%perl>
+<%INIT>
my @data;
my $ticket = new RT::Ticket $session{CurrentUser};
@@ -167,4 +169,4 @@ else {
}
return [ $c, $o, $k, $e ];
-</%perl>
+</%INIT>
diff --git a/rt/html/REST/1.0/Forms/user/default b/rt/html/REST/1.0/Forms/user/default
index ad2ebd57a..621e96dfa 100644
--- a/rt/html/REST/1.0/Forms/user/default
+++ b/rt/html/REST/1.0/Forms/user/default
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/Forms/user/ns b/rt/html/REST/1.0/Forms/user/ns
index 406156304..3503d8ace 100644
--- a/rt/html/REST/1.0/Forms/user/ns
+++ b/rt/html/REST/1.0/Forms/user/ns
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/NoAuth/mail-gateway b/rt/html/REST/1.0/NoAuth/mail-gateway
index 65d55508d..739dace9d 100644
--- a/rt/html/REST/1.0/NoAuth/mail-gateway
+++ b/rt/html/REST/1.0/NoAuth/mail-gateway
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,6 +54,7 @@ $action => "correspond"
$ticket => undef
</%ARGS>
<%init>
+$m->comp('/Elements/Callback', _CallbackName => 'Pre', %ARGS);
use RT::Interface::Email (); # It's an exporter, but we don't care
$r->content_type('text/plain; charset=utf-8');
$m->error_format('text');
@@ -59,13 +62,13 @@ my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway( \%ARGS );
if ( $status == 1 ) {
$m->out('ok');
if ( $Ticket->Id ) {
- $m->out( 'Ticket: ' . $Ticket->Id );
- $m->out( 'Queue: ' . $Ticket->QueueObj->Name );
- $m->out( 'Owner: ' . $Ticket->OwnerObj->Name );
- $m->out( 'Status: ' . $Ticket->Status );
- $m->out( 'Subject: ' . $Ticket->Subject );
+ $m->out( 'Ticket: ' . ($Ticket->Id || '') );
+ $m->out( 'Queue: ' . ($Ticket->QueueObj->Name || '') );
+ $m->out( 'Owner: ' . ($Ticket->OwnerObj->Name || '') );
+ $m->out( 'Status: ' . ($Ticket->Status || '') );
+ $m->out( 'Subject: ' . ($Ticket->Subject || '') );
$m->out(
- 'Requestor: ' . $Ticket->Requestors->MemberEmailAddressesAsString );
+ 'Requestor: ' . ($Ticket->Requestors->MemberEmailAddressesAsString || '') );
}
}
else {
diff --git a/rt/html/REST/1.0/autohandler b/rt/html/REST/1.0/autohandler
index 8e3fb164d..e8247b18e 100644
--- a/rt/html/REST/1.0/autohandler
+++ b/rt/html/REST/1.0/autohandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/dhandler b/rt/html/REST/1.0/dhandler
index 6cf45b000..7406520bc 100644
--- a/rt/html/REST/1.0/dhandler
+++ b/rt/html/REST/1.0/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -61,7 +63,7 @@ my $object = $m->dhandler_arg;
my $name = qr{[\w.-]+};
my $list = '(?:(?:\d+-)?\d+,)*(?:\d+-)?\d+';
my $label = '[a-zA-Z0-9@_.+-]+';
-my $field = '[a-zA-Z][a-zA-Z0-9_-]*';
+my $field = '[a-zA-Z](?:[a-zA-Z0-9_-]|\s+)*';
my $labels = "(?:$label,)*$label";
# We must handle requests such as the following:
@@ -72,6 +74,7 @@ my $labels = "(?:$label,)*$label";
# http://.../REST/1.0/ticket/edit
# 4. http://.../REST/1.0/ticket/nn (all possibly with a single form).
# http://.../REST/1.0/ticket/nn/history
+# http://.../REST/1.0/ticket/nn/comment
# http://.../REST/1.0/ticket/nn/attachment/1
#
# Objects are specified by their type, and either a unique numeric ID,
@@ -290,7 +293,12 @@ foreach $object (@objects) {
# We won't pass $e through to compose, trusting instead that the
# handler added suitable comments for the user.
if ($e) {
- $status = "409 Syntax Error" if @$o;
+ if (@$o) {
+ $status = "409 Syntax Error";
+ }
+ else {
+ $status = "400 Bad Request";
+ }
push @output, [ $c, $o, $k ];
}
else {
@@ -303,7 +311,6 @@ unshift(@output, [ join "\n", @comments ]) if @comments;
$output = form_compose(\@output);
OUTPUT:
+$m->out("RT/".$RT::VERSION ." ".$status ."\n\n$output\n") if ($output || $status != 200);
+return;
</%INIT>
-RT/<% $RT::VERSION %> <% $status %>
-
-<% $output |n %>
diff --git a/rt/html/REST/1.0/logout b/rt/html/REST/1.0/logout
index 470cb0915..4152a7ee0 100644
--- a/rt/html/REST/1.0/logout
+++ b/rt/html/REST/1.0/logout
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/search/dhandler b/rt/html/REST/1.0/search/dhandler
index 1915a4644..3e6b314b7 100644
--- a/rt/html/REST/1.0/search/dhandler
+++ b/rt/html/REST/1.0/search/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/REST/1.0/search/ticket b/rt/html/REST/1.0/search/ticket
index 0990fd69b..37883931d 100644
--- a/rt/html/REST/1.0/search/ticket
+++ b/rt/html/REST/1.0/search/ticket
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -57,10 +59,10 @@ my $status = "200 Ok";
my $tickets = new RT::Tickets $session{CurrentUser};
# Parse and validate any field specifications.
-my $field = '[a-zA-Z][a-zA-Z0-9_-]*';
+my $field = '[a-zA-Z](?:[a-zA-Z0-9_-]|\s+)*';
my (%fields, @fields);
if ($fields) {
- $format = "l";
+ $format ||= "l";
unless ($fields =~ /^(?:$field,)*$field$/) {
$status = "400 Bad Request";
$output = "Invalid field specification: $fields";
@@ -115,14 +117,28 @@ my @output;
while (my $ticket = $tickets->Next) {
$n++;
+ my $id = $ticket->Id;
if ($format eq "i") {
- $output .= "ticket/" . $ticket->Id . "\n";
+ $output .= "ticket/" . $id . "\n";
}
elsif ($format eq "s") {
- $output .= $ticket->Id . ": ". $ticket->Subject . "\n";
+ if ($fields) {
+ my $result = $m->comp("/REST/1.0/Forms/ticket/default", id => $id, format => $format, fields => \%fields);
+ my ($notes, $order, $key_values, $errors) = @$result;
+ # If it's the first time through, add our header
+ if ($n == 1) {
+ $output .= join("\t",@$order)."\n";
+ }
+ # Cut off the annoying ticket/ before the id;
+ $key_values->{'id'} = $id;
+ $output .= join("\t", map {$key_values->{$_}} @$order)."\n";
+
+
+ } else {
+ $output .= $ticket->Id . ": ". $ticket->Subject . "\n";
+ }
}
else {
- my $id = $ticket->Id;
my $d = $m->comp("/REST/1.0/Forms/ticket/default", id => $id, format => $format, fields => \%fields);
my ($c, $o, $k, $e) = @$d;
push @output, [ $c, $o, $k ];
@@ -138,4 +154,5 @@ OUTPUT:
$m->out("RT/". $RT::VERSION . " " . $status ."\n\n");
$m->out($output );
+return();
</%INIT>
diff --git a/rt/html/REST/1.0/ticket/comment b/rt/html/REST/1.0/ticket/comment
index e27bfcc1e..240dd90fb 100644
--- a/rt/html/REST/1.0/ticket/comment
+++ b/rt/html/REST/1.0/ticket/comment
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -60,7 +62,7 @@ my $status = "200 Ok";
my $output;
my $action;
-# http://.../REST/1.0/ticket/comment/1
+# http://.../REST/1.0/ticket/1/comment
my ($c, $o, $k, $e) = @{ form_parse($content)->[0] };
if ($e || !$o) {
if (!$o) {
diff --git a/rt/html/REST/1.0/ticket/link b/rt/html/REST/1.0/ticket/link
index 6556a5ef7..766e12624 100644
--- a/rt/html/REST/1.0/ticket/link
+++ b/rt/html/REST/1.0/ticket/link
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -72,7 +74,7 @@ my %lfields = (
# http://.../REST/1.0/ticket/link/1
-$object =~ s#^/##;
+$object =~ s#^/REST/1.0/ticket/link##;
if ($id && $object && $id != $object) {
$output = "Different ids in URL (`$object') and submitted form (`$id').\n";
$status = "400 Bad Request";
@@ -109,6 +111,9 @@ my $op = $del ? "DeleteLink" : "AddLink";
($n, $output) = $ticket->$op(Type => $type, $mode => $to);
if ($n == 0) {
$status = "500 Error";
+} else {
+ my $action = $del ? "Deleted" : "Created";
+ $output .= " $action link " . $ticket->Id . " $rel $to";
}
OUTPUT:
diff --git a/rt/html/REST/1.0/ticket/merge b/rt/html/REST/1.0/ticket/merge
index 3db52111b..d6ae96f83 100644
--- a/rt/html/REST/1.0/ticket/merge
+++ b/rt/html/REST/1.0/ticket/merge
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Search/Build.html b/rt/html/Search/Build.html
index 5a66e02c9..263958775 100644
--- a/rt/html/Search/Build.html
+++ b/rt/html/Search/Build.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -74,15 +76,15 @@
Rows => $RowsPerPage
&>
-<FORM METHOD="POST" ACTION="Build.html" NAME="BuildQuery">
-<input type=hidden name=SearchId value="<%$SearchId%>">
-<input type=hidden name=Query value="<%$Query%>">
-<input type=hidden name=Format value="<%$Format%>">
-<table width=100% border="0" cellpadding="5">
+<form method="post" action="Build.html" name="BuildQuery">
+<input type="hidden" class="hidden" name="SearchId" value="<%$SearchId%>" />
+<input type="hidden" class="hidden" name="Query" value="<%$Query%>" />
+<input type="hidden" class="hidden" name="Format" value="<%$Format%>" />
+<table width="100%" border="0" cellpadding="5">
<tr valign="top">
<td class="boxcontainer" rowspan="2" width="65%">
<& Elements/PickCriteria, query => $Query, cfqueues => $queues &>
-<& /Elements/Submit, Caption => loc('Add additional criteria'), Label => loc('Add'), Name => 'AddClause'&>
+<& /Elements/Submit, Caption => loc('Add these terms to your search'), Label => loc('Add'), Name => 'AddClause'&>
</td>
<td>
@@ -91,6 +93,7 @@
actions => \@actions,
optionlist => $optionlist,
Description => $Description &>
+<& /Elements/Submit, Label => loc('Add and Search'), Name => 'DoSearch'&>
</td>
</tr>
@@ -101,19 +104,15 @@
</tr>
<tr>
-<td colspan=2 class="boxcontainer">
+<td colspan="2" class="boxcontainer">
<& Elements/DisplayOptions, %ARGS, Format=> $Format,
AvailableColumns => $AvailableColumns, CurrentFormat => $CurrentFormat, RowsPerPage => $RowsPerPage, OrderBy => $OrderBy, Order => $Order &>
-</td>
-</tr>
-<tr>
-<td colspan=2 class="boxcontainer">
-<& /Elements/Submit, Caption => loc("Do the Search"), Label => loc('Search'), Name => 'DoSearch'&>
+<& /Elements/Submit, Label => loc('Add and Search'), Name => 'DoSearch'&>
</td>
</tr>
</table>
-</FORM>
+</form>
<%INIT>
use RT::Interface::Web::QueryBuilder;
@@ -134,7 +133,7 @@ if ( $NewQuery or $ARGS{'Delete'} ) {
$SearchId = '';
$Order = '';
$OrderBy = '';
- $RowsPerPage = '';
+ $RowsPerPage = undef;
# ($search hasn't been set yet; no need to clear)
@@ -147,22 +146,43 @@ if ( $NewQuery or $ARGS{'Delete'} ) {
# }}}
+if (ref $OrderBy eq "ARRAY") {
+ $OrderBy = join("|", @$OrderBy);
+}
+if (ref $Order eq "ARRAY") {
+ $Order = join("|", @$Order);
+}
+
# {{{ Attempt to load what we can from the session, set defaults
# We don't read or write to the session again until the end
$search_hash = $session{'CurrentSearchHash'};
+# Read from user preferences
+my $prefs = $session{'CurrentUser'}->UserObj->Preferences("SearchDisplay") || {};
+
# These variables are what define a search_hash; this is also
# where we give sane defaults.
$Query ||= $search_hash->{'Query'};
-$Format ||= $search_hash->{'Format'};
+$Format ||= $search_hash->{'Format'} || $prefs->{'Format'};
$Description ||= $search_hash->{'Description'};
$SearchId ||= $search_hash->{'SearchId'} || 'new';
-$Order ||= $search_hash->{'Order'} || 'ASC';
-$OrderBy ||= $search_hash->{'OrderBy'} || 'id';
-$RowsPerPage = ( $search_hash->{'RowsPerPage'} || 50 )
- unless defined($RowsPerPage);
-$search ||= $search_hash->{'Object'};
+$Order ||= $search_hash->{'Order'} || $prefs->{'Order'} || 'ASC';
+$OrderBy ||= $search_hash->{'OrderBy'} || $prefs->{'OrderBy'} || 'id';
+
+unless ( defined $RowsPerPage ) {
+ if ( defined $search_hash->{'RowsPerPage'} ) {
+ $RowsPerPage = $search_hash->{'RowsPerPage'};
+ }
+ elsif ( defined $prefs->{'RowsPerPage'} ) {
+ $RowsPerPage = $prefs->{'RowsPerPage'};
+ }
+ else {
+ $RowsPerPage = 50;
+ }
+}
+
+ $search ||= $search_hash->{'Object'};
# }}}
@@ -175,31 +195,14 @@ $Format = $m->comp( '/Elements/ScrubHTML', Content => $Format ) if ($Format);
if ( $ARGS{'Delete'} ) {
# We set $SearchId to 'new' above already, so peek into the %ARGS
- if ( $ARGS{'SearchId'} =~ /^(.*?)-(\d+)-SavedSearch-(\d+)$/ ) {
- my $obj_type = $1;
- my $obj_id = $2;
- my $search_id = $3;
-
- my $container_object;
- if ( $obj_type eq 'RT::User' && $obj_id == $session{'CurrentUser'}->Id )
- {
- $container_object = $session{'CurrentUser'}->UserObj;
- }
- elsif ( $obj_type eq 'RT::Group' ) {
- $container_object = RT::Group->new( $session{'CurrentUser'} );
- $container_object->Load($obj_id);
- }
-
- if ( $container_object->id ) {
-
- # We have the object the entry is an attribute on; delete
- # the entry..
- $container_object->Attributes->DeleteEntry(
- Name => 'SavedSearch',
- id => $search_id
+ my ($container_object, $search_id) = _parse_saved_search ($ARGS{'SearchId'});
+ if ($container_object && $container_object->id) {
+ # We have the object the entry is an attribute on; delete the
+ # entry..
+ $container_object->Attributes->DeleteEntry(
+ Name => 'SavedSearch',
+ id => $search_id
);
- }
-
}
}
@@ -223,25 +226,8 @@ if ( $ARGS{'Revert'} ) {
# {{{ if we're asked to load a search, load it.
-if ( $ARGS{'LoadSavedSearch'} =~ /^(.*?)-(\d+)-SavedSearch-(\d+)$/ ) {
- my $obj_type = $1;
- my $obj_id = $2;
- my $search_id = $3;
-
- # We explicitly list out the available types (user and group) and
- # don't trust user input here
- if ( ( $obj_type eq 'RT::User' )
- && ( $obj_id == $session{'CurrentUser'}->id ) )
- {
- $search =
- $session{'CurrentUser'}->UserObj->Attributes->WithId($search_id);
-
- }
- elsif ( $obj_type eq 'RT::Group' ) {
- my $group = RT::Group->new( $session{'CurrentUser'} );
- $group->Load($obj_id);
- $search = $group->Attributes->WithId($search_id);
- }
+if ( my ($container_object, $search_id ) = _parse_saved_search ($ARGS{'LoadSavedSearch'})) {
+ $search = $container_object->Attributes->WithId($search_id);
# We have a $search and now; import the others
$SearchId = $ARGS{'LoadSavedSearch'};
@@ -255,6 +241,62 @@ if ( $ARGS{'LoadSavedSearch'} =~ /^(.*?)-(\d+)-SavedSearch-(\d+)$/ ) {
# }}}
+# {{{ if we're asked to save the current search, save it
+if ( $ARGS{'Save'} ) {
+ if ( $search && $search->id ) {
+ # permission check
+ if ($search->Object->isa('RT::System')) {
+ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) {
+ Abort("No permission to save system-wide searches");
+ }
+ }
+
+ # This search is based on a previously loaded search -- so
+ # just update the current search object with new values
+ $search->SetSubValues(
+ Format => $Format,
+ Query => $Query,
+ Order => $Order,
+ OrderBy => $OrderBy,
+ RowsPerPage => $RowsPerPage,
+ );
+ $search->SetDescription($Description);
+
+ }
+ elsif ( $SearchId eq 'new' ) {
+ my $saved_search = RT::SavedSearch->new( $session{'CurrentUser'} );
+ my ( $ok, $search_msg ) = $saved_search->Save(
+ Privacy => $ARGS{'Owner'},
+ Name => $Description,
+ SearchParams => {
+ Format => $Format,
+ Query => $Query,
+ Order => $Order,
+ OrderBy => $OrderBy,
+ RowsPerPage => $RowsPerPage } );
+
+ if ($ok) {
+ $search = $session{'CurrentUser'}->UserObj->Attributes->WithId($saved_search->Id);
+ # Build new SearchId
+ $SearchId =
+ ref( $session{'CurrentUser'}->UserObj ) . '-'
+ . $session{'CurrentUser'}->UserObj->Id
+ . '-SavedSearch-'
+ . $search->Id;
+ }
+ else {
+ push @actions, [ loc("Can't find a saved search to work with").': '.loc($search_msg), 0 ];
+ }
+ }
+ else {
+ push @actions, [ loc("Can't save this search"), 0 ];
+ }
+
+}
+
+# }}}
+
+
# {{{ Parse the query
use Regexp::Common qw /delimited/;
@@ -278,7 +320,7 @@ my $_match = sub {
my $ParseQuery = sub {
my $string = shift;
my $tree = shift;
- my @actions = shift;
+ my $actions = shift;
my $want = KEYWORD | PAREN;
my $last = undef;
@@ -287,9 +329,12 @@ my $ParseQuery = sub {
# make a tree root
$$tree = RT::Interface::Web::QueryBuilder::Tree->new;
my $root = RT::Interface::Web::QueryBuilder::Tree->new( 'AND', $$tree );
- my $lastnode = $root;
my $parentnode = $root;
+ # on new searches, we're passed undef but still need to construct the
+ # RT::Interface::Web::QueryBuilder::Tree. Quiet warning
+ return unless defined $string;
+
# get the FIELDS from Tickets_Overlay
my $tickets = new RT::Tickets( $session{'CurrentUser'} );
my %FIELDS = %{ $tickets->FIELDS };
@@ -339,13 +384,10 @@ my $ParseQuery = sub {
# Error
# FIXME: I will only print out the highest $want value
my $token = $tokens[ ( ( log $want ) / ( log 2 ) ) ];
- push @actions,
+ push @$actions,
[
- loc(
-"current: $current, want $want, Error near ->$val<- expecting a "
- . $token
- . " in '$string'\n"
- ),
+ loc("Error near ->[_1]<- expecting a [_2] in '[_3]'",
+ $val, $token, $string ),
-1
];
}
@@ -364,13 +406,13 @@ my $ParseQuery = sub {
else {
$depth--;
$parentnode = $parentnode->getParent();
- $lastnode = $parentnode;
}
$want = KEYWORD | PAREN | AGGREG;
}
elsif ( $current & AGGREG ) {
$ea = $val;
+ $parentnode->setNodeValue($ea);
$want = KEYWORD | PAREN;
}
elsif ( $current & KEYWORD ) {
@@ -400,20 +442,28 @@ my $ParseQuery = sub {
$val =~ s!\\(.)!$1!g;
my $class;
- if ( exists $lcfields{ lc $key } ) {
- $key = $lcfields{ lc $key };
- $class = $FIELDS{$key}->[0];
+
+ my ($key_base, $subkey) = split(/\./,$key,2);
+ $key_base =~ s/\..*$//; # Strip off .EmailAddress, for example
+
+ if ( exists $lcfields{lc $key_base } ) {
+ $key = $lcfields{lc $key_base } . (defined $subkey ? '.'.$subkey : '');
+ $class = $FIELDS{$key_base}->[0];
+ }
+ elsif ( $key =~ /^C(?:ustom)?F(?:ield)?\.{(.*)}$/i ) {
+ $class = $FIELDS{'CF'}->[0];
}
+
if ( $class ne 'INT' ) {
$val = "'$val'";
}
- push @actions, [ loc("Unknown field: $key"), -1 ] unless $class;
+ push @$actions, [ loc("Unknown field: [_1]", $key), -1 ] unless $class;
$want = PAREN | AGGREG;
}
else {
- push @actions, [ loc("I'm lost"), -1 ];
+ push @$actions, [ loc("I'm lost"), -1 ];
}
if ( $current & VALUE ) {
@@ -427,33 +477,40 @@ my $ParseQuery = sub {
};
# explicity add a child to it
- $lastnode = RT::Interface::Web::QueryBuilder::Tree->new( $clause, $parentnode );
- $lastnode->getParent()->setNodeValue($ea);
+ RT::Interface::Web::QueryBuilder::Tree->new( $clause, $parentnode );
( $ea, $key, $op, $value ) = ( "", "", "", "" );
+
}
$last = $current;
} # while
- push @actions, [ loc("Incomplete query"), -1 ]
+ push @$actions, [ loc("Incomplete query"), -1 ]
unless ( ( $want | PAREN ) || ( $want | KEYWORD ) );
- push @actions, [ loc("Incomplete Query"), -1 ]
+ push @$actions, [ loc("Incomplete Query"), -1 ]
unless ( $last && ( $last | PAREN ) || ( $last || VALUE ) );
# This will never happen, because the parser will complain
- push @actions, [ loc("Mismatched parentheses"), -1 ]
+ push @$actions, [ loc("Mismatched parentheses"), -1 ]
unless $depth == 1;
};
my $tree;
-$ParseQuery->( $Query, \$tree, \@actions );
-
-# if parsing went poorly, send them to the edit page to fix it
-if ( $actions[0] ) {
- $m->comp( "Edit.html", Query => $Query, actions => \@actions );
- $m->abort();
+{
+ my @parsing_errors;
+ $ParseQuery->( $Query, \$tree, \@parsing_errors );
+
+ # if parsing went poorly, send them to the edit page
+ # to fix it
+ if ( @parsing_errors ) {
+ return $m->comp(
+ "Edit.html",
+ Query => $Query,
+ actions => \@parsing_errors
+ );
+ }
}
$Query = "";
@@ -583,7 +640,7 @@ elsif ( $ARGS{"Toggle"} ) {
# {{{ Try to find if we're adding a clause
foreach my $arg ( keys %ARGS ) {
if (
- $arg =~ m/^ValueOf(.+)/
+ $arg =~ m/^ValueOf(\w+|'CF.{.*?}')$/
&& ( ref $ARGS{$arg} eq "ARRAY"
? grep { $_ ne "" } @{ $ARGS{$arg} }
: $ARGS{$arg} ne "" )
@@ -695,77 +752,6 @@ my ( $AvailableColumns, $CurrentFormat );
# }}}
-# {{{ if we're asked to save the current search, save it
-if ( $ARGS{'Save'} ) {
-
- if ( $search && $search->id ) {
-
- # This search is based on a previously loaded search -- so
- # just update the current search object with new values
- $search->SetSubValues(
- Format => $Format,
- Query => $Query,
- Order => $Order,
- OrderBy => $OrderBy,
- RowsPerPage => $RowsPerPage,
- );
- $search->SetDescription($Description);
-
- }
- elsif ( $SearchId eq 'new' && $ARGS{'Owner'} =~ /^(.*?)-(\d+)$/ ) {
-
- # We're saving a new search
- my $obj_type = $1;
- my $obj_id = $2;
-
- # Find out if we're saving on the user, or a group
- my $container_object;
- if ( $obj_type eq 'RT::User' && $obj_id == $session{'CurrentUser'}->Id )
- {
- $container_object = $session{'CurrentUser'}->UserObj;
- }
- elsif ( $obj_type eq 'RT::Group' ) {
- $container_object = RT::Group->new( $session{'CurrentUser'} );
- $container_object->Load($obj_id);
- }
-
- if ( $container_object->id ) {
-
- # If we got one or the other, add the saerch
- my ( $search_id, $search_msg ) = $container_object->AddAttribute(
- Name => 'SavedSearch',
- Description => $Description,
- Content => {
- Format => $Format,
- Query => $Query,
- Order => $Order,
- OrderBy => $OrderBy,
- RowsPerPage => $RowsPerPage,
- }
- );
- $search =
- $session{'CurrentUser'}->UserObj->Attributes->WithId($search_id);
-
- # Build new SearchId
- $SearchId =
- ref( $session{'CurrentUser'}->UserObj ) . '-'
- . $session{'CurrentUser'}->UserObj->Id
- . '-SavedSearch-'
- . $search->Id;
- }
- unless ( $search->id ) {
- push @actions, [ loc("Can't find a saved search to work with"), 0 ];
- }
-
- }
- else {
- push @actions, [ loc("Can't save this search"), 0 ];
- }
-
-}
-
-# }}}
-
# {{{ If we're modifying an old query, check if it has changed
my $dirty = 0;
$dirty = 1
@@ -793,7 +779,7 @@ $session{'CurrentSearchHash'} = $search_hash;
# }}}
# {{{ Show the results, if we were asked.
-if ( $ARGS{"DoSearch"} ) {
+if ( $ARGS{"DoSearch"}) {
$m->comp(
"Results.html",
Query => $Query,
@@ -802,6 +788,7 @@ if ( $ARGS{"DoSearch"} ) {
OrderBy => $OrderBy,
Rows => $RowsPerPage
);
+ $m->comp('/Elements/Footer');
$m->abort();
}
diff --git a/rt/html/Search/Bulk.html b/rt/html/Search/Bulk.html
index f9eef26b6..9742df5ae 100644
--- a/rt/html/Search/Bulk.html
+++ b/rt/html/Search/Bulk.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,185 +45,220 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Bulk ticket update") &>
-<& /Elements/Tabs, Title => loc("Bulk ticket update") &>
+<& /Elements/Header, Title => $title &>
+<& /Ticket/Elements/Tabs,
+ current_tab => "Search/Bulk.html",
+ Title => $title,
+ Format => $ARGS{'Format'}, # we don't want the locally modified one
+ Query => $Query,
+ Rows => $Rows,
+ OrderBy => $OrderBy,
+ Order => $Order &>
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD="POST" ACTION="<%$RT::WebPath%>/Search/Bulk.html" >
-<input type="hidden" name="Query" value="<%$ARGS{'Query'}%>">
-<TABLE WIDTH=100% border=0 cellpadding=3 CELLSPACING=0>
-<TR>
-<TH><&|/l&>Update</&></TH>
-%foreach my $col (@cols) {
-% my $colalias = $col;
-% $colalias =~ s/(Obj\-\>|)(Name|AsString)//;
-
-<TH><% loc($colalias) %>&nbsp;</TH>
+<form method="post" action="<%$RT::WebPath%>/Search/Bulk.html" enctype="multipart/form-data">
+% foreach my $var qw(Query Format OrderBy Order Rows Page) {
+<input type="hidden" class="hidden" name="<%$var%>" value="<%$ARGS{$var}%>" />
%}
-</TR>
-
-<%PERL>
-
-my $i;
-
-$Tickets->RedoSearch();
-while (my $Ticket = $Tickets->Next) {
- $i++;
- if ($i % 2) {
- $bgcolor = "#dddddd";
- }
- else {
- $bgcolor = "#ffffff";
- }
- </%PERL>
-<TR bgcolor="<%$bgcolor%>">
-<TD><input type=checkbox name="UpdateTicket<%$Ticket->Id%>" value="1" CHECKED></TD>
-%foreach my $col (@cols) {
-<TD>
-% if ($col eq 'id') {
-<A HREF="<% $RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Id()%></A>
-% }
-%else {
-<% eval "\$Ticket->$col()" %>&nbsp;
-%}
-</TD>
-%}
-</TR>
-%}
-
-
-
-</TABLE>
-
-<HR>
-
-
-<& /Elements/TitleBoxStart, title => loc('Update selected tickets') &>
-<TABLE>
-<TR>
-<TD VALIGN=TOP>
+<& /Elements/TicketList, Query => $Query,
+ DisplayFormat => $Format,
+ Format => $ARGS{'Format'},
+ Verbatim => 1,
+ AllowSorting => 1,
+ OrderBy => $OrderBy,
+ Order => $Order,
+ Rows => $Rows,
+ Page => $Page,
+ BaseURL => $RT::WebPath."/Search/Bulk.html?"
+ &>
+
+<hr>
+
+<& /Elements/Submit, Label => loc('Update'), CheckAll => 1, ClearAll => 1 &>
+<br />
+<&|/Widgets/TitleBox, title => $title &>
+<table>
+<tr>
+<td valign="top">
<table>
-<tr><td class=label> <&|/l&>Make Owner</&>: </td>
-<td class=value> <& /Elements/SelectOwner, Name => "Owner" &> (<input type=checkbox name="ForceOwnerChange"> <&|/l&>Force change</&>) </td></tr>
-<tr><td class=label> <&|/l&>Add Requestor</&>: </td>
-<td class=value> <INPUT Name="AddRequestor" SIZE=20> </td></tr>
-<tr><td class=label> <&|/l&>Remove Requestor</&>: </td>
-<td class=value> <INPUT Name="DeleteRequestor" SIZE=20> </td></tr>
-<tr><td class=label> <&|/l&>Add Cc</&>: </td>
-<td class=value> <INPUT Name="AddCc" SIZE=20> </td></tr>
-<tr><td class=label> <&|/l&>Remove Cc</&>: </td>
-<td class=value> <INPUT Name="DeleteCc" SIZE=20> </td></tr>
-<tr><td class=label> <&|/l&>Add AdminCc</&>: </td>
-<td class=value> <INPUT Name="AddAdminCc" SIZE=20> </td></tr>
-<tr><td class=label> <&|/l&>Remove AdminCc</&>: </td>
-<td class=value> <INPUT Name="DeleteAdminCc" SIZE=20> </td></tr>
+<tr><td class="label"> <&|/l&>Make Owner</&>: </td>
+<td class="value"> <& /Elements/SelectOwner, Name => "Owner" &> (<input type="checkbox" class="checkbox" name="ForceOwnerChange" /> <&|/l&>Force change</&>) </td></tr>
+<tr><td class="label"> <&|/l&>Add Requestor</&>: </td>
+<td class="value"> <input name="AddRequestor" size="20" /> </td></tr>
+<tr><td class="label"> <&|/l&>Remove Requestor</&>: </td>
+<td class="value"> <input name="DeleteRequestor" size="20" /> </td></tr>
+<tr><td class="label"> <&|/l&>Add Cc</&>: </td>
+<td class="value"> <input name="AddCc" size="20" /> </td></tr>
+<tr><td class="label"> <&|/l&>Remove Cc</&>: </td>
+<td class="value"> <input name="DeleteCc" size="20" /> </td></tr>
+<tr><td class="label"> <&|/l&>Add AdminCc</&>: </td>
+<td class="value"> <input name="AddAdminCc" size="20" /> </td></tr>
+<tr><td class="label"> <&|/l&>Remove AdminCc</&>: </td>
+<td class="value"> <input name="DeleteAdminCc" size="20" /> </td></tr>
</table>
-</TD>
-<TD VALIGN=TOP>
+</td>
+<td valign="top">
<table>
-<tr><td class=label> <&|/l&>Make subject</&>: </td>
-<td class=value> <INPUT Name="Subject" SIZE=20> </td></tr>
-<tr><td class=label> <&|/l&>Make priority</&>: </td>
-<td class=value> <INPUT Name="Priority" SIZE=4> </td></tr>
-<tr><td class=label> <&|/l&>Make queue</&>: </td>
-<td class=value> <& /Elements/SelectQueue, Name => "Queue" &> </td></tr>
-<tr><td class=label> <&|/l&>Make Status</&>: </td>
-<td class=value> <& /Elements/SelectStatus, Name => "Status" &> </td></tr>
-<tr><td class=label> <&|/l&>Make date Starts</&>: </td>
-<td class=value> <& /Elements/SelectDate, Name => "Starts_Date", ShowTime => 0, Default => '' &> </td></tr>
-<tr><td class=label> <&|/l&>Make date Started</&>: </td>
-<td class=value> <& /Elements/SelectDate, Name => "Started_Date", ShowTime => 0, Default => '' &> </td></tr>
-<tr><td class=label> <&|/l&>Make date Told</&>: </td>
-<td class=value> <& /Elements/SelectDate, Name => "Told_Date", ShowTime => 0, Default => '' &> </td></tr>
-<tr><td class=label> <&|/l&>Make date Due</&>: </td>
-<td class=value> <& /Elements/SelectDate, Name => "Due_Date", ShowTime => 0, Default => '' &> </td></tr>
-<tr><td class=label> <&|/l&>Make date Resolved</&>: </td>
-<td class=value> <& /Elements/SelectDate, Name => "Resolved_Date", ShowTime => 0, Default => '' &> </td></tr>
+<tr><td class="label"> <&|/l&>Make subject</&>: </td>
+<td class="value"> <input name="Subject" size="20" /> </td></tr>
+<tr><td class="label"> <&|/l&>Make priority</&>: </td>
+<td class="value"> <input name="Priority" size="4" /> </td></tr>
+<tr><td class="label"> <&|/l&>Make queue</&>: </td>
+<td class="value"> <& /Elements/SelectQueue, Name => "Queue" &> </td></tr>
+<tr><td class="label"> <&|/l&>Make Status</&>: </td>
+<td class="value"> <& /Elements/SelectStatus, Name => "Status" &> </td></tr>
+<tr><td class="label"> <&|/l&>Make date Starts</&>: </td>
+<td class="value"> <& /Elements/SelectDate, Name => "Starts_Date", ShowTime => 0, Default => '' &> </td></tr>
+<tr><td class="label"> <&|/l&>Make date Started</&>: </td>
+<td class="value"> <& /Elements/SelectDate, Name => "Started_Date", ShowTime => 0, Default => '' &> </td></tr>
+<tr><td class="label"> <&|/l&>Make date Told</&>: </td>
+<td class="value"> <& /Elements/SelectDate, Name => "Told_Date", ShowTime => 0, Default => '' &> </td></tr>
+<tr><td class="label"> <&|/l&>Make date Due</&>: </td>
+<td class="value"> <& /Elements/SelectDate, Name => "Due_Date", ShowTime => 0, Default => '' &> </td></tr>
+<tr><td class="label"> <&|/l&>Make date Resolved</&>: </td>
+<td class="value"> <& /Elements/SelectDate, Name => "Resolved_Date", ShowTime => 0, Default => '' &> </td></tr>
</table>
-</TD>
-</TR>
+</td>
+</tr>
</table>
-<& /Elements/TitleBoxEnd&>
-<& /Elements/TitleBoxStart, title => loc('Add comments or replies to selected tickets') &>
+</&>
+<&| /Widgets/TitleBox, title => loc('Add comments or replies to selected tickets') &>
<table>
-<tr><td align=right><&|/l&>Update Type</&>:</td>
+<tr><td align="right"><&|/l&>Update Type</&>:</td>
<td><select name="UpdateType">
<option value="private" ><&|/l&>Comments (not sent to requestors)</&></option>
<option value="response" ><&|/l&>Reply to requestors</&></option>
</select>
</td></tr>
-<tr><td align=right><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size=60 value=""></td></tr>
+<tr><td align="right"><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size="60" value="" /></td></tr>
% while (my $CF = $TxnCFs->Next()) {
-<TR>
-<TD ALIGN=RIGHT><% $CF->Name %>:</TD>
-<TD><& /Elements/EditCustomField,
+<tr>
+<td align="right"><% $CF->Name %>:</td>
+<td><& /Elements/EditCustomField,
CustomField => $CF,
NamePrefix => "Object-RT::Transaction--CustomField-"
- &><em><% $CF->FriendlyType %></em></TD>
-</TD></TR>
+ &><em><% $CF->FriendlyType %></em></td>
+</td></tr>
% } # end if while
- <tr><td align=right><&|/l&>Attach</&>:</td><td><input name="UpdateAttachment" type="file"></td></tr>
- <tr><td class=labeltop><&|/l&>Message</&>:</td><td>
+ <tr><td align="right"><&|/l&>Attach</&>:</td><td><input name="UpdateAttachment" type="file" /></td></tr>
+ <tr><td class="labeltop"><&|/l&>Message</&>:</td><td>
<& /Elements/MessageBox, Name=>"UpdateContent"&>
</td></tr>
</table>
-<& /Elements/TitleBoxEnd &>
-
+</&>
+<&|/Widgets/TitleBox, title => loc('Edit Custom Fields'), color => "#336633"&>
+<%perl>
+my $cfs = RT::CustomFields->new($session{'CurrentUser'});
+$cfs->LimitToGlobal();
+$cfs->LimitToQueue($_) for keys %$seen_queues;
+</%perl>
+<table>
+<tr>
+<th><&|/l&>Name</&></th>
+<th><&|/l&>Add values</&></th>
+<th><&|/l&>Delete values</&></th>
+</tr>
+% while (my $cf = $cfs->Next()) {
+<tr>
+<td class="label"><%$cf->Name%><br />
+<em>(<%$cf->FriendlyType%>)</em></td>
+% my $rows = 5;
+% my @add = (NamePrefix => 'Bulk-Add-CustomField-', CustomField => $cf, Rows => $rows, Multiple => ($cf->MaxValues ==1 ? 0 : 1) , Cols => 25);
+% my @del = (NamePrefix => 'Bulk-Delete-CustomField-', CustomField => $cf, Rows => $rows, Multiple => 1, Cols => 25);
+% if ($cf->Type eq 'Select') {
+<td><& /Elements/EditCustomFieldSelect, @add &></td>
+<td><& /Elements/EditCustomFieldSelect, @del &></td>
+% } elsif ($cf->Type eq 'Combobox') {
+<td><& /Elements/EditCustomFieldCombobox, @add &></td>
+<td><& /Elements/EditCustomFieldCombobox, @del &></td>
+% } elsif ($cf->Type eq 'Freeform') {
+<td><& /Elements/EditCustomFieldFreeform, @add &></td>
+<td><& /Elements/EditCustomFieldFreeform, @del &></td>
+% } elsif ($cf->Type eq 'Text') {
+<td><& /Elements/EditCustomFieldText, @add &></td>
+<td>&nbsp;</td>
+% } else {
+% $RT::Logger->crit("Unknown CustomField type: " . $cf->Type);
+% }
+</tr>
+% }
+</table>
+</&>
-<& /Elements/TitleBoxStart, title => loc('Edit Links'), color => "#336633"&>
-<i><&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.</&></i><br>
+<&|/Widgets/TitleBox, title => loc('Edit Links'), color => "#336633"&>
+<em><&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.</&></em><br />
<& /Ticket/Elements/BulkLinks &>
-<& /Elements/TitleBoxEnd &>
+</&>
+
+<& /Elements/Submit, Label => loc('Update') &>
+
-<& /Elements/Submit, Label => loc('Update All') &>
+</form>
-</FORM>
<%INIT>
+my $title = loc("Update multiple tickets");
# Iterate through the ARGS hash and remove anything with a null value.
-map ($ARGS{$_} =~ /^$/ && (delete $ARGS{$_}), keys %ARGS);
-
-my ($bgcolor, @results);
-my @cols = qw(id Status Priority Subject QueueObj->Name OwnerObj->Name RequestorAddresses DueAsString );
-
-
-my $Tickets = RT::Tickets->new($session{'CurrentUser'});
-$Tickets->FromSQL($ARGS{'Query'});
-
-Abort(loc("No search to operate on.")) unless ($Tickets);
-
-my %allcfs;
-my %cfqnames;
-my %cfqs;
-my $count = 0;
-while (my $Ticket = $Tickets->Next) {
- my $cfq = $Ticket->QueueObj;
- my $cfqid = $cfq->Id;
- my $cfqn = $cfq->Name;
- unless ( exists $cfqs{$cfqid} ) {
- $cfqs{$cfqid} = 1;
- $count++;
- my $cfs = $cfq->TicketCustomFields;
- while (my $cf = $cfs->Next) {
- $allcfs{$cf->Id} = $cf;
- $cfqnames{$cf->Id} = $cfqn;
- }
+map ( $ARGS{$_} =~ /^$/ && ( delete $ARGS{$_} ), keys %ARGS );
+
+my (@results);
+
+$Page ||= 1;
+
+$Format ||= $RT::DefaultSearchResultFormat;
+
+# inject _CHECKBOX to the first field.
+$Format =~ s/'?([^']+)'?,/'___CHECKBOX__$1',/;
+
+my $Tickets = RT::Tickets->new( $session{'CurrentUser'} );
+$Tickets->FromSQL($Query);
+if ( $OrderBy =~ /\|/ ) {
+
+ # Multiple Sorts
+ my @OrderBy = split /\|/, $OrderBy;
+ my @Order = split /\|/, $Order;
+ $Tickets->OrderByCols(
+ map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } }
+ ( 0 .. $#OrderBy ) );
+}
+else {
+ $Tickets->OrderBy( FIELD => $OrderBy, ORDER => $Order );
+}
+
+$Tickets->RowsPerPage($Rows) if ($Rows);
+$Tickets->GotoPage( $Page - 1 ); # SB uses page 0 as the first page
+
+Abort( loc("No search to operate on.") ) unless ($Tickets);
+
+# build up a list of all custom fields for tickets that we're displaying, so
+# we can display sane edit widgets.
+
+my $fields = {};
+my $seen_queues = {};
+while ( my $ticket = $Tickets->Next ) {
+ next if $seen_queues->{ $ticket->Queue }++;
+
+ my $custom_fields = $ticket->QueueObj->TicketCustomFields;
+ while ( my $field = $custom_fields->Next ) {
+ $fields->{ $field->id } = $field;
}
}
-my $do_comment_reply=0;
+my $do_comment_reply = 0;
+
# Prepare for ticket updates
-$ARGS{'UpdateContent'} =~ s/\r\n/\n/g;
-chomp ($ARGS{'UpdateContent'}) ;
-
-if ($ARGS{'UpdateContent'} &&
- $ARGS{'UpdateContent'} ne '' &&
- $ARGS{'UpdateContent'} ne "-- \n" .
- $session{'CurrentUser'}->UserObj->Signature) {
- $do_comment_reply=1;
+if ($ARGS{'UpdateContent'}) {
+ $ARGS{'UpdateContent'} =~ s/\r\n/\n/g;
+ chomp( $ARGS{'UpdateContent'} );
+
+ if ($ARGS{'UpdateContent'} ne ''
+ && $ARGS{'UpdateContent'} ne "-- \n"
+ . $session{'CurrentUser'}->UserObj->Signature ) {
+ $do_comment_reply = 1;
+ }
}
#Iterate through each ticket we've been handed
@@ -229,50 +266,131 @@ my @linkresults;
my %queues;
$Tickets->RedoSearch();
-while (my $Ticket = $Tickets->Next) {
- $queues{$Ticket->QueueObj->Id}++;
- $RT::Logger->debug( "Checking Ticket ".$Ticket->Id ."\n");
- next unless ($ARGS{"UpdateTicket".$Ticket->Id});
- $RT::Logger->debug ("Matched\n");
- my @updateresults;
+
+# pull out the labels for any custom fields we want to update
+
+my $cf_del_keys;
+@$cf_del_keys = grep { /^Bulk-Delete-CustomField/ } keys %ARGS;
+my $cf_add_keys;
+@$cf_add_keys = grep { /^Bulk-Add-CustomField/ } keys %ARGS;
+
+
+while ( my $Ticket = $Tickets->Next ) {
+ next unless ( $ARGS{ "UpdateTicket" . $Ticket->Id } );
+
+ #Update the links
+ $ARGS{'id'} = $Ticket->id;
+ $queues{ $Ticket->QueueObj->Id }++;
+
+ my @updateresults;
if ($do_comment_reply) {
- ProcessUpdateMessage(TicketObj => $Ticket, ARGSRef => \%ARGS, Actions => \@updateresults);
+ ProcessUpdateMessage(
+ TicketObj => $Ticket,
+ ARGSRef => \%ARGS,
+ Actions => \@updateresults
+ );
}
#Update the basics.
- my @basicresults = ProcessTicketBasics(TicketObj => $Ticket, ARGSRef => \%ARGS);
- my @dateresults = ProcessTicketDates(TicketObj => $Ticket, ARGSRef => \%ARGS);
+ my @basicresults =
+ ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS );
+ my @dateresults =
+ ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS );
+
#Update the watchers
- my @watchresults = ProcessTicketWatchers(TicketObj => $Ticket, ARGSRef => \%ARGS);
+ my @watchresults =
+ ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS );
+ foreach my $type qw(MergeInto DependsOn MemberOf RefersTo) {
+ $ARGS{ $Ticket->id . "-" . $type } = $ARGS{"Ticket-$type"};
+ $ARGS{ $type . "-" . $Ticket->id } = $ARGS{"$type-Ticket"};
+ }
+ @linkresults =
+ ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS );
+ foreach my $type qw(MergeInto DependsOn MemberOf RefersTo) {
+ delete $ARGS{ $type . "-" . $Ticket->id };
+ delete $ARGS{ $Ticket->id . "-" . $type };
+ }
- #Update the links
- $ARGS{'id'} = $Ticket;
- $ARGS{$Ticket->Id.'-MergeInto'} = $ARGS{'Ticket-MergeInto'};
- $ARGS{$Ticket->Id.'-DependsOn'} = $ARGS{'Ticket-DependsOn'};
- $ARGS{'DependsOn-'.$Ticket->Id} = $ARGS{'DependsOn-Ticket'};
- $ARGS{$Ticket->Id.'-MemberOf'} = $ARGS{'Ticket-MemberOf'};
- $ARGS{'MemberOf-'.$Ticket->Id} = $ARGS{'MemberOf-Ticket'};
- $ARGS{$Ticket->Id.'-RefersTo'} = $ARGS{'Ticket-RefersTo'};
- $ARGS{'RefersTo-'.$Ticket->Id} = $ARGS{'RefersTo-Ticket'};
- @linkresults = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
- delete $ARGS{'id'};
- delete $ARGS{$Ticket->Id.'-MergeInto'};
- delete $ARGS{$Ticket->Id.'-DependsOn'};
- delete $ARGS{'DependsOn-'.$Ticket->Id};
- delete $ARGS{$Ticket->Id.'-MemberOf'};
- delete $ARGS{'MemberOf-'.$Ticket->Id};
- delete $ARGS{$Ticket->Id.'-RefersTo'};
- delete $ARGS{'RefersTo-'.$Ticket->Id};
- my @tempresults = (@watchresults, @basicresults, @dateresults,
- @updateresults, @linkresults);
- @tempresults = map { loc("Ticket [_1]: [_2]",$Ticket->Id,$_) } @tempresults;
-
- @results = (@results, @tempresults);
+ my @cfresults;
+
+ foreach my $list ( $cf_add_keys, $cf_del_keys ) {
+ next unless $list->[0];
+
+
+ my $op;
+ if ( $list->[0] =~ /Add/ ) {
+ $op = 'add';
+
+ }
+ elsif ( $list->[0] =~ /Del/ ) {
+ $op = 'del';
+ }
+ else {
+ $RT::Logger->crit(
+ "Got an op that was neither add nor delete. can never happen"
+ . $list->[0] );
+ last;
+ }
+
+ foreach my $key (@$list) {
+ my ( $cfid, $cf );
+ if ( $key =~ /CustomField-(\d+)-/ ) {
+ $cfid = $1;
+ $cf = RT::CustomField->new( $session{'CurrentUser'} );
+ $cf->Load($cfid);
+ }
+ else {next}
+ my @values =
+ ref( $ARGS{$key} ) eq 'ARRAY'
+ ? @{ $ARGS{$key} }
+ : ( $ARGS{$key} );
+ map { s/(\r\n|\r)/\n/g; } @values; # fix the newlines
+ # now break the multiline values into multivalues
+ @values = map { split( /\n/, $_ ) } @values
+ unless ( $cf->SingleValue );
+
+ my $current_values = $Ticket->CustomFieldValues($cfid);
+ foreach my $value (@values) {
+ if ( $op eq 'del' && $current_values->HasEntry($value) ) {
+ my ( $id, $msg ) = $Ticket->DeleteCustomFieldValue(
+ Field => $cfid,
+ Value => $value
+ );
+ push @cfresults, $msg;
+ }
+
+ elsif ( $op eq 'add' && !$current_values->HasEntry($value) ) {
+ my ( $id, $msg ) = $Ticket->AddCustomFieldValue(
+ Field => $cfid,
+ Value => $value
+ );
+ push @cfresults, $msg;
+ }
+ }
+ }
+ }
+ my @tempresults = (
+ @watchresults, @basicresults, @dateresults,
+ @updateresults, @linkresults, @cfresults
+ );
+
+ @tempresults =
+ map { loc( "Ticket [_1]: [_2]", $Ticket->Id, $_ ) } @tempresults;
+
+ @results = ( @results, @tempresults );
}
-my $TxnCFs = RT::CustomFields->new($session{CurrentUser});
-$TxnCFs->LimitToLookupType("RT::Queue-RT::Ticket-RT::Transaction");
-$TxnCFs->LimitToGlobalOrObjectId(sort keys %queues);
+my $TxnCFs = RT::CustomFields->new( $session{CurrentUser} );
+$TxnCFs->LimitToLookupType( RT::Transaction->CustomFieldLookupType );
+$TxnCFs->LimitToGlobalOrObjectId( sort keys %queues );
</%INIT>
+<%args>
+$Format => undef
+$Page => 1
+$Rows => undef
+$Order => 'ASC'
+$OrderBy => 'id'
+$Query => undef
+</%args>
diff --git a/rt/html/Search/Chart b/rt/html/Search/Chart
index ea52bb1f9..82704fdc7 100644
--- a/rt/html/Search/Chart
+++ b/rt/html/Search/Chart
@@ -74,14 +74,45 @@ $tix->GroupBy( FIELD => $PrimaryGroupBy );
my $value_name = $tix->Column( FIELD => $PrimaryGroupBy );
my $chart = $chart_class->new( 600 => 400 );
+
+my $font = $RT::ChartFont || ['verdana', 'arial', gdMediumBoldFont];
+$chart->set_title_font( $font, 12 ) if $chart->can('set_title_font');
+$chart->set_legend_font( $font, 12 ) if $chart->can('set_legend_font');
+$chart->set_x_label_font( $font, 10 ) if $chart->can('set_x_label_font');
+$chart->set_y_label_font( $font, 10 ) if $chart->can('set_y_label_font');
+$chart->set_label_font( $font, 10 ) if $chart->can('set_label_font');
+$chart->set_x_axis_font( $font, 9 ) if $chart->can('set_x_axis_font');
+$chart->set_y_axis_font( $font, 9 ) if $chart->can('set_y_axis_font');
+$chart->set_values_font( $font, 9 ) if $chart->can('set_values_font');
+$chart->set_value_font( $font, 9 ) if $chart->can('set_value_font');
+
+# Pie charts don't like having no input, so we show a special image
+# that indicates an error message. Because this is used in an <img>
+# context, it can't be a simple error message. Without this check,
+# the chart will just be a non-loading image.
+if ($tix->Count == 0) {
+ my $plot = GD::Image->new(600 => 400);
+ $plot->colorAllocate(255, 255, 255); # background
+ my $black = $plot->colorAllocate(0, 0, 0);
+
+ require GD::Text::Wrap;
+ my $error = GD::Text::Wrap->new($plot,
+ color => $black,
+ text => loc("No tickets found."),
+ );
+ $error->set_font( $font, 12 );
+ $error->draw(0, 0);
+
+ $m->comp( 'SELF:Plot', plot => $plot, %ARGS );
+}
+
if ($chart_class eq "GD::Graph::bars") {
$chart->set(
x_label => $tix->Label( $PrimaryGroupBy ),
x_labels_vertical => 1,
- y_label => 'Tickets',
+ y_label => loc('Tickets'),
show_values => 1
);
- $chart->set_legend_font( ['verdana', 'arial', gdMediumBoldFont], 12);
}
my %class = (
@@ -132,17 +163,26 @@ my @sorted_values = map { $data{$_}} @sorted_keys;
my $plot = $chart->plot( [ [@sorted_keys], [@sorted_values] ] ) or die $chart->error;
+$m->comp( 'SELF:Plot', plot => $plot, %ARGS );
+</%init>
-if ( $plot->can('png') ) {
- $r->content_type('image/png');
- $m->out( $plot->png );
-}
-elsif ( $plot->can('gif') ) {
- $r->content_type('image/gif');
- $m->out( $plot->gif );
-}
-else {
- die "Your GD library appears to support neither PNG nor GIF";
+<%METHOD Plot>
+<%ARGS>
+$plot => undef
+</%ARGS>
+<%INIT>
+my @types = ('png', 'gif');
+
+for my $type (@types) {
+ $plot->can($type)
+ or next;
+
+ $r->content_type("image/$type");
+ $m->out( $plot->$type );
+ $m->abort();
}
-$m->abort();
-</%init>
+
+die "Your GD library appears to support none of the following image types: " . join(', ', @types);
+</%INIT>
+
+</%METHOD>
diff --git a/rt/html/Search/Edit.html b/rt/html/Search/Edit.html
index 16e8a0e71..21df0db97 100755
--- a/rt/html/Search/Edit.html
+++ b/rt/html/Search/Edit.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -56,11 +58,11 @@
<& Elements/NewListActions, actions => \@actions &>
<form method="post" action="Build.html">
-<input type="hidden" name="SearchId" value="<%$SearchId%>">
+<input type="hidden" class="hidden" name="SearchId" value="<%$SearchId%>" />
<textarea name="Query" rows="8" cols="72"><%$Query%></textarea>
-<br>
+<br />
<textarea name="Format" rows="8" cols="72"><%$Format%></textarea>
-<br>
+<br />
<& /Elements/Submit, Label => loc("Apply"), Reset => 1, Caption => loc("Apply your changes")&>
</form>
diff --git a/rt/html/Search/Elements/BuildFormatString b/rt/html/Search/Elements/BuildFormatString
index cffb81a48..3bd39b5c2 100644
--- a/rt/html/Search/Elements/BuildFormatString
+++ b/rt/html/Search/Elements/BuildFormatString
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -171,12 +173,12 @@ elsif ( $AddCol ) {
$column{Column} = $col;
if ( $Face eq "Bold" ) {
- $column{Prefix} .= "<B>";
- $column{Suffix} .= "</B>";
+ $column{Prefix} .= "<b>";
+ $column{Suffix} .= "</b>";
}
if ( $Face eq "Italic" ) {
- $column{Prefix} .= "<I>";
- $column{Suffix} .= "</I>";
+ $column{Prefix} .= "<i>";
+ $column{Suffix} .= "</i>";
}
if ($Size) {
$column{Prefix} .= "<" . $m->interp->apply_escapes( $Size, 'h' ) . ">";
@@ -184,11 +186,11 @@ elsif ( $AddCol ) {
}
if ( $Link eq "Display" ) {
$column{Prefix} .=
- "<A HREF=\"" . $RT::WebPath . "/Ticket/Display.html?id=__id__\">";
+ "<a HREF=\"" . $RT::WebPath . "/Ticket/Display.html?id=__id__\">";
$column{Suffix} .= "</a>";
}
elsif ( $Link eq "Take" ) {
- $column{Prefix} .= "<A HREF=\"" . $RT::WebPath
+ $column{Prefix} .= "<a HREF=\"" . $RT::WebPath
. "/Ticket/Display.html?Action=Take&id=__id__\">";
$column{Suffix} .= "</a>";
}
@@ -223,10 +225,13 @@ elsif ( $ColDown ) {
my @format_string;
foreach my $field (@seen) {
next unless $field;
- my $row = "'" . $field->{Prefix};
- $row .= "__" . $m->interp->apply_escapes( $field->{Column}, 'h' ) . "__"
+ my $row = "'";
+ $row .= $field->{Prefix} if $field->{Prefix};
+ $row .= "__" . ($field->{Column} =~ m/\(/ ? $field->{Column} # func, don't escape
+ : $m->interp->apply_escapes( $field->{Column}, 'h' )) . "__"
unless ( $field->{Column} eq "<blank>" );
- $row .= $field->{Suffix} . "'";
+ $row .= $field->{Suffix} if $field->{Suffix};
+ $row .= "'";
push( @format_string, $row );
}
diff --git a/rt/html/Search/Elements/DisplayOptions b/rt/html/Search/Elements/DisplayOptions
index 43a9d9998..cc57f96dc 100644
--- a/rt/html/Search/Elements/DisplayOptions
+++ b/rt/html/Search/Elements/DisplayOptions
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,43 +45,53 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/TitleBoxStart, title => loc("Display Columns") &>
-<table>
+<&| /Widgets/TitleBox, title => loc("Display Columns") &>
+<table width="100%">
<tr>
<td>
<& EditFormat, %ARGS &>
</td>
-<td valign=top>
-<table valign=top>
+<td valign="top">
+<table valign="top">
+
+% for my $o (0..3) {
<tr>
-<td class=label>
+<td class="label">
+% if ($o == 0) {
<&|/l&>Order by</&>:
-</td><td class=value>
+% }
+</td>
+<td class="value">
<select name="OrderBy">
-% foreach my $field (keys %fields) {
+% if ($o > 0) {
+<option value=""><&|/l&>~[none~]</&></option>
+% }
+% foreach my $field (sort keys %fields) {
% next unless $field;
-<option value=<%$field%>
-% if ($field =~ /^$OrderBy$/i) {
-SELECTED
+<option value="<%$field%>"
+% if (defined $OrderBy[$o] and $field eq $OrderBy[$o]) {
+selected
% }
><&|/l&><%$field%></&></option>
% }
</select>
<select name="Order">
<option value="ASC"
-% if ($Order eq "ASC") {
-SELECTED
+% unless ( ($Order[$o]||'') eq "DESC" ) {
+selected
% }
-><&|/l&>Ascending</&></option>
+><&|/l&>Asc</&></option>
<option value="DESC"
-% if ($Order eq "DESC") {
-SELECTED
+% if ( ($Order[$o]||'') eq "DESC" ) {
+selected
% }
-><&|/l&>Descending</&></option>
+><&|/l&>Desc</&></option>
</select>
</td>
</tr>
-<td class=label>
+% }
+<tr>
+<td class="label">
<&|/l&>Rows per page</&>:
</td><td class="value">
<& /Elements/SelectResultsPerPage,
@@ -91,14 +103,34 @@ SELECTED
</td>
</tr>
</table>
-<& /Elements/TitleBoxEnd &>
+</&>
<%INIT>
my $tickets = new RT::Tickets($session{'CurrentUser'});
my %fields = %{$tickets->FIELDS};
map { $fields{$_}->[0] =~ /^(?:ENUM|INT|DATE|STRING)$/ || delete $fields{$_} } keys %fields;
delete $fields{'EffectiveId'};
+$fields{ $_ . '.EmailAddress' } = 1 foreach( qw(Requestor Cc AdminCc) );
+
+# Add all available CustomFields to the list of sortable columns.
+my @cfs = grep /^CustomField/, @{$ARGS{AvailableColumns}};
+$fields{$_}=1 for @cfs;
+
+# Add PAW sort
+$fields{'Custom.Ownership'} = 1;
+my @Order;
+my @OrderBy;
+if ($OrderBy =~ /\|/) {
+ @OrderBy = split /\|/, $OrderBy;
+} else {
+ @OrderBy = ( $OrderBy );
+}
+if ($Order =~ /\|/) {
+ @Order = split /\|/, $Order;
+} else {
+ @Order = ( $Order );
+}
</%INIT>
@@ -107,4 +139,5 @@ $Order => undef
$OrderBy => undef
$RowsPerPage => undef
$Format => undef
+$GroupBy => 'id'
</%ARGS>
diff --git a/rt/html/Search/Elements/EditFormat b/rt/html/Search/Elements/EditFormat
index dc8720f26..fa0ac96e0 100644
--- a/rt/html/Search/Elements/EditFormat
+++ b/rt/html/Search/Elements/EditFormat
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -56,7 +58,7 @@
<&|/l&>Show Columns</&>:
</td>
<tr>
-<td valign=top>
+<td valign="top">
<select size="6" name="SelectDisplayColumns" multiple>
% foreach my $field ( @$AvailableColumns) {
<option value="<%$field%>"><% loc( $field) %></option>
@@ -71,14 +73,14 @@
<option value="Display"><&|/l&>Display</&></option>
<option value="Take"><&|/l&>Take</&></option>
</select>
-<br><&|/l&>Title</&>: <input name="Title" size=10>
-<br><&|/l&>Size</&>:
+<br /><&|/l&>Title</&>: <input name="Title" size="10" />
+<br /><&|/l&>Size</&>:
<select name="Size">
<option value="">-</option>
<option value="Small"><&|/l&>Small</&></option>
<option value="Large"><&|/l&>Large</&></option>
</select>
-<br><&|/l&>Style</&>:
+<br /><&|/l&>Style</&>:
<select name="Face">
<option value="">-</option>
<option value="Bold"><&|/l&>Bold</&></option>
@@ -86,24 +88,24 @@
</select>
</td>
<td>
-<input type=submit name="AddCol" value="->">
+<input type="submit" class="button" name="AddCol" value=" &rarr; " />
</td>
-<td valign=top>
-<select size=4 name="CurrentDisplayColumns">
+<td valign="top">
+<select size="4" name="CurrentDisplayColumns">
% my $i=0;
% foreach my $field (@$CurrentFormat) {
<option value="<%$i++%>><%$field->{Column}%>">
<%loc( $field->{Column}) %></option>
% }
</select>
-<br>
+<br />
<center>
-<input type="submit" name="ColUp" value="^">
-<input type="submit" name="ColDown" value="v">
-<input type="submit" name="RemoveCol" value="<%loc('Delete')%>">
+<input type="submit" class="button" name="ColUp" value=" &uarr; " />
+<input type="submit" class="button" name="ColDown" value=" &darr; " />
+<input type="submit" class="button" name="RemoveCol" value="<%loc('Delete')%>" />
</center>
</td>
-<td colspan=3 align=center>
+<td colspan="3" align="center">
</td>
</tr>
</table>
diff --git a/rt/html/Search/Elements/EditQuery b/rt/html/Search/Elements/EditQuery
index 783541a64..5c40c2573 100644
--- a/rt/html/Search/Elements/EditQuery
+++ b/rt/html/Search/Elements/EditQuery
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,20 +46,20 @@
%#
%# END BPS TAGGED BLOCK }}}
<& NewListActions, actions => $actions &>
-<& /Elements/TitleBoxStart, title => join(': ', grep defined, loc("Query"), $Description) &>
+<&|/Widgets/TitleBox, title => join(': ', grep defined, loc("Current search"), $Description) &>
<select size="10" name="clauses" style="width: 100%" multiple>
% $m->out($optionlist);
</select>
<p align="center">
-<input type=submit name="Up" value="^">
-<input type=submit name="Down" value="v">
-<input type=submit name="Left" value="<">
-<input type=submit name="Right" value=">">
-<input type=submit name="Toggle" value="<&|/l&>And/Or</&>">
-<input type=submit name="DeleteClause" value="<&|/l&>Delete</&>">
-%#<input type=submit name="EditQuery" value="Advanced">
+<input type="submit" class="button" name="Up" value=" &uarr; " />
+<input type="submit" class="button" name="Down" value=" &darr; " />
+<input type="submit" class="button" name="Left" value=" &larr; " />
+<input type="submit" class="button" name="Right" value=" &rarr; " />
+<input type="submit" class="button" name="Toggle" value="<&|/l&>And/Or</&>" />
+<input type="submit" class="button" name="DeleteClause" value="<&|/l&>Delete</&>" />
+%#<input type="submit" class="button" name="EditQuery" value="Advanced" />
</p>
-<& /Elements/TitleBoxEnd &>
+</&>
<%ARGS>
$Description
$optionlist
diff --git a/rt/html/Search/Elements/EditSearches b/rt/html/Search/Elements/EditSearches
index bc6b80e6f..3978ea320 100644
--- a/rt/html/Search/Elements/EditSearches
+++ b/rt/html/Search/Elements/EditSearches
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,62 +45,59 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/TitleBoxStart, title => loc('Saved searches') &>
+<&| /Widgets/TitleBox, title => loc($Title)&>
%# Hide all the save functionality if the user shouldn't see it.
% if ($session{'CurrentUser'}->HasRight( Right => 'CreateSavedSearch',
% Object=> $RT::System )) {
<&|/l&>Privacy:</&>
% if ($CurrentSearch->{'Object'} && $CurrentSearch->{'Object'}->id) {
-<& SearchPrivacy, Object => $CurrentSearch->{'Object'}->Object &><br>
+<& SearchPrivacy, Object => $CurrentSearch->{'Object'}->Object &><br />
% } else {
-<& SelectSearchObject, Name => 'Owner', Objects => \@Objects &><br>
+<& SelectSearchObject, Name => 'Owner', Objects => \@Objects &><br />
% }
<&|/l&>Description</&>:<br>
-<font size="-1"><input size="25" name="Description" value="<%$CurrentSearch->{'Description'}%>"></font>
-<nobr>
+<font size="-1"><input size="25" name="Description" value="<%$CurrentSearch->{'Description'} || ''%>" /></font>
% if ($SearchId ne 'new') {
+<nobr>
% if ($Dirty) {
-<input type="submit" name="Revert" value="<%loc('Revert')%>">
+<input type="submit" class="button" name="Revert" value="<%loc('Revert')%>" />
% }
-<input type="submit" name="Delete" value="<%loc('Delete')%>">
-<input type="submit" name="CopySearch" value="<%loc('Copy')%>">
-</nobr>
-
+<input type="submit" class="button" name="Delete" value="<%loc('Delete')%>" />
+% if ($AllowCopy) {
+<input type="submit" class="button" name="CopySearch" value="<%loc('Copy')%>" />
% }
+</nobr>
-% if ($Dirty or $SearchId eq 'new') {
-<input type="submit" name="Save" value="<%loc('Save')%>">
% }
-<hr>
+<input type="submit" name="Save" value="<%loc('Save')%>" class="button" />
+<hr />
% }
-<&|/l&>Load saved search:</&><br>
-<& SelectSearchesForObjects, Name => 'LoadSavedSearch', Objects => \@Objects&>
-<input value="<%loc('Load')%>" type="submit">
-<& /Elements/TitleBoxEnd &>
+<&|/l&>Load saved search:</&><br />
+<& SelectSearchesForObjects, Name => 'LoadSavedSearch', Objects => \@Objects, SearchType => $SearchType &>
+<input value="<%loc('Load')%>" type="submit" class="button" />
+</&>
<%init>
-
unless ($session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch',
- Object=> $RT::System )) {
+ Object=> $RT::System )) {
return;
}
-my @Objects;
-
-push @Objects, $session{CurrentUser}->UserObj;
-
-my $groups = RT::Groups->new($session{'CurrentUser'});
-$groups->LimitToUserDefinedGroups;
-$groups->WithMember(PrincipalId => $session{'CurrentUser'}->Id,
- Recursively => 1);
+use RT::SavedSearches;
+my @Objects = RT::SavedSearches->new($session{CurrentUser})->_PrivacyObjects;
+push @Objects, RT::System->new($session{'CurrentUser'})
+ if $session{'CurrentUser'}->HasRight( Object=> $RT::System,
+ Right => 'SuperUser');
- push (@Objects, @{$groups->ItemsArrayRef()});
</%INIT>
<%ARGS>
+$SearchType => 'Ticket'
$SearchId => undef
$CurrentSearch => undef
$Description => undef
$HideResults => 0
$Dirty => 0
+$AllowCopy => 1
+$Title => 'Saved searches'
</%ARGS>
diff --git a/rt/html/Search/Elements/NewListActions b/rt/html/Search/Elements/NewListActions
index eb82544f3..535ac8cb9 100644
--- a/rt/html/Search/Elements/NewListActions
+++ b/rt/html/Search/Elements/NewListActions
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,19 +46,19 @@
%#
%# END BPS TAGGED BLOCK }}}
% if ($actions[0] ) {
-<b><%loc('Results')%></b><br>
+<b><%loc('Results')%></b><br />
% foreach my $action (@actions) {
% next unless ($action);
% my @item = @$action;
% if ($item[1] < 0) {
-<font color=red>
+<font color="red">
% }
-&nbsp;<%$item[0]%><BR>
+&nbsp;<%$item[0]%><br />
% if ($item[1] < 0) {
</font>
% }
% }
-<BR>
+<br />
% }
<%init>
@actions = grep (/./,@actions);
diff --git a/rt/html/Search/Elements/PickBasics b/rt/html/Search/Elements/PickBasics
index 8a48f6b18..44a378c14 100644
--- a/rt/html/Search/Elements/PickBasics
+++ b/rt/html/Search/Elements/PickBasics
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,11 +51,11 @@
</td><td>
<& /Elements/SelectEqualityOperator, Name => "idOp" &>
</td><td>
-<INPUT Name="ValueOfid" SIZE=5>
+<input name="ValueOfid" size="5" />
</td>
</tr>
-<tr><td align=right>
+<tr><td>
<& /Elements/SelectAttachmentField, Name => 'AttachmentField' &>
</td><td>
<& /Elements/SelectBoolean, Name => "AttachmentOp",
@@ -63,7 +65,7 @@
FalseVal => 'NOT LIKE'
&>
</td><td>
-<Input Name="ValueOfAttachment" Size=20>
+<input name="ValueOfAttachment" size="20" />
</td>
</tr>
<tr>
@@ -97,11 +99,11 @@
</td>
</tr>
<tr><td class="label">
-<SELECT NAME="ActorField">
-<OPTION VALUE="Owner"><&|/l&>Owner</&></OPTION>
-<OPTION VALUE="Creator"><&|/l&>Creator</&></OPTION>
-<OPTION VALUE="LastUpdatedBy"><&|/l&>LastUpdatedBy</&></OPTION>
-</SELECT>
+<select name="ActorField">
+<option value="Owner"><&|/l&>Owner</&></option>
+<option value="Creator"><&|/l&>Creator</&></option>
+<option value="LastUpdatedBy"><&|/l&>LastUpdatedBy</&></option>
+</select>
</td><td>
<& /Elements/SelectBoolean, Name => "ActorOp",
TrueVal=> '=',
@@ -117,21 +119,7 @@
</td><td>
<& /Elements/SelectMatch, Name => "WatcherOp" &>
</td><td>
-<Input Name="ValueOfWatcher" Size=20>
-</tr>
-<tr>
-<td class="label">
-<& SelectPersonType, Name => 'WatcherGroupField', Default => 'RequestorGroup', Suffix => 'Group' &>
-</td><td>
-<& /Elements/SelectBoolean, Name => "WatcherGroupOp",
- True=> loc('belongs to'),
- False=> loc('does not belong to'),
- TrueVal=> '=',
- FalseVal => '!='
-&>
-</td><td>
-<& SelectGroup, Name => 'ValueOfWatcherGroup' &>
-</td>
+<input name="ValueOfWatcher" size="20" />
</tr>
<tr>
<td class="label">
@@ -143,28 +131,29 @@
</td></tr>
<tr>
<td class="label">
-<SELECT NAME="TimeField">
-<OPTION VALUE="TimeWorked"><&|/l&>Time Worked</&></OPTION>
-<OPTION VALUE="TimeEstimated"><&|/l&>Time Estimated</&></OPTION>
-<OPTION VALUE="TimeLeft"><&|/l&>Time Left</&></OPTION>
-</SELECT>
+<select name="TimeField">
+<option value="TimeWorked"><&|/l&>Time Worked</&></option>
+<option value="TimeEstimated"><&|/l&>Time Estimated</&></option>
+<option value="TimeLeft"><&|/l&>Time Left</&></option>
+</select>
</td><td>
<& /Elements/SelectEqualityOperator, Name => "TimeOp" &>
</td><td>
-<INPUT Name="ValueOfTime" SIZE=5>
+<input name="ValueOfTime" size="5" />
+<& /Elements/SelectTimeUnits, Name =>'ValueOfTime' &>
</td>
</tr>
<tr>
<td class="label">
-<SELECT NAME="PriorityField">
-<OPTION VALUE="Priority"><&|/l&>Priority</&></OPTION>
-<OPTION VALUE="InitialPriority"><&|/l&>Initial Priority</&></OPTION>
-<OPTION VALUE="FinalPriority"><&|/l&>Final Priority</&></OPTION>
-</SELECT>
+<select name="PriorityField">
+<option value="Priority"><&|/l&>Priority</&></option>
+<option value="InitialPriority"><&|/l&>Initial Priority</&></option>
+<option value="FinalPriority"><&|/l&>Final Priority</&></option>
+</select>
</td><td>
<& /Elements/SelectEqualityOperator, Name => "PriorityOp" &>
</td><td>
-<INPUT Name="ValueOfPriority" SIZE=5>
+<input name="ValueOfPriority" size="5" />
</td>
</tr>
<tr>
@@ -177,7 +166,7 @@
TrueVal=> '=',
FalseVal => '!=' &>
</td><td>
-<INPUT Name="ValueOfLinks" value="" SIZE=5>
+<input name="ValueOfLinks" value="" size="5" />
</td></tr>
<%INIT>
my @people = ('Actor',
diff --git a/rt/html/Search/Elements/PickCFs b/rt/html/Search/Elements/PickCFs
index 435a07ad3..734f5f871 100644
--- a/rt/html/Search/Elements/PickCFs
+++ b/rt/html/Search/Elements/PickCFs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Search/Elements/PickCriteria b/rt/html/Search/Elements/PickCriteria
index 129344443..58b29fb57 100644
--- a/rt/html/Search/Elements/PickCriteria
+++ b/rt/html/Search/Elements/PickCriteria
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,12 +45,12 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/TitleBoxStart, title => loc('Add Criteria')&>
-<table width=100% cellspacing=0 cellpadding=0 border=0>
+<&| /Widgets/TitleBox, title => loc('Add Criteria')&>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
- <table cellspacing=0 border=0>
- <tr><td class=label>
+ <table cellspacing="0" border="0">
+ <tr><td class="label">
<&|/l&>Aggregator</&>:
</td>
<td><& SelectAndOr, Name => "AndOr" &>
@@ -61,8 +63,8 @@
</td>
</tr>
<tr>
- <td valign=top>
- <table cellspacing=0 border=0>
+ <td valign="top">
+ <table cellspacing="0" border="0">
<& PickBasics &>
<& PickCFs, cfqueues => \%cfqueues &>
</table>
@@ -71,7 +73,7 @@
<tr><td>&nbsp;</td></tr>
</table>
-<& /Elements/TitleBoxEnd &>
+</&>
<%ARGS>
$addquery => 0
diff --git a/rt/html/Search/Elements/SearchPrivacy b/rt/html/Search/Elements/SearchPrivacy
index 270e1baa3..745ba62ac 100644
--- a/rt/html/Search/Elements/SearchPrivacy
+++ b/rt/html/Search/Elements/SearchPrivacy
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Search/Elements/SelectAndOr b/rt/html/Search/Elements/SelectAndOr
index 2f3c70477..c8122660a 100644
--- a/rt/html/Search/Elements/SelectAndOr
+++ b/rt/html/Search/Elements/SelectAndOr
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,8 +45,8 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<input type=radio NAME="<%$Name%>" CHECKED VALUE="AND"><&|/l&>AND</&></input>
-<input type=radio NAME="<%$Name%>" VALUE="OR"><&|/l&>OR</&></input>
+<input type="radio" class="radio" name="<%$Name%>" checked value="AND" /><&|/l&>AND</&></input>
+<input type="radio" class="radio" name="<%$Name%>" value="OR" /><&|/l&>OR</&></input>
<%ARGS>
$Name => "Operator"
diff --git a/rt/html/Search/Elements/SelectGroup b/rt/html/Search/Elements/SelectGroup
index edd53713f..3f78d3964 100644
--- a/rt/html/Search/Elements/SelectGroup
+++ b/rt/html/Search/Elements/SelectGroup
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,14 +45,14 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
% if ($AllowNull) {
-<OPTION VALUE="">-</OPTION>
+<option value="">-</option>
% }
%while (my $group = $groups->Next) {
-<OPTION VALUE="<%$group->id%>" <%$group->id eq $Default && "SELECTED"%>><%$group->Name%></OPTION>
+<option value="<%$group->id%>" <%$group->id eq $Default && "SELECTED"%>><%$group->Name%></option>
%}
-</SELECT>
+</select>
<%INIT>
my $groups = new RT::Groups($session{'CurrentUser'});
diff --git a/rt/html/Search/Elements/SelectLinks b/rt/html/Search/Elements/SelectLinks
index 00ec80bd3..f3586528d 100644
--- a/rt/html/Search/Elements/SelectLinks
+++ b/rt/html/Search/Elements/SelectLinks
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,11 +45,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME="<%$Name%>">
+<select name="<%$Name%>">
% foreach (@fields) {
-<OPTION VALUE="<%$_%>"><&|/l&><%$_%></&></OPTION>
+<option value="<%$_%>"><&|/l&><%$_%></&></option>
% }
-</SELECT>
+</select>
<%ARGS>
$Name => 'LinksField'
</%ARGS>
diff --git a/rt/html/Search/Elements/SelectPersonType b/rt/html/Search/Elements/SelectPersonType
index d4127c97b..bc631dbb0 100644
--- a/rt/html/Search/Elements/SelectPersonType
+++ b/rt/html/Search/Elements/SelectPersonType
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,20 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<SELECT NAME ="<%$Name%>">
+<select NAME ="<%$Name%>">
% if ($AllowNull) {
-<OPTION VALUE="">-</OPTION>
+<option value="">-</option>
% }
% for my $option (@types) {
% if ($Suffix) {
-<OPTION VALUE="<% $option %><% $Suffix %>" <%$option eq $Default && "SELECTED"%> ><%loc($option)%></OPTION>
+<option value="<% $option %><% $Suffix %>" <%$option eq $Default && "SELECTED"%> ><%loc($option)%></option>
% next;
% }
% foreach my $subtype (@subtypes) {
-<OPTION VALUE="<%"$option.$subtype"%>" <%$option eq $Default && $subtype eq 'EmailAddress' && "SELECTED"%> ><% loc($option) %> <% loc($subtype) %></OPTION>
+<option value="<%"$option.$subtype"%>" <%$option eq $Default && $subtype eq 'EmailAddress' && "SELECTED"%> ><% loc($option) %> <% loc($subtype) %></option>
% }
% }
-</SELECT>
+</select>
<%INIT>
my @types;
diff --git a/rt/html/Search/Elements/SelectSearchObject b/rt/html/Search/Elements/SelectSearchObject
index e9df5179f..f52a83372 100644
--- a/rt/html/Search/Elements/SelectSearchObject
+++ b/rt/html/Search/Elements/SelectSearchObject
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Search/Elements/SelectSearchesForObjects b/rt/html/Search/Elements/SelectSearchesForObjects
index e6be66a58..dc8368577 100644
--- a/rt/html/Search/Elements/SelectSearchesForObjects
+++ b/rt/html/Search/Elements/SelectSearchesForObjects
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,6 +48,7 @@
<%args>
@Objects => undef
$Name => undef
+$SearchType => 'Ticket',
</%args>
<select name="<%$Name%>">
% foreach my $object (@Objects) {
@@ -57,9 +60,9 @@ $Name => undef
% }
% my @searches = $object->Attributes->Named('SavedSearch');
% foreach my $search (@searches) {
-% # Skip it if it is not a ticket search.
+% # Skip it if it is not of search type we want.
% next if ($search->SubValue('SearchType')
-% && $search->SubValue('SearchType') ne 'Ticket');
+% && $search->SubValue('SearchType') ne $SearchType);
<option value="<%ref($object)%>-<%$object->id%>-SavedSearch-<%$search->Id%>"> -<%$search->Description||loc('Unnamed search')%></option>
% }
% }
diff --git a/rt/html/Search/Results.html b/rt/html/Search/Results.html
index 5849378a8..01bdfffde 100755
--- a/rt/html/Search/Results.html
+++ b/rt/html/Search/Results.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,7 +45,8 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => $title, Refresh => $session{'tickets_refresh_interval'} &>
+<& /Elements/Header, Title => $title, Refresh => $session{'tickets_refresh_interval'},
+ RSSAutoDiscovery => $RSSFeedURL &>
<& /Ticket/Elements/Tabs,
current_tab => "Search/Results.html".$QueryString,
Title => $title,
@@ -63,45 +66,82 @@
BaseURL => $RT::WebPath."/Search/Results.html?"
&>
-<div align=right>
-<form method=get action="<%$RT::WebPath%>/Search/Results.html">
-<input type="hidden" name="Query" value="<%$Query%>" />
-<input type="hidden" name="Format" value="<%$Format%>" />
-<input type="hidden" name="HideResults" value="<%$HideResults%>" />
-<input type="hidden" name="Rows" value="<%$Rows%>" />
-<input type="hidden" name="Page" value="<%$Page%>" />
-<input type="hidden" name="OrderBy" value="<%$OrderBy%>" />
-<input type="hidden" name="Order" value="<%$Order%>" />
+% my %hiddens = (Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order, HideResults => $HideResults, Page => $Page );
+<div align="right">
+<form method="get" action="<%$RT::WebPath%>/Search/Results.html">
+%foreach my $key (keys(%hiddens)) {
+<input type="hidden" class="hidden" name="<%$key%>" value="<%defined($hiddens{$key})?$hiddens{$key}:''%>"/>
+%}
<& /Elements/Refresh, Name => 'TicketsRefreshInterval', Default => $session {'tickets_refresh_interval'} &>
-<input type=submit value="<&|/l&>Go!</&>">
+<input type="submit" class="button" value="<&|/l&>Go!</&>" />
</form>
</div>
-<div align=right>
-<a href="<%$RT::WebPath%>/Search/Bulk.html<%$QueryString%>"><&|/l&>Update multiple tickets</&></a><br>
-<a href="<%$RT::WebPath%>/Search/Results.html<%$QueryString%>"><&|/l&>Bookmarkable link</&></a><br>
+<div align="right">
+<a href="<%$RT::WebPath%>/Search/Bulk.html<%$QueryString%>"><&|/l&>Update multiple tickets</&></a><br />
+<a href="<%$RT::WebPath%>/Search/Results.html<%$QueryString%>"><&|/l&>Bookmarkable link</&></a><br />
<a href="<%$RT::WebPath%>/Search/Results.tsv<%$QueryString%>"><&|/l&>spreadsheet</&></a> |
-<a href="<%$RT::WebPath%>/Search/Results.rdf<%$ShortQueryString%>"><&|/l&>RSS</&></a> |
-<a href="<%$RT::WebPath%>/Tools/Offline.html<%$ShortQueryString%>"><&|/l&>Work offline</&></a><br>
+<a href="<%$RSSFeedURL%>"><&|/l&>RSS</&></a> |
+<a href="<%$RT::WebPath%>/Tools/Offline.html<%$ShortQueryString%>"><&|/l&>Work offline</&></a><br />
+<form method="get" action="<%$RT::WebPath%>/Search/Chart.html"><&|/l&>chart</&>
+% %hiddens = (Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order);
+%foreach my $key (keys(%hiddens)) {
+<input type="hidden" class="hidden" name="<%$key%>" value="<%defined($hiddens{$key})?$hiddens{$key}:''%>"/>
+%}
+<&|/l, $m->scomp('Elements/SelectGroupBy', Name => 'PrimaryGroupBy', Query => $Query) &>grouped by [_1]</&>
+<&|/l, $m->scomp('Elements/SelectChartType', Name => 'ChartStyle') &>style: [_1]</&>
+<input type="submit" class="button" value="<%loc('Go!')%>" />
+</form>
<& /Elements/Callback, _CallbackName => 'SearchActions', QueryString => $QueryString&>
</div>
<%INIT>
+# Read from user preferences
+my $prefs = $session{'CurrentUser'}->UserObj->Preferences("SearchDisplay") || {};
+
+# These variables are what define a search_hash; this is also
+# where we give sane defaults.
+$Format ||= $prefs->{'Format'};
+$Order ||= $prefs->{'Order'} || 'ASC';
+$OrderBy ||= $prefs->{'OrderBy'} || 'id';
+
+# Some forms pass in "RowsPerPage" rather than "Rows"
+# We call it RowsPerPage everywhere else.
+
+if ( !defined($Rows) ) {
+ if ( $ARGS{'RowsPerPage'} ) {
+ $Rows = $ARGS{'RowsPerPage'};
+ } elsif ( defined $prefs->{'RowsPerPage'} ) {
+ $Rows = $prefs->{'RowsPerPage'};
+ } else {
+ $Rows = 50;
+ }
+}
+
my ($title, $ticketcount);
$session{'i'}++;
$session{'tickets'} = RT::Tickets->new($session{'CurrentUser'}) ;
$session{'tickets'}->FromSQL($Query) if ($Query);
-$session{'tickets'}->OrderBy(FIELD => $OrderBy, ORDER => $Order);
+if ($OrderBy =~ /\|/) {
+ # Multiple Sorts
+ my @OrderBy = split /\|/,$OrderBy;
+ my @Order = split /\|/,$Order;
+ $session{'tickets'}->OrderByCols(
+ map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } } ( 0
+ .. $#OrderBy ) );;
+} else {
+ $session{'tickets'}->OrderBy(FIELD => $OrderBy, ORDER => $Order);
+}
$session{'CurrentSearchHash'} = {
Format => $Format,
Query => $Query,
+ Page => $Page,
Order => $Order,
OrderBy => $OrderBy,
RowsPerPage => $Rows
};
-
if ( $session{'tickets'}->Query()) {
$ticketcount = $session{tickets}->CountAll();
$title = loc('Found [quant,_1,ticket]', $ticketcount);
@@ -116,13 +156,12 @@ my $QueryString = "?".$m->comp('/Elements/QueryString',
OrderBy => $OrderBy,
Order => $Order,
Page => $Page);
-
my $ShortQueryString = "?".$m->comp('/Elements/QueryString', Query => $Query);
+my $RSSFeedURL = "$RT::WebPath/Search/Results.rdf$ShortQueryString";
if ($ARGS{'TicketsRefreshInterval'}) {
$session{'tickets_refresh_interval'} = $ARGS{'TicketsRefreshInterval'};
}
-
</%INIT>
<%CLEANUP>
$session{'tickets'}->PrepForSerialization();
@@ -131,8 +170,8 @@ $session{'tickets'}->PrepForSerialization();
$Query => undef
$Format => undef
$HideResults => 0
-$Rows => 50
+$Rows => undef
$Page => 1
-$OrderBy => 'id'
-$Order => 'ASC'
+$OrderBy => undef
+$Order => undef
</%ARGS>
diff --git a/rt/html/Search/Results.rdf b/rt/html/Search/Results.rdf
index 7cc248306..fe97a314c 100644
--- a/rt/html/Search/Results.rdf
+++ b/rt/html/Search/Results.rdf
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,7 +49,7 @@
my $Tickets = RT::Tickets->new($session{'CurrentUser'});
$Tickets->FromSQL($ARGS{'Query'});
-$r->content_type('application/rdf+xml');
+$r->content_type('application/rss+xml');
diff --git a/rt/html/Search/Results.tsv b/rt/html/Search/Results.tsv
index e6b20481f..bb1907317 100644
--- a/rt/html/Search/Results.tsv
+++ b/rt/html/Search/Results.tsv
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,45 +45,64 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+<%ARGS>
+$OrderBy => 'id'
+$Order => 'ASC'
+</%ARGS>
<%INIT>
-my $Tickets = RT::Tickets->new($session{'CurrentUser'});
-$Tickets->FromSQL($ARGS{'Query'});
+my $Tickets = RT::Tickets->new( $session{'CurrentUser'} );
+$Tickets->FromSQL( $ARGS{'Query'} );
+if ( $OrderBy =~ /\|/ ) {
+
+ # Multiple Sorts
+ my @OrderBy = split /\|/, $OrderBy;
+ my @Order = split /\|/, $Order;
+ $Tickets->OrderByCols(
+ map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } }
+ ( 0 .. $#OrderBy ) );
+}
+else {
+ $Tickets->OrderBy( FIELD => $OrderBy, ORDER => $Order );
+}
my @rows;
my %known_cfs;
my @attrs = qw( id QueueObj->Name Subject Status TimeEstimated TimeWorked TimeLeft Priority FinalPriority OwnerObj->Name
- Requestors->MemberEmailAddressesAsString DueObj->ISO ToldObj->ISO
- CreatedObj->ISO ResolvedObj->ISO );
+ Requestors->MemberEmailAddressesAsString Cc->MemberEmailAddressesAsString AdminCc->MemberEmailAddressesAsString
+ DueObj->ISO ToldObj->ISO CreatedObj->ISO ResolvedObj->ISO LastUpdatedObj->ISO);
- $r->content_type('application/vnd.ms-excel');
- while ( my $Ticket = $Tickets->Next()) {
- my $row;
- foreach my $attr (@attrs) {
- my $method = '$Ticket->'.$attr.'()';
- $row->{$attr} = eval $method;
+$r->content_type('application/vnd.ms-excel');
+while ( my $Ticket = $Tickets->Next()) {
+ my $row;
+ foreach my $attr (@attrs) {
+ if ($attr =~ /(.*)->ISO$/ and $Ticket->$1->Unix <= 0) {
+ $row->{$attr} = "";
+ } else {
+ my $method = '$Ticket->'.$attr.'()';
+ $row->{$attr} = eval $method;
if ($@) {die "Failed to find $attr - ". $@};
- }
-
- my $cfs = $Ticket->QueueObj->TicketCustomFields();
- while (my $cf = $cfs->Next) {
- my @content;
- my $values = $Ticket->CustomFieldValues($cf->Id);
- while (my $value = $values->Next) {
- push @content, $value->Content;
- }
- $row->{'CustomField-'.$cf->Id} = join(', ',@content);
- if ($row->{'CustomField-'.$cf->Id}) {
- $known_cfs{$cf->Id} = $cf->Name;
- }
}
- push @rows, $row;
-
+ }
+ my $cfs = $Ticket->QueueObj->TicketCustomFields();
+ while (my $cf = $cfs->Next) {
+ my @content;
+ my $values = $Ticket->CustomFieldValues($cf->Id);
+ while (my $value = $values->Next) {
+ push @content, $value->Content;
+ }
+ $row->{'CustomField-'.$cf->Id} = join(', ',@content);
+ if ($row->{'CustomField-'.$cf->Id}) {
+ $known_cfs{$cf->Id} = $cf->Name;
+ }
}
+ push @rows, $row;
+}
+
{
-my @header;
+ my @header;
foreach my $attr (@attrs) {
my $label = $attr;
$label =~ s'Obj-.(?:AsString|Name|ISO)''g;
@@ -89,27 +110,25 @@ my @header;
push @header, $label;
}
foreach my $id (sort keys %known_cfs) {
- push @header, $known_cfs{$id};
+ push @header, "CF-".$known_cfs{$id};
}
-
-$m->out(join("\t", @header));
-$m->out("\n");
+ $m->out(join("\t", @header));
+ $m->out("\n");
}
+
foreach my $row (@rows) {
- my @row;
- foreach my $attr(@attrs) {
- push @row, $row->{"$attr"};
- }
- foreach my $id (sort keys %known_cfs) {
- my $val = $row->{'CustomField-'.$id};
- $val =~ s/(\n|\r)//g;
- push @row, $val;
- }
-
- $m->out(join("\t",@row));
- $m->out("\n");
+ my @row;
+ foreach my $attr(@attrs) {
+ push @row, $row->{"$attr"};
+ }
+ foreach my $id (sort keys %known_cfs) {
+ my $val = $row->{'CustomField-'.$id};
+ $val =~ s/(\n|\r)//g;
+ push @row, $val;
+ }
+ $m->out(join("\t",@row));
+ $m->out("\n");
}
-
$m->abort();
</%INIT>
diff --git a/rt/html/Search/Simple.html b/rt/html/Search/Simple.html
index cdffc4c46..01424a3b1 100644
--- a/rt/html/Search/Simple.html
+++ b/rt/html/Search/Simple.html
@@ -51,6 +51,8 @@
Title => $title
&>
+<& /Elements/Callback, _CallbackName => 'PreForm', %ARGS &>
+
<div id="SimpleSearchForm">
<form action="Simple.html" method="get">
@@ -64,6 +66,11 @@
<div align="center">
<input name="q" size="60" /><input type="submit" class="button" value="<&|/l&>Search</&>" />
</div>
+
+</form>
+
+<& /Elements/Callback, _CallbackName => 'PostForm', %ARGS &>
+
</div>
<%INIT>
@@ -78,8 +85,15 @@ if ($q) {
if ($q =~ /^(\d+)$/) {
RT::Interface::Web::Redirect($RT::WebURL."/Ticket/Display.html?id=".$q);
}
- my $search = RT::Search::Googleish->new(Argument => $q,
- TicketsObj => $tickets);
+
+ my %args = (
+ Argument => $q,
+ TicketsObj => $tickets,
+ );
+
+ $m->comp('/Elements/Callback', %ARGS, _CallbackName => 'SearchArgs', args => \%args);
+
+ my $search = RT::Search::Googleish->new(%args);
$m->comp( "Results.html", Query => $search->QueryToSQL() );
$m->comp( "/Elements/Footer" );
diff --git a/rt/html/SelfService/Attachment/dhandler b/rt/html/SelfService/Attachment/dhandler
index f953c2486..e7d59e63c 100644
--- a/rt/html/SelfService/Attachment/dhandler
+++ b/rt/html/SelfService/Attachment/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/SelfService/Closed.html b/rt/html/SelfService/Closed.html
index 2d49a6897..766b0bc4f 100644
--- a/rt/html/SelfService/Closed.html
+++ b/rt/html/SelfService/Closed.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,5 +47,10 @@
%# END BPS TAGGED BLOCK }}}
<& /SelfService/Elements/Header, Title => loc('Closed tickets') &>
-<& /SelfService/Elements/MyRequests, status => ['rejected', 'resolved'], friendly_status =>
-loc('closed') &>
+<& /SelfService/Elements/MyRequests, status => ['rejected', 'resolved'],
+ friendly_status => loc('closed'),
+ BaseURL => $RT::WebPath . "/SelfService/Closed.html?",
+ Page => $Page &>
+<%ARGS>
+$Page => 1
+</%ARGS>
diff --git a/rt/html/SelfService/Create.html b/rt/html/SelfService/Create.html
index bfa7534eb..f66961db8 100644
--- a/rt/html/SelfService/Create.html
+++ b/rt/html/SelfService/Create.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,67 +47,67 @@
%# END BPS TAGGED BLOCK }}}
<& Elements/Header, Title => loc("Create a ticket") &>
-<FORM ACTION="Display.html" METHOD="POST" ENCTYPE="multipart/form-data">
-<INPUT TYPE=HIDDEN Name="id" VALUE="new">
+<form action="Display.html" method="post" enctype="multipart/form-data">
+<input type="hidden" class="hidden" name="id" value="new" />
-<TABLE>
-<TR>
-<TD class="label">
+<table>
+<tr>
+<td class="label">
<&|/l&>Queue</&>:
</td>
<td class="value">
- <input type="hidden" name="Queue" value="<%$queue_obj->id%>">
- <b><%$queue_obj->Name%></b> (<%$queue_obj->Description%>)
-</TD>
-</TR>
-<TR>
-<TD class="label">
+ <input type="hidden" class="hidden" name="Queue" value="<%$queue_obj->id%>" />
+ <strong><%$queue_obj->Name%></strong> (<%$queue_obj->Description%>)
+</td>
+</tr>
+<tr>
+<td class="label">
<&|/l&>Requestors</&>:
-</TD>
-<TD class="value">
-<INPUT Name="Requestors" Value="<%$session{CurrentUser}->EmailAddress%>" SIZE=20>
-</TD>
-</TR>
-<TR>
-<TD class="label">
+</td>
+<td class="value">
+<input name="Requestors" value="<%$session{CurrentUser}->EmailAddress%>" size="20" />
+</td>
+</tr>
+<tr>
+<td class="label">
<&|/l&>Cc</&>:
-</TD>
-<TD class="value">
- <INPUT NAME="Cc" SIZE=20>
-</TD>
-</TR>
-<TR>
-<TD class="label">
+</td>
+<td class="value">
+ <input name="Cc" size="20" />
+</td>
+</tr>
+<tr>
+<td class="label">
<&|/l&>Subject</&>:
-</TD>
-<TD class="value">
-<INPUT Name="Subject" SIZE=60 MAXSIZE=200 value="">
-</TD>
-</TR>
+</td>
+<td class="value">
+<input name="Subject" size="60" maxsize="200" value="" />
+</td>
+</tr>
<tr>
<td colspan="2">
<& /Ticket/Elements/EditCustomFields, QueueObj => $queue_obj &>
</td>
</tr>
<tr>
-<TD class="label">
+<td class="label">
<&|/l&>Attach file</&>:
-</TD>
-<TD class="value">
-<INPUT Name="Attach" type="file">
-</TD>
-</TR>
-<TR>
-<TD COLSPAN=2>
-<&|/l&>Describe the issue below</&>:<br>
+</td>
+<td class="value">
+<input name="Attach" type="file" />
+</td>
+</tr>
+<tr>
+<td colspan="2">
+<&|/l&>Describe the issue below</&>:<br />
<& /Elements/MessageBox &>
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
<& /Elements/Submit, Label => loc("Create ticket")&>
-</FORM>
+</form>
<%args>
$Queue => undef
</%args>
diff --git a/rt/html/SelfService/CreateTicketInQueue.html b/rt/html/SelfService/CreateTicketInQueue.html
index 5e8973610..fd7e42664 100755
--- a/rt/html/SelfService/CreateTicketInQueue.html
+++ b/rt/html/SelfService/CreateTicketInQueue.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/SelfService/Display.html b/rt/html/SelfService/Display.html
index f7140df02..a38d2593b 100644
--- a/rt/html/SelfService/Display.html
+++ b/rt/html/SelfService/Display.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,25 +49,25 @@
<& /Elements/ListActions, actions => \@results &>
- <TABLE WIDTH="100%" class="ticketsummary" >
- <TR>
- <TD VALIGN=TOP WIDTH="50%" class="boxcontainer">
- <& /Elements/TitleBoxStart, title => loc('The Basics'),
+ <table width="100%" class="ticketsummary" >
+ <tr>
+ <td valign="top" width="50%" class="boxcontainer">
+ <&| /Widgets/TitleBox, title => loc('The Basics'),
title_class=> 'inverse',
color => "#993333" &>
<& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
<& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
-</TD>
- <TD VALIGN=TOP WIDTH="50%" class="boxcontainer">
- <& /Elements/TitleBoxStart, title => loc("Dates"),
+ </&>
+</td>
+ <td valign="top" width="50%" class="boxcontainer">
+ <&| /Widgets/TitleBox, title => loc("Dates"),
title_class=> 'inverse',
color => "#663366" &>
<& /Ticket/Elements/ShowDates, Ticket => $Ticket, UpdatedLink => 0 &>
- <& /Elements/TitleBoxEnd &>
-</TD>
-</TR>
-</TABLE>
+ </&>
+</td>
+</tr>
+</table>
@@ -158,15 +160,6 @@ if ( $id[0] eq 'new' ) {
Why => loc( "Couldn't load ticket '[_1]'", $id ) );
$m->abort();
}
- }
-
- # }}}
-
- unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
- $m->comp( 'Error.html',
- Why => loc("No permission to display that ticket") );
- $m->abort();
- }
my ( $code, $msg );
@@ -183,7 +176,8 @@ if ( $id[0] eq 'new' ) {
if (
$session{'Attachments'}
- || ( $ARGS{'UpdateContent'} ne ''
+ || ( defined $ARGS{'UpdateContent'}
+ && $ARGS{'UpdateContent'} ne ''
&& $ARGS{'UpdateContent'} ne "-- \n"
. $session{'CurrentUser'}->UserObj->Signature )
)
@@ -195,6 +189,7 @@ if ( $id[0] eq 'new' ) {
Actions => \@results,
TicketObj => $Ticket
);
+ delete $session{'Attachments'};
# delete temporary storage entry to make WebUI clean
unless ( keys %{ $session{'Attachments'} } and $ARGS{'UpdateAttach'} ) {
@@ -206,6 +201,27 @@ if ( $id[0] eq 'new' ) {
# }}}
+ }
+
+ # This code does automatic redirection if any updates happen.
+
+ unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
+ $m->comp( 'Error.html',
+ Why => loc("No permission to display that ticket") );
+ $m->abort();
+ }
+
+ if (@results) {
+ # We've done something, so we need to clear the decks to avoid
+ # resubmission on refresh.
+ # But we need to store Actions somewhere too, so we don't lose them.
+ $session{"Actions"} = \@results;
+ RT::Interface::Web::Redirect($RT::WebURL."SelfService/Display.html?id="
+ . $Ticket->id);
+ } else {
+ @results = @{ delete $session{"Actions"} || [] };
+ }
+
my $Transactions = $Ticket->Transactions;
my $attachments =
diff --git a/rt/html/SelfService/Elements/GotoTicket b/rt/html/SelfService/Elements/GotoTicket
index 50efaa24e..5eac306e9 100644
--- a/rt/html/SelfService/Elements/GotoTicket
+++ b/rt/html/SelfService/Elements/GotoTicket
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,4 +45,4 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<FORM ACTION="<%$RT::WebPath%>/SelfService/Display.html"><input type=submit value="<&|/l&>Goto ticket</&>">&nbsp;<input size=4 name=id></FORM>
+<form action="<%$RT::WebPath%>/SelfService/Display.html"><input type="submit" class="button" value="<&|/l&>Goto ticket</&>" />&nbsp;<input size="4" name="id" /></form>
diff --git a/rt/html/SelfService/Elements/Header b/rt/html/SelfService/Elements/Header
index c7e6a9167..f248292e2 100644
--- a/rt/html/SelfService/Elements/Header
+++ b/rt/html/SelfService/Elements/Header
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/SelfService/Elements/MyRequests b/rt/html/SelfService/Elements/MyRequests
index 2df8ce842..41f6b09b1 100644
--- a/rt/html/SelfService/Elements/MyRequests
+++ b/rt/html/SelfService/Elements/MyRequests
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,43 +45,40 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/TitleBoxStart, title => $title &>
-<TABLE BORDER=0 cellspacing=1 cellpadding=1 BGCOLOR="#eeeeee" WIDTH=100%>
-<TR>
-<TH><&|/l&>Subject</&></TH>
-<TH><&|/l&>Status</&></TH>
-<TH><&|/l&>Owner</&></TH>
-</TR>
-<TR>
-% while (my $Ticket = $MyTickets->Next) {
-<TR>
-<TD>
-<a href="<%$RT::WebPath%>/SelfService/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Id%>: <%$Ticket->Subject%></a>
-</TD>
-<TD>
-<%loc($Ticket->Status)%>
-</TD><TD>
-<%$Ticket->OwnerObj->Name%>
-</TR>
-% }
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
+<&| /Widgets/TitleBox, title => $title &>
+<& /Elements/TicketList, Title => $title,
+ Format => @Format,
+ Query => $Query,
+ Order => $Order,
+ OrderBy => $OrderBy,
+ BaseURL => $BaseURL,
+ Page => $Page &>
+</&>
<%INIT>
-$title ||= loc("My [_1] tickets", $friendly_status);
-my $MyTickets;
-$MyTickets = new RT::Tickets ($session{'CurrentUser'});
-$MyTickets->LimitWatcher(TYPE => 'Requestor', VALUE => $session{'CurrentUser'}->EmailAddress);
-$MyTickets->OrderBy(FIELD => 'id', ORDER => 'ASC');
-
-foreach my $status (@status) {
-
- $MyTickets->LimitStatus(VALUE => $status);
+my $id = $session{'CurrentUser'}->id;
+my $Query = "( "
+ . join( ' OR ', map "$_.id = $id", @roles )
+ . ")";
+if ( @status ) {
+ $Query .= " AND ( "
+ . join( ' OR ', map "Status = '$_'", @status )
+ . " )";
}
+my $Order = "ASC";
+my $OrderBy = "Created";
+my @Format = qq{
+ '<B><A HREF="$RT::WebPath/SelfService/Display.html?id=__id__">__id__</a></B>/TITLE:#',
+ '<B><A HREF="$RT::WebPath/SelfService/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject',
+ Status,
+ Requestors,
+ OwnerName};
</%INIT>
<%ARGS>
-$title => undef
$friendly_status => loc('open')
+$title => loc("My [_1] tickets", $friendly_status)
+@roles => ('Watcher')
@status => ('open', 'new', 'stalled')
+$BaseURL => undef
+$Page => 1
</%ARGS>
diff --git a/rt/html/SelfService/Elements/Tabs b/rt/html/SelfService/Elements/Tabs
index 802fd6525..164fa2863 100644
--- a/rt/html/SelfService/Elements/Tabs
+++ b/rt/html/SelfService/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,6 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+<& /Elements/Callback, tabs => $tabs, %ARGS &>
<& /Elements/PageLayout,
current_toptab => $current_toptab,
current_tab => $current_tab,
@@ -52,11 +55,23 @@
&>
<a name="skipnav" id="skipnav" accesskey="8"></a>
<%INIT>
+my $queues = RT::Queues->new($session{'CurrentUser'});
+$queues->UnLimit;
+
+my $queue_count = 0;
+my $queue_id = 1;
+
+while (my $queue = $queues->Next) {
+ next unless $queue->CurrentUserHasRight('CreateTicket');
+ $queue_id = $queue->id;
+ $queue_count++;
+ last if ($queue_count > 1);
+}
if ($Title) {
-$Title = loc ("RT Self Service") . " / " . $Title;
+$Title = loc("RT Self Service") . " / " . $Title;
} else {
-$Title = loc ("RT Self Service");
+$Title = loc("RT Self Service");
}
my ($tab);
@@ -66,10 +81,18 @@ my $tabs = { A => { title => loc('Open tickets'),
B => { title => loc('Closed tickets'),
path => 'SelfService/Closed.html',
},
- C => { title => loc('New ticket'),
- path => 'SelfService/CreateTicketInQueue.html'
- }
};
+
+if ($queue_count > 1) {
+ $tabs->{C} = { title => loc('New ticket'),
+ path => 'SelfService/CreateTicketInQueue.html'
+ };
+} else {
+ $tabs->{C} = { title => loc('New ticket'),
+ path => 'SelfService/Create.html?Queue=' . $queue_id
+ };
+}
+
if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf',
Object => $RT::System )) {
$tabs->{Z} = { title => loc('Preferences'),
diff --git a/rt/html/SelfService/Error.html b/rt/html/SelfService/Error.html
index 8ac9f81ea..81a483d39 100644
--- a/rt/html/SelfService/Error.html
+++ b/rt/html/SelfService/Error.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,15 +47,15 @@
%# END BPS TAGGED BLOCK }}}
<& /SelfService/Elements/Header, Title => loc('Error') &>
<h2 class="title"><%loc('Error')%></h2>
-<& /Elements/TitleBoxStart, title => $Title &>
+<&| /Widgets/TitleBox, title => $Title &>
<%$Why%>
-<br>
-<font size=-1>
+<br />
+<font size="-1">
<%$Details%>
</font>
-<& /Elements/TitleBoxEnd &>
+</&>
</body>
-</HTML>
+</html>
<%args>
diff --git a/rt/html/SelfService/Prefs.html b/rt/html/SelfService/Prefs.html
index 3913203fb..0cd3756c3 100644
--- a/rt/html/SelfService/Prefs.html
+++ b/rt/html/SelfService/Prefs.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,14 +48,14 @@
<& /SelfService/Elements/Header, Title => loc('Preferences') &>
<& /Elements/ListActions, actions => \@results &>
-<form method=post>
+<form method="post">
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-<& /Elements/TitleBoxStart, title => loc('Change password') &>
-<&|/l&>New password</&>: <input type=password name="NewPass1" size=16>
-<&|/l&>Confirm</&>: <input type=password name="NewPass2" size=16>
-<& /Elements/TitleBoxEnd &>
-<BR>
+<&| /Widgets/TitleBox, title => loc('Change password') &>
+<&|/l&>New password</&>: <input type="password" name="NewPass1" size="16" />
+<&|/l&>Confirm</&>: <input type="password" name="NewPass2" size="16" />
+</&>
+<br />
% }
<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
diff --git a/rt/html/SelfService/Update.html b/rt/html/SelfService/Update.html
index 816a610aa..b10716f9a 100644
--- a/rt/html/SelfService/Update.html
+++ b/rt/html/SelfService/Update.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,9 +50,9 @@
&>
-<FORM ACTION="Display.html" METHOD=POST ENCTYPE="multipart/form-data">
-<input type=hidden name="UpdateType" value="response">
-<input TYPE="hidden" NAME="id" VALUE="<%$Ticket->Id%>">
+<form action="Display.html" method="post" enctype="multipart/form-data">
+<input type="hidden" class="hidden" name="UpdateType" value="response" />
+<input type="hidden" class="hidden" name="id" value="<%$Ticket->Id%>" />
<table>
<tr>
<td class="label">
@@ -65,30 +67,30 @@
<&|/l&>Subject</&>
</td>
<td class="value">
- <input name="UpdateSubject" size=60 value="<% $Ticket->Subject %>">
+ <input name="UpdateSubject" size="60" value="<% $Ticket->Subject %>" />
</td>
</tr>
% if (exists $session{'Attachments'}) {
<tr>
- <TD class="label">
+ <td class="label">
<&|/l&>Attached file</&>
- </TD>
- <TD COLSPAN=5 class="value">
- <&|/l&>Check box to delete</&><BR>
+ </td>
+ <td colspan="5" class="value">
+ <&|/l&>Check box to delete</&><br />
% foreach my $attach_name (keys %{$session{'Attachments'}}) {
- <input type="checkbox" name="DeleteAttach-<%$attach_name%>" value="1"><%$attach_name%><BR>
+ <input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
% } # end of foreach
- </TD>
-</TR>
+ </td>
+</tr>
% } # end of if
<tr>
<td class"label">
<&|/l&>Attach</&>
</td>
<td class="value">
- <input name="Attach" type="file">
- <input type="hidden" name="UpdateAttach" value="1">
+ <input name="Attach" type="file" />
+ <input type="hidden" class="hidden" name="UpdateAttach" value="1" />
</td>
</tr>
</table>
@@ -97,11 +99,11 @@
Name => "UpdateContent",
QuoteTransaction => $ARGS{QuoteTransaction}
&>
- <br>
+ <br />
<& /Elements/Submit &>
- </FORM>
+ </form>
diff --git a/rt/html/SelfService/index.html b/rt/html/SelfService/index.html
index f3ccb8555..cd7dfb02f 100644
--- a/rt/html/SelfService/index.html
+++ b/rt/html/SelfService/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,6 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /SelfService/Elements/Header, Title => undef &>
+<& /SelfService/Elements/Header, Title => loc('Open tickets') &>
-<& /SelfService/Elements/MyRequests &>
+<& /SelfService/Elements/MyRequests, BaseURL => $RT::WebPath . "/SelfService/?",
+ Page => $Page &>
+<%ARGS>
+$Page => 1
+</%ARGS>
diff --git a/rt/html/Ticket/Attachment/dhandler b/rt/html/Ticket/Attachment/dhandler
index 584fd721d..4872ef2a7 100644
--- a/rt/html/Ticket/Attachment/dhandler
+++ b/rt/html/Ticket/Attachment/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Ticket/Create.html b/rt/html/Ticket/Create.html
index fc4cc20ef..2061b3be3 100644
--- a/rt/html/Ticket/Create.html
+++ b/rt/html/Ticket/Create.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,203 +45,286 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Create a new ticket") &>
+<& /Elements/Header,
+ Title => loc("Create a new ticket"),
+ onload => "hide(document.getElementById('Ticket-Create-details'));" &>
<& /Elements/Tabs,
current_toptab => "Ticket/Create.html",
- Title => loc("Create a new ticket") &>
-<FORM ACTION="<%$RT::WebPath%>/Ticket/Create.html" METHOD="POST" ENCTYPE="multipart/form-data" NAME="TicketCreate">
-<INPUT TYPE=HIDDEN Name="id" VALUE="new">
-<A NAME="top">
-
-
-[<a class="currenttab"><&|/l&>Show basics</&></a>] [<A HREF="#detail"><&|/l&>Show details</&></a>]
-<BR>
-<& /Elements/TitleBoxStart, contentbg => "#cccccc", title => loc("Create a new ticket") &>
-<TABLE border=0 cellpadding=0 cellspacing=0>
-<TR><TD class=label><&|/l&>Queue</&>:</TD>
-<TD class=value><% $QueueObj->Name %>
-<INPUT TYPE=HIDDEN NAME=Queue Value="<%$QueueObj->Name%>">
-</TD>
-<TD class=label><&|/l&>Status</&>:
-</TD>
-<TD class=value>
+ Title => loc("Create a new ticket"),
+ actions => $actions &>
+<& /Elements/ListActions, actions => \@results &>
+<form action="<%$RT::WebPath%>/Ticket/Create.html" method="post" enctype="multipart/form-data" name="TicketCreate">
+<input type="hidden" class="hidden" name="id" value="new" />
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+
+<div id="Ticket-Create-basics">
+<a name="basics"></a>
+<&| /Widgets/TitleBox, title => loc("Create a new ticket") &>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td class="label"><&|/l&>Queue</&>:</td>
+<td class="value"><& Elements/ShowQueue, QueueObj => $QueueObj &>
+<input type="hidden" class="hidden" name="Queue" value="<% $QueueObj->Name %>" />
+</td>
+<td class="label"><&|/l&>Status</&>:
+</td>
+<td class="value">
<& /Elements/SelectStatus, Name => "Status", Default => $ARGS{Status}||'new', DefaultValue => 0 &>
-</TD>
-<TD class=label>
+</td>
+<td class="label">
<&|/l&>Owner</&>:
-</TD>
-<TD class=value>
+</td>
+<td class="value">
<& /Elements/SelectOwner, Name => "Owner", QueueObj => $QueueObj, Default => $ARGS{Owner}||$RT::Nobody->Id, DefaultValue => 0 &>
-</TD>
-</TR>
-<TR>
-<TD class=label>
+</td>
+</tr>
+<tr>
+<td class="label">
<&|/l&>Requestors</&>:
-</TD>
-<TD class=value COLSPAN=5>
-<INPUT Name="Requestors" Value="<% ($ARGS{Requestors}) || $session{CurrentUser}->EmailAddress %>" SIZE=40>
-</TD>
-</TR>
-<TR>
-<TD class=labeltop>
+</td>
+<td class="value" colspan="5">
+<input name="Requestors" value="<% ($ARGS{Requestors}) || $session{CurrentUser}->EmailAddress %>" size="40" />
+</td>
+</tr>
+<tr>
+<td class="labeltop">
<&|/l&>Cc</&>:
-</TD>
-<TD class=value COLSPAN=5>
-<INPUT NAME="Cc" SIZE=40 VALUE="<% $ARGS{Cc} %>"><BR>
-<i><font size=-2>
-<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <b>will</b> receive future updates.)</&></font></i>
-</TD>
-</TR>
-<TR>
-<TD class=labeltop>
+</td>
+<td class="value" colspan="5">
+<input name="Cc" size="40" value="<% $ARGS{Cc} %>" /><br />
+<i><font size="-2">
+<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <strong>will</strong> receive future updates.)</&></font></i>
+</td>
+</tr>
+<tr>
+<td class="labeltop">
<&|/l&>Admin Cc</&>:
-</TD>
-<TD class=value COLSPAN=5>
-<INPUT NAME="AdminCc" SIZE=40 VALUE="<% $ARGS{AdminCc} %>"><BR>
-<i><font size=-2>
-<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <b>will</b> receive future updates.)</&></font></i>
-</TD>
-</TR>
-<TR>
-<TD class=label>
+</td>
+<td class="value" colspan="5">
+<input name="AdminCc" size="40" value="<% $ARGS{AdminCc} %>" /><br />
+<i><font size="-2">
+<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <strong>will</strong> receive future updates.)</&></font></i>
+</td>
+</tr>
+<tr>
+<td class="label">
<&|/l&>Subject</&>:
-</TD>
-<TD class=value COLSPAN=5>
-<INPUT Name="Subject" SIZE=60 MAXSIZE=200 value="<%$ARGS{Subject} || ''%>">
-</TD>
-</TR>
-<TR>
-<TD COLSPAN=6>
+</td>
+<td class="value" colspan="5">
+<input name="Subject" size="60" maxsize="200" value="<%$ARGS{Subject} || ''%>" />
+</td>
+</tr>
+<tr>
+<td colspan="6">
<& /Ticket/Elements/EditCustomFields, QueueObj => $QueueObj &>
-</TD>
-</TR>
+</td>
+</tr>
% if ($TxnCFs->Count) {
% while (my $CF = $TxnCFs->Next()) {
-<TR>
-<TD ALIGN=RIGHT><% $CF->Name %>:</TD>
-<TD><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
- "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></TD>
-</TD></TR>
+<tr>
+<td align="right"><% $CF->Name %>:</td>
+<td><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
+ "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></td>
+</td></tr>
% }
% }
-<TR>
+<tr>
% if (exists $session{'Attachments'}) {
-<TD class=label>
+<td class="label">
<&|/l&>Attached file</&>:
-</TD>
-<TD COLSPAN=5>
-<&|/l&>Check box to delete</&><BR>
+</td>
+<td colspan="5">
+<&|/l&>Check box to delete</&><br />
% foreach my $attach_name (keys %{$session{'Attachments'}}) {
-<input type="checkbox" name="DeleteAttach-<%$attach_name%>" value="1"><%$attach_name%><BR>
+<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
% } # end of foreach
-</TD>
-</TR>
-<TR>
+</td>
+</tr>
+<tr>
% } # end of if
-<TD>
+<td>
<&|/l&>Attach file</&>:
-</TD>
-<TD class=value COLSPAN=5>
-<INPUT TYPE=FILE NAME="Attach">
-<INPUT TYPE=SUBMIT NAME="AddMoreAttach" VALUE="<&|/l&>Add More Files</&>">
-</TD>
-</TR>
-<TR>
-<TD COLSPAN=6>
-<&|/l&>Describe the issue below</&>:<br>
+</td>
+<td class="value" colspan="5">
+<input type="file" name="Attach" />
+<input type="submit" class="button" name="AddMoreAttach" value="<&|/l&>Add More Files</&>" />
+</td>
+</tr>
+<tr>
+<td colspan="6">
+<&|/l&>Describe the issue below</&>:<br />
% if (exists $ARGS{Content}) {
<& /Elements/MessageBox, Default => $ARGS{Content}, IncludeSignature => 0 &>
% } else {
<& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &>
%}
-<BR>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT COLSPAN=2>
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
+<br />
+</td>
+</tr>
+<tr>
+<td align="right" colspan="2">
+</td>
+</tr>
+</table>
+</&>
<& /Elements/Submit, Label => loc("Create")&>
+</div>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-
-<A NAME="detail">
- [<A HREF="#top"><&|/l&>Show basics</&></a>] [<a class="currenttab"><&|/l&>Show details</&></a>]
-<BR>
-<TABLE WIDTH="100%" BORDER=0>
-<TR>
-<TD WIDTH="50%" VALIGN=TOP>
+<div id="Ticket-Create-details">
+<a name="details"></a>
+<table width="100%" border="0">
+<tr>
+<td width="50%" valign="top">
- <& /Elements/TitleBoxStart, title => loc('The Basics'),
+ <&| /Widgets/TitleBox, title => loc('The Basics'),
title_class=> 'inverse',
color => "#993333" &>
-<TABLE BORDER=0>
-<TR><TD ALIGN=RIGHT><&|/l&>Priority</&>:</TD><TD><input size=3 name="InitialPriority" value="<% $ARGS{InitialPriority} ? $ARGS{InitialPriority} : $QueueObj->InitialPriority %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Final Priority</&>:</TD><TD><input size=3 name="FinalPriority" value="<% $ARGS{FinalPriority} ? $ARGS{FinalPriority} : $QueueObj->FinalPriority %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Time Worked</&>:</TD><TD><&|/l,'<input size=3 name="TimeWorked" value="'.$ARGS{TimeWorked}.'">'&>[_1] min</&></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Time Left</&>:</TD><TD><&|/l,'<input size=3 name="TimeLeft" value="'.$ARGS{TimeLeft}.'">'&>[_1] min</&></TD></TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<br>
-<& /Elements/TitleBoxStart, title => loc("Dates"),
+<table border="0">
+<tr><td align="right"><&|/l&>Priority</&>:</td><td><input size="3" name="InitialPriority" value="<% $ARGS{InitialPriority} ? $ARGS{InitialPriority} : $QueueObj->InitialPriority %>" /></td></tr>
+<tr><td align="right"><&|/l&>Final Priority</&>:</td><td><input size="3" name="FinalPriority" value="<% $ARGS{FinalPriority} ? $ARGS{FinalPriority} : $QueueObj->FinalPriority %>" /></td></tr>
+<tr><td align="right"><&|/l&>Time Estimated</&>:</td>
+<td>
+<input size="3" name="TimeEstimated" value="<%$ARGS{TimeEstimated}%>" />
+<& /Elements/SelectTimeUnits, Name =>'TimeEstimated' &>
+
+</td></tr>
+<tr><td align="right"><&|/l&>Time Worked</&>:</td>
+<td>
+<input size="3" name="TimeWorked" value="<%$ARGS{TimeWorked}%>" />
+<& /Elements/SelectTimeUnits, Name =>'TimeWorked' &>
+
+</td></tr>
+<tr>
+<td align="right"><&|/l&>Time Left</&>:</td>
+<td><input size="3" name="TimeLeft" value="<%$ARGS{TimeLeft}%>" />
+<& /Elements/SelectTimeUnits, Name =>'TimeLeft' &>
+</td></tr>
+</table>
+</&>
+<br />
+<&|/Widgets/TitleBox, title => loc("Dates"),
title_class=> 'inverse',
color => "#663366" &>
-<TABLE BORDER=0>
-<TR><TD ALIGN=RIGHT><&|/l&>Starts</&>:</TD><TD><input size=10 name="Starts" value="<% $ARGS{Starts} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Due</&>:</TD><TD><input size=10 name="Due" value="<%
-$ARGS{Due}%>"></TD></TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<BR>
-</TD>
+<table>
+<tr><td class="label"><&|/l&>Starts</&>:</td><td><& /Elements/SelectDate, Name => "Starts", Default => $ARGS{Starts} || '' &></td></tr>
+<tr><td class="label"><&|/l&>Due</&>:</td><td><& /Elements/SelectDate, Name => "Due", Default => $ARGS{Due} || '' &></td></tr>
+</table>
+</&>
+<br />
+</td>
-<TD VALIGN="TOP">
-<& /Elements/TitleBoxStart, title => loc('Links'),
- title_class=> 'inverse',
- titleright => '', color=> "#336633" &>
+<td valign="top">
+<&| /Widgets/TitleBox, title => loc('Links'), title_class=> 'inverse' &>
-<i><&|/l&>(Enter ticket ids or URLs, separated with spaces)</&></i>
-<TABLE BORDER=0>
-<TR><TD ALIGN=RIGHT><&|/l&>Depends on</&></TD><TD><input size=10 name="new-DependsOn" value="<% $ARGS{'new-DependsOn'} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Depended on by</&></TD><TD><input size=10 name="DependsOn-new" value="<% $ARGS{'DependsOn-new'} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Parents</&></TD><TD><input size=10 name="new-MemberOf" value="<% $ARGS{'new-MemberOf'} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Children</&></TD><TD><input size=10 name="MemberOf-new" value="<% $ARGS{'MemberOf-new'} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Refers to</&></TD><TD><input size=10 name="new-RefersTo" value="<% $ARGS{'new-RefersTo'} %>"></TD></TR>
-<TR><TD ALIGN=RIGHT><&|/l&>Referred to by</&></TD><TD><input size=10 name="RefersTo-new" value="<% $ARGS{'RefersTo-new'} %>"></TD></TR>
+<em><&|/l&>(Enter ticket ids or URLs, separated with spaces)</&></em>
+<table border="0">
+<tr><td align="right"><&|/l&>Depends on</&></td><td><input size="10" name="new-DependsOn" value="<% $ARGS{'new-DependsOn'} %>" /></td></tr>
+<tr><td align="right"><&|/l&>Depended on by</&></td><td><input size="10" name="DependsOn-new" value="<% $ARGS{'DependsOn-new'} %>" /></td></tr>
+<tr><td align="right"><&|/l&>Parents</&></td><td><input size="10" name="new-MemberOf" value="<% $ARGS{'new-MemberOf'} %>" /></td></tr>
+<tr><td align="right"><&|/l&>Children</&></td><td><input size="10" name="MemberOf-new" value="<% $ARGS{'MemberOf-new'} %>" /></td></tr>
+<tr><td align="right"><&|/l&>Refers to</&></td><td><input size="10" name="new-RefersTo" value="<% $ARGS{'new-RefersTo'} %>" /></td></tr>
+<tr><td align="right"><&|/l&>Referred to by</&></td><td><input size="10" name="RefersTo-new" value="<% $ARGS{'RefersTo-new'} %>" /></td></tr>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<BR>
+</table>
+</&>
+<br />
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
<& /Elements/Submit, Label => loc("Create") &>
-</FORM>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
+</div>
+</form>
<%INIT>
+my $CloneTicketObj;
+if ( $CloneTicket ) {
+ $CloneTicketObj = RT::Ticket->new( $session{CurrentUser} );
+ $CloneTicketObj->Load($CloneTicket) or Abort(loc("Ticket could not be loaded"));
+
+ my $clone = {
+ Requestors => join( ',', $CloneTicketObj->RequestorAddresses ),
+ Cc => join( ',', $CloneTicketObj->CcAddresses),
+ AdminCc => join( ',', $CloneTicketObj->AdminCcAddresses),
+ InitialPriority => $CloneTicketObj->Priority,
+ };
+
+ $clone->{$_} = $CloneTicketObj->$_()
+ for qw/Owner Subject FinalPriority TimeEstimated TimeWorked
+ Status TimeLeft Starts Started Due Resolved/;
+
+ my $members = $CloneTicketObj->Members;
+ my ( @members, @members_of, @refers, @refers_by, @depends, @depends_by );
+ while ( my $member = $members->Next ) {
+ push @members, $member->LocalBase;
+ }
+ $clone->{'MemberOf-new'} = join ' ', @members;
+
+ my $members_of = $CloneTicketObj->MemberOf;
+ while ( my $member_of = $members_of->Next ) {
+ push @members_of, $member_of->LocalTarget;
+ }
+ $clone->{'new-MemberOf'} = join ' ', @members_of;
+
+ my $refers = $CloneTicketObj->RefersTo;
+ while ( my $refer = $refers->Next ) {
+ push @refers, $refer->LocalTarget;
+ }
+ $clone->{'new-RefersTo'} = join ' ', @refers;
+
+ my $refers_by = $CloneTicketObj->ReferredToBy;
+ while ( my $refer_by = $refers_by->Next ) {
+ push @refers_by, $refer_by->LocalBase;
+ }
+ $clone->{'RefersTo-new'} = join ' ', @refers_by;
+
+ my $depends = $CloneTicketObj->DependsOn;
+ while ( my $depend = $depends->Next ) {
+ push @depends, $depend->LocalTarget;
+ }
+ $clone->{'new-DependsOn'} = join ' ', @depends;
+
+ my $depends_by = $CloneTicketObj->DependedOnBy;
+ while ( my $depend_by = $depends_by->Next ) {
+ push @depends_by, $depend_by->LocalBase;
+ }
+ $clone->{'DependsOn-new'} = join ' ', @depends_by;
+
+
+
+ my $cfs = $CloneTicketObj->QueueObj->TicketCustomFields();
+ while ( my $cf = $cfs->Next ) {
+ my $cf_id = $cf->id;
+ my $cf_values = $CloneTicketObj->CustomFieldValues( $cf->id );
+ my @cf_values;
+ while ( my $cf_value = $cf_values->Next ) {
+ push @cf_values, $cf_value->Content;
+ }
+ $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"}
+ = join "\n", @cf_values;
+ }
+
+ for ( keys %$clone ) {
+ $ARGS{$_} = $clone->{$_} if not defined $ARGS{$_};
+ }
+}
+my @results;
my $QueueObj = new RT::Queue($session{'CurrentUser'});
$QueueObj->Load($Queue) || Abort(loc("Queue could not be loaded."));
my $CFs = $QueueObj->TicketCustomFields();
my $TxnCFs = $QueueObj->TicketTransactionCustomFields();
+my $ValidCFs = $m->comp(
+ '/Elements/ValidateCustomFields',
+ CustomFields => $CFs,
+ ARGSRef => \%ARGS
+);
+
# if no due date has been set explicitly, then use the
# queue's default if it exists
if ($QueueObj->DefaultDueIn && !$ARGS{'Due'}) {
@@ -285,10 +370,29 @@ unless (keys %{$session{'Attachments'}} and $ARGS{'id'} eq 'new') {
# }}}
-if ((!exists $ARGS{'AddMoreAttach'}) && ($ARGS{'id'} eq 'new')) { # new ticket?
- $m->comp('Display.html', %ARGS);
- return();
+if ((!exists $ARGS{'AddMoreAttach'}) and ($ARGS{'id'} eq 'new')) { # new ticket?
+ if ($ValidCFs) {
+ $m->comp('Display.html', %ARGS);
+ $RT::Logger->crit("After display call; error is $@");
+ $m->abort();
+ }
+ else {
+ # Invalid CFs
+ while (my $CF = $CFs->Next) {
+ my $msg = $m->notes('InvalidField-' . $CF->Id) or next;
+ push @results, $CF->Name . ': ' . $msg;
+ }
+ }
}
+
+my $actions = {
+ A => {
+ html => q[<a href="#basics" onclick="return switchVisibility('Ticket-Create-basics','Ticket-Create-details');">] . loc('Show basics') . q[</a>],
+ },
+ B => {
+ html => q[<a href="#details" onclick="return switchVisibility('Ticket-Create-details','Ticket-Create-basics');">] . loc('Show details') . q[</a>],
+ },
+};
</%INIT>
<%ARGS>
@@ -297,4 +401,5 @@ $DependedOnBy => undef
$MemberOf => undef
$QuoteTransaction => undef
$Queue => undef
+$CloneTicket => undef
</%ARGS>
diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html
index 908a7a93a..17d00a00c 100644
--- a/rt/html/Ticket/Display.html
+++ b/rt/html/Ticket/Display.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,13 +53,12 @@
Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &>
<& /Elements/ListActions, actions => \@Actions &>
-
-<& /Elements/TitleBoxStart, title => loc('Ticket metadata'), contentbg =>
-'#ffffff' &>
+<& /Elements/Callback, _CallbackName => 'BeforeShowSummary', Ticket => $TicketObj, %ARGS &>
+<&| /Widgets/TitleBox, title => loc('Ticket metadata') &>
<& /Ticket/Elements/ShowSummary, Ticket => $TicketObj, Attachments => $attachments &>
-<& /Elements/TitleBoxEnd &>
+</&>
-<BR>
+<br />
<& /Elements/Callback, _CallbackName => 'BeforeShowHistory', Ticket => $TicketObj, %ARGS &>
@@ -71,7 +72,9 @@
&>
-
+<& /Elements/Callback, _CallbackName => 'AfterShowHistory', Ticket => $TicketObj,
+current_tab => 'Ticket/Display.html?id=' . $TicketObj->id, %ARGS &>
+
<%ARGS>
$id => undef
$Create => undef
@@ -119,6 +122,10 @@ if ($ARGS{'id'} eq 'new') {
}
}
+ $m->comp('/Elements/Callback', _CallbackName => 'BeforeProcessArguments',
+ TicketObj => $TicketObj, Tickets => $Tickets,
+ ActionsRef => \@Actions, ARGSRef => \%ARGS);
+
if (defined $ARGS{'Action'}) {
if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) {
my $action = $1;
@@ -143,17 +150,31 @@ if ($ARGS{'id'} eq 'new') {
delete $session{'Attachments'};
}
#Process status updates
+ my @PeopleActions = ProcessTicketWatchers(ARGSRef => \%ARGS, TicketObj=>$TicketObj);
my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$TicketObj);
my @results = ProcessTicketLinks( TicketObj => $TicketObj, ARGSRef => \%ARGS);
- push (@Actions, @BasicActions, @results);
+ push (@Actions, @PeopleActions, @BasicActions, @results);
}
-
-
$m->comp('/Elements/Callback', _CallbackName => 'BeforeDisplay',
- TicketObj => \$TicketObj, Tickets => \$Tickets, ARGSRef => \%ARGS);
-
+ TicketObj => \$TicketObj,
+ Tickets => \$Tickets,
+ Actions => \@Actions,
+ ARGSRef => \%ARGS,
+);
+
+# This code does automatic redirection if any updates happen.
+
+if (@Actions) {
+ # We've done something, so we need to clear the decks to avoid
+ # resubmission on refresh.
+ # But we need to store Actions somewhere too, so we don't lose them.
+ $session{"Actions"} = \@Actions;
+ RT::Interface::Web::Redirect($RT::WebURL."Ticket/Display.html?id=".$TicketObj->id);
+} else {
+ @Actions = @{ delete $session{"Actions"} || [] };
+}
my $attachments = $m->comp('Elements/FindAttachments', Ticket => $TicketObj, Tickets => $Tickets);
my $attachment_content = $m->comp('Elements/LoadTextAttachments', Ticket => $TicketObj);
diff --git a/rt/html/Ticket/Elements/AddWatchers b/rt/html/Ticket/Elements/AddWatchers
index 98314b9d2..891ff95b5 100644
--- a/rt/html/Ticket/Elements/AddWatchers
+++ b/rt/html/Ticket/Elements/AddWatchers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,10 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<BR>
-<%$msg%><br>
+<br />
+<%$msg%><br />
-<&|/l&>Add new watchers</&>:<br>
+<&|/l&>Add new watchers</&>:<br />
<table>
% if ($Users and $Users->Count) {
@@ -79,17 +81,17 @@
<tr><td>
<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail1" &>
</td><td>
-<input name="WatcherAddressEmail1" size=15>
+<input name="WatcherAddressEmail1" size="15" />
</td></tr>
<tr><td>
<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail2" &>
</td><td>
-<input name="WatcherAddressEmail2" size=15>
+<input name="WatcherAddressEmail2" size="15" />
</td></tr>
<tr><td>
<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail3" &>
</td><td>
-<input name="WatcherAddressEmail3" size=15>
+<input name="WatcherAddressEmail3" size="15" />
</td></tr>
</table>
diff --git a/rt/html/Ticket/Elements/BulkLinks b/rt/html/Ticket/Elements/BulkLinks
index 6a3859aa3..e449b18d8 100644
--- a/rt/html/Ticket/Elements/BulkLinks
+++ b/rt/html/Ticket/Elements/BulkLinks
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,33 +45,33 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
- <TR>
- <TD class="label"><&|/l&>Merge into</&>:</TD>
- <TD class="entry"><input name="Ticket-MergeInto"> <i><&|/l&>(only one ticket)</&></i></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Depends on</&>:</TD>
- <TD class="entry"><input name="Ticket-DependsOn"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Depended on by</&>:</TD>
- <TD class="entry"><input name="DependsOn-Ticket"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Parents</&>:</TD>
- <TD class="entry"><input name="Ticket-MemberOf"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Children</&>:</TD>
- <TD class="entry"> <input name="MemberOf-Ticket"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Refers to</&>:</TD>
- <TD class="entry"><input name="Ticket-RefersTo"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Referred to by</&>:</TD>
- <TD class="entry"> <input name="RefersTo-Ticket"></TD>
- </TR>
-</TABLE>
+<table>
+ <tr>
+ <td class="label"><&|/l&>Merge into</&>:</td>
+ <td class="entry"><input name="Ticket-MergeInto" /> <i><&|/l&>(only one ticket)</&></i></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Depends on</&>:</td>
+ <td class="entry"><input name="Ticket-DependsOn" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Depended on by</&>:</td>
+ <td class="entry"><input name="DependsOn-Ticket" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Parents</&>:</td>
+ <td class="entry"><input name="Ticket-MemberOf" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Children</&>:</td>
+ <td class="entry"> <input name="MemberOf-Ticket" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Refers to</&>:</td>
+ <td class="entry"><input name="Ticket-RefersTo" /></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Referred to by</&>:</td>
+ <td class="entry"> <input name="RefersTo-Ticket" /></td>
+ </tr>
+</table>
diff --git a/rt/html/Ticket/Elements/EditBasics b/rt/html/Ticket/Elements/EditBasics
index 715685153..d68fe6522 100644
--- a/rt/html/Ticket/Elements/EditBasics
+++ b/rt/html/Ticket/Elements/EditBasics
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,44 +45,65 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
- <TR>
+<table>
+ <tr>
<td class="label"><&|/l&>Subject</&>:</td>
- <td class="value"><input name=Subject value="<%$TicketObj->Subject|h%>" SIZE=50></td>
- </TR>
+ <td class="value"><input name="Subject" value="<%$TicketObj->Subject|h%>" size="50" /></td>
+ </tr>
- <TR>
+ <tr>
<td class="label"><&|/l&>Status</&>:</td>
<td class="value"><%$SelectStatus|n%></td>
- </TR>
- <TR>
+ </tr>
+ <tr>
<td class="label"><&|/l&>Queue</&>:</td>
<td class="value"><%$SelectQueue|n%></td>
- </TR>
- <TR>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Owner</&>:</td>
+ <td class="value"><& /Elements/SelectOwner,
+ Name => 'Owner',
+ QueueObj => $TicketObj->QueueObj,
+ TicketObj => $TicketObj,
+ Default => $TicketObj->OwnerObj->Id,
+ DefaultValue => 0,
+ &></td>
+ </tr>
+
+ <tr>
<td class="label"><&|/l&>Time Estimated</&>:</td>
- <td class="value"><input name=TimeEstimated value="<%$TicketObj->TimeEstimated|h%>" SIZE="5"></td>
- </TR>
- <TR>
+ <td class="value"><input name="TimeEstimated" value="<%$TicketObj->TimeEstimated|h%>" size="5" />
+ <& /Elements/SelectTimeUnits, Name =>'TimeEstimated' &>
+</td>
+ </tr>
+ <tr>
<td class="label"><&|/l&>Time Worked</&>:</td>
- <td class="value"><input name=TimeWorked value="<%$TicketObj->TimeWorked|h%>" SIZE="5"></td>
- </TR>
- <TR>
+ <td class="value"><input name="TimeWorked" value="<%$TicketObj->TimeWorked|h%>" size="5" />
+ <& /Elements/SelectTimeUnits, Name =>'TimeWorked' &>
+</td>
+
+ </tr>
+ <tr>
<td class="label"><&|/l&>Time Left</&>:</td>
- <td class="value"><input name=TimeLeft value="<%$TicketObj->TimeLeft|h%>" SIZE="5"></td>
- </TR>
+ <td class="value"><input name="TimeLeft" value="<%$TicketObj->TimeLeft|h%>" size="5" />
+ <& /Elements/SelectTimeUnits, Name =>'TimeLeft' &>
+ </td>
+ </tr>
- <TR>
+ <tr>
<td class="label"><&|/l&>Priority</&>:</td>
- <td class="value"><input name=Priority value="<%$TicketObj->Priority|h%>" SIZE="5"></td>
- </TR>
+ <td class="value"><input name="Priority" value="<%$TicketObj->Priority|h%>" size="5" /></td>
+ </tr>
- <TR>
+ <tr>
<td class="label"><&|/l&>Final Priority</&>:</td>
- <td class="value"><input name=FinalPriority value="<%$TicketObj->FinalPriority|h%>" SIZE="5"></td>
- </TR>
+ <td class="value"><input name="FinalPriority" value="<%$TicketObj->FinalPriority|h%>" size="5" /></td>
+ </tr>
+
+
+
<& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $TicketObj, %ARGS &>
-</TABLE>
+</table>
<%INIT>
#It's hard to do this inline, so we'll preload the html of the selectstatus in here.
diff --git a/rt/html/Ticket/Elements/EditCustomField b/rt/html/Ticket/Elements/EditCustomField
index 63687acd7..fff3925aa 100644
--- a/rt/html/Ticket/Elements/EditCustomField
+++ b/rt/html/Ticket/Elements/EditCustomField
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Ticket/Elements/EditCustomFields b/rt/html/Ticket/Elements/EditCustomFields
index 78da71201..04d7180af 100644
--- a/rt/html/Ticket/Elements/EditCustomFields
+++ b/rt/html/Ticket/Elements/EditCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,39 +46,47 @@
%#
%# END BPS TAGGED BLOCK }}}
<table>
-<tr>
-<td valign="top" width="50%">
-<table>
-
% my $i = 0;
-% my $cfcount = $CustomFields->Count;
-% $cfcount++ if ($cfcount % 2) ; # if we have an odd number of
-% #custom fields, fudge it so we know where to put in the table break
-% while (my $CustomField = $CustomFields->Next()) {
-% if ($cfcount == 2 * $i) {
-</table>
-</td>
-<td valign="top" width="50%">
-<table>
-% }
+% while ( my $CustomField = $CustomFields->Next ) {
+% next unless $CustomField->CurrentUserHasRight('ModifyCustomField');
% $i++;
- <tr>
+% if ( $i % 2 ) {
+<tr>
+% }
+<td width="50%">
+<table>
+ <tr id="CF-<%$CustomField->id%>-EditRow">
<td class="labeltop">
- <b><%$CustomField->Name%></b><br>
+ <b><%$CustomField->Name%></b><br />
<i><%$CustomField->FriendlyType%></i>
</td>
<td class="entry"><& /Elements/EditCustomField,
Object => $TicketObj,
CustomField => $CustomField,
- NamePrefix => $NamePrefix
- &></td>
+ NamePrefix => $NamePrefix ,
+ Default => $m->notes('Field-' . $CustomField->Id),
+ &>
+% if (my $msg = $m->notes('InvalidField-' . $CustomField->Id)) {
+ <br />
+ <em style="color: red"><% $msg %></em>
+% }
+ </td>
</tr>
-% }
</table>
</td>
+
+% unless ( $i % 2 ) {
</tr>
-</table>
+% }
+
+% }
+%# close row if required
+% if ( $i % 2 ) {
+</tr>
+% }
+
+</table>
<%INIT>
my $CustomFields;
my $NamePrefix;
diff --git a/rt/html/Ticket/Elements/EditDates b/rt/html/Ticket/Elements/EditDates
index a19774192..f694506d0 100644
--- a/rt/html/Ticket/Elements/EditDates
+++ b/rt/html/Ticket/Elements/EditDates
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,32 +45,32 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
- <TR>
- <TD class="label"><&|/l&>Starts</&>:</TD>
- <TD class="entry"><& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &>
- (<% $TicketObj->StartsObj->AsString %>)</TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Started</&>:</TD>
- <TD class="entry"><& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)</TD>
- </TR>
+<table>
+ <tr>
+ <td class="label"><&|/l&>Starts</&>:</td>
+ <td class="entry"><& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &>
+ (<% $TicketObj->StartsObj->AsString %>)</td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Started</&>:</td>
+ <td class="entry"><& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)</td>
+ </tr>
- <TR>
- <TD class="label">
+ <tr>
+ <td class="label">
<&|/l&>Last Contact</&>:
- </TD>
- <TD class="entry">
+ </td>
+ <td class="entry">
<& /Elements/SelectDate, menu_prefix => 'Told', current => 0 &> (<% $TicketObj->ToldObj->AsString %>)
- </TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Due</&>:</TD>
- <TD class="entry">
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Due</&>:</td>
+ <td class="entry">
<& /Elements/SelectDate, menu_prefix => 'Due', current => 0 &> (<% $TicketObj->DueObj->AsString %>)
- </TD>
- </TR>
-</TABLE>
+ </td>
+ </tr>
+</table>
<%ARGS>
$TicketObj => undef
</%ARGS>
diff --git a/rt/html/Ticket/Elements/EditPeople b/rt/html/Ticket/Elements/EditPeople
index 055d7ba20..fd23ae0d6 100644
--- a/rt/html/Ticket/Elements/EditPeople
+++ b/rt/html/Ticket/Elements/EditPeople
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,28 +45,28 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
-<TR>
-<TD VALIGN=TOP>
+<table width="100%">
+<tr>
+<td valign="top">
<h3><&|/l&>New watchers</&></h3>
-<&|/l&>Find people whose</&><BR>
+<&|/l&>Find people whose</&><br />
<& /Elements/SelectUsers &>
-<input type=submit name="OnlySearchForPeople" value="<&|/l&>Go!</&>">
-<BR>
-<&|/l&>Find groups whose</&><BR>
+<input type="submit" class="button" name="OnlySearchForPeople" value="<&|/l&>Go!</&>" />
+<br />
+<&|/l&>Find groups whose</&><br />
<& /Elements/SelectGroups &>
-<input type=submit name="OnlySearchForGroup" value="<&|/l&>Go!</&>">
+<input type="submit" class="button" name="OnlySearchForGroup" value="<&|/l&>Go!</&>" />
<& AddWatchers, Ticket => $Ticket, UserString => $UserString,
UserOp => $UserOp, UserField => $UserField,
GroupString => $GroupString, GroupOp => $GroupOp,
GroupField => $GroupField, PrivilegedOnly => $PrivilegedOnly &>
-</TD><TD VALIGN=TOP>
+</td><td valign="top">
<h3><&|/l&>Owner</&></h3>
<&|/l&>Owner</&>: <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->OwnerObj->Id, DefaultValue => 0&>
<h3><&|/l&>Current watchers</&></h3>
-<&|/l&>(Check box to delete)</&><br>
+<&|/l&>(Check box to delete)</&><br />
<&|/l&>Requestors</&>:
<& EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->Requestors &>
@@ -75,9 +77,9 @@
<&|/l&>Administrative Cc</&>:
<& EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->AdminCc &>
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
<%ARGS>
$UserField => undef
diff --git a/rt/html/Ticket/Elements/EditWatchers b/rt/html/Ticket/Elements/EditWatchers
index 0089932f4..918dddb68 100644
--- a/rt/html/Ticket/Elements/EditWatchers
+++ b/rt/html/Ticket/Elements/EditWatchers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,20 +48,25 @@
<ul>
%# Print out a placeholder if there are none.
%if ($Members->Count == 0 ) {
-<li><i><&|/l&>none</&></i>
+<li><i><&|/l&>none</&></i></li>
% }
%while (my $watcher=$Members->Next) {
<li>
-<INPUT TYPE=CHECKBOX NAME="Ticket-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1" UNCHECKED>
+<input type="checkbox" class="checkbox" name="Ticket-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1" unchecked />
%if ($watcher->MemberObj->IsUser) {
<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->MemberObj->Object->id%>">
-<%$watcher->MemberObj->Object->Name%></a>
+<%$watcher->MemberObj->Object->Name%></a>
+% if ($TicketObj and grep { $_->Content eq $watcher->MemberObj->Object->EmailAddress } $TicketObj->SquelchMailTo) {
+<b><&|/l&>(Will not be sent email)</&></b>
+% }
+
%} else {
<a href="<%$RT::WebPath%>/Admin/Groups/Modify.html?id=<%$watcher->MemberObj->Object->id%>">
<%$watcher->MemberObj->Object->Name%></a>
%}
+</li>
% }
</ul>
<%INIT>
diff --git a/rt/html/Ticket/Elements/FindAttachments b/rt/html/Ticket/Elements/FindAttachments
index 017c77288..a9d698d31 100755
--- a/rt/html/Ticket/Elements/FindAttachments
+++ b/rt/html/Ticket/Elements/FindAttachments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Ticket/Elements/LoadTextAttachments b/rt/html/Ticket/Elements/LoadTextAttachments
index 943568fb3..fc83d6605 100755
--- a/rt/html/Ticket/Elements/LoadTextAttachments
+++ b/rt/html/Ticket/Elements/LoadTextAttachments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -80,7 +82,9 @@ if ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
$attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text/plain');
$attachments->Limit ( FIELD => 'ContentType', OPERATOR => 'STARTSWITH', VALUE => 'message/');
$attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text');
-
+ if ($RT::SuppressInlineTextFiles) {
+ $attachments->Limit ( FIELD => 'Filename', OPERATOR => 'IS', VALUE => 'NULL');
+ }
}
return ($attachments);
</%INIT>
diff --git a/rt/html/Ticket/Elements/PreviewScrips b/rt/html/Ticket/Elements/PreviewScrips
index 491f8e3f3..423040c8e 100755
--- a/rt/html/Ticket/Elements/PreviewScrips
+++ b/rt/html/Ticket/Elements/PreviewScrips
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -94,23 +96,24 @@ unless ( $Transaction ) {
my @non_recipients = $TicketObj->SquelchMailTo;
</%init>
<h2><&|/l&>This message will be sent to...</&></h2>
+
% if ( $Object ) {
-<i><&|/l&>(Check boxes to disable notifications to the listed recipients)</&></i><br>
+<i><&|/l&>(Check boxes to disable notifications to the listed recipients)</&></i><br />
% foreach my $scrip (@{$Object->Scrips->Prepared}) {
% next unless $scrip->ActionObj->Action->isa('RT::Action::SendEmail');
-<b><% $scrip->Description %></b><br>
+<b><% $scrip->Description %></b><br />
<&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name)&>[_1] [_2] with template [_3]</&>
-<br>
+<br />
%foreach my $type qw(To Cc Bcc) {
%my @addresses = $scrip->ActionObj->Action->$type();
<ul>
%foreach my $addr (@addresses) {
-<li> <b><%loc($type)%></b>: <input type="checkbox" name="Ticket-<%$TicketObj->id%>-SquelchMailTo" value="<%$addr->address%>"> <%$addr->address%>
+<li> <b><%loc($type)%></b>: <input type="checkbox" class="checkbox" name="Ticket-<%$TicketObj->id%>-SquelchMailTo" value="<%$addr->address%>" /> <%$addr->address%>
% }
</ul>
% }
% if ($RT::PreviewScripMessages) {
-<textarea cols=80 rows="5">
+<textarea cols="80" rows="5">
<%$scrip->ActionObj->TemplateObj->MIMEObj->as_string%>
</textarea>
% }
@@ -120,10 +123,10 @@ my @non_recipients = $TicketObj->SquelchMailTo;
<h2><&|/l&>Messages about this ticket will not be sent to...</&></h2>
<i><&|/l&>(Check boxes to enable notifications to the listed recipients)</&></i>
-<br>
+<br />
<ul>
% foreach my $recipient (@non_recipients) {
-<li><input type="checkbox" name="Ticket-<%$TicketObj->id%>-UnsquelchMailTo" value="<%$recipient->Content%>">
+<li><input type="checkbox" class="checkbox" name="Ticket-<%$TicketObj->id%>-UnsquelchMailTo" value="<%$recipient->Content%>" />
<% $recipient->Content %>
% }
</ul>
diff --git a/rt/html/Ticket/Elements/ShowAttachments b/rt/html/Ticket/Elements/ShowAttachments
index 82028dd28..6f1de620a 100644
--- a/rt/html/Ticket/Elements/ShowAttachments
+++ b/rt/html/Ticket/Elements/ShowAttachments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,13 +46,13 @@
%#
%# END BPS TAGGED BLOCK }}}
% if (keys %documents) {
-<& /Elements/TitleBoxStart, title => loc('Attachments'),
+<&| /Widgets/TitleBox, title => loc('Attachments'),
title_class=> 'inverse',
color => "#336699" &>
% foreach my $key (keys %documents) {
-<%$key%><br>
+<%$key%><br />
<ul>
% foreach my $rev (@{$documents{$key}}) {
@@ -68,7 +70,7 @@ if ($size) {
</%PERL>
<li><font size="-2">
-<A HREF="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>">
+<a href="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>">
<&|/l, $rev->CreatedAsString, $size, $rev->CreatorObj->Name &>[_1] ([_2]) by [_3]</&>
</a>
</font></li>
@@ -77,8 +79,9 @@ if ($size) {
</ul>
% }
-<& /Elements/TitleBoxEnd &>
-<BR>
+</&>
+
+<br />
% }
<%INIT>
diff --git a/rt/html/Ticket/Elements/ShowBasics b/rt/html/Ticket/Elements/ShowBasics
index e5f09f693..631b90927 100644
--- a/rt/html/Ticket/Elements/ShowBasics
+++ b/rt/html/Ticket/Elements/ShowBasics
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -55,18 +57,18 @@
% if ($Ticket->TimeEstimated) {
<tr>
<td class="label time estimated"><&|/l&>Estimated</&>:</td>
- <td class="value time estimated"><&|/l, $Ticket->TimeEstimated &>[_1] min</&></td>
+ <td class="value time estimated"><& ShowTime, minutes => $Ticket->TimeEstimated &></td>
</tr>
% }
% if ($Ticket->TimeWorked) {
<tr>
<td class="label time worked"><&|/l&>Worked</&>:</td>
- <td class="value time worked"><&|/l, $Ticket->TimeWorked &>[_1] min</&></td>
+ <td class="value time worked"><& ShowTime, minutes => $Ticket->TimeWorked &></td>
</tr>
% }
<tr>
<td class="label time left"><&|/l&>Left</&>:</td>
- <td class="value time left"><&|/l, $Ticket->TimeLeft &>[_1] min</&></td>
+ <td class="value time left"><& ShowTime, minutes => $Ticket->TimeLeft &></td>
</tr>
<tr>
<td class="label priority"><&|/l&>Priority</&>:</td>
@@ -74,7 +76,7 @@
</tr>
<tr>
<td class="label queue"><&|/l&>Queue</&>:</td>
- <td class="value queue"><%$Ticket->QueueObj->Name%></td>
+ <td class="value queue"><& ShowQueue, QueueObj => $Ticket->QueueObj &></td>
</tr>
<& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $Ticket, %ARGS &>
</table>
diff --git a/rt/html/Ticket/Elements/ShowCustomFields b/rt/html/Ticket/Elements/ShowCustomFields
index eb49212c5..f307d9dd2 100644
--- a/rt/html/Ticket/Elements/ShowCustomFields
+++ b/rt/html/Ticket/Elements/ShowCustomFields
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Ticket/Elements/ShowDates b/rt/html/Ticket/Elements/ShowDates
index 322fafd99..e00b5ee80 100644
--- a/rt/html/Ticket/Elements/ShowDates
+++ b/rt/html/Ticket/Elements/ShowDates
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,41 +45,41 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TABLE>
- <TR>
- <TD class="label date created"><&|/l&>Created</&>:</TD>
- <TD class="value date created"><% $Ticket->CreatedObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label date starts"><&|/l&>Starts</&>:</TD>
- <TD class="value date starts"><% $Ticket->StartsObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label date started"><&|/l&>Started</&>:</TD>
- <TD class="value date started"><% $Ticket->StartedObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label date told"><a href="<% $RT::WebPath %>/Ticket/Display.html?id=<% $Ticket->id %>&Action=SetTold"><&|/l&>Last Contact</&></a>:</TD>
- <TD class="value date told"><% $Ticket->ToldObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label date due"><&|/l&>Due</&>:</TD>
- <TD class="value date due"><% $Ticket->DueObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label date resolved"><&|/l&>Closed</&>:</TD>
- <TD class="value date resolved"><% $Ticket->ResolvedObj->AsString %></TD>
- </TR>
- <TR>
- <TD class="label date updated"><&|/l&>Updated</&>:</TD>
+<table>
+ <tr>
+ <td class="label date created"><&|/l&>Created</&>:</td>
+ <td class="value date created"><% $Ticket->CreatedObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date starts"><&|/l&>Starts</&>:</td>
+ <td class="value date starts"><% $Ticket->StartsObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date started"><&|/l&>Started</&>:</td>
+ <td class="value date started"><% $Ticket->StartedObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date told"><a href="<% $RT::WebPath %>/Ticket/Display.html?id=<% $Ticket->id %>&Action=SetTold"><&|/l&>Last Contact</&></a>:</td>
+ <td class="value date told"><% $Ticket->ToldObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date due"><&|/l&>Due</&>:</td>
+ <td class="value date due"><% $Ticket->DueObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date resolved"><&|/l&>Closed</&>:</td>
+ <td class="value date resolved"><% $Ticket->ResolvedObj->AsString %></td>
+ </tr>
+ <tr>
+ <td class="label date updated"><&|/l&>Updated</&>:</td>
% my $UpdatedString = $Ticket->LastUpdated ? loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name) : loc("Never");
% if ($UpdatedLink) {
- <TD class="value date updated"><A HREF="#lasttrans"><% $UpdatedString | h %></a></TD>
+ <td class="value date updated"><A HREF="#lasttrans"><% $UpdatedString | h %></a></td>
% } else {
- <TD class="value date updated"><% $UpdatedString | h %></TD>
+ <td class="value date updated"><% $UpdatedString | h %></td>
% }
- </TR>
-</TABLE>
+ </tr>
+</table>
<%ARGS>
$Ticket => undef
$UpdatedLink => 1
diff --git a/rt/html/Ticket/Elements/ShowDependencies b/rt/html/Ticket/Elements/ShowDependencies
index f276bc949..b2f4d298d 100644
--- a/rt/html/Ticket/Elements/ShowDependencies
+++ b/rt/html/Ticket/Elements/ShowDependencies
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,19 +45,19 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&|/l&>Depends on</&>:<BR>
+<&|/l&>Depends on</&>:<br />
% while (my $Link = $Ticket->DependsOn->Next) {
% my $member = $Link->TargetObj;
<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
[<%$member->Status%>]
- <br>
+ <br />
% }
-<&|/l&>Depended on by</&>:<BR>
+<&|/l&>Depended on by</&>:<br />
% while (my $Link = $Ticket->DependedOnBy->Next) {
% my $member = $Link->TargetObj;
<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
[<%$member->Status%>]
- <br>
+ <br />
% }
<%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowGroupMembers b/rt/html/Ticket/Elements/ShowGroupMembers
index 1fdb79aab..e39bc690e 100644
--- a/rt/html/Ticket/Elements/ShowGroupMembers
+++ b/rt/html/Ticket/Elements/ShowGroupMembers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,14 +49,15 @@
% my $UserMembers = $Group->UserMembersObj;
% while (my $member = $UserMembers->Next()) {
-<& ShowUserEntry, User => $member &><br>
+<& ShowUserEntry, User => $member, Ticket => $Ticket &><br />
% }
% my $GroupMembers = $Group->MembersObj;
% $GroupMembers->LimitToGroups();
% while (my $member = $GroupMembers->Next()) {
-<&|/l&>Group</&>: <%$member->MemberObj->Object->Name%><br>
+<&|/l&>Group</&>: <%$member->MemberObj->Object->Name%><br />
% }
<%ARGS>
$Group => undef
-</%ARGS> \ No newline at end of file
+$Ticket => undef
+</%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowHistory b/rt/html/Ticket/Elements/ShowHistory
index 878e2535c..45cd5122f 100644
--- a/rt/html/Ticket/Elements/ShowHistory
+++ b/rt/html/Ticket/Elements/ShowHistory
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,47 +45,45 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+<%doc>
+# This is (ab)used in Admin/(Users|Groups)/History.html and should probably
+# be generalized at some point.
+</%doc>
<%perl>
- if ($ShowDisplayModes or $ShowTitle) {
-my $title;
-my $titleright;
-if ($ShowTitle) {
- $title = loc('History');
-}
-else {
- $title = '&nbsp;';
-}
-$titleright = loc('Display mode') . ":";
-if ($ShowHeaders) {
- $titleright .= "[<A HREF=\"" . $URIFile . "?id="
- . $Ticket->id . "\">"
- . loc("Brief headers")
- . "</a>] <b>["
- . loc("Full headers") . "]</b>";
-}
-else {
- $titleright .= "<b>["
- . loc("Brief headers")
- . "]</b> [<A HREF=\""
- . $URIFile
- . "?ShowHeaders=1"
- . "&id="
- . $Ticket->id . "\">"
- . loc("Full headers") . "</a>]";
-}
+if ($ShowDisplayModes or $ShowTitle) {
+ my $title = $ShowTitle
+ ? loc('History')
+ : '&nbsp;';
+
+ my $titleright;
+
+ if ($ShowDisplayModes) {
+ $titleright = q[<span style="color: black">] . loc('Display mode') . ':</span> ';
+
+ if ($ShowHeaders) {
+ $titleright .= qq{<a href="$URIFile?id=} .
+ $Ticket->id.qq{">} .
+ loc("Brief headers") .
+ qq{</a> &mdash; };
+ $titleright .= q[<span class="selected">] . loc("Full headers") . "</span>";
+ }
+ else {
+ $titleright .= q[<span class="selected">] . loc("Brief headers") . "</span> &mdash; ";
+ $titleright .= qq{<a href="$URIFile?ShowHeaders=1;id=} .
+ $Ticket->id.qq{">} .
+ loc("Full headers") .
+ qq{</a>};
+ }
+ }
</%perl>
-<& /Elements/TitleBoxStart, title => $title, titleright => $titleright, bodyclass=> ''&>
+<& /Widgets/TitleBoxStart, title => $title, titleright => $titleright &>
% }
-<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=2 BORDER=0>
+<div id="ticket-history">
<%perl>
my @attachments = @{$Attachments->ItemsArrayRef()};
my @attachment_content = @{$AttachmentContent->ItemsArrayRef()};
-
-
-
-
while ( my $Transaction = $Transactions->Next ) {
my $skip = 0;
$m->comp( '/Elements/Callback',
@@ -123,9 +123,9 @@ $m->flush_buffer();
}
</%perl>
-</TABLE>
+</div>
% if ($ShowDisplayModes or $ShowTitle) {
-<& /Elements/TitleBoxEnd &>
+<& /Widgets/TitleBoxEnd &>
% }
<%INIT>
my $Transactions = new RT::Transactions($session{'CurrentUser'});
diff --git a/rt/html/Ticket/Elements/ShowMembers b/rt/html/Ticket/Elements/ShowMembers
index f4fec1c7c..f87ce8fc9 100644
--- a/rt/html/Ticket/Elements/ShowMembers
+++ b/rt/html/Ticket/Elements/ShowMembers
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,21 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% if ($members->Count) {
-<UL>
+<ul>
% while (my $link = $members->Next) {
-% my $member= $link->BaseObj;
-<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: <%$member->Subject%> [<%loc($member->Status)%>]<br>
+<li><& /Elements/ShowLink, URI => $link->BaseURI &><br />
% if ($depth < 8) {
-<&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &>
+<& /Ticket/Elements/ShowMembers, Ticket => $link->BaseObj, depth => ($depth+1) &>
% }
+</li>
% }
-</UL>
-% }
+</ul>
<%INIT>
my $members = $Ticket->Members;
+return unless $members->Count;
</%INIT>
diff --git a/rt/html/Ticket/Elements/ShowMessageHeaders b/rt/html/Ticket/Elements/ShowMessageHeaders
index 8dc76bae3..81c56375d 100644
--- a/rt/html/Ticket/Elements/ShowMessageHeaders
+++ b/rt/html/Ticket/Elements/ShowMessageHeaders
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,14 +45,15 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% use Data::Dumper;
<table>
% foreach my $header (@headers) {
-% next unless ($display_headers{'_all'} || $display_headers{lc($header->{'Tag'})});
-<tr>
-<td align="right" class="message-header-key"><%$header->{'Tag'}%>:</td>
-<td class="message-header-value"><%$header->{'Value'} | n%></td>
-</tr>
+% next unless $display_headers{_all}
+% or ($display_headers{ lc $header->{Tag} }
+% and length $header->{Value});
+ <tr>
+ <td align="right" class="message-header-key"><%$header->{'Tag'}%>:</td>
+ <td class="message-header-value"><%$header->{'Value'} | n%></td>
+ </tr>
% }
</table>
<%INIT>
@@ -61,23 +64,24 @@ $m->comp('/Elements/Callback', content => \$content, %ARGS);
# we'll display the value without escaping later (for MakeClicky et al.)
$content = $m->interp->apply_escapes($content, 'h');
-my @lines = split (/\n/,$content);
+my @lines = split /\n/, $content;
my $in_header = 0;
-my @headers =();
-foreach (@lines) {
+my @headers;
+
+for (@lines) {
if (/^(\S+):\s+(.*)$/) {
- push (@headers, { Tag => $1, Value => $2} );
- } elsif ($headers[-1]) {
+ push @headers, { Tag => $1, Value => $2 };
+ }
+ elsif (/^\s+/) {
$headers[-1]->{'Value'} .= $_;
- } else {
-
- push (@headers, { Tag => $_, Value => ''} );
+ }
+ else {
+ s/:$//;
+ push @headers, { Tag => $_, Value => '' };
}
}
-my %display_headers;
-
-map { $display_headers{lc($_)} = 1 } @$DisplayHeaders;
+my %display_headers = map { lc($_) => 1 } @$DisplayHeaders;
$m->comp('/Elements/Callback', _CallbackName => 'Headers', content => \$content, headers => \@headers, display_headers => \%display_headers, %ARGS);
diff --git a/rt/html/Ticket/Elements/ShowMessageStanza b/rt/html/Ticket/Elements/ShowMessageStanza
index eaf551de9..8040096f1 100644
--- a/rt/html/Ticket/Elements/ShowMessageStanza
+++ b/rt/html/Ticket/Elements/ShowMessageStanza
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -44,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
% if (ref($Message)) {
-<font color="<%$colors[$Depth]%>">
+<div class="message-stanza-depth-<% $Depth %>">
<%perl>
foreach my $stanza (@$Message) {
if ( ref $stanza eq "ARRAY" ) {
@@ -57,24 +59,23 @@ foreach my $stanza (@$Message) {
my $content = $stanza->{raw};
RT::Interface::Web::EscapeUTF8(\$content);
$m->comp('/Elements/Callback', content => \$content, %ARGS);
- $content =~ s/\n/<br>/gi if defined $content;
+ $content =~ s{$}{<br />}mg
+ if defined $content;
</%perl>
-<%$content |n%><br>
-% }
+<%$content |n%>
+% }
% } # end foreach
-</font>
+</div>
% } else {
-% my $content = $Message;
-% RT::Interface::Web::EscapeUTF8(\$content);
-% $m->comp('/Elements/Callback', content => \$content, %ARGS);
-% $content =~ s/\n/<br>/gi;
-<%$content |n%><br>
+% my $content = $Message;
+% RT::Interface::Web::EscapeUTF8(\$content);
+% $m->comp('/Elements/Callback', content => \$content, %ARGS);
+% $content =~ s{$}{<br />}mg;
+<%$content |n%>
% }
<%INIT>
use URI::URL;
-my $server = 'fsck.com';
-my @colors = ('#000000', '#660000', '#006600', '#000066', '#cc0000', '#00cc00', '#0000cc', '#ff0000', '#00ff00', '#0000ff');
</%INIT>
<%ARGS>
$Message => undef
diff --git a/rt/html/Ticket/Elements/ShowPeople b/rt/html/Ticket/Elements/ShowPeople
index dbec93928..76336ecdc 100644
--- a/rt/html/Ticket/Elements/ShowPeople
+++ b/rt/html/Ticket/Elements/ShowPeople
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,19 +48,19 @@
<table>
<tr>
<td class="label"><&|/l&>Owner</&>:</td>
- <td class="value"><& ShowUserEntry, User => $Ticket->OwnerObj &></td>
+ <td class="value"><& ShowUserEntry, User => $Ticket->OwnerObj, Ticket => $Ticket &></td>
</tr>
<tr>
<td class="labeltop"><&|/l&>Requestors</&>:</td>
- <td class="value"><& ShowGroupMembers, Group => $Ticket->Requestors &></td>
+ <td class="value"><& ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket &></td>
</tr>
<tr>
<td class="labeltop"><&|/l&>Cc</&>:</td>
- <td class="value"><& ShowGroupMembers, Group => $Ticket->Cc &></td>
+ <td class="value"><& ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket &></td>
</tr>
<tr>
<td class="labeltop"><&|/l&>AdminCc</&>:</td>
- <td class="value"><& ShowGroupMembers, Group => $Ticket->AdminCc &></td>
+ <td class="value"><& ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &></td>
</tr>
</table>
<%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowQueue b/rt/html/Ticket/Elements/ShowQueue
new file mode 100644
index 000000000..484760244
--- /dev/null
+++ b/rt/html/Ticket/Elements/ShowQueue
@@ -0,0 +1,9 @@
+<% $QueueObj->Name %>
+<%ARGS>
+$QueueObj
+</%ARGS>
+<%INIT>
+my $value = $QueueObj->Name;
+$value = '#'. $QueueObj->id
+ unless defined $value && length $value;
+</%INIT>
diff --git a/rt/html/Ticket/Elements/ShowRequestor b/rt/html/Ticket/Elements/ShowRequestor
index 57bfa0e55..d7fe6b185 100644
--- a/rt/html/Ticket/Elements/ShowRequestor
+++ b/rt/html/Ticket/Elements/ShowRequestor
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,6 +47,7 @@
%# END BPS TAGGED BLOCK }}}
<%PERL>
my $rows = 10;
+my $has_right_adminusers = $session{'CurrentUser'}->HasRight(Object => $RT::System, Right => 'AdminUsers');
my $people = $Ticket->Requestors->UserMembersObj;
while (my $requestor=$people->Next) {
next if $requestor->Privileged;
@@ -55,27 +58,29 @@ $tickets->RowsPerPage($rows);
$tickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC');
</%PERL>
-<& /Elements/TitleBoxStart,
- title => "<a class='inverse' href=\"$RT::WebPath/Admin/Users/Modify.html?id=".$requestor->id."\">".loc("More about [_1]", $name)."</a>" &>
+<&| /Widgets/TitleBox,
+ title_href => $has_right_adminusers ? "$RT::WebPath/Admin/Users/Modify.html?id=".$requestor->id : undef,
+ title=> loc("More about [_1]", $name),
+&>
%# Additional information about this user. Empty by default.
<& /Elements/Callback, _CallbackName => 'AboutThisUser', requestor => $requestor, %ARGS &>
-<&|/l&>Comments about this user</&>:<BR>
-<B><% ($requestor->Comments || loc("No comment entered about this user")) %></B><BR>
+<&|/l&>Comments about this user</&>:<br />
+<b><% ($requestor->Comments || loc("No comment entered about this user")) %></b><br />
-<&|/l, $rows &>This user's [_1] highest priority tickets</&>:<BR>
-<UL>
+<&|/l, $rows &>This user's [_1] highest priority tickets</&>:<br />
+<ul>
%while (my $w=$tickets->Next) {
-<LI><a href="<%$RT::WebPath%><%$DisplayPath%>?id=<%$w->id%>"><%$w->Id%>: <%$w->Subject%></a> (<%$w->Status%>)
+<li><a href="<%$RT::WebPath%><%$DisplayPath%>?id=<%$w->id%>"><%$w->Id%>: <%$w->Subject%></a> (<%$w->Status%>)
%}
-</UL>
+</ul>
-<&|/l&>Groups this user belongs to</&>:<BR>
+<&|/l&>Groups this user belongs to</&>:<br />
<& /Elements/ShowMemberships, UserObj => $requestor &>
-<& /Elements/TitleBoxEnd &>
+</&>
%}
<%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary
index b3e59edb3..ffd71d3f9 100644
--- a/rt/html/Ticket/Elements/ShowSummary
+++ b/rt/html/Ticket/Elements/ShowSummary
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,62 +45,65 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
- <TABLE WIDTH="100%" class="ticketsummary" >
- <TR>
- <TD VALIGN=TOP WIDTH="50%" class="boxcontainer">
- <& /Elements/TitleBoxStart, title => loc('The Basics'),
+ <table width="100%" class="ticket-summary">
+ <tr>
+ <td valign="top" width="50%" class="boxcontainer">
+ <&| /Widgets/TitleBox, title => loc('The Basics'),
title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id,
- title_class=> 'inverse',
- color => "#993333" &>
+ class => 'ticket-info-basics' &>
<& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
- <br>
+ </&>
+
% if ($Ticket->QueueObj->TicketCustomFields->First) {
- <& /Elements/TitleBoxStart, title => loc('Custom Fields'),
+ <&| /Widgets/TitleBox, title => loc('Custom Fields'),
title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id,
- title_class=> 'inverse',
- color => "#993333" &>
+ class => 'ticket-info-cfs' &>
<& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
-
-<br>
+ </&>
% }
- <& /Elements/TitleBoxStart, title => loc('People'),
+ <&| /Widgets/TitleBox, title => loc('People'),
title_href =>"$RT::WebPath/Ticket/ModifyPeople.html?id=".$Ticket->Id,
- title_class=> 'inverse',
- color => "#333399" &>
- <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
- <BR>
+ class => 'ticket-info-people' &>
+ <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
+ </&>
- <& /Elements/Callback, %ARGS, _CallbackName => 'LeftColumn' &>
-
- </TD>
- <TD VALIGN=TOP WIDTH="50%" class="boxcontainer">
+ <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
+ <br />
+ <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
- <& /Elements/TitleBoxStart, title => loc("Dates"),
+ <& /Elements/Callback, %ARGS, _CallbackName => 'LeftColumn' &>
+ </td>
+ <td valign="top" width="50%" class="boxcontainer">
+ <&|/Widgets/TitleBox, title => loc("Reminders"),
+ title_href =>"$RT::WebPath/Ticket/Reminders.html?id=".$Ticket->Id,
+ class => 'ticket-info-reminders' &>
+ <table>
+ <tr>
+ <td>
+ <form action="<%$RT::WebPath%>/Ticket/Display.html" method="post">
+ <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 0 &>
+ <div align="right"><input type="submit" class="button" value="Save" /></div>
+ </form>
+ </td>
+ </tr>
+ </table>
+ </&>
+ <&| /Widgets/TitleBox, title => loc("Dates"),
title_href =>"$RT::WebPath/Ticket/ModifyDates.html?id=".$Ticket->Id,
- title_class=> 'inverse',
- color => "#663366" &>
+ class => 'ticket-info-dates' &>
<& /Ticket/Elements/ShowDates, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
- <BR>
- <& /Elements/TitleBoxStart, title => loc('Links'),
+ </&>
+
+ <&| /Widgets/TitleBox, title => loc('Links'),
title_href => "$RT::WebPath/Ticket/ModifyLinks.html?id=".$Ticket->Id,
- title_class=> 'inverse',
- titleright => '', color=> "#336633" &>
+ class => 'ticket-info-links' &>
<& /Elements/ShowLinks, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
- <BR>
- <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
-
- <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
-
+ </&>
<& /Elements/Callback, %ARGS, _CallbackName => 'RightColumn' &>
- </TD>
- </TR>
- </TABLE>
+ </td>
+ </tr>
+ </table>
<%ARGS>
$Ticket => undef
$Attachments => undef
diff --git a/rt/html/Ticket/Elements/ShowTransaction b/rt/html/Ticket/Elements/ShowTransaction
index 8bf589d45..f6d73c2f5 100644
--- a/rt/html/Ticket/Elements/ShowTransaction
+++ b/rt/html/Ticket/Elements/ShowTransaction
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,25 +45,33 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<TR class="<% $RowNum%2 ? 'oddline' : 'evenline'%>" >
-<TD rowspan="2" valign="top" bgcolor="<%$bgcolor%>"><A NAME="txn-<%$Transaction->Id%>" href="<% $DisplayPath %>#txn-<%$Transaction->Id%>">#</A><% $LastTransaction ? '<a name="lasttrans">&nbsp;</a>' : '&nbsp;' |n %></TD>
-<TD>&nbsp&nbsp;</TD>
-<TD><font size=-2><% $transdate|n %></font>&nbsp;</TD>
+<div class="ticket-transaction<% $type_class && " $type_class" %><% $RowNum % 2 ? ' odd' : ' even' %>">
+<table width="100%" cellspacing="0" cellpadding="2" border="0">
+ <tr>
+ <td rowspan="2" valign="top" class="type">
+ <a name="txn-<%$Transaction->Id%>" href="<% $DisplayPath %>#txn-<%$Transaction->Id%>">#</a>
+ <% $LastTransaction ? '<a name="lasttrans">&nbsp;</a>' : '&nbsp;' |n %>
+ </td>
+ <td class="date"><% $transdate|n %></td>
% my $desc = $Transaction->BriefDescription;
% $m->comp('/Elements/Callback', _CallbackName => 'ModifyDisplay', text => \$desc, Transaction => $Transaction, %ARGS);
-<TD ALIGN="LEFT"><b><%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$desc%>
-
-</b></TD>
-<TD><%$TimeTaken%>&nbsp;</TD>
-<TD ALIGN="RIGHT"><font size=-1><%$titlebar_commands|n%></font></TD>
-</TR>
-<TR class="<% $RowNum%2 ? 'oddline' : 'evenline'%>"><TD colspan=5>
+ <td class="description">
+ <%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$desc%>
+ </td>
+ <td class="time-taken"><%$TimeTaken%></td>
+ <td class="actions"><%$titlebar_commands|n%></td>
+ </tr>
+
+ <tr>
+ <td colspan="4" class="content">
% if ($Transaction->CustomFieldValues->Count) {
-<& /Elements/ShowCustomFields, Object => $Transaction &>
+ <& /Elements/ShowCustomFields, Object => $Transaction &>
% }
% $m->comp('ShowTransactionAttachments', %ARGS, Parent => 0) unless ($Collapsed ||!$ShowBody);
-</TD>
-</TR>
+ </td>
+ </tr>
+</table>
+</div>
<%ARGS>
$Ticket => undef
@@ -82,37 +92,37 @@ $LastTransaction => 0
<%INIT>
-my ( $TimeTaken, $TicketString, $bgcolor );
+my ( $TimeTaken, $TicketString, $type_class );
my $transdate = $Transaction->CreatedAsString();
$transdate =~ s/\s/&nbsp;/g;
if ( $Transaction->Type =~ /^(Create|Correspond|Comment$)/ ) {
if ( $Transaction->IsInbound ) {
- $bgcolor = "#336699";
+ $type_class = 'message';
}
else {
- $bgcolor = "#339999";
+ $type_class = 'message';
}
}
elsif ( ( $Transaction->Field =~ /^Owner$/ )
or ( $Transaction->Type =~ /^(AddWatcher|DelWatcher)$/ ) ) {
- $bgcolor = "#333399";
+ $type_class = 'people';
}
elsif ( $Transaction->Type =~ /^(AddLink|DeleteLink)$/ ) {
- $bgcolor = "#336633";
+ $type_class = 'links';
}
elsif ( $Transaction->Type =~ /^(Status|Set|Told)$/ ) {
if ( $Transaction->Field =~ /^(Told|Starts|Started|Due)$/ ) {
- $bgcolor = "#663366";
+ $type_class = 'dates';
}
else {
- $bgcolor = "#993333";
+ $type_class = 'basics';
}
}
else {
- $bgcolor = "#cccccc";
+ $type_class = 'other';
}
if ( $Ticket->Id != $Transaction->Ticket ) {
@@ -144,9 +154,7 @@ if ( $Transaction->Type =~ /EmailRecord$/ ) {
. "&Transaction="
. $Transaction->Id
. "&Attachment="
- . ( $Transaction->Attachments->First
- && $Transaction->Attachments->First->Id )
-
+ . ( $Attachments->[0] && $Attachments->[0]->id )
. '">' . loc('Show') . "</a>]&nbsp;";
$ShowBody = 0;
}
diff --git a/rt/html/Ticket/Elements/ShowTransactionAttachments b/rt/html/Ticket/Elements/ShowTransactionAttachments
index d9e94ffa2..958123714 100644
--- a/rt/html/Ticket/Elements/ShowTransactionAttachments
+++ b/rt/html/Ticket/Elements/ShowTransactionAttachments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -79,10 +81,10 @@ foreach my $message ( grep { $_->Parent == $Parent } @$Attachments ) {
}
</%PERL>
-<A HREF="<%$AttachPath%>/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename | u%>"><&|/l&>Download</&> <%$message->Filename || loc('(untitled)') %></a>
-<div class="downloadcontenttype">
-<%$message->ContentType%> <% $size %>
-</div>
+<a href="<%$AttachPath%>/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename | u%>"><&|/l&>Download</&> <%$message->Filename || loc('(untitled)') %></a>
+<span class="downloadcontenttype">
+[<%$message->ContentType%> <% $size %>]
+</span>
</div>
% }
% # }}}
@@ -95,6 +97,7 @@ unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) {
# If it's text
if ( $message->ContentType =~ m{^(text|message)}i
+ && !($RT::SuppressInlineTextFiles && $message->Filename)
&& $message->ContentLength <= $RT::MaxInlineBody )
{
@@ -136,7 +139,7 @@ unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) {
# if it's a text/plain show the body
elsif ( $message->ContentType =~ m{^(text|message|text)}i ) {
- eval { $content = Text::Quoted::extract($content); };
+ eval { require Text::Quoted; $content = Text::Quoted::extract($content); };
if ($@) { 1; }
$m->comp(
@@ -151,12 +154,12 @@ unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) {
}
# if it's an image, show it as an image
- elsif ( $message->ContentType =~ /^image\//i ) {
+ elsif ( $RT::ShowTransactionImages and $message->ContentType =~ /^image\//i ) {
$m->out('<img src="'
. $AttachPath . '/'
. $Transaction->Id . '/'
. $message->Id
- . '/">' );
+ . '/" />' );
}
elsif ( $message->ContentLength > 0 ) {
$m->out(
@@ -173,9 +176,9 @@ $m->comp(
ParentObj => $message
);
-}
</%PERL>
</div>
+% }
<%ARGS>
$Ticket => undef
$Transaction => undef
diff --git a/rt/html/Ticket/Elements/ShowUserEntry b/rt/html/Ticket/Elements/ShowUserEntry
index 163bcbdb1..8481c143b 100644
--- a/rt/html/Ticket/Elements/ShowUserEntry
+++ b/rt/html/Ticket/Elements/ShowUserEntry
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,7 +51,11 @@
% if ($User->EmailAddress && $User->EmailAddress ne $User->Name) {
&lt;<%$User->EmailAddress%>&gt;
% }
+% if ($Ticket and grep { $_->Content eq $User->EmailAddress } $Ticket->SquelchMailTo) {
+<b><&|/l&>(Will not be sent email)</&></b>
+% }
<%ARGS>
$User => undef
-</%ARGS> \ No newline at end of file
+$Ticket => undef
+</%ARGS>
diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs
index 1a5058691..1eb2aa8cf 100644
--- a/rt/html/Ticket/Elements/Tabs
+++ b/rt/html/Ticket/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -119,9 +121,11 @@ my $ticket_page_tabs = {
{ title => loc('People'), path => "Ticket/ModifyPeople.html?id=" . $id, },
_E => { title => loc('Links'),
path => "Ticket/ModifyLinks.html?id=" . $id, },
- _F => { title => loc('Jumbo'),
- path => "Ticket/ModifyAll.html?id=" . $id,
- separator => 1
+ _F => { title => loc('Reminders'),
+ path => "Ticket/Reminders.html?id=" . $id,
+ separator => 1, },
+ _X => { title => loc('Jumbo'),
+ path => "Ticket/ModifyAll.html?id=" . $id,
},
};
@@ -136,76 +140,102 @@ foreach my $tab ( sort keys %{$ticket_page_tabs} ) {
$tabs->{'this'}->{"subtabs"} = $ticket_page_tabs;
$current_tab = "Ticket/Display.html?id=" . $id;
+my %can = (
+ ModifyTicket => $Ticket->CurrentUserHasRight('ModifyTicket'),
+);
-
-
-
-if ( $Ticket->CurrentUserHasRight('ModifyTicket')
- or $Ticket->CurrentUserHasRight('ReplyToTicket') ) {
- $actions->{'A'} = { title => loc('Reply'),
- path => "Ticket/Update.html?Action=Respond&id=" . $id,
+if ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('ReplyToTicket') ) {
+ $actions->{'F'} = {
+ title => loc('Reply'),
+ path => "Ticket/Update.html?Action=Respond&id=" . $id,
};
}
-if ( $Ticket->CurrentUserHasRight('ModifyTicket') ) {
+if ( $can{'ModifyTicket'} ) {
if ( $Ticket->Status ne 'resolved' ) {
- $actions->{'B'} = {
-
+ $actions->{'G'} = {
path => "Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=" . $id,
title => loc('Resolve') };
}
if ( $Ticket->Status ne 'open' ) {
- $actions->{'C'} = { path => "Ticket/Display.html?Status=open&id=" . $id,
+ $actions->{'A'} = { path => "Ticket/Display.html?Status=open&id=" . $id,
title => loc('Open it') };
}
}
if ( $Ticket->CurrentUserHasRight('OwnTicket') ) {
- if ( $Ticket->OwnerObj->id == $RT::Nobody->id ) {
- $actions->{'D'} = { path => "Ticket/Display.html?Action=Take&id=" . $id,
- title => loc('Take') };
+ if ( $Ticket->OwnerObj->Id == $RT::Nobody->id
+ and ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('TakeTicket') ) )
+ {
+ $actions->{'B'} = {
+ path => "Ticket/Display.html?Action=Take&id=" . $id,
+ title => loc('Take'),
+ };
}
- elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id ) {
- $actions->{'E'} = {path => "Ticket/Display.html?Action=Steal&id=" . $id,
- title => loc('Steal') };
+ elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id
+ and ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('StealTicket') ) )
+ {
+ $actions->{'C'} = {
+ path => "Ticket/Display.html?Action=Steal&id=" . $id,
+ title => loc('Steal'),
+ };
}
}
-if ( $Ticket->CurrentUserHasRight('ModifyTicket')
- or $Ticket->CurrentUserHasRight('CommentOnTicket') ) {
- $actions->{'F'} = { title => loc('Comment'),
- path => "Ticket/Update.html?Action=Comment&id=" . $id,
+if ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('CommentOnTicket') ) {
+ $actions->{'E'} = {
+ title => loc('Comment'),
+ path => "Ticket/Update.html?Action=Comment&id=" . $id,
};
}
}
-my $args = "?" . $m->comp(
+if ( (defined $actions->{A} || defined $actions->{B} || defined $actions->{C})
+ && (defined $actions->{E} || defined $actions->{F} || defined $actions->{G}) ) {
+
+ if (defined $actions->{C}) { $actions->{C}->{separator} = 1 }
+ elsif (defined $actions->{B}) { $actions->{B}->{separator} = 1 }
+ elsif (defined $actions->{A}) { $actions->{A}->{separator} = 1 }
+}
+
+my $args;
+$args= "?" . $m->comp(
'/Elements/QueryString',
Query => $ARGS{'Query'} || $session{'CurrentSearchHash'}->{'Query'},
Format => $ARGS{'Format'} || $session{'CurrentSearchHash'}->{'Format'},
OrderBy => $ARGS{'OrderBy'} || $session{'CurrentSearchHash'}->{'OrderBy'},
Order => $ARGS{'Order'} || $session{'CurrentSearchHash'}->{'Order'},
+ Page => $ARGS{'Page'} || $session{'CurrentSearchHash'}->{'Page'},
Rows => $ARGS{'Rows'},
) if ($ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'});
$args ||= '';
$tabs->{"f"} = { path => "Search/Build.html?NewQuery=1",
- title => loc('New Query')};
+ title => loc('New Search')};
$tabs->{"g"} = { path => "Search/Build.html$args",
- title => loc('Query Builder')};
+ title => loc('Edit Search')};
$tabs->{"h"} = { path => "Search/Edit.html$args",
title => loc('Advanced'),
separator => 1 };
-if (defined $session{'tickets'} and $session{'tickets'}->Count) {
+if ($args) {
$tabs->{"i"} = { path => "Search/Results.html$args",
title => loc('Show Results'),
- separator => 1,
- subtabs => $searchtabs };
+ };
if ($current_tab =~ "Search/Results.html") {
$current_tab = "Search/Results.html$args";
}
+ $tabs->{"j"} = { path => "Search/Bulk.html$args",
+ title => loc('Bulk Update'),
+ };
+ if ($current_tab =~ "Search/Bulk.html") {
+ $current_tab = "Search/Bulk.html$args";
+ }
+ foreach my $searchtab (keys %{$searchtabs}) {
+ ($searchtab =~ /^_/) ? $tabs->{"s".$searchtab} = $searchtabs->{$searchtab} : $tabs->{"z_".$searchtab} = $searchtabs->{$searchtab};
+ }
}
+
</%INIT>
diff --git a/rt/html/Ticket/History.html b/rt/html/Ticket/History.html
index a80cd0002..bf533b304 100644
--- a/rt/html/Ticket/History.html
+++ b/rt/html/Ticket/History.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,7 +50,7 @@
Ticket => $Ticket, current_tab => 'Ticket/History.html?id='.$Ticket->id,
Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &>
-<BR>
+<br />
<& /Ticket/Elements/ShowHistory ,
Ticket => $Ticket,
@@ -58,6 +60,8 @@
AttachmentContent => $attachment_content
&>
+<& /Elements/Callback, _CallbackName => 'AfterShowHistory', Ticket => $Ticket,
+current_tab => 'Ticket/History.html?id=' . $Ticket->id, %ARGS &>
<%ARGS>
$id => undef
diff --git a/rt/html/Ticket/Modify.html b/rt/html/Ticket/Modify.html
index a6c316141..488e0ad46 100644
--- a/rt/html/Ticket/Modify.html
+++ b/rt/html/Ticket/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,13 +51,13 @@
Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="Modify.html" ENCTYPE="multipart/form-data">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$TicketObj->Id%>">
-
-<& /Elements/TitleBoxStart, title => loc('Modify ticket #[_1]',$TicketObj->Id), color=> "#993333", width => "100%" &>
+<form method="post" action="Modify.html" enctype="multipart/form-data">
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<input type="hidden" class="hidden" name="id" value="<%$TicketObj->Id%>" />
+<&| /Widgets/TitleBox, title => loc('Modify ticket #[_1]',$TicketObj->Id) &>
<& Elements/EditBasics, TicketObj => $TicketObj &>
<& Elements/EditCustomFields, TicketObj => $TicketObj &>
-<& /Elements/TitleBoxEnd &>
+</&>
<& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), color => "#993333" &>
</form>
@@ -65,12 +67,16 @@ my $TicketObj = LoadTicket($id);
my $CustomFields = $TicketObj->QueueObj->TicketCustomFields();
# Now let callbacks have a chance at editing %ARGS
-$m->comp('/Elements/Callback', TicketObj => $TicketObj, CustomFields => $CustomFields, %ARGS);
+$m->comp('/Elements/Callback', TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef => \%ARGS);
my @results = ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS);
my @cf_results = ProcessObjectCustomFieldUpdates(Object => $TicketObj, ARGSRef => \%ARGS);
push (@results, @cf_results);
+# undef so that TransactionBatch scrips run and update the ticket
+$TicketObj = undef;
+$TicketObj = LoadTicket($id);
+
# TODO: display the results, even if we can't display the ticket
unless ($TicketObj->CurrentUserHasRight('ShowTicket')) {
diff --git a/rt/html/Ticket/ModifyAll.html b/rt/html/Ticket/ModifyAll.html
index 23cd93570..7f7ae30bd 100644
--- a/rt/html/Ticket/ModifyAll.html
+++ b/rt/html/Ticket/ModifyAll.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,37 +53,37 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="ModifyAll.html" ENCTYPE="multipart/form-data">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>">
+<form method="post" action="ModifyAll.html" enctype="multipart/form-data">
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<input type="hidden" class="hidden" name="id" value="<%$Ticket->Id%>" />
-
-<& /Elements/TitleBoxStart, title => loc('Modify ticket # [_1]', $Ticket->Id), color=> "#993333", width => "100%" &>
+<&| /Widgets/TitleBox, title => loc('Modify ticket # [_1]', $Ticket->Id) &>
<& Elements/EditBasics, TicketObj => $Ticket &>
<& Elements/EditCustomFields, TicketObj => $Ticket &>
-<& /Elements/TitleBoxEnd &>
+</&>
-<BR>
+<br />
-<& /Elements/TitleBoxStart, title => loc('Dates'), width => "100%", color => "#663366" &>
+<&| /Widgets/TitleBox, title => loc('Dates') &>
<& Elements/EditDates, TicketObj => $Ticket &>
-<& /Elements/TitleBoxEnd &>
+</&>
-<BR>
+<br />
-<& /Elements/TitleBoxStart, title => loc('People'),width => "100%", color=> "#333399" &>
+<&| /Widgets/TitleBox, title => loc('People') &>
<& Elements/EditPeople, Ticket => $Ticket, UserField => $UserField, UserString => $UserString, UserOp => $UserOp &>
-<& /Elements/TitleBoxEnd &>
+</&>
-<BR>
+<br />
-<& /Elements/TitleBoxStart, title => loc('Links'), color => "#336633"&>
+<&| /Widgets/TitleBox, title => loc('Links') &>
<& /Elements/EditLinks, Object => $Ticket, Merge => 1 &>
-<& /Elements/TitleBoxEnd &>
+</&>
-<BR>
+<br />
-<& /Elements/TitleBoxStart, title => loc('Update ticket') &>
+<&| /Widgets/TitleBox, title => loc('Update ticket') &>
<table>
<tr>
<td class="label"><&|/l&>Update Type</&>:</td>
@@ -98,29 +100,29 @@
</tr>
<tr>
<td class="label"><&|/l&>Subject</&>:</td>
- <td class="entry"><input name="UpdateSubject" size=60 value="<%$Ticket->Subject%>"></td>
+ <td class="entry"><input name="UpdateSubject" size="60" value="<%$Ticket->Subject%>" /></td>
</tr>
% if (my $TxnCFs = $Ticket->TransactionCustomFields) {
% while (my $CF = $TxnCFs->Next()) {
-<TR>
-<TD class="label"><% $CF->Name %>:</TD>
-<TD class="entry"><& /Elements/EditCustomField,
+<tr>
+<td class="label"><% $CF->Name %>:</td>
+<td class="entry"><& /Elements/EditCustomField,
CustomField => $CF,
NamePrefix => "Object-RT::Transaction--CustomField-"
- &><em><% $CF->FriendlyType %></em></TD>
-</TD></TR>
+ &><em><% $CF->FriendlyType %></em></td>
+</td></tr>
% } # end if while
% } # end of if
<tr>
<td class="label"><&|/l&>Attach</&>:</td>
- <td class="entry"><input name="UpdateAttachment" type=file></td>
+ <td class="entry"><input name="UpdateAttachment" type="file" /></td>
</tr>
<tr>
<td class="labeltop"><&|/l&>Content</&>:</td>
<td class="entry"><& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &></td>
</tr>
</table>
-<& /Elements/TitleBoxEnd &>
+</&>
<& /Elements/Submit,
@@ -145,9 +147,20 @@ $CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or
$Ticket->CurrentUserHasRight('ModifyTicket') );
+$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS);
my (@wresults, @results, @dresults, @lresults, @cf_results);
unless ($OnlySearchForPeople) {
+ # There might be two owners.
+ if ( ref ($ARGS{'Owner'} )) {
+ my @owners =@{$ARGS{'Owner'}};
+ delete $ARGS{'Owner'};
+ foreach my $owner(@owners){
+ $ARGS{'Owner'} = $owner unless ($Ticket->OwnerObj->id == $owner);
+ }
+
+ }
+
@wresults = ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS);
@cf_results = ProcessObjectCustomFieldUpdates( Object => $Ticket, ARGSRef => \%ARGS);
@dresults = ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS);
@@ -169,7 +182,7 @@ unless ($OnlySearchForPeople) {
$ARGS{'UpdateAttachments'}->{ $subject } = $attachment;
}
- $ARGS{'UpdateContent'} =~ s/\r+\n/\n/g;
+ $ARGS{'UpdateContent'} =~ s/\r+\n/\n/g if $ARGS{'UpdateContent'};
if ($ARGS{'UpdateAttachments'} || ( $ARGS{'UpdateContent'} && $ARGS{'UpdateContent'} ne "-- \n" .
$session{'CurrentUser'}->UserObj->Signature)) {
@@ -182,6 +195,10 @@ push @results, @dresults;
push @results, @lresults;
push @results, @cf_results;
+# undef so that TransactionBatch scrips run and update the ticket
+$Ticket = undef;
+$Ticket = LoadTicket($id);
+
# If they've gone and moved the ticket to somewhere they can't see, etc...
# TODO: display the results, even if we can't display the ticket.
diff --git a/rt/html/Ticket/ModifyDates.html b/rt/html/Ticket/ModifyDates.html
index a4f68f2f5..d12619002 100644
--- a/rt/html/Ticket/ModifyDates.html
+++ b/rt/html/Ticket/ModifyDates.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,19 +53,20 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="ModifyDates.html">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$TicketObj->Id%>">
-<& /Elements/TitleBoxStart, title => loc('Modify dates for ticket # [_1]', $TicketObj->Id), width => "100%", color => "#663366" &>
-
+<form method="post" action="ModifyDates.html">
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<input type="hidden" class="hidden" name="id" value="<%$TicketObj->Id%>" />
+<&| /Widgets/TitleBox,title => loc('Modify dates for ticket # [_1]', $TicketObj->Id) &>
<& Elements/EditDates, TicketObj => $TicketObj &>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, Label => loc('Save Changes'), color => "#663366" &>
+</&>
+<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
<%INIT>
my $TicketObj = LoadTicket($id);
+$m->comp('/Elements/Callback', TicketObj => $TicketObj, ARGSRef => \%ARGS);
my @results = ProcessTicketDates( TicketObj => $TicketObj, ARGSRef => \%ARGS);
</%INIT>
diff --git a/rt/html/Ticket/ModifyLinks.html b/rt/html/Ticket/ModifyLinks.html
index 150597d89..93c80db18 100644
--- a/rt/html/Ticket/ModifyLinks.html
+++ b/rt/html/Ticket/ModifyLinks.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,21 +54,25 @@
<& /Elements/ListActions, actions => \@results &>
<form action="ModifyLinks.html" method="post">
-<input type="hidden" name="id" value="<%$Ticket->id%>">
+<input type="hidden" class="hidden" name="id" value="<%$Ticket->id%>" />
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<&| /Widgets/TitleBox, title => loc('Edit Links') &>
-<& /Elements/TitleBoxStart, title => loc('Edit Links'), color => "#336633"&>
<& /Elements/EditLinks, Object => $Ticket, Merge => 1 &>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, color => "#336633", Label => loc('Save Changes') &>
+</&>
+<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
<%INIT>
-
+
my $Ticket = LoadTicket($id);
-my @results = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
+
+my @results;
+$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS, Results => \@results );
+push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS );
</%INIT>
diff --git a/rt/html/Ticket/ModifyPeople.html b/rt/html/Ticket/ModifyPeople.html
index 61cbe6c27..aa3811269 100644
--- a/rt/html/Ticket/ModifyPeople.html
+++ b/rt/html/Ticket/ModifyPeople.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,11 +53,12 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="ModifyPeople.html">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>">
-<& /Elements/TitleBoxStart, title => loc('Modify people related to ticket #[_1]', $Ticket->Id), width => "100%", color=> "#333399" &>
+<form method="post" action="ModifyPeople.html">
+<input type="hidden" class="hidden" name="id" value="<%$Ticket->Id%>" />
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<&| /Widgets/TitleBox, title => loc('Modify people related to ticket #[_1]', $Ticket->Id), width => "100%", color=> "#333399" &>
<& Elements/EditPeople, Ticket => $Ticket, UserField => $UserField, UserString => $UserString, UserOp => $UserOp, GroupString => $GroupString, GroupOp => $GroupOp, GroupField => $GroupField &>
-<& /Elements/TitleBoxEnd &>
+</&>
<& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &>
</form>
@@ -64,6 +67,7 @@
my (@results, @wresults);
my $Ticket = LoadTicket($id);
+$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS);
# if we're trying to search for watchers and nothing else
unless ($OnlySearchForPeople or $OnlySearchForGroup) {
diff --git a/rt/html/Ticket/ShowEmailRecord.html b/rt/html/Ticket/ShowEmailRecord.html
index 38eddd3d2..f77406c77 100644
--- a/rt/html/Ticket/ShowEmailRecord.html
+++ b/rt/html/Ticket/ShowEmailRecord.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -61,7 +63,7 @@ $Transaction => undef
</%init>
<& /Elements/Header, ShowBar => 0 &>
-<pre>
+<pre style="padding: 2em;">
<%$AttachmentObj->Headers%>
<%$AttachmentObj->Content%>
diff --git a/rt/html/Ticket/Update.html b/rt/html/Ticket/Update.html
index df739c9c7..3824873b5 100644
--- a/rt/html/Ticket/Update.html
+++ b/rt/html/Ticket/Update.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,26 +50,28 @@
Ticket => $TicketObj,
Title=> $title &>
-<FORM ACTION="Update.html" NAME="TicketUpdate"
- METHOD=POST enctype="multipart/form-data">
-<input type="hidden" name="QuoteTransaction" value="<% $ARGS{QuoteTransaction} %>">
-<input type="hidden" name="DefaultStatus" value="<% $DefaultStatus %>">
-<input type="hidden" name="Action" value="<% $ARGS{Action} %>">
+<form action="Update.html" name="TicketUpdate"
+ method="post" enctype="multipart/form-data">
+<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &>
+<input type="hidden" class="hidden" name="QuoteTransaction" value="<% $ARGS{QuoteTransaction} %>" />
+<input type="hidden" class="hidden" name="DefaultStatus" value="<% $DefaultStatus %>" />
+<input type="hidden" class="hidden" name="Action" value="<% $ARGS{Action} %>" />
+<table width="100%" border="0">
-<TABLE BORDER=0>
-
-<tr><td align=right><&|/l&>Status</&>:</td>
+<tr><td align="right"><&|/l&>Status</&>:</td>
<td>
<& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)", loc($TicketObj->Status)), Default => $ARGS{'Status'} || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus)&>
<&|/l&>Owner</&>:
<& /Elements/SelectOwner, Name=>"Owner", DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->OwnerObj->Name()), QueueObj => $TicketObj->QueueObj, TicketObj => $TicketObj, Default => $ARGS{'Owner'} &>
-<&|/l&>Worked</&>: <input size=4 name="UpdateTimeWorked" value="<% $ARGS{UpdateTimeWorked}%>"> <&|/l&>minutes</&></td></tr>
+<&|/l&>Worked</&>: <input size="4" name="UpdateTimeWorked" value="<% $ARGS{UpdateTimeWorked} %>" />
+<& /Elements/SelectTimeUnits, Name => 'UpdateTimeWorked'&>
+</td></tr>
% my $skip;
<& /Elements/Callback, _CallbackName => 'BeforeUpdateType', skip => \$skip, %ARGS &>
% if (!$skip) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$TicketObj->Id%>"><br>
+<input type="hidden" class="hidden" name="id" value="<%$TicketObj->Id%>" /><br />
% }
-<tr><td align=right><&|/l&>Update Type</&>:</td>
+<tr><td align="right"><&|/l&>Update Type</&>:</td>
<td><select name="UpdateType">
% if ($CanComment) {
<option value="private" <%$ARGS{'UpdateType'} eq "private" ? "SELECTED" : !$ARGS{'UpdateType'}&&$CommentDefault%>><&|/l&>Comments (Not sent to requestors)</&></option>
@@ -77,41 +81,41 @@
% }
</select>
</td></tr>
-<tr><td align=right><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size=60 value="<% $ARGS{UpdateSubject} || $TicketObj->Subject()%>"></td></tr>
-<tr><td align=right><&|/l&>Cc</&>:</td><td> <input name="UpdateCc" size=60
-value="<% $ARGS{UpdateCc} %>"><BR>
-<i><font size=-2>
-<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. Does <b>not</b> change who will receive future updates.)</&></font></i>
+<tr><td align="right"><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size="60" value="<% $ARGS{UpdateSubject} || $TicketObj->Subject()%>" /></td></tr>
+<tr><td align="right"><&|/l&>Cc</&>:</td><td> <input name="UpdateCc" size="60"
+value="<%$ARGS{UpdateCc}||""%>" /><br />
+<i><font size="-2">
+<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. Does <strong>not</strong> change who will receive future updates.)</&></font></i>
</td></tr>
-<tr><td align=right><&|/l&>Bcc</&>:</td><td> <input name="UpdateBcc" size=60 VALUE="<%$ARGS{UpdateBcc}%>"><BR>
-<i><font size=-2>
-<&|/l&>(Sends a blind carbon-copy of this update to a comma-delimited list of email addresses. Does <b>not</b> change who will receive future updates.)</&></font></i>
+<tr><td align="right"><&|/l&>Bcc</&>:</td><td> <input name="UpdateBcc" size="60" value="<%$ARGS{UpdateBcc}||""%>" /><br />
+<i><font size="-2">
+<&|/l&>(Sends a blind carbon-copy of this update to a comma-delimited list of email addresses. Does <strong>not</strong> change who will receive future updates.)</&></font></i>
</td></tr>
% if (exists $session{'Attachments'}) {
-<TD>
+<td>
<&|/l&>Attached file</&>:
-</TD>
-<TD COLSPAN=5>
-<&|/l&>Check box to delete</&><BR>
+</td>
+<td colspan="5">
+<&|/l&>Check box to delete</&><br />
% foreach my $attach_name (keys %{$session{'Attachments'}}) {
-<input type="checkbox" name="DeleteAttach-<%$attach_name%>" value="1"><%$attach_name%><BR>
+<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
% } # end of foreach
-</TD>
-</TR>
-<TR>
+</td>
+</tr>
+<tr>
% } # end of if
% if (my $TxnCFs = $TicketObj->TransactionCustomFields) {
% while (my $CF = $TxnCFs->Next()) {
-<TR>
-<TD ALIGN=RIGHT><% $CF->Name %>:</TD>
-<TD><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
- "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></TD>
-</TR>
+<tr>
+<td align="right"><% $CF->Name %>:</td>
+<td><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
+ "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></td>
+</tr>
% } # end if while
% } # end of if
-<tr><td align=right><&|/l&>Attach</&>:</td><td><input name="Attach" type="file"><INPUT TYPE=SUBMIT NAME="AddMoreAttach" VALUE="<&|/l&>Add More Files</&>"><input type="hidden" name="UpdateAttach" value="1">
+<tr><td align="right"><&|/l&>Attach</&>:</td><td><input name="Attach" type="file" /><input type="submit" class="button" name="AddMoreAttach" value="<&|/l&>Add More Files</&>" /><input type="hidden" class="hidden" name="UpdateAttach" value="1" />
</td></tr>
<tr><td align="right" valign="top"><&|/l&>Message</&>:</td><td>
<& /Elements/Callback, _CallbackName => 'BeforeMessageBox', %ARGS &>
@@ -134,7 +138,7 @@ value="<% $ARGS{UpdateCc} %>"><BR>
% if ($TicketObj->CurrentUserHasRight('ShowOutgoingEmail')) {
<& /Ticket/Elements/PreviewScrips, TicketObj => $TicketObj, %ARGS &>
% }
-</FORM>
+</form>
<%INIT>
my $CanRespond = 0;
my $CanComment = 0;
diff --git a/rt/html/Tools/Elements/Tabs b/rt/html/Tools/Elements/Tabs
index fc4153b98..cd6d16916 100644
--- a/rt/html/Tools/Elements/Tabs
+++ b/rt/html/Tools/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,25 +47,35 @@
%# END BPS TAGGED BLOCK }}}
<& /Elements/Tabs,
tabs => $tabs,
- current_toptab => 'Tools/Offline.html',
+ current_toptab => 'Tools/index.html',
current_tab => $current_tab,
Title => $Title &>
<%INIT>
- my $tabs = { a => { title => loc('Offline'),
- path => 'Tools/Offline.html',
- },
- };
+my $tabs = {
+ a => {
+ title => loc('Offline'),
+ path => 'Tools/Offline.html',
+ },
+ b => {
+ title => loc('Reports'),
+ path => 'Tools/Reports/index.html',
+ },
+ c => {
+ title => loc('My Day'),
+ path => 'Tools/MyDay.html',
+ },
+};
- foreach my $tab (sort keys %{$tabs}) {
- if ($tabs->{$tab}->{'path'} eq $current_tab) {
- $tabs->{$tab}->{"subtabs"} = $subtabs;
- $tabs->{$tab}->{"current_subtab"} = $current_subtab;
+$m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
+
+foreach my $tab ( sort keys %{$tabs} ) {
+ if ( $tabs->{$tab}->{'path'} eq $current_tab ) {
+ $tabs->{$tab}->{"subtabs"} = $subtabs;
+ $tabs->{$tab}->{"current_subtab"} = $current_subtab;
}
- }
+}
</%INIT>
-
-
<%ARGS>
$subtabs => undef
$current_tab => undef
diff --git a/rt/html/Tools/MyDay.html b/rt/html/Tools/MyDay.html
index a20209c9b..dbda0f9aa 100644
--- a/rt/html/Tools/MyDay.html
+++ b/rt/html/Tools/MyDay.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -43,37 +45,67 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, title => "What I did today" &>
-(displaying new and open tickets for <%$session{'CurrentUser'}->Name%>)
-<FORM METHOD=POST ACTION="MyDay.html">
-<TABLE width=100% cellpadding=0 cellspacing=0>
+<& /Elements/Header, Title => $title &>
+<& /Tools/Elements/Tabs, current_tab => "Tools/MyDay.html", Title => $title &>
+
+<& /Elements/ListActions, actions => \@results &>
+
+<&|/l, $session{'CurrentUser'}->Name&>(displaying new and open tickets for [_1])</&>
+<form method="post" action="MyDay.html">
+<table width="100%" cellpadding="0" cellspacing="0">
% while ( my $Ticket = $Tickets->Next()) {
% my $class;
% $i++;
% if ($i % 2 ) {
% $class = 'class="oddline"';
% }
-<TR <%$class|n%>><TD COLSPAN=2><h2><A
-HREF="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Id%>:
-<%$Ticket->Subject%></A></h2></td></tr>
-<TR <%$class|n%>><TD><SPAN CLASS=label>Worked:</SPAN><input size=3 name="UpdateTimeWorked-<%$Ticket->Id%>"> minutes
-</TD>
-<TD ROWSPAN=2><SPAN CLASS=label>Comments:<br></SPAN><textarea name="UpdateContent-<%$Ticket->Id%>" rows=5
-cols=60></textarea></TD></TR>
-<TR <%$class|n%>>
-<TD><SPAN CLASS="label">Status:</SPAN> <& /Elements/SelectStatus, Name=> 'UpdateStatus-'.$Ticket->Id,
- DefaultLabel => loc("[_1] (Unchanged)",loc($Ticket->Status())) &></TD>
- </TR>
+<tr <%$class|n%>><td colspan="2"><h2><a
+href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Id%>:
+<%$Ticket->Subject%></a></h2></td></tr>
+<tr <%$class|n%>><td><span class="label"><&|/l&>Worked</&>:</span><input size="3" name="UpdateTimeWorked-<%$Ticket->Id%>" /> <&|/l&>minutes</&>
+</td>
+<td rowspan="2"><span class="label"><&|/l&>Comments</&>:<br /></span><textarea name="UpdateContent-<%$Ticket->Id%>" rows="5"
+cols="60"></textarea></td></tr>
+<tr <%$class|n%>>
+<td><span class="label"><&|/l&>Status</&>:</span> <& /Elements/SelectStatus, Name=> 'UpdateStatus-'.$Ticket->Id,
+ DefaultLabel => loc("[_1] (Unchanged)",loc($Ticket->Status())) &></td>
+ </tr>
% }
-</TABLE>
+</table>
<& /Elements/Submit, Label => "Record all updates" , Reset => 'Clear'&>
-</FORM>
-</HTML>
-
+</form>
+</html>
<%INIT>
+my $title = loc("What I did today");
my $i = 0;
+my @results;
+foreach my $arg ( keys %ARGS ) {
+ next unless ( $arg =~ /^UpdateStatus-(\d*)$/ );
+ my $id = $1;
+ my $ticket = LoadTicket($id);
+ next unless ( $ticket->id );
+ if ( my $content = $ARGS{'UpdateContent-'.$id} ) {
+ my ( $val, $msg ) = $ticket->Comment(
+ Content => $content,
+ TimeTaken => $ARGS{ 'UpdateTimeWorked-' . $id }
+ );
+ push @results, loc( "Ticket [_1]: [_2]", $id, $msg );
+ } elsif ( my $worked = $ARGS{ 'UpdateTimeWorked-' . $id } ) {
+ my ( $val, $msg ) = $ticket->SetTimeWorked( $worked + $ticket->TimeWorked );
+ push @results, loc( "Ticket [_1]: [_2]", $id, $msg );
+ }
+
+ if ( my $status = $ARGS{ 'UpdateStatus-' . $id } ) {
+ if ( $status ne $ticket->Status ) {
+ my ( $val, $msg ) = $ticket->SetStatus($status);
+ push @results, loc( "Ticket [_1]: [_2]", $id, $msg );
+
+ }
+ }
+
+}
my $Tickets = RT::Tickets->new($session{'CurrentUser'});
$Tickets->LimitOwner(VALUE => $session{'CurrentUser'}->Id);
@@ -81,11 +113,5 @@ $Tickets->LimitStatus( VALUE => 'open' );
$Tickets->LimitStatus ( VALUE => 'new');
$Tickets->OrderBy ( FIELD => 'Priority', ORDER => 'DESC');
-while (my $Ticket = $Tickets->Next()) {
- #Process updates
-
-
-}
</%INIT>
-
diff --git a/rt/html/Tools/Offline.html b/rt/html/Tools/Offline.html
index 8b12784e8..385e6add8 100644
--- a/rt/html/Tools/Offline.html
+++ b/rt/html/Tools/Offline.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -53,50 +55,48 @@
<& /Elements/Callback, Requestor => \$requestoraddress,
Queue => \$qname, %ARGS &>
-<FORM ACTION="Offline.html" NAME="TicketUpdate"
- METHOD=POST enctype="multipart/form-data">
+<form action="Offline.html" name="TicketUpdate"
+ method="post" enctype="multipart/form-data">
<table>
<tr>
-<td class=label>
+<td class="label">
<&|/l&>Default Queue</&>:
</td>
<td>
<& /Elements/SelectQueue, Name => "qname", NamedValues => 1 &>
-<i><&|/l&>If no queue is specified, create tickets in this queue.</&></i>
+<em><&|/l&>If no queue is specified, create tickets in this queue.</&></em>
</td>
</tr>
<tr>
-<td class=label>
+<td class="label">
<&|/l&>Default Requestor</&>:
</td>
<td>
-<input name=requestoraddress value=<%$requestoraddress%>>
-<i><&|/l&>If no Requestor is specified, create tickets with this requestor.</&></i>
+<input name="requestoraddress" value="<%$requestoraddress%>" />
+<em><&|/l&>If no Requestor is specified, create tickets with this requestor.</&></em>
</td>
</tr>
-<tr><td class=labeltop>
+<tr><td class="labeltop">
<&|/l&>Template</&>:
</td>
-<td colspan=2>
-<textarea name=string cols=80 rows=30>
-<%$string%>
-</textarea>
+<td colspan="2">
+<textarea name="string" cols="80" rows="30"><%$string%></textarea>
</td>
</tr>
-<tr><td class=label>
+<tr><td class="label">
<&|/l&>Get template from file</&>:
</td>
<td>
-<input name="Template" type="file" value="foo">
-<INPUT TYPE=SUBMIT NAME="Parse" VALUE="<&|/l&>Go</&>">
+<input name="Template" type="file" value="foo" />
+<input type="submit" class="button" name="Parse" value="<&|/l&>Go!</&>" />
</td>
</tr>
</table>
<& /Elements/Submit, Name => 'UpdateTickets', Label => loc('Upload'), Caption => loc("Upload your changes"), color => "#993333" &>
-</FORM>
+</form>
<%args>
-$requestoraddress => undef
+$requestoraddress => ''
$qname => undef
$string => undef
</%args>
diff --git a/rt/html/User/Delegation.html b/rt/html/User/Delegation.html
index 3347fda1f..2587f8cde 100644
--- a/rt/html/User/Delegation.html
+++ b/rt/html/User/Delegation.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/User/Elements/DelegateRights b/rt/html/User/Elements/DelegateRights
index 79ecb5977..3d42ed54e 100644
--- a/rt/html/User/Elements/DelegateRights
+++ b/rt/html/User/Elements/DelegateRights
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -55,7 +57,7 @@ my $object_obj = @{$objects->{$ObjectType}{$object}}[0]->Object;
% }
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
- <th width=15%><&|/l&>Personal groups:</&></th>
+ <th width="15%"><&|/l&>Personal groups:</&></th>
% while (my $pg = $personalgroups->Next) {
<th><%$pg->Name%></th>
% }
@@ -76,14 +78,14 @@ while ( my $delegation = $delegations->Next) {
%
<tr class="<%($i%2) && 'oddline'%>">
<td>
-<% loc($right->RightName) %><br>
-<div align=right><font size="-2" color="#999999"><&|/l, $right->PrincipalObj->Object->SelfDescription &>as granted to [_1]</&></font></div>
+<% loc($right->RightName) %><br />
+<div align="right"><font size="-2" color="#999999"><&|/l, $right->PrincipalObj->Object->SelfDescription &>as granted to [_1]</&></font></div>
</td>
% while (my $pg = $personalgroups->Next) {
-<td align=center>
- <input name="Delegate-ACE-<% $right->Id %>-to-<% $pg->PrincipalId%>" type=checkbox value="1" <%$ del_hash->{$pg->PrincipalId} && 'CHECKED' %>>
+<td align="center">
+ <input name="Delegate-ACE-<% $right->Id %>-to-<% $pg->PrincipalId%>" type="checkbox" value="1" <%$ del_hash->{$pg->PrincipalId} && 'CHECKED' %> />
% if ( $del_hash->{$pg->PrincipalId}) {
-<input type=hidden name="Delegate-Existing-ACE-<% $right->Id %>-to-<% $pg->PrincipalId%>-as-<%$del_hash->{$pg->PrincipalId}->Id%>">
+<input type="hidden" class="hidden" name="Delegate-Existing-ACE-<% $right->Id %>-to-<% $pg->PrincipalId%>-as-<%$del_hash->{$pg->PrincipalId}->Id%>" />
% }
</td>
% }
diff --git a/rt/html/User/Elements/GroupTabs b/rt/html/User/Elements/GroupTabs
index 2e79df268..b0eba0f8e 100644
--- a/rt/html/User/Elements/GroupTabs
+++ b/rt/html/User/Elements/GroupTabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/User/Elements/Tabs b/rt/html/User/Elements/Tabs
index 625b30f93..0aca8b5c3 100644
--- a/rt/html/User/Elements/Tabs
+++ b/rt/html/User/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -59,6 +61,12 @@
h => { title => loc('Delegation'),
path => 'User/Delegation.html',
},
+ f => { title => loc('Search options'),
+ path => 'Prefs/SearchOptions.html',
+ },
+ r => { title => loc('RT at a glance'),
+ path => 'Prefs/MyRT.html',
+ },
};
# Now let callbacks add their extra tabs
diff --git a/rt/html/User/Groups/Members.html b/rt/html/User/Groups/Members.html
index 2068e5a5b..0634260ca 100644
--- a/rt/html/User/Groups/Members.html
+++ b/rt/html/User/Groups/Members.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,36 +54,36 @@
-<FORM ACTION="<%$RT::WebPath%>/User/Groups/Members.html" METHOD="POST">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
-<TABLE WIDTH="100%">
-<TR>
-<TD>
+<form action="<%$RT::WebPath%>/User/Groups/Members.html" method="post">
+<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
+<table width="100%">
+<tr>
+<td>
<&|/l&>Add members</&>
-</TD>
-<TD>
+</td>
+<td>
<&|/l&>Current members</&>
-</TD>
-</TR>
+</td>
+</tr>
-<TR>
-<TD VALIGN=TOP>
+<tr>
+<td valign="top">
<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group &>
-</TD>
-<TD VALIGN=TOP>
+</td>
+<td valign="top">
% if ($Group->MembersObj->Count == 0 ) {
-<i><&|/l&>(No members)</&></i>
+<em><&|/l&>(No members)</&></em>
% } else {
-<i><&|/l&>(Check box to delete)</&></i>
-<br>
-<br>
+<em><&|/l&>(Check box to delete)</&></em>
+<br />
+<br />
<&|/l&>Users</&>
% my $UserMembers = $Group->MembersObj;
% $UserMembers->LimitToUsers();
-<UL>
+<ul>
% while (my $member = $UserMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$member->MemberId%>" value="1" />
<%$member->MemberObj->Object->Name%> (<%$member->MemberObj->Object->RealName%>)
% }
</ul>
@@ -90,14 +92,14 @@
% my $GroupMembers = $Group->MembersObj;
% $GroupMembers->LimitToGroups();
% while (my $member = $GroupMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$member->MemberId%>" value="1" />
<%$member->MemberObj->Object->Name%>
% }
+</ul>
% }
-</UL>
-</TD>
-</TR>
-</TABLE>
+</td>
+</tr>
+</table>
<& /Elements/Submit, Label => loc('Modify Members') &>
</form>
diff --git a/rt/html/User/Groups/Modify.html b/rt/html/User/Groups/Modify.html
index c0e9ce575..da42f2c2a 100644
--- a/rt/html/User/Groups/Modify.html
+++ b/rt/html/User/Groups/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -53,27 +55,27 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="<%$RT::WebPath%>/User/Groups/Modify.html" METHOD=POST>
+<form action="<%$RT::WebPath%>/User/Groups/Modify.html" method="post">
%unless ($Group->Id) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
+<input type="hidden" class="hidden" name="id" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
+<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
% }
-<TABLE>
-<TR><TD ALIGN=RIGHT>
+<table>
+<tr><td align="right">
<&|/l&>Name</&>:
-</TD>
-<TD><INPUT name="Name" value="<%$Group->Name%>"></TD>
-</TR><TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$Group->Description%>" size=60></TD>
-</TR><TR>
-<TD COLSPAN=2>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this group)</&><BR>
-</TR>
-</TABLE>
+</td>
+<td><input name="Name" value="<%$Group->Name%>" /></td>
+</tr><tr>
+<td align="right">
+<&|/l&>Description</&>:</td><td colspan="3"><input name="Description" value="<%$Group->Description%>" size="60" /></td>
+</tr><tr>
+<td colspan="2">
+<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this group)</&><br />
+</tr>
+</table>
<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
</form>
<%INIT>
diff --git a/rt/html/User/Groups/index.html b/rt/html/User/Groups/index.html
index 6d2e15d47..76ffac3af 100644
--- a/rt/html/User/Groups/index.html
+++ b/rt/html/User/Groups/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -48,12 +50,12 @@
current_subtab => 'User/Groups/index.html',
Title => $title &>
-<&|/l&>Personal groups</&>:<BR>
-<UL>
+<&|/l&>Personal groups</&>:<br />
+<ul>
%while ( my $Group = $Groups->Next) {
-<LI><A HREF="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><BR>
+<li><a href="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><br />
%}
-</UL>
+</ul>
<%INIT>
my $Groups = RT::Groups->new($session{'CurrentUser'});
diff --git a/rt/html/User/Prefs.html b/rt/html/User/Prefs.html
index f1c755826..8c6d5f18e 100644
--- a/rt/html/User/Prefs.html
+++ b/rt/html/User/Prefs.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,131 +52,133 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="<%$RT::WebPath%>/User/Prefs.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$UserObj->Id%>">
+<form action="<%$RT::WebPath%>/User/Prefs.html" method="post">
+<input type="hidden" class="hidden" name="id" value="<%$UserObj->Id%>" />
-<TABLE WIDTH=100% BORDER=0>
-<TR>
+<table width="100%" border="0">
+<tr>
-<TD VALIGN=TOP class="boxcontainer">
-<& /Elements/TitleBoxStart, title => loc('Identity') &>
+<td valign="top" class="boxcontainer">
+<&| /Widgets/TitleBox, title => loc('Identity'), id => "user-prefs-identity" &>
-<input type=hidden name="Name" value="<%$UserObj->Name%>">
-<table callspacing=0 cellpadding=0>
+<input type="hidden" class="hidden" name="Name" value="<%$UserObj->Name%>" />
+<table cellspacing="0" cellpadding="0">
<tr>
- <td class=label><&|/l&>Email</&>: </td>
- <td class=value><input name="EmailAddress" value="<%$UserObj->EmailAddress%>"></td>
+ <td class="label"><&|/l&>Email</&>: </td>
+ <td class="value"><input name="EmailAddress" value="<%$UserObj->EmailAddress%>" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Real Name</&>:</td>
- <td class=value><input name="RealName" value="<%$UserObj->RealName%>"></td> </tr>
+ <td class="label"><&|/l&>Real Name</&>:</td>
+ <td class="value"><input name="RealName" value="<%$UserObj->RealName%>" /></td> </tr>
<tr>
- <td class=label><&|/l&>Nickname</&>:</td>
- <td class=value><input name="NickName" value="<%$UserObj->NickName%>"></td>
+ <td class="label"><&|/l&>Nickname</&>:</td>
+ <td class="value"><input name="NickName" value="<%$UserObj->NickName%>" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Language</&>:</td>
- <td class=value><& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &></td>
+ <td class="label"><&|/l&>Language</&>:</td>
+ <td class="value"><& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &></td>
</tr>
</table>
-<& /Elements/TitleBoxEnd &>
-<br>
-<& /Elements/TitleBoxStart, title => loc('Phone numbers') &>
-<table callspacing=0 cellpadding=0>
+</&>
+<&| /Widgets/TitleBox, title => loc('Phone numbers'), id => "user-prefs-phone" &>
+<table cellspacing="0" cellpadding="0">
<tr>
- <td class=label><&|/l&>Residence</&>:</td>
- <td class=value><input name="HomePhone" value="<%$UserObj->HomePhone%>" size=13></td>
+ <td class="label"><&|/l&>Residence</&>:</td>
+ <td class="value"><input name="HomePhone" value="<%$UserObj->HomePhone%>" size="13" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Work</&>:</td>
- <td class=value><input name="WorkPhone" value="<%$UserObj->WorkPhone%>" size=13></td>
+ <td class="label"><&|/l&>Work</&>:</td>
+ <td class="value"><input name="WorkPhone" value="<%$UserObj->WorkPhone%>" size="13" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Mobile</&>:</td>
- <td class=value><input name="MobilePhone" value="<%$UserObj->MobilePhone%>" size=13></td>
+ <td class="label"><&|/l&>Mobile</&>:</td>
+ <td class="value"><input name="MobilePhone" value="<%$UserObj->MobilePhone%>" size="13" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Pager</&>:</td>
- <td class=value><input name="PagerPhone" value="<%$UserObj->PagerPhone%>" size=13></td>
+ <td class="label"><&|/l&>Pager</&>:</td>
+ <td class="value"><input name="PagerPhone" value="<%$UserObj->PagerPhone%>" size="13" /></td>
</tr>
</table>
-<& /Elements/TitleBoxEnd &>
-</TD>
-<TD VALIGN=TOP class="boxcontainer">
+</&>
+<& /Elements/Callback, _CallbackName => 'FormLeftColumn', UserObj => $UserObj, %ARGS &>
+</td>
+<td valign="top" class="boxcontainer">
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-<& /Elements/TitleBoxStart, title => loc('Password') &>
-<TABLE>
-<TR>
-<TD class=label>
+<&| /Widgets/TitleBox, title => loc('Password'), id => "user-prefs-password" &>
+<table>
+<tr>
+<td class="label">
<&|/l&>New Password</&>:
-</TD>
-<TD class=value>
-<input type=password name="Pass1">
-</TD>
-</TR>
-<TR><TD class=label>
+</td>
+<td class="value">
+<input type="password" name="Pass1" />
+</td>
+</tr>
+<tr><td class="label">
<&|/l&>Retype Password</&>:
-</TD>
-<TD class=value>
-<input type=password name="Pass2">
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
+</td>
+<td class="value">
+<input type="password" name="Pass2" />
+</td>
+</tr>
+</table>
+</&>
% }
-<& /Elements/TitleBoxStart, title => loc('Location') &>
-<table callspacing=0 cellpadding=0>
+<&| /Widgets/TitleBox, title => loc('Location'), id => "user-prefs-location" &>
+<table cellspacing="0" cellpadding="0">
<tr>
- <td class=label><&|/l&>Organization</&>:</td>
- <td class=value><input name="Organization" value="<%$UserObj->Organization%>"></td>
+ <td class="label"><&|/l&>Organization</&>:</td>
+ <td class="value"><input name="Organization" value="<%$UserObj->Organization%>" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Address1</&>:</td>
- <td class=value><input name="Address1" value="<%$UserObj->Address1%>"></td>
+ <td class="label"><&|/l&>Address1</&>:</td>
+ <td class="value"><input name="Address1" value="<%$UserObj->Address1%>" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Address2</&>:</td>
- <td class=value><input name="Address2" value="<%$UserObj->Address2%>"></td>
+ <td class="label"><&|/l&>Address2</&>:</td>
+ <td class="value"><input name="Address2" value="<%$UserObj->Address2%>" /></td>
</tr>
<tr>
- <td class=label><&|/l&>City</&>:</td>
- <td><input name="City" value="<%$UserObj->City%>" size=14></td>
+ <td class="label"><&|/l&>City</&>:</td>
+ <td><input name="City" value="<%$UserObj->City%>" size="14" /></td>
</tr>
<tr>
- <td class=label><&|/l&>State</&>:</td>
- <td class=value><input name="State" value="<%$UserObj->State%>" size=3></td>
+ <td class="label"><&|/l&>State</&>:</td>
+ <td class="value"><input name="State" value="<%$UserObj->State%>" size="3" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Zip</&>:</td>
- <td class=value><input name="Zip" value="<%$UserObj->Zip%>" size=9></td>
+ <td class="label"><&|/l&>Zip</&>:</td>
+ <td class="value"><input name="Zip" value="<%$UserObj->Zip%>" size="9" /></td>
</tr>
<tr>
- <td class=label><&|/l&>Country</&>:</td>
- <td class=value><input name="Country" value="<%$UserObj->Country%>"></td>
+ <td class="label"><&|/l&>Country</&>:</td>
+ <td class="value"><input name="Country" value="<%$UserObj->Country%>" /></td>
</tr>
</table>
-<& /Elements/TitleBoxEnd &>
-</TD>
-</TR>
-<TR>
+</&>
+<& /Elements/Callback, _CallbackName => 'FormRightColumn', UserObj => $UserObj, %ARGS &>
+</td>
+</tr>
+<tr>
-<TD COLSPAN=2 VALIGN=TOP class="boxcontainer">
+<td colspan="2" valign="top" class="boxcontainer">
%if ($UserObj->Privileged) {
-<BR>
-<& /Elements/TitleBoxStart, title => loc('Signature') &>
-<TEXTAREA COLS=80 ROWS=5 name="Signature" class="signature" WRAP=HARD>
-<%$UserObj->Signature%></TEXTAREA>
-<& /Elements/TitleBoxEnd &>
+<br />
+<&| /Widgets/TitleBox, title => loc('Signature') &>
+<textarea cols="80" rows="5" name="Signature" class="signature" wrap="hard">
+<%$UserObj->Signature%></textarea>
+</&>
% }
-</TD>
+</td>
-</TR>
-</TABLE>
+</tr>
+</table>
+<& /Elements/Callback, _CallbackName => 'FormEnd', UserObj => $UserObj, %ARGS &>
<& /Elements/Submit, Label => loc('Save Preferences') &>
</form>
@@ -205,6 +209,12 @@ if ($UserObj->Id) {
AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
Address2 City State Zip Country Lang
);
+
+ $m->comp('/Elements/Callback', _CallbackName => 'UpdateLogic',
+ fields => \@fields,
+ results => \@results,
+ UserObj => $UserObj,
+ ARGSRef => \%ARGS);
my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields,
Object => $UserObj,
diff --git a/rt/html/Widgets/SavedSearch b/rt/html/Widgets/SavedSearch
index b8313daf8..b873c2bcb 100644
--- a/rt/html/Widgets/SavedSearch
+++ b/rt/html/Widgets/SavedSearch
@@ -136,8 +136,16 @@ $args
<form method="post" action="<% $Action %>" name="SaveSearch">
<& /Search/Elements/EditSearches, Name => 'Owner', SearchType => $self->{SearchType}, AllowCopy => 0,
CurrentSearch => $self->{CurrentSearch}, SearchId => $self->{SearchId}, Title => $Title &><br />
-% for my $field (@{$self->{SearchFields}}) {
-<input type="hidden" class="hidden" name="<%$field%>" value="<%$ARGS{$field} || ''%>" />
+<%PERL>
+foreach my $field ( @{$self->{SearchFields}} ) {
+ if ( ref($ARGS{$field}) && ref($ARGS{$field}) ne 'ARRAY' ) {
+ $RT::Logger->error("Couldn't store '$field'. it's reference to ". ref($ARGS{$field}) );
+ next;
+ }
+ foreach my $value ( grep defined, ref($ARGS{$field})? @{ $ARGS{$field} } : $ARGS{$field} ) {
+</%PERL>
+<input type="hidden" class="hidden" name="<% $field %>" value="<% $value %>" />
+% }
% }
</form>
<%ARGS>
diff --git a/rt/html/Widgets/SelectionBox b/rt/html/Widgets/SelectionBox
index 910b20b25..38ae7a04a 100644
--- a/rt/html/Widgets/SelectionBox
+++ b/rt/html/Widgets/SelectionBox
@@ -146,6 +146,10 @@ else {
}
}
+ if ($ARGS{clear}) {
+ $current = [];
+ }
+
$self->{Current} = $current;
}
@@ -201,9 +205,14 @@ selected="selected"
><% $self->{_item_map}{$_} %></option>
% }
</select>
+% unless ($ARGS{'NoArrows'}) {
<input name="moveup" type="submit" class="button" value=" &uarr; " />
<input name="movedown" type="submit" class="button" value=" &darr; " />
+% }
<input name="remove" type="submit" class="button" value="<&|/l&>Delete</&>" />
+% if ($ARGS{'Clear'}) {
+ <input name="clear" type="submit" class="button" value="<&|/l&>Clear</&>" />
+% }
% my $caption = "";
% unless ($self->{'AutoSave'}) {
diff --git a/rt/html/Widgets/TitleBoxStart b/rt/html/Widgets/TitleBoxStart
index 7edc8a154..1d8548d00 100755
--- a/rt/html/Widgets/TitleBoxStart
+++ b/rt/html/Widgets/TitleBoxStart
@@ -64,8 +64,6 @@ $title => ''
$title_class => ''
$titleright_href => undef
$titleright => undef
-$contentbg => "#dddddd"
-$color => "#336699"
$id => ''
$hideable => 1
</%ARGS>
diff --git a/rt/html/autohandler b/rt/html/autohandler
index c854c2b33..909b922c8 100644
--- a/rt/html/autohandler
+++ b/rt/html/autohandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -49,30 +51,75 @@
$RT::Handle->ForceRollback() if $RT::Handle->TransactionDepth;
-local *session unless $m->is_subrequest; # avoid reentrancy, as suggested by masonbook
+if ($RT::StatementLog) {
+ $RT::Handle->ClearSQLStatementLog;
+ $RT::Handle->LogSQLStatements(1);
+}
+
+local *session
+ unless $m->is_subrequest; # avoid reentrancy, as suggested by masonbook
# Disable AutoFlush using an attribute
-if ($m->request_comp->attr_exists('AutoFlush')) {
- $m->autoflush($m->request_comp->attr('AutoFlush'));
+if ( $m->request_comp->attr_exists('AutoFlush') ) {
+ $m->autoflush( $m->request_comp->attr('AutoFlush') );
}
%ARGS = map {
- # if they've passed multiple values, they'll be an array. if they've
+
+ # if they've passed multiple values, they'll be an array. if they've
# passed just one, a scalar whatever they are, mark them as utf8
my $type = ref($_);
- (!$type)
- ? Encode::is_utf8($_) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) :
- ($type eq 'ARRAY')
- ? [ map { (ref($_) or Encode::is_utf8($_)) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } @$_ ] :
- ($type eq 'HASH')
- ? { map { (ref($_) or Encode::is_utf8($_)) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } %$_ } : $_
- } %ARGS;
-
-$m->{'rt_base_time'} = [Time::HiRes::gettimeofday()];
-
-$m->comp('/Elements/SetupSessionCookie', %ARGS);
-
-unless ($session{'CurrentUser'} && $session{'CurrentUser'}->Id) {
+ ( !$type )
+ ? Encode::is_utf8($_)
+ ? $_
+ : Encode::decode( utf8 => $_, Encode::FB_PERLQQ )
+ : ( $type eq 'ARRAY' )
+ ? [
+ map {
+ ( ref($_) or Encode::is_utf8($_) )
+ ? $_
+ : Encode::decode( utf8 => $_, Encode::FB_PERLQQ )
+ } @$_
+ ]
+ : ( $type eq 'HASH' )
+ ? {
+ map {
+ ( ref($_) or Encode::is_utf8($_) )
+ ? $_
+ : Encode::decode( utf8 => $_, Encode::FB_PERLQQ )
+ } %$_
+ }
+ : $_
+} %ARGS;
+
+# Latter in the code we use
+# $m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %ARGS );
+# instead of $m->call_next to avoid problems with UTF8 keys in arguments.
+# The call_next method pass through original arguments and if you have
+# an argument with unicode key then in a next component you'll get two
+# records in the args hash: one with key without UTF8 flag and another
+# with the flag, which may result into errors. "{ base_comp => $m->request_comp }"
+# is copied from mason's source to get the same results as we get from
+# call_next method, this feature is not documented, so we just leave it
+# here to avoid possible side effects.
+
+# This code canonicalizes time inputs in hours into minutes
+foreach my $field ( keys %ARGS ) {
+ next unless $field =~ /^(.*)-TimeUnits$/i && $ARGS{$1};
+ my $local = $1;
+ $ARGS{$local} =~ s{\b (?: (\d+) \s+ )? (\d+)/(\d+) \b}
+ {($1 || 0) + $3 ? $2 / $3 : 0}xe;
+ if ( $ARGS{$field} && $ARGS{$field} =~ /hours/i ) {
+ $ARGS{$local} *= 60;
+ }
+ delete $ARGS{$field};
+}
+
+$m->{'rt_base_time'} = [ Time::HiRes::gettimeofday() ];
+
+$m->comp( '/Elements/SetupSessionCookie', %ARGS );
+
+unless ( $session{'CurrentUser'} && $session{'CurrentUser'}->Id ) {
$session{'CurrentUser'} = RT::CurrentUser->new();
}
@@ -80,147 +127,201 @@ unless ($session{'CurrentUser'} && $session{'CurrentUser'}->Id) {
$r->content_type("text/html; charset=utf-8");
# If it's a noauth file, don't ask for auth.
-if ($m->base_comp->path =~ $RT::WebNoAuthRegex )
-{
- $m->call_next(%ARGS);
- $m->abort();
+if ( $m->base_comp->path =~ $RT::WebNoAuthRegex ) {
+ $m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %ARGS);
+ $m->abort;
}
# If RT is configured for external auth, let's go through and get REMOTE_USER
-elsif ( $RT::WebExternalAuth ) {
+elsif ($RT::WebExternalAuth) {
# do we actually have a REMOTE_USER equivlent?
if ( RT::Interface::Web::WebCanonicalizeInfo() ) {
- my $orig_user = $user;
-
- $user = RT::Interface::Web::WebCanonicalizeInfo();
- $session{'CurrentUser'} = RT::CurrentUser->new();
- my $load_method = $RT::WebExternalGecos ? 'LoadByGecos' : 'Load';
-
- if ($^O eq 'MSWin32' and $RT::WebExternalGecos) {
- my $NodeName = Win32::NodeName();
- $user =~ s/^\Q$NodeName\E\\//i;
- }
-
- $session{'CurrentUser'}->$load_method($user);
-
- if ($RT::WebExternalAuto and !$session{'CurrentUser'}->Id() ) {
- # Create users on-the-fly
-
- my $UserObj = RT::User->new(RT::CurrentUser->new('RT_System'));
-
- my ($val, $msg) = $UserObj->Create(
- %{ref($RT::AutoCreate) ? $RT::AutoCreate : {}},
- Name => $user,
- Gecos => $user,
- );
-
- if ($val) {
-
- # now get user specific information, to better create our user.
- my $new_user_info = RT::Interface::Web::WebExternalAutoInfo($user);
-
- # set the attributes that have been defined.
- # FIXME: this is a horrible kludge. I'm sure there's something cleaner
- foreach my $attribute ('Name', 'Comments', 'Signature', 'EmailAddress',
- 'PagerEmailAddress', 'FreeformContactInfo',
- 'Organization', 'Disabled', 'Privileged',
- 'RealName', 'NickName', 'Lang', 'EmailEncoding',
- 'WebEncoding', 'ExternalContactInfoId',
- 'ContactInfoSystem', 'ExternalAuthId', 'Gecos',
- 'HomePhone', 'WorkPhone', 'MobilePhone',
- 'PagerPhone', 'Address1', 'Address2', 'City',
- 'State', 'Zip', 'Country') {
- $m->comp('/Elements/Callback', %ARGS, _CallbackName => 'NewUser');
-
- my $method = "Set$attribute";
- $UserObj->$method($new_user_info->{$attribute})
- if( defined $new_user_info->{$attribute} );
- }
- $session{'CurrentUser'}->Load($user);
- }
- else {
- # we failed to successfully create the user. abort abort abort.
- delete $session{'CurrentUser'};
- $m->abort() unless $RT::WebFallbackToInternalAuth;
- $m->comp('/Elements/Login', %ARGS,
- Error=> loc('Cannot create user: [_1]', $msg));
- }
- }
-
- unless ( $session{'CurrentUser'}->Id() ) {
- delete $session{'CurrentUser'};
- $user = $orig_user;
-
- if ( $RT::WebExternalOnly ) {
- $m->comp('/Elements/Login', %ARGS,
- Error=> loc('You are not an authorized user'));
- $m->abort();
- }
- }
+ my $orig_user = $user;
+
+ $user = RT::Interface::Web::WebCanonicalizeInfo();
+ $session{'CurrentUser'} = RT::CurrentUser->new();
+ my $load_method = $RT::WebExternalGecos ? 'LoadByGecos' : 'Load';
+
+ if ( $^O eq 'MSWin32' and $RT::WebExternalGecos ) {
+ my $NodeName = Win32::NodeName();
+ $user =~ s/^\Q$NodeName\E\\//i;
+ }
+
+ $session{'CurrentUser'}->$load_method($user);
+
+ if ( $RT::WebExternalAuto and !$session{'CurrentUser'}->Id() ) {
+
+ # Create users on-the-fly
+
+ my $UserObj = RT::User->new( RT::CurrentUser->new('RT_System') );
+
+ my ( $val, $msg ) = $UserObj->Create(
+ %{ ref($RT::AutoCreate) ? $RT::AutoCreate : {} },
+ Name => $user,
+ Gecos => $user,
+ );
+
+ if ($val) {
+
+ # now get user specific information, to better create our user.
+ my $new_user_info
+ = RT::Interface::Web::WebExternalAutoInfo($user);
+
+ # set the attributes that have been defined.
+ # FIXME: this is a horrible kludge. I'm sure there's something cleaner
+ foreach my $attribute (
+ 'Name', 'Comments',
+ 'Signature', 'EmailAddress',
+ 'PagerEmailAddress', 'FreeformContactInfo',
+ 'Organization', 'Disabled',
+ 'Privileged', 'RealName',
+ 'NickName', 'Lang',
+ 'EmailEncoding', 'WebEncoding',
+ 'ExternalContactInfoId', 'ContactInfoSystem',
+ 'ExternalAuthId', 'Gecos',
+ 'HomePhone', 'WorkPhone',
+ 'MobilePhone', 'PagerPhone',
+ 'Address1', 'Address2',
+ 'City', 'State',
+ 'Zip', 'Country'
+ )
+ {
+ $m->comp( '/Elements/Callback', %ARGS,
+ _CallbackName => 'NewUser' );
+
+ my $method = "Set$attribute";
+ $UserObj->$method( $new_user_info->{$attribute} )
+ if ( defined $new_user_info->{$attribute} );
+ }
+ $session{'CurrentUser'}->Load($user);
+ }
+ else {
+
+ # we failed to successfully create the user. abort abort abort.
+ delete $session{'CurrentUser'};
+ $m->abort() unless $RT::WebFallbackToInternalAuth;
+ $m->comp( '/Elements/Login', %ARGS,
+ Error => loc( 'Cannot create user: [_1]', $msg ) );
+ }
+ }
+
+ unless ( $session{'CurrentUser'}->Id() ) {
+ delete $session{'CurrentUser'};
+ $user = $orig_user;
+
+ if ($RT::WebExternalOnly) {
+ $m->comp( '/Elements/Login', %ARGS,
+ Error => loc('You are not an authorized user') );
+ $m->abort();
+ }
+ }
}
elsif ($RT::WebFallbackToInternalAuth) {
- unless (defined($session{'CurrentUser'})) {
- $m->comp('/Elements/Login', %ARGS,
- Error=> loc('You are not an authorized user'));
- $m->abort();
- }
- } else {
- # WebExternalAuth is set, but we don't have a REMOTE_USER. abort
- delete $session{'CurrentUser'} if defined $session{'CurrentUser'};
+ unless ( defined( $session{'CurrentUser'} ) ) {
+ $m->comp( '/Elements/Login', %ARGS,
+ Error => loc('You are not an authorized user') );
+ $m->abort();
+ }
+ }
+ else {
+
+ # WebExternalAuth is set, but we don't have a REMOTE_USER. abort
+ delete $session{'CurrentUser'} if defined $session{'CurrentUser'};
}
}
delete $session{'CurrentUser'}
- unless $session{'CurrentUser'} and defined $session{'CurrentUser'}->Id;
-
+ unless $session{'CurrentUser'}
+ and $session{'CurrentUser'}->Id;
# Process per-page authentication callbacks
-$m->comp('/Elements/Callback', %ARGS, _CallbackName => 'Auth');
+$m->comp( '/Elements/Callback', %ARGS, _CallbackName => 'Auth' );
# If the user is logging in, let's authenticate
-if (!$session{'CurrentUser'} && defined ($user) && defined ($pass) ){
+if ( !$session{'CurrentUser'} && defined $user && defined $pass ) {
$session{'CurrentUser'} = RT::CurrentUser->new();
$session{'CurrentUser'}->Load($user);
- if (!$session{'CurrentUser'}->id() ||
- !$session{'CurrentUser'}->IsPassword($pass))
+ unless ( $session{'CurrentUser'}->id
+ && $session{'CurrentUser'}->IsPassword($pass) )
{
delete $session{'CurrentUser'};
- $RT::Logger->error("FAILED LOGIN for $user from $ENV{'REMOTE_ADDR'}");
- $m->comp('/Elements/Login', %ARGS,
- Error => loc('Your username or password is incorrect'));
- $m->abort();
+ $RT::Logger->error("FAILED LOGIN for $user from $ENV{'REMOTE_ADDR'}");
+ $m->comp( '/Elements/Login', %ARGS,
+ Error => loc('Your username or password is incorrect') );
+ $m->comp( '/Elements/Callback', %ARGS, _CallbackName => 'FailedLogin' );
+ $m->abort;
}
else {
- $RT::Logger->info("Successful login for $user from $ENV{'REMOTE_ADDR'}");
+ $RT::Logger->info(
+ "Successful login for $user from $ENV{'REMOTE_ADDR'}");
+ $m->comp( '/Elements/Callback', %ARGS, _CallbackName => 'SuccessfulLogin' );
}
}
-
+
# If we've got credentials, let's serve the file up.
-if ( (defined $session{'CurrentUser'}) and
- ( $session{'CurrentUser'}->Id) ) {
-
+if ( ( defined $session{'CurrentUser'} )
+ and ( $session{'CurrentUser'}->Id ) )
+{
+
# Process per-page global callbacks
- $m->comp('/Elements/Callback', %ARGS);
+ $m->comp( '/Elements/Callback', %ARGS );
# If the user isn't privileged, they can only see SelfService
- if ((! $session{'CurrentUser'}->Privileged) and
- ($m->base_comp->path !~ '^(/+)SelfService/') ) {
- $m->comp('/SelfService/index.html');
- $m->abort();
+ if ( not $session{'CurrentUser'}->Privileged ) {
+
+ # if the user is trying to access a ticket, redirect them
+ if ( $m->request_comp->path =~ '^(/+)Ticket/Display.html'
+ and $ARGS{'id'} )
+ {
+ RT::Interface::Web::Redirect($RT::WebURL."SelfService/Display.html?id=".$ARGS{'id'});
+ }
+
+ # otherwise, drop the user at the SelfService default page
+ elsif ( $m->base_comp->path !~ '^(/+)SelfService/' ) {
+ RT::Interface::Web::Redirect($RT::WebURL."SelfService/");
+ }
+ else {
+ $m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %ARGS);
+ }
}
else {
- $m->call_next(%ARGS);
+ $m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %ARGS);
}
}
# If we have no credentials
else {
- $m->comp('/Elements/Login', %ARGS);
+ $m->comp( '/Elements/Login', %ARGS );
$m->abort();
}
+
+if ($RT::StatementLog) {
+ my @log = $RT::Handle->SQLStatementLog;
+ $RT::Handle->ClearSQLStatementLog;
+ for my $stmt (@log) {
+ my ( $time, $sql, $bind, $duration ) = @{$stmt};
+ my @bind;
+ if ( ref $bind ) {
+ @bind = @{$bind};
+ }
+ else {
+
+ # Older DBIx-SB
+ $duration = $bind;
+ }
+ $RT::Logger->log(
+ level => $RT::StatementLog,
+ message => "SQL(" . sprintf( "%.2f", $duration ) . "s): $sql;"
+ . (
+ @bind ? " [ bound values: @{[map{qq|'$_'|} @bind]} ]" : ""
+ )
+ );
+ }
+}
+
</%INIT>
<& /Elements/Footer, %ARGS &>
<%ARGS>
diff --git a/rt/html/index.html b/rt/html/index.html
index 04d48ece6..af95a655c 100644
--- a/rt/html/index.html
+++ b/rt/html/index.html
@@ -1,14 +1,15 @@
+<& /Elements/Header, Title=>loc("RT at a glance"), Refresh => $session{'home_refresh_interval'} &>
<!--
% $m->out('--'.'>');
% if (0) {
%# -->
<html><head>
-<META HTTP-EQUIV=Refresh CONTENT="3; URL=http://bestpractical.com/rt/rt-broken-install.html">
+<meta http-equiv="refresh" content="30; url=http://bestpractical.com/rt/rt-broken-install.html">
<title>Almost there!</title></head>
<body>
-<img src="http://www.bestpractical.com/images/unconfigured-rtlogo.jpg">
-<br><br>
+<img src="http://www.bestpractical.com/images/unconfigured-rtlogo.jpg" />
+<br /><br />
<h1>You're almost there!</h1>
You haven't yet configured your webserver to run RT.
@@ -16,7 +17,7 @@ You appear to have installed RT's web interface correctly, but haven't yet confi
server to "run" the RT server which powers the web interface.
The next step is to edit your webserver's configuration file to instruct it to use
-RT's <b>mod_perl</b>, <b>fastcgi</b> or <b>speedycgi</b> handler.
+RT's <strong>mod_perl</strong>, <strong>FastCGI</strong> or <strong>SpeedyCGI</strong> handler.
If you need commercial support, please contact us at sales@bestpractical.com.
@@ -28,7 +29,7 @@ If you need commercial support, please contact us at sales@bestpractical.com.
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -48,7 +49,9 @@ If you need commercial support, please contact us at sales@bestpractical.com.
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -69,30 +72,13 @@ If you need commercial support, please contact us at sales@bestpractical.com.
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title=>loc("RT at a glance"), Refresh => $session{'home_refresh_interval'} &>
<& /Elements/Tabs,
current_toptab => '',
- Title=>loc("RT at a glance") &>
+ Title=>loc("RT at a glance"),
+ actions => $actions,
+ &>
<& /Elements/ListActions, actions => \@results &>
-<TABLE BORDER=0 WIDTH=100%>
-<TR VALIGN=TOP>
-<TD WIDTH=70% class="boxcontainer">
-<& /Elements/MyTickets &>
-<BR>
-<& /Elements/MyRequests &>
-<BR>
-<& /Elements/QuickCreate &>
-</TD>
-<TD class="boxcontainer">
-<& /Elements/Quicksearch &>
-<BR>
-<form method=get action="<%$RT::WebPath%>/index.html">
-<& /Elements/Refresh, Name => 'HomeRefreshInterval', Default => $session {'home_refresh_interval'} &>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</form>
-</TD>
-</TR>
-</TABLE>
+<& /Elements/MyRT &>
<%init>
my @results;
@@ -101,6 +87,7 @@ if ($ARGS{'QuickCreate'} ) {
my $ticket = RT::Ticket->new($session{'CurrentUser'});
my ($tid, $trans, $tmsg) = $ticket->Create(Queue => $ARGS{'Queue'},
Owner => $ARGS{'Owner'},
+ Requestor => $session{'CurrentUser'}->UserObj->EmailAddress,
Subject => $ARGS{'Subject'});
@@ -109,48 +96,22 @@ if ($ARGS{'QuickCreate'} ) {
if ( $ARGS{'q'} ) {
- my $query = $ARGS{'q'};
-
- if ( $query =~ m/^\s*(\d+)\s*$/ ) {
- $m->comp("/Ticket/Display.html" , id=> $1);
- return();
- }
-
- if ($m->comp('/Elements/Callback', _CallbackName => 'SearchPreFilter',
- query => $query, %ARGS)) {
- return();
- }
-
- $session{'tickets'} = RT::Tickets->new( $session{'CurrentUser'} );
-
- if ( $query =~ m/\@/ ) {
- $m->comp("/Search/Results.html", Query => "Requestor = '$query'");
-
- return();
- }
-
- #
- # Any search on queue name or subject will be for new/open tickets
- # only.
- #
-
- my $status = "Status = 'new' OR Status = 'open'";
-
- my $queue = RT::Queue->new( $session{'CurrentUser'} );
- if ( $queue->Load($query) && $queue->Id ) {
- $m->comp("/Search/Results.html", Query => "Queue = '" . $queue->Id . "' AND ($status)");
- return();
- }
-
- $m->comp("/Search/Results.html", Query => "Subject LIKE '$query' AND ($status)");
- return();
-
+ RT::Interface::Web::Redirect($RT::WebURL."Search/Simple.html?q=".$m->interp->apply_escapes($ARGS{q}));
}
if ($ARGS{'HomeRefreshInterval'}) {
$session{'home_refresh_interval'} = $ARGS{'HomeRefreshInterval'};
}
+my $actions;
+if ($session{'CurrentUser'}->HasRight(Right => 'ModifySelf', Object => $RT::System)) {
+ $actions = {
+ A => { title => loc('Edit'),
+ path => 'Prefs/MyRT.html',
+ },
+ };
+}
+
</%init>
%# --></body></html>
diff --git a/rt/html/l b/rt/html/l
index dbd146e57..32302aaa0 100644
--- a/rt/html/l
+++ b/rt/html/l
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY: