diff options
author | ivan <ivan> | 2012-01-21 03:46:24 +0000 |
---|---|---|
committer | ivan <ivan> | 2012-01-21 03:46:24 +0000 |
commit | 24548f7cf666bac02335d0bc74f81251c7b4ab50 (patch) | |
tree | e0f4f4a25b3a55e71957a1fb186e35fb9800be92 /rt/share/html | |
parent | 75162bb14b3e38d66617077843f4dfdcaf09d5c4 (diff) |
import rt 3.8.11BESTPRACTICAL
Diffstat (limited to 'rt/share/html')
-rw-r--r-- | rt/share/html/Admin/CustomFields/Modify.html | 2 | ||||
-rwxr-xr-x | rt/share/html/REST/1.0/logout | 2 | ||||
-rwxr-xr-x | rt/share/html/Search/Bulk.html | 6 | ||||
-rw-r--r-- | rt/share/html/Search/Elements/SelectChartType | 2 | ||||
-rwxr-xr-x | rt/share/html/Ticket/Elements/PreviewScrips | 8 | ||||
-rwxr-xr-x | rt/share/html/Ticket/Elements/ShowTransaction | 14 |
6 files changed, 24 insertions, 10 deletions
diff --git a/rt/share/html/Admin/CustomFields/Modify.html b/rt/share/html/Admin/CustomFields/Modify.html index c94c560ec..c428bcd25 100644 --- a/rt/share/html/Admin/CustomFields/Modify.html +++ b/rt/share/html/Admin/CustomFields/Modify.html @@ -196,7 +196,7 @@ if ( $ARGS{'Update'} && $id ne 'new' ) { # Update any existing values my $values = $CustomFieldObj->ValuesObj; while ( my $value = $values->Next ) { - foreach my $attr qw(Name Description SortOrder Category) { + foreach my $attr (qw(Name Description SortOrder Category)) { my $param = join("-", $paramtag, $value->Id, $attr); next unless exists $ARGS{$param}; $ARGS{$param} =~ s/^\s+//; diff --git a/rt/share/html/REST/1.0/logout b/rt/share/html/REST/1.0/logout index a6b0bac1f..2e59b1dca 100755 --- a/rt/share/html/REST/1.0/logout +++ b/rt/share/html/REST/1.0/logout @@ -46,6 +46,6 @@ %# %# END BPS TAGGED BLOCK }}} <%PERL> -tied(%session)->delete if (defined %session); +tied(%session)->delete if keys %session; </%PERL> RT/<% $RT::VERSION %> 200 Ok diff --git a/rt/share/html/Search/Bulk.html b/rt/share/html/Search/Bulk.html index e2b757499..74487cdd6 100755 --- a/rt/share/html/Search/Bulk.html +++ b/rt/share/html/Search/Bulk.html @@ -60,7 +60,7 @@ <& /Elements/ListActions, actions => \@results &> <form method="post" action="<% RT->Config->Get('WebPath') %>/Search/Bulk.html" enctype="multipart/form-data"> -% foreach my $var qw(Query Format OrderBy Order Rows Page SavedChartSearchId) { +% foreach my $var (qw(Query Format OrderBy Order Rows Page SavedChartSearchId)) { <input type="hidden" class="hidden" name="<%$var%>" value="<%$ARGS{$var} || ''%>" /> %} <& /Elements/CollectionList, @@ -358,13 +358,13 @@ unless ( $ARGS{'AddMoreAttach'} ) { my @watchresults = ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS ); - foreach my $type qw(MergeInto DependsOn MemberOf RefersTo) { + foreach my $type (qw(MergeInto DependsOn MemberOf RefersTo)) { $ARGS{ $Ticket->id . "-" . $type } = $ARGS{"Ticket-$type"}; $ARGS{ $type . "-" . $Ticket->id } = $ARGS{"$type-Ticket"}; } @linkresults = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS ); - foreach my $type qw(MergeInto DependsOn MemberOf RefersTo) { + foreach my $type (qw(MergeInto DependsOn MemberOf RefersTo)) { delete $ARGS{ $type . "-" . $Ticket->id }; delete $ARGS{ $Ticket->id . "-" . $type }; } diff --git a/rt/share/html/Search/Elements/SelectChartType b/rt/share/html/Search/Elements/SelectChartType index da4cbfa62..42cd4e4b2 100644 --- a/rt/share/html/Search/Elements/SelectChartType +++ b/rt/share/html/Search/Elements/SelectChartType @@ -50,7 +50,7 @@ $Name => 'ChartType' $Default => 'bar' </%args> <select id="<%$Name%>" name="<%$Name%>"> -% foreach my $option qw(bar pie) { +% foreach my $option (qw(bar pie)) { % # 'bar' # loc % # 'pie' # loc <option value="<%$option%>"<% $option eq $Default ? qq[ selected="selected"] : '' |n %>><%loc($option)%></option> diff --git a/rt/share/html/Ticket/Elements/PreviewScrips b/rt/share/html/Ticket/Elements/PreviewScrips index a7576e5ad..dcf85a558 100755 --- a/rt/share/html/Ticket/Elements/PreviewScrips +++ b/rt/share/html/Ticket/Elements/PreviewScrips @@ -65,7 +65,7 @@ my @non_recipients = @{ $squelch{'EmailAddresses'} }; <b><% $scrip->Description || loc('Scrip #[_1]',$scrip->id) %></b><br /> <&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name)&>[_1] [_2] with template [_3]</&> <br /> -%foreach my $type qw(To Cc Bcc) { +%foreach my $type (qw(To Cc Bcc)) { %my @addresses = $scrip->ActionObj->Action->$type(); <ul> %foreach my $addr (@addresses) { @@ -90,7 +90,7 @@ my @non_recipients = @{ $squelch{'EmailAddresses'} }; % next unless $rule->{hints} && $rule->{hints}{class} eq 'SendEmail'; <b><% $rule->Describe %></b> % my $data = $rule->{hints}{recipients}; -% foreach my $type qw(To Cc Bcc) { +% foreach my $type (qw(To Cc Bcc)) { <ul> % foreach my $address (@{$data->{$type}}) { <li> @@ -205,7 +205,7 @@ foreach my $scrip ( @{ $txn->Scrips->Prepared } ) { my $action = $scrip->ActionObj->Action; next unless $action->isa('RT::Action::SendEmail'); - foreach my $type qw(To Cc Bcc) { + foreach my $type (qw(To Cc Bcc)) { push @recipients, $action->$type(); } } @@ -250,7 +250,7 @@ foreach my $scrip ( @{ $txn->Scrips->Prepared } ) { my $action = $scrip->ActionObj->Action; next unless $action->isa('RT::Action::SendEmail'); - foreach my $type qw(To Cc Bcc) { + foreach my $type (qw(To Cc Bcc)) { push @recipients, $action->$type(); } } diff --git a/rt/share/html/Ticket/Elements/ShowTransaction b/rt/share/html/Ticket/Elements/ShowTransaction index 14c4d2aba..e76e00495 100755 --- a/rt/share/html/Ticket/Elements/ShowTransaction +++ b/rt/share/html/Ticket/Elements/ShowTransaction @@ -142,6 +142,13 @@ unless ( $type_class ) { } } +$m->callback( + CallbackName => 'MassageTypeClass', + Transaction => $Transaction, + TypeClassRef => \$type_class, + ARGSRef => \%ARGS, +); + my $TicketString = ''; if ( $Ticket->Id != $Transaction->Ticket ) { $TicketString = loc("Ticket #[_1]:", $Transaction->Ticket) .' '; @@ -158,6 +165,13 @@ unless ($Attachments) { } my $titlebar_commands = ''; +$m->callback( + CallbackName => 'MassageAttachments', + Transaction => $Transaction, + AttachmentsRef => \$Attachments, + ARGSRef => \%ARGS, +); + if ( $type =~ /EmailRecord$/ ) { $titlebar_commands .= |