]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Form.pm
Verhalten bei nicht existenten Waren verbessert
[mfinanz.git] / SL / Form.pm
index 6c3785b4d72bba14807eaa1f83c63f65dcfb124f..874aacee6f5d723463f988de0d92b2bcd110e8d0 100644 (file)
@@ -468,7 +468,7 @@ sub header {
 
   $layout->use_javascript("$_.js") for (qw(
     jquery jquery-ui jquery.cookie jqModal jquery.checkall jquery.download
-    common part_selection switchmenuframe
+    common part_selection switchmenuframe autocomplete_part
   ), "jquery/ui/i18n/jquery.ui.datepicker-$::myconfig{countrycode}");
 
   $self->{favicon} ||= "favicon.ico";
@@ -1070,11 +1070,11 @@ sub parse_template {
 
   close OUT if $self->{OUT};
 
-  Common::copy_file_to_webdav_folder($self) if ($::instance_conf->get_webdav
-                                                and $::instance_conf->get_webdav_documents and not $self->{preview});
+  my $copy_to_webdav = $::instance_conf->get_webdav && $::instance_conf->get_webdav_documents && !$self->{preview};
 
   if ($self->{media} eq 'file') {
     copy(join('/', $self->{cwd}, $userspath, $self->{tmpfile}), $out =~ m|^/| ? $out : join('/', $self->{cwd}, $out)) if $template->uses_temp_file;
+    Common::copy_file_to_webdav_folder($self)                                                                         if $copy_to_webdav;
     $self->cleanup;
     chdir("$self->{cwd}");
 
@@ -1083,6 +1083,8 @@ sub parse_template {
     return;
   }
 
+  Common::copy_file_to_webdav_folder($self) if $copy_to_webdav;
+
   if ($self->{media} eq 'email') {
 
     my $mail = new Mailer;