X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=3908f74351be408abf9a150aa6ff47d954bfef82;hb=b6cc210659f5ed09f22de0b5985c62457ec634ac;hp=e9e7bb50dbf4ff4e8241de5a921527ef5f881585;hpb=eb00db46a38d4e447aa6af7ead58eb386d7494ab;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index e9e7bb50d..3908f7435 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -402,19 +402,18 @@ 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; } 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}; @@ -1459,8 +1458,6 @@ sub backorder_exchangerate { $form->header; print qq| - -
{script}> |; @@ -1512,8 +1509,6 @@ sub backorder_exchangerate { . $locale->text('Continue') . qq|">
- - |; $main::lxdebug->leave_sub(); @@ -2003,7 +1998,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();