[Rt-commit] r18010 - in rt/3.999/branches/merge_to_3.8.2: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Jan 29 05:11:43 EST 2009
Author: sunnavy
Date: Thu Jan 29 05:11:43 2009
New Revision: 18010
Modified:
rt/3.999/branches/merge_to_3.8.2/ (props changed)
rt/3.999/branches/merge_to_3.8.2/share/html/Ticket/Create.html
Log:
r19214 at sunnavys-mb: sunnavy | 2009-01-29 17:33:04 +0800
merged share/html/Ticket/Create.html
Modified: rt/3.999/branches/merge_to_3.8.2/share/html/Ticket/Create.html
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/Ticket/Create.html (original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/Ticket/Create.html Thu Jan 29 05:11:43 2009
@@ -47,7 +47,7 @@
%# END BPS TAGGED BLOCK }}}
<&| /_elements/wrapper,
title => _("Create a new ticket"),
- onload => "hide(document.getElementById('Ticket-Create-details'));" &>
+ onload => "function () { hide(document.getElementByid('Ticket-Create-details')) }" &>
<& /Elements/Tabs,
current_toptab => "Ticket/Create.html",
title => _("Create a new ticket"),
@@ -159,7 +159,7 @@
<tr>
<td colspan="6">
<&|/l&>describe the issue below</&>:<br />
-<& /Elements/Callback, _Callbackname => 'before_message_box', queue_obj => $queue_obj, %ARGS &>
+% $m->callback( %ARGS, queue_obj => $queue_obj, callbackname => 'BeforeMessageBox' );
% if (exists $ARGS{content}) {
<& /Elements/MessageBox, default => $ARGS{content}, include_signature => 0 &>
% } else {
@@ -248,6 +248,9 @@
</&>
<%INIT>
+$m->callback( callbackname => "Init", args_ref => \%ARGS );
+my $queue = $ARGS{queue};
+
my $cloneticket_obj;
if ( $clone_ticket ) {
$cloneticket_obj = RT::Model::Ticket->new();
@@ -346,21 +349,16 @@
# {{{ store the uploaded attachment in session
if ($ARGS{'attach'}) { # attachment?
- $session{'Attachments'} = {} unless defined $session{'Attachments'};
-
- my $subject = "$ARGS{'attach'}";
-
- # strip leading directories
- $subject =~ s#^.*[\\/]##;
-
my $attachment = make_mime_entity(
subject => $subject,
- AttachmentFieldname => 'attach'
+ attachment_field_name => 'attach'
);
-
- $session{'Attachments'} = { %{$session{'Attachments'} || {}},
- $ARGS{'attach'} => $attachment };
-
+ my $file_path = Encode::decode_utf8("$ARGS{'attach'}");
+ $session{'Attachments'} = {
+ %{$session{'Attachments'} || {}},
+ $file_path => $attachment,
+ };
+
}
# }}}
@@ -387,9 +385,13 @@
$checks_failure = 1 unless $status;
}
+my $skip_create = 0;
+$m->callback( callbackname => 'BeforeCreate', args_ref => \%ARGS, skip_create => \$skip_create,
+ checks_failure => $checks_failure, results => \@results );
if ((!exists $ARGS{'add_more_attach'}) and (defined($ARGS{'id'}) and $ARGS{'id'} eq 'new')) { # new ticket?
- if ( $ValidCFs && !$checks_failure ) {
+ if ( $ValidCFs && !$checks_failure && !$skip_create ) {
+
$m->comp('Display.html', %ARGS);
Jifty->log->fatal("After display call; error is $@");
$m->abort();
@@ -418,6 +420,5 @@
$depended_on_by => undef
$member_of => undef
$quote_transaction => undef
-$queue => undef
$clone_ticket => undef
</%ARGS>
More information about the Rt-commit
mailing list