diff options
Diffstat (limited to 'rt/html/Ticket')
42 files changed, 1238 insertions, 695 deletions
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 b547242f2..c23a302b7 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,214 @@ %# 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"><% $QueueObj->Name %> +<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=100 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 @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 +298,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> diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html index dd4c093dc..1c0aa417a 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,8 @@ &> - +<& /Elements/Callback, _CallbackName => 'AfterShowHistory', Ticket => $TicketObj, %ARGS &> + <%ARGS> $id => undef $Create => undef @@ -119,6 +121,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; @@ -128,30 +134,46 @@ if ($ARGS{'id'} eq 'new') { } $ARGS{'UpdateContent'} =~ s/\r\n/\n/g if defined $ARGS{'UpdateContent'}; - if ( $ARGS{'UpdateTimeWorked'} || - $session{'Attachments'} || - ( defined $ARGS{'UpdateContent'} - && $ARGS{'UpdateContent'} ne '' - && $ARGS{'UpdateContent'} ne "-- \n" - . $session{'CurrentUser'}->UserObj->Signature )) { - $ARGS{UpdateAttachments} = $session{'Attachments'}; - ProcessUpdateMessage( ARGSRef => \%ARGS, - Actions => \@Actions, - TicketObj => $TicketObj ); - delete $session{'Attachments'}; + if ( $ARGS{'UpdateTimeWorked'} || ( + defined $ARGS{'UpdateContent'} + && $ARGS{'UpdateContent'} ne '' + && $ARGS{'UpdateContent'} ne "-- \n" + . $session{'CurrentUser'}->UserObj->Signature ) ) + { + $ARGS{UpdateAttachments} = $session{'Attachments'}; + ProcessUpdateMessage( + ARGSRef => \%ARGS, + Actions => \@Actions, + TicketObj => $TicketObj, + ); + 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 6ae188fa7..5af48cbf0 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: @@ -48,8 +50,7 @@ <td valign="top" width="50%"> <table> -% my @entry_fields; -% my $i; +% 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 @@ -61,16 +62,21 @@ <table> % } % $i++; - <tr> + <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> 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 a3492b749..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: @@ -86,38 +88,45 @@ my ( $Transaction, $Description, $Object ) = $TicketObj->$action( TimeTaken => $ARGS{'UpdateTimeWorked'}, DryRun => 1 ); +unless ( $Transaction ) { + $RT::Logger->error("Coulfn't fire '$action' action: $Description"); +} my @non_recipients = $TicketObj->SquelchMailTo; </%init> <h2><&|/l&>This message will be sent to...</&></h2> -<i><&|/l&>(Check boxes to disable notifications to the listed recipients)</&></i><br> + +% if ( $Object ) { +<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> % } -%} -<br> +% } +% } +<br /> + <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/Reminders b/rt/html/Ticket/Elements/Reminders new file mode 100644 index 000000000..63d68c7b1 --- /dev/null +++ b/rt/html/Ticket/Elements/Reminders @@ -0,0 +1,168 @@ +%# 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 }}} +<%args> +$Ticket => undef +$id => undef +$ShowCompleted => 0 +$Edit => 0 +</%args> +<%init> + +$Ticket = LoadTicket($id) if ($id); + +my $request_args = $m->request_args(); + +my $reminder_collection = $Ticket->Reminders->Collection; + +if ( $request_args->{'update-reminders'} ) { + while ( my $reminder = $reminder_collection->Next ) { + if ( $reminder->Status ne 'resolved' && $request_args->{ 'Complete-Reminder-' . $reminder->id } ) { + $Ticket->Reminders->Resolve($reminder); + } + elsif ( $reminder->Status eq 'resolved' && !$request_args->{ 'Complete-Reminder-' . $reminder->id } ) { + $Ticket->Reminders->Open($reminder); + } + + if ( exists( $request_args->{ 'Reminder-Subject-' . $reminder->id } ) && ( $reminder->Subject ne $request_args->{ 'Reminder-Subject-' . $reminder->id } )) { + $reminder->SetSubject( $request_args->{ 'Reminder-Subject-' . $reminder->id } ) ; + } + + if ( exists( $request_args->{ 'Reminder-Owner-' . $reminder->id } ) && ( $reminder->Owner != $request_args->{ 'Reminder-Owner-' . $reminder->id } )) { + $reminder->SetOwner( $request_args->{ 'Reminder-Owner-' . $reminder->id } , "Force" ) ; + } + + if ( exists( $request_args->{ 'Reminder-Due-' . $reminder->id } ) && ( $reminder->DueObj->Date ne $request_args->{ 'Reminder-Due-' . $reminder->id } )) { + $reminder->SetDue( $request_args->{ 'Reminder-Due-' . $reminder->id } ) ; + } + } +} + +if ( $request_args->{'NewReminder-Subject'} ) { + my $due_obj = RT::Date->new( $session{'CurrentUser'} ); + my $date = Time::ParseDate::parsedate( + $request_args->{'NewReminder-Due'}, + UK => $RT::DateDayBeforeMonth, + PREFER_PAST => 0, + PREFER_FUTURE => 1 + ); + $due_obj->Set( Value => $date, Format => 'unix' ); + my ( $add_id, $msg, $txnid ) = $Ticket->Reminders->Add( + + Subject => $request_args->{'NewReminder-Subject'}, + Owner => $request_args->{'NewReminder-Owner'}, + Due => $due_obj->ISO + ); +} + +# We've made changes, let's reload our search + +$reminder_collection = $Ticket->Reminders->Collection; +</%init> +<input type="hidden" class="hidden" name="id" value="<% $Ticket->id %>" /> +<input type="hidden" class="hidden" name="update-reminders" value="1" /> +<div> +% while (my $reminder = $reminder_collection->Next) { +% if ($reminder->Status eq 'resolved' && !$ShowCompleted) { +<input type="hidden" class="hidden" name="Complete-Reminder-<% $reminder->id %>" value="1" /> +% } elsif ($Edit) { +<& SELF:EditEntry, Reminder => $reminder, Ticket => $Ticket &> +% } else { +<& SELF:ShowEntry, Reminder => $reminder, Ticket => $Ticket &> +% } +% } +</div> +<div> +<h3><&|/l&>New reminder:</&></h3> +<& SELF:NewReminder, Ticket => $Ticket &> +<%method NewReminder> +<%args> +$Ticket +</%args> +<div class="input-row"> +<label class="horizontal" for="NewReminder-Subject" ><&|/l&>Subject</&>:</label> +<input type="text" size="15" name="NewReminder-Subject" /> +</div> +<div class="input-row"> +<label class="horizontal" for="NewReminder-Owner" ><&|/l&>Owner</&>:</label> +<& /Elements/SelectOwner, Name => 'NewReminder-Owner', QueueObj => $Ticket->QueueObj, DefaultValue => 0 &> +</div> +<div class="input-row"> +<label class="horizontal" for="NewReminder-Due" ><&|/l&>Due</&> <&|/l&>(yyyy/mm/dd)</&>:</label> +<& /Elements/SelectDate, Name => "NewReminder-Due", Default => "" &> +</div> +</div> +</%method> +<%method EditEntry> +<%args> +$Reminder +$Ticket +</%args> +<input + type="checkbox" + name="Complete-Reminder-<%$Reminder->id%>" + <% $Reminder->Status eq 'resolved' ? 'CHECKED' : '' %> +/> + <input type="text" size="15" name="Reminder-Subject-<% $Reminder->id %>" value="<%$Reminder->Subject%>" /> • + <& /Elements/SelectOwner, Name => 'Reminder-Owner-'.$Reminder->id, Queue => $Ticket->QueueObj, Default => $Reminder->Owner, DefaultValue => 0 &> + <& /Elements/SelectDate, Name => 'Reminder-Due-'.$Reminder->id, Default => $Reminder->DueObj->Date &> + (<%$Reminder->DueObj->Unix>0 ? $Reminder->DueObj->AgeAsString : '' %>)<br /> +</%method> +<%method ShowEntry> +<%args> +$Reminder +$Ticket +</%args> +<input + type="checkbox" + name="Complete-Reminder-<%$Reminder->id%>" + <% $Reminder->Status eq 'resolved' ? 'CHECKED' : '' %> +/> + <%$Reminder->Subject%> • + <%$Reminder->OwnerObj->Name%> + <%$Reminder->DueObj->Unix>0 ? "• ". $Reminder->DueObj->AgeAsString : '' |n%><br /> +</%method> 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 00ed3ccd1..c2ba649d3 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: @@ -45,36 +47,36 @@ %# END BPS TAGGED BLOCK }}} <table> <tr> - <td class="label"><&|/l&>Id</&>:</td> - <td class="value"><%$Ticket->Id %></td> + <td class="label id"><&|/l&>Id</&>:</td> + <td class="value id"><%$Ticket->Id %></td> </tr> <tr> - <td class="label"><&|/l&>Status</&>:</td> - <td class="value"><&|/l&><% $Ticket->Status%></&></td> + <td class="label status"><&|/l&>Status</&>:</td> + <td class="value status"><&|/l&><% $Ticket->Status%></&></td> </tr> % if ($Ticket->TimeEstimated) { <tr> - <td class="label"><&|/l&>Estimated</&>:</td> - <td class="value"><&|/l, $Ticket->TimeEstimated &>[_1] min</&></td> + <td class="label time estimated"><&|/l&>Estimated</&>:</td> + <td class="value time estimated"><& ShowTime, minutes => $Ticket->TimeEstimated &></td> </tr> % } % if ($Ticket->TimeWorked) { <tr> - <td class="label"><&|/l&>Worked</&>:</td> - <td class="value"><&|/l, $Ticket->TimeWorked &>[_1] min</&></td> + <td class="label time worked"><&|/l&>Worked</&>:</td> + <td class="value time worked"><& ShowTime, minutes => $Ticket->TimeWorked &></td> </tr> % } <tr> - <td class="label"><&|/l&>Left</&>:</td> - <td class="value"><&|/l, $Ticket->TimeLeft &>[_1] min</&></td> + <td class="label time left"><&|/l&>Left</&>:</td> + <td class="value time left"><& ShowTime, minutes => $Ticket->TimeLeft &></td> </tr> <tr> - <td class="label"><&|/l&>Priority</&>:</td> - <td class="value"><%$Ticket->Priority%>/<%$Ticket->FinalPriority %></td> + <td class="label priority"><&|/l&>Priority</&>:</td> + <td class="value priority"><%$Ticket->Priority%>/<%$Ticket->FinalPriority %></td> </tr> <tr> - <td class="label"><&|/l&>Queue</&>:</td> - <td class="value"><%$Ticket->QueueObj->Name%></td> + <td class="label queue"><&|/l&>Queue</&>:</td> + <td class="value queue"><%$Ticket->QueueObj->Name%></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 2ccbb3fea..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"><&|/l&>Created</&>:</TD> - <TD class="value"><% $Ticket->CreatedObj->AsString %></TD> - </TR> - <TR> - <TD class="label"><&|/l&>Starts</&>:</TD> - <TD class="value"><% $Ticket->StartsObj->AsString %></TD> - </TR> - <TR> - <TD class="label"><&|/l&>Started</&>:</TD> - <TD class="value"><% $Ticket->StartedObj->AsString %></TD> - </TR> - <TR> - <TD class="label"><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->id%>&Action=SetTold"><&|/l&>Last Contact</&></a>:</TD> - <TD class="value"><% $Ticket->ToldObj->AsString %></TD> - </TR> - <TR> - <TD class="label"><&|/l&>Due</&>:</TD> - <TD class="value"><% $Ticket->DueObj->AsString %></TD> - </TR> - <TR> - <TD class="label"><&|/l&>Closed</&>:</TD> - <TD class="value"><% $Ticket->ResolvedObj->AsString %></TD> - </TR> - <TR> - <TD class="label"><&|/l&>Updated</&>:</TD> -% my $UpdatedString = $Ticket->LastUpdated ? (loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)) : loc("Never"); +<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"><A HREF="#lasttrans"><% $UpdatedString | h %></a></TD> + <td class="value date updated"><A HREF="#lasttrans"><% $UpdatedString | h %></a></td> % } else { - <TD class="value"><% $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 75e34776f..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 = ' '; -} -$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') + : ' '; + + 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> — }; + $titleright .= q[<span class="selected">] . loc("Full headers") . "</span>"; + } + else { + $titleright .= q[<span class="selected">] . loc("Brief headers") . "</span> — "; + $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'}); @@ -136,8 +136,16 @@ if ($Tickets) { } else { $Transactions = $Ticket->Transactions; } -my $i; + +my $OldestFirst = $RT::OldestTransactionsFirst? 'ASC': 'DESC'; +$Transactions->OrderByCols( { FIELD => 'Created', + ORDER => $OldestFirst }, + { FIELD => 'id', + ORDER => $OldestFirst }, + ); + +my $i; $Attachments ||= $m->comp('/Ticket/Elements/FindAttachments', Ticket => $Ticket, Tickets => $Tickets || undef); $AttachmentContent ||= $m->comp('/Ticket/Elements/LoadTextAttachments', Ticket => $Ticket); diff --git a/rt/html/Ticket/Elements/ShowMembers b/rt/html/Ticket/Elements/ShowMembers index f4fec1c7c..4bf592555 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: @@ -44,15 +46,15 @@ %# %# 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><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: <%$member->Subject%> [<%loc($member->Status)%>]<br /> % if ($depth < 8) { <&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &> % } % } -</UL> +</ul> % } <%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/ShowRequestor b/rt/html/Ticket/Elements/ShowRequestor index 421d38e0a..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,42 +47,41 @@ %# 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; my $name=$requestor->RealName || $requestor->EmailAddress; my $tickets = RT::Tickets->new($session{'CurrentUser'}); -$tickets->LimitWatcher(TYPE => 'Requestor', VALUE => $requestor->EmailAddress ); -$tickets->LimitStatus( VALUE => 'open'); -$tickets->LimitStatus( VALUE => 'new'); +$tickets->FromSQL( "Requestor.id = ". $requestor->id ." AND (Status = 'open' OR Status = 'new')" ); $tickets->RowsPerPage($rows); -$tickets->OrderBy(FIELD => 'Priority', - ORDER => 'DESC'); +$tickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC'); </%PERL> -% unless ($requestor->Privileged) { -<& /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> $Ticket=>undef diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary index 31571400e..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,58 +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> - </TD> - <TD VALIGN=TOP WIDTH="50%" class="boxcontainer"> + class => 'ticket-info-people' &> + <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> + </&> + + <& /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/ShowTime b/rt/html/Ticket/Elements/ShowTime new file mode 100644 index 000000000..92e84f681 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowTime @@ -0,0 +1,55 @@ +%# 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 }}} +% if ($minutes < 60) { +<&|/l, $minutes &>[_1] min</&> +% } else { +<&|/l, sprintf("%.1f",$minutes / 60) &>[quant,_1,hour]</&> (<&|/l, $minutes &>[_1] min</&>) +% } +<%ARGS> +$minutes +</%ARGS> diff --git a/rt/html/Ticket/Elements/ShowTransaction b/rt/html/Ticket/Elements/ShowTransaction index 8bf589d45..12d8d3b68 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"> </a>' : ' ' |n %></TD> -<TD>  </TD> -<TD><font size=-2><% $transdate|n %></font> </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"> </a>' : ' ' |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%> </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/ /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 ) { @@ -138,15 +148,15 @@ my @DisplayHeaders=qw ( _all); if ( $Transaction->Type =~ /EmailRecord$/ ) { @DisplayHeaders = qw(To Cc Bcc); + my $aid = + $titlebar_commands .= "[<a target=\"_blank\" href=\"$EmailRecordPath?id=" . $Transaction->Ticket . "&Transaction=" . $Transaction->Id . "&Attachment=" - . ( $Transaction->Attachments->First - && $Transaction->Attachments->First->Id ) - + . ( $Attachments->[0] && $Attachments->[0]->id ) . '">' . loc('Show') . "</a>] "; $ShowBody = 0; } diff --git a/rt/html/Ticket/Elements/ShowTransactionAttachments b/rt/html/Ticket/Elements/ShowTransactionAttachments index d9e94ffa2..9a66ee780 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( 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) { <<%$User->EmailAddress%>> % } +% 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..400526f62 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, 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..9baa954aa 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,12 +54,13 @@ <& /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> @@ -66,6 +69,7 @@ <%INIT> my $Ticket = LoadTicket($id); +$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS); my @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/Reminders.html b/rt/html/Ticket/Reminders.html new file mode 100755 index 000000000..2a3ba4c08 --- /dev/null +++ b/rt/html/Ticket/Reminders.html @@ -0,0 +1,71 @@ +%# 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 }}} +<& /Elements/Header, Title => loc("Reminder ticket #[_1]", $Ticket->Id) &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket, + current_tab => "Ticket/Reminders.html?id=".$Ticket->Id, + Title => loc("Reminders for ticket #[_1]", $Ticket->Id) &> +<form action="<%$RT::WebPath%>/Ticket/Reminders.html" method="post"> +<&|/Widgets/TitleBox, title => loc("Reminders"), + title_class=> 'inverse', + color => "#666699" &> + +<& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 1, Edit => 1 &> +</&> +<& /Elements/Submit, Label => 'Save'&> +</form> + + +<%INIT> + +my $Ticket = LoadTicket($id); + +</%INIT> +<%ARGS> +$id => undef +</%ARGS> 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..3d2a0c5a4 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 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; |