[Rt-commit] r14491 - in rt/3.8/trunk: share/html/Ticket
falcone at bestpractical.com
falcone at bestpractical.com
Thu Jul 24 18:15:17 EDT 2008
Author: falcone
Date: Thu Jul 24 18:15:16 2008
New Revision: 14491
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/share/html/Ticket/Create.html
Log:
r36138 at ketch: falcone | 2008-07-24 18:14:49 -0400
* add a new callback before ticket creation so you can implement
custom validation or stop creation for another reason.
RTFM will use this to stop creation when it inserts an Article
into the MessageBox
Modified: rt/3.8/trunk/share/html/Ticket/Create.html
==============================================================================
--- rt/3.8/trunk/share/html/Ticket/Create.html (original)
+++ rt/3.8/trunk/share/html/Ticket/Create.html Thu Jul 24 18:15:16 2008
@@ -389,10 +389,13 @@
$checks_failure = 1 unless $status;
}
+my $skip_create = 0;
+$m->callback( CallbackName => 'BeforeCreate', ARGSRef => \%ARGS, skip_create => \$skip_create,
+ checks_failure => $checks_failure, results => \@results );
if ((!exists $ARGS{'AddMoreAttach'}) and (defined($ARGS{'id'}) and $ARGS{'id'} eq 'new')) { # new ticket?
- if ( $ValidCFs && !$checks_failure ) {
- $m->comp('Display.html', %ARGS);
+ if ( $ValidCFs && !$checks_failure && !$skip_create ) {
+ $m->comp(Display.html', %ARGS);
$RT::Logger->crit("After display call; error is $@");
$m->abort();
}
More information about the Rt-commit
mailing list