X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=0bcb897bf98c446facfb361ab7fe7d92a46b4e8c;hb=74d33c7dac34e5f4aa55c259f5ec6f07fff81751;hp=f73c437765486bceb761e5d8f01059ccb1b71a1e;hpb=0f69c7262394cd4c831332f1e87a2b28ef6f6096;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index f73c43776..0bcb897bf 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -402,19 +402,19 @@ sub form_header { } } - my $onload = ""; + my $dispatch_to_popup = ''; if ($form->{resubmit} && ($form->{format} eq "html")) { - $onload = "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';"; - $onload .= "document.do.submit();"; + $dispatch_to_popup = "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';"; + $dispatch_to_popup .= "document.do.submit();"; } elsif ($form->{resubmit}) { # emulate click for resubmitting actions - $onload = "document.oe.${_}.click(); " for grep { /^action_/ } keys %$form; - $onload .= "document.oe.submit();"; + $dispatch_to_popup = "document.oe.${_}.click(); " for grep { /^action_/ } keys %$form; + $dispatch_to_popup .= "document.oe.submit();"; } elsif ($creditwarning) { - $onload = "alert('$credittext')"; + $::request->{layout}->add_javascripts_inline("alert('$credittext')"); } - $TMPL_VAR{onload} = $onload; + $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup})"); $TMPL_VAR{dateformat} = $myconfig{dateformat}; $TMPL_VAR{numberformat} = $myconfig{numberformat}; @@ -1999,7 +1999,7 @@ sub edit_periodic_invoices_config { $::form->{AR} = [ grep { $_->{link} =~ m/(?:^|:)AR(?::|$)/ } @{ $::form->{ALL_CHARTS} } ]; $::form->{title} = $::locale->text('Edit the configuration for periodic invoices'); - $::form->header(); + $::form->header(no_layout => 1); print $::form->parse_html_template('oe/edit_periodic_invoices_config', $config); $::lxdebug->leave_sub();