]> git.uio.no Git - usit-rt.git/blobdiff - share/html/Ticket/Create.html
Upgrade to 4.0.13
[usit-rt.git] / share / html / Ticket / Create.html
index ad0023f80884ed3d1a0386e6e9f037cbc3540154..9e708a4c6fc2b6d7d128df4538e47597bc8f8e51 100644 (file)
@@ -361,31 +361,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') {
-    delete $session{'Attachments'};
-}
+ProcessAttachments(ARGSRef => \%ARGS);
 
 my $checks_failure = 0;