X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Fshare%2Fhtml%2FTicket%2FCreate.html;h=7a1619a7e08c47e34271ec428d343a3249a95861;hb=919e930aa9279b3c5cd12b593889cd6de79d67bf;hp=8c6a58ad0d4c95461b44b5bd5d7376cb82c07c83;hpb=54a357b171aa44f9399b4c146acd2afd3b686075;p=freeside.git diff --git a/rt/share/html/Ticket/Create.html b/rt/share/html/Ticket/Create.html index 8c6a58ad0..7a1619a7e 100755 --- a/rt/share/html/Ticket/Create.html +++ b/rt/share/html/Ticket/Create.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -53,6 +53,7 @@ <& /Elements/ListActions, actions => \@results &>
+ % $m->callback( CallbackName => 'FormStart', QueueObj => $QueueObj, ARGSRef => \%ARGS ); @@ -105,8 +106,8 @@ % $m->callback( CallbackName => 'AfterOwner', ARGSRef => \%ARGS ); - <& /Ticket/Elements/EditCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1 &> - <& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1 &> + <& /Ticket/Elements/EditCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1, KeepValue => 1 &> + <& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1, KeepValue => 1 &> % $m->callback( CallbackName => 'AfterBasics', QueueObj => $QueueObj, ARGSRef => \%ARGS ); @@ -337,8 +338,14 @@ if ($CloneTicket) { while ( my $cf_value = $cf_values->Next ) { push @cf_values, $cf_value->Content; } - $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = join "\n", - @cf_values; + + if ( @cf_values > 1 && $cf->Type eq 'Select' ) { + $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = \@cf_values; + } + else { + $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = join "\n", + @cf_values; + } } # Pass customer links along (even though cloning of parent links @@ -376,32 +383,7 @@ my $ValidCFs = $m->comp( ARGSRef => \%ARGS ); -# deal with deleting uploaded attachments -foreach my $key (keys %ARGS) { - if ($key =~ m/^DeleteAttach-(.+)$/) { - delete $session{'Attachments'}{$1}; - } - $session{'Attachments'} = { %{$session{'Attachments'} || {}} }; -} - -# store the uploaded attachment in session -if ( defined $ARGS{'Attach'} && length $ARGS{'Attach'} ) { # attachment? - my $attachment = MakeMIMEEntity( - AttachmentFieldName => 'Attach' - ); - - my $file_path = Encode::decode_utf8("$ARGS{'Attach'}"); - $session{'Attachments'} = { - %{$session{'Attachments'} || {}}, - $file_path => $attachment, - }; -} - -# delete temporary storage entry to make WebUI clean -unless (keys %{$session{'Attachments'}} and - ($ARGS{'id'} eq 'new' or $ARGS{'id'} eq 'refresh')) { - delete $session{'Attachments'}; -} +ProcessAttachments(ARGSRef => \%ARGS); my $checks_failure = 0;