From: ivan Date: Wed, 10 Nov 2010 23:12:41 +0000 (+0000) Subject: QuickCreateDisplay RT pref and config option to redirect to ticket display on quick... X-Git-Tag: TORRUS_1_0_9~103 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=315efbebcacc909a11eb0379bd2f67bd3145243c QuickCreateDisplay RT pref and config option to redirect to ticket display on quick create, RT#10429 --- diff --git a/rt/FREESIDE_MODIFIED b/rt/FREESIDE_MODIFIED index 45a61062e..2200dcfa4 100644 --- a/rt/FREESIDE_MODIFIED +++ b/rt/FREESIDE_MODIFIED @@ -25,6 +25,7 @@ lib/RT/URI/freeside/Internal.pm lib/RT/URI/freeside/XMLRPC.pm share/html/autohandler #Footer getting appended where unwelcome + share/html/index.html #option to redirect to ticket display on quick create share/html/Admin/CustomFields/Modify.html #CheckMandatoryFields share/html/Admin/Users/Modify.html share/html/Elements/CollectionList diff --git a/rt/etc/RT_SiteConfig.pm b/rt/etc/RT_SiteConfig.pm index eb2d09af5..f833f0d52 100644 --- a/rt/etc/RT_SiteConfig.pm +++ b/rt/etc/RT_SiteConfig.pm @@ -49,5 +49,8 @@ Set($UsernameFormat, 'verbose'); #back to concise to hide email addresses Set($MessageBoxWidth, 80); Set($MessageBoxRichTextHeight, 368); +#redirects to ticket display on quick create +#Set($QuickCreateRedirect, 1); + #Set(@Plugins,(qw(Extension::QuickDelete RT::FM))); 1; diff --git a/rt/lib/RT/Config.pm b/rt/lib/RT/Config.pm index ce66bb6cc..3634557c6 100644 --- a/rt/lib/RT/Config.pm +++ b/rt/lib/RT/Config.pm @@ -313,6 +313,16 @@ our %META = ( Hints => 'Use css rules to display text monospaced and with formatting preserved, but wrap as needed. This does not work well with IE6 and you should use the previous option', #loc }, }, + QuickCreateDisplay => { + Section => 'Ticket display', + Overridable => 1, + SortOrder => 6, + Widget => '/Widgets/Form/Boolean', + WidgetArguments => { + Description => 'On Quick Create, redirect to ticket display', #loc + #Hints => '', #loc + }, + }, # User overridable locale options DateTimeFormat => { diff --git a/rt/share/html/index.html b/rt/share/html/index.html index ad9964cdb..2d703584e 100755 --- a/rt/share/html/index.html +++ b/rt/share/html/index.html @@ -115,7 +115,11 @@ if ( $ARGS{'QuickCreate'} ) { From => $session{'CurrentUser'}->EmailAddress, Content => $ARGS{'Content'}, Subject => $ARGS{'Subject'}); - push @results, $msg; + if ( $t && $t->Id && RT->Config->Get('QuickCreateDisplay', $session{'CurrentUser'}) ) { + RT::Interface::Web::Redirect(RT->Config->Get('WebURL')."Ticket/Display.html?id=". $t->Id); + } else { + push @results, $msg; + } } elsif ( !$ValidCFs ) { push @results, "can't quickly create ticket in queue " .