summaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
authorivan <ivan>2010-11-10 23:12:42 +0000
committerivan <ivan>2010-11-10 23:12:42 +0000
commit9e8c4a41aa10f40c7c8fc744e37ea8b21d4dce1e (patch)
tree25162bc05390d3c30a89a36f7d3c563f1c988abc /rt
parentf6450113d5a5d77a5f565630cdc48da0fc34b3e1 (diff)
QuickCreateDisplay RT pref and config option to redirect to ticket display on quick create, RT#10429
Diffstat (limited to 'rt')
-rw-r--r--rt/FREESIDE_MODIFIED1
-rw-r--r--rt/etc/RT_SiteConfig.pm3
-rw-r--r--rt/lib/RT/Config.pm10
-rwxr-xr-xrt/share/html/index.html6
4 files changed, 19 insertions, 1 deletions
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 " .