summaryrefslogtreecommitdiff
path: root/rt/share/html/SelfService
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-06-04 00:21:24 -0700
committerIvan Kohler <ivan@freeside.biz>2013-06-04 00:21:24 -0700
commit679854b8bbc65d112071111bbd7f34a6a481fb30 (patch)
treedda0862fdf7853f4f61e4cf155c8bbc93768c994 /rt/share/html/SelfService
parent9b328d940af56b9924a342192ebb0790478fa705 (diff)
RT 4.0.13
Diffstat (limited to 'rt/share/html/SelfService')
-rw-r--r--rt/share/html/SelfService/Article/Display.html2
-rw-r--r--rt/share/html/SelfService/Article/Search.html2
-rw-r--r--rt/share/html/SelfService/Article/autohandler2
-rwxr-xr-xrt/share/html/SelfService/Attachment/dhandler2
-rwxr-xr-xrt/share/html/SelfService/Closed.html2
-rwxr-xr-xrt/share/html/SelfService/Create.html17
-rwxr-xr-xrt/share/html/SelfService/CreateTicketInQueue.html2
-rwxr-xr-xrt/share/html/SelfService/Display.html33
-rwxr-xr-xrt/share/html/SelfService/Elements/GotoTicket2
-rwxr-xr-xrt/share/html/SelfService/Elements/Header2
-rwxr-xr-xrt/share/html/SelfService/Elements/MyRequests2
-rw-r--r--rt/share/html/SelfService/Elements/SearchArticle2
-rwxr-xr-xrt/share/html/SelfService/Error.html2
-rwxr-xr-xrt/share/html/SelfService/Prefs.html44
-rwxr-xr-xrt/share/html/SelfService/Update.html30
-rwxr-xr-xrt/share/html/SelfService/index.html2
16 files changed, 84 insertions, 64 deletions
diff --git a/rt/share/html/SelfService/Article/Display.html b/rt/share/html/SelfService/Article/Display.html
index 77b3c0ff2..93e8bcbc3 100644
--- a/rt/share/html/SelfService/Article/Display.html
+++ b/rt/share/html/SelfService/Article/Display.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/share/html/SelfService/Article/Search.html b/rt/share/html/SelfService/Article/Search.html
index c9acc555a..7e178d37f 100644
--- a/rt/share/html/SelfService/Article/Search.html
+++ b/rt/share/html/SelfService/Article/Search.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/share/html/SelfService/Article/autohandler b/rt/share/html/SelfService/Article/autohandler
index 802184c27..3bb2c2b38 100644
--- a/rt/share/html/SelfService/Article/autohandler
+++ b/rt/share/html/SelfService/Article/autohandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/share/html/SelfService/Attachment/dhandler b/rt/share/html/SelfService/Attachment/dhandler
index e3381a981..01b7bba76 100755
--- a/rt/share/html/SelfService/Attachment/dhandler
+++ b/rt/share/html/SelfService/Attachment/dhandler
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/share/html/SelfService/Closed.html b/rt/share/html/SelfService/Closed.html
index 6fd6e8328..13ca3a876 100755
--- a/rt/share/html/SelfService/Closed.html
+++ b/rt/share/html/SelfService/Closed.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/share/html/SelfService/Create.html b/rt/share/html/SelfService/Create.html
index e28ab0f57..76126ae18 100755
--- a/rt/share/html/SelfService/Create.html
+++ b/rt/share/html/SelfService/Create.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -91,16 +91,7 @@
<& /Ticket/Elements/EditCustomFields, %ARGS, QueueObj => $queue_obj &>
</td>
</tr>
-<tr>
-<td class="label">
-%# FIXME: if failed customfields validation, attachement needs to be choosen
-%# again by user.
-<&|/l&>Attach file</&>:
-</td>
-<td class="value">
-<input name="Attach" type="file" />
-</td>
-</tr>
+<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $queue_obj &>
</table>
<table width="100%">
<tr>
@@ -128,10 +119,12 @@ my $ValidCFs = $m->comp(
ARGSRef => \%ARGS
);
+ProcessAttachments(ARGSRef => \%ARGS);
+
my $skip_create = 0;
$m->callback( CallbackName => 'BeforeCreate', ARGSRef => \%ARGS, skip_create => \$skip_create, results => \@results );
-if ( defined($ARGS{'id'}) and $ARGS{'id'} eq 'new' ) { # new ticket?
+if ( !exists $ARGS{'AddMoreAttach'} and defined($ARGS{'id'}) and $ARGS{'id'} eq 'new' ) { # new ticket?
if ( $ValidCFs && !$skip_create ) {
$m->comp('Display.html', %ARGS);
$RT::Logger->crit("After display call; error is $@");
diff --git a/rt/share/html/SelfService/CreateTicketInQueue.html b/rt/share/html/SelfService/CreateTicketInQueue.html
index 887c32e35..39020973e 100755
--- a/rt/share/html/SelfService/CreateTicketInQueue.html
+++ b/rt/share/html/SelfService/CreateTicketInQueue.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/share/html/SelfService/Display.html b/rt/share/html/SelfService/Display.html
index 23c74672a..857ebfa98 100755
--- a/rt/share/html/SelfService/Display.html
+++ b/rt/share/html/SelfService/Display.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -100,21 +100,6 @@ my @id = ( ref $id eq 'ARRAY' ) ? @{$id} : ($id);
my $Ticket = RT::Ticket->new( $session{'CurrentUser'} );
-# store the uploaded attachment in session
-if ( defined $ARGS{'Attach'} && length $ARGS{'Attach'} ) { # attachment?
- $session{'Attachments'} = {} unless defined $session{'Attachments'};
-
- my $attachment = MakeMIMEEntity(
- AttachmentFieldName => 'Attach'
- );
-
- my $file_path = Encode::decode_utf8("$ARGS{'Attach'}");
- $session{'Attachments'} = {
- %{ $session{'Attachments'} || {} },
- $file_path => $attachment,
- };
-}
-
if ( defined ($id[0]) && $id[0] eq 'new' ) {
# {{{ Create a new ticket
@@ -134,19 +119,12 @@ if ( defined ($id[0]) && $id[0] eq 'new' ) {
( $Ticket, @results ) =
- CreateTicket( Attachments => $session{'Attachments'}, %ARGS );
+ CreateTicket( Attachments => delete $session{'Attachments'}, %ARGS );
unless ( $Ticket->id ) {
$m->comp( 'Error.html', Why => join( "\n", @results ));
$m->abort();
}
-
-
- # delete temporary storage entry to make WebUI clean
- unless ( keys %{ $session{'Attachments'} } and $ARGS{'UpdateAttach'} ) {
- delete $session{'Attachments'};
- }
-
}
else {
unless ( $Ticket->Load( $id[0] ) ) {
@@ -172,12 +150,7 @@ if ( defined ($id[0]) && $id[0] eq 'new' ) {
ARGSRef => \%ARGS,
TicketObj => $Ticket
);
- delete $session{'Attachments'};
-
- # delete temporary storage entry to make WebUI clean
- unless ( keys %{ $session{'Attachments'} } and $ARGS{'UpdateAttach'} ) {
- delete $session{'Attachments'};
- }
+ delete $session{'Attachments'};
my @cfupdates = ProcessObjectCustomFieldUpdates(Object => $Ticket, ARGSRef => \%ARGS);
push (@results, @cfupdates);
diff --git a/rt/share/html/SelfService/Elements/GotoTicket b/rt/share/html/SelfService/Elements/GotoTicket
index 28bc81b82..8d8dae07b 100755
--- a/rt/share/html/SelfService/Elements/GotoTicket
+++ b/rt/share/html/SelfService/Elements/GotoTicket
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/share/html/SelfService/Elements/Header b/rt/share/html/SelfService/Elements/Header
index 7cbc0ad96..1aad1a791 100755
--- a/rt/share/html/SelfService/Elements/Header
+++ b/rt/share/html/SelfService/Elements/Header
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/share/html/SelfService/Elements/MyRequests b/rt/share/html/SelfService/Elements/MyRequests
index 76accfc9b..b6f8f8979 100755
--- a/rt/share/html/SelfService/Elements/MyRequests
+++ b/rt/share/html/SelfService/Elements/MyRequests
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/share/html/SelfService/Elements/SearchArticle b/rt/share/html/SelfService/Elements/SearchArticle
index d547127b5..1d0087695 100644
--- a/rt/share/html/SelfService/Elements/SearchArticle
+++ b/rt/share/html/SelfService/Elements/SearchArticle
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/share/html/SelfService/Error.html b/rt/share/html/SelfService/Error.html
index 9f0c7f82e..0ee0b5d64 100755
--- a/rt/share/html/SelfService/Error.html
+++ b/rt/share/html/SelfService/Error.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/share/html/SelfService/Prefs.html b/rt/share/html/SelfService/Prefs.html
index ac5d725ad..6478ef206 100755
--- a/rt/share/html/SelfService/Prefs.html
+++ b/rt/share/html/SelfService/Prefs.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -50,6 +50,23 @@
<& /Elements/ListActions, actions => \@results &>
<form method="post">
+<table width="100%" border="0">
+<tr>
+<td valign="top" class="boxcontainer" width=50%>
+<&| /Widgets/TitleBox, title => loc('Locale'), id => "user-prefs-identity" &>
+<table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="label"><&|/l&>Language</&>:</td>
+ <td class="value"><& /Elements/SelectLang, Name => 'Lang', Default => $user->Lang &></td>
+ </tr>
+ <tr>
+ <td class="label"><&|/l&>Timezone</&>:</td>
+ <td class="value"><& /Elements/SelectTimezone, Name => 'Timezone', Default => $user->Timezone &></td>
+ </tr>
+</table>
+</&>
+</td>
+<td valign="top">
<&| /Widgets/TitleBox, title => loc('Change password') &>
<& /Elements/EditPassword,
User => $user,
@@ -57,6 +74,7 @@
&>
</&>
+</td></tr></table>
<br />
<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
@@ -76,6 +94,29 @@ if (defined $NewPass1 && length $NewPass1 ) {
push @results, loc("Password: [_1]", $msg);
}
+my @fields = qw(
+ Lang Timezone
+ );
+
+$m->callback(
+ CallbackName => 'UpdateLogic',
+ fields => \@fields,
+ results => \@results,
+ UserObj => $user,
+ ARGSRef => \%ARGS,
+);
+
+push @results, UpdateRecordObject (
+ AttributesRef => \@fields,
+ Object => $user,
+ ARGSRef => \%ARGS,
+);
+
+if ( $Lang ) {
+ $session{'CurrentUser'}->LanguageHandle($Lang);
+ $session{'CurrentUser'} = $session{'CurrentUser'}; # force writeback
+}
+
if ($Signature) {
$Signature =~ s/(\r\n|\r)/\n/g;
if ($Signature ne $user->Signature) {
@@ -93,4 +134,5 @@ $Signature => undef
$CurrentPass => undef
$NewPass1 => undef
$NewPass2 => undef
+$Lang => undef
</%ARGS>
diff --git a/rt/share/html/SelfService/Update.html b/rt/share/html/SelfService/Update.html
index 6525d3de9..cc5e496db 100755
--- a/rt/share/html/SelfService/Update.html
+++ b/rt/share/html/SelfService/Update.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -51,7 +51,8 @@
% $m->callback(CallbackName => 'BeforeForm', %ARGS, ARGSRef => \%ARGS, Ticket => $Ticket );
-<form action="Display.html" method="post" enctype="multipart/form-data">
+<form action="Update.html" method="post" enctype="multipart/form-data">
+<input type="hidden" class="hidden" name="QuoteTransaction" value="<% $ARGS{QuoteTransaction}||'' %>" />
<input type="hidden" class="hidden" name="UpdateType" value="response" />
<input type="hidden" class="hidden" name="id" value="<%$Ticket->Id%>" />
<table width="100%">
@@ -68,21 +69,27 @@
<&|/l&>Subject</&>
</td>
<td class="value">
- <input name="UpdateSubject" size="60" value="<% $Ticket->Subject %>" />
+ <input name="UpdateSubject" size="60" value="<% $ARGS{UpdateSubject} || $Ticket->Subject || '' %>" />
</td>
</tr>
<& /Ticket/Elements/AddAttachments, %ARGS, TicketObj => $Ticket &>
<tr><td colspan="2"><& /Ticket/Elements/EditCustomFields, TicketObj => $Ticket &></td></tr>
</table>
-<& /Elements/MessageBox,
- Name => "UpdateContent",
- QuoteTransaction => $ARGS{QuoteTransaction}
- &>
+% if (exists $ARGS{UpdateContent}) {
+% # preserve QuoteTransaction so we can use it to set up sane references/in/reply to
+% my $temp = $ARGS{'QuoteTransaction'};
+% delete $ARGS{'QuoteTransaction'};
+<& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, IncludeSignature => 0, %ARGS&>
+% $ARGS{'QuoteTransaction'} = $temp;
+% } else {
+% my $IncludeSignature = 1;
+<& /Elements/MessageBox, Name=>"UpdateContent", IncludeSignature => $IncludeSignature, %ARGS &>
+% }
<br />
-<& /Elements/Submit &>
+<& /Elements/Submit, Label => loc('Update Ticket'), Name => 'SubmitTicket', id => 'SubmitTicket' &>
</form>
@@ -102,7 +109,12 @@ Abort( loc("No permission to view update ticket") )
unless ( $Ticket->CurrentUserHasRight('ReplyToTicket')
or $Ticket->CurrentUserHasRight('ModifyTicket') );
-$m->callback(CallbackName => 'BeforeDisplay', Ticket => \$Ticket, ARGSRef => \%ARGS);
+ProcessAttachments(ARGSRef => \%ARGS);
+
+if ( exists $ARGS{SubmitTicket} ) {
+ $m->callback(CallbackName => 'BeforeDisplay', Ticket => \$Ticket, ARGSRef => \%ARGS);
+ return $m->comp('Display.html', TicketObj => $Ticket, %ARGS);
+}
</%INIT>
<%ARGS>
diff --git a/rt/share/html/SelfService/index.html b/rt/share/html/SelfService/index.html
index 29accf551..ab43ab950 100755
--- a/rt/share/html/SelfService/index.html
+++ b/rt/share/html/SelfService/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)