[Rt-commit] rt branch, 4.2/route-actions-via-update-page, created. rt-4.1.8-151-g28c940b
Ruslan Zakirov
ruz at bestpractical.com
Thu Apr 18 04:50:24 EDT 2013
The branch, 4.2/route-actions-via-update-page has been created
at 28c940b0d79b0089dbec59a074508b02d23a81c4 (commit)
- Log -----------------------------------------------------------------
commit 7d1d99430b770bad8734ece0937d3ee77ca4385a
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Sun Jul 15 20:16:56 2012 +0400
point all status change actions to Update.html
Quick actions are now routed to Display.html. It makes
harder to implement variouse extensions that require
users to fill CFs/core fields/etc when status is changed.
These quick links should fall through Update.html to
Display.html in vanilla RT and stay backwards compatible.
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 713b125..eb84dde 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -671,20 +671,13 @@ my $build_main_nav = sub {
my $action = $info->{'update'} || '';
my $url = '/Ticket/';
- if ($action) {
- $url .= "Update.html?"
- . $query_string->(
- Action => $action,
- DefaultStatus => $next,
- id => $id,
- );
- } else {
- $url .= "Display.html?"
- . $query_string->(
- Status => $next,
- id => $id,
- );
- }
+ $url .= "Update.html?". $query_string->(
+ $action
+ ? (Action => $action)
+ : (SubmitTicket => 1, Status => $next),
+ DefaultStatus => $next,
+ id => $id,
+ );
my $key = $info->{'label'} || ucfirst($next);
$actions->child( $key => title => loc( $key ), path => $url);
}
commit 28c940b0d79b0089dbec59a074508b02d23a81c4
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Apr 18 12:40:44 2013 +0400
get rid of uninit warnings in Update.html
$Action argument is not really required
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 3f1274e..90789b0 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -56,7 +56,7 @@
% $m->callback( CallbackName => 'FormStart', ARGSRef => \%ARGS, Ticket => $TicketObj, CanRespond => $CanRespond, CanComment => $CanComment, ResponseDefault => $ResponseDefault, CommentDefault => $CommentDefault );
<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}||'' %>" />
+<input type="hidden" class="hidden" name="Action" value="<% $Action %>" />
<& /Elements/GnuPG/SignEncryptWidget:ShowIssues, self => $gnupg_widget &>
@@ -229,8 +229,8 @@ if ($Action ne 'Respond') {
}
my $type = $ARGS{'UpdateType'} ? $ARGS{'UpdateType'} :
- lc $ARGS{'Action'} eq 'respond' ? 'response' :
- lc $ARGS{'Action'} eq 'comment' ? 'private' :
+ lc $Action eq 'respond' ? 'response' :
+ lc $Action eq 'comment' ? 'private' :
'none' ;
@@ -298,6 +298,6 @@ if ( !$checks_failure && !$skip_update && exists $ARGS{SubmitTicket} ) {
<%ARGS>
$id => undef
-$Action => undef
+$Action => ''
$DefaultStatus => undef
</%ARGS>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list