X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fhtml%2FSelfService%2FDisplay.html;h=0410e1b48d429af3ac21a9634f2216e73f363077;hp=f7140df022189743e31f9d23803d04bb8544ee90;hb=ef20b2b6b1feb47ad02b5ff7525f1a0fd11d0fa4;hpb=a513c0bef534d05f03c1242831b6f3be19b97dae diff --git a/rt/html/SelfService/Display.html b/rt/html/SelfService/Display.html index f7140df02..0410e1b48 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 %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth 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 &> - - - + +
- <& /Elements/TitleBoxStart, title => loc('The Basics'), + + + - + - -
+ <&| /Widgets/TitleBox, title => loc('The Basics'), title_class=> 'inverse', color => "#993333" &> <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &> <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - - <& /Elements/TitleBoxStart, title => loc("Dates"), + + + <&| /Widgets/TitleBox, title => loc("Dates"), title_class=> 'inverse', color => "#663366" &> <& /Ticket/Elements/ShowDates, Ticket => $Ticket, UpdatedLink => 0 &> - <& /Elements/TitleBoxEnd &> -
+ +
@@ -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 ) ) @@ -206,6 +200,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 =