From 95795aa002c50ae10bf8306ff43305fe6bdd63bb Mon Sep 17 00:00:00 2001 From: Thomas Heck Date: Mon, 2 Dec 2013 16:57:15 +0100 Subject: [PATCH] =?utf8?q?"Kunden/Lieferanten=20Erfassen"-Button=20f=C3=BC?= =?utf8?q?hrt=20zum=20Controller?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/ct.pl | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 513a7ff21..f3a90ae3d 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -54,6 +54,7 @@ use SL::DB::Business; use SL::DB::Default; use SL::Helper::Flash; use SL::ReportGenerator; +use SL::MoreCommon qw(uri_encode); require "bin/mozilla/common.pl"; require "bin/mozilla/reportgenerator.pl"; @@ -66,18 +67,13 @@ use strict; sub add { $main::lxdebug->enter_sub(); - $main::auth->assert('customer_vendor_edit'); - - my $form = $main::form; - my %myconfig = %main::myconfig; - - $form->{title} = "Add"; - $form->{callback} = "$form->{script}?action=add&db=$form->{db}" unless $form->{callback}; + my $url = 'controller.pl?action=CustomerVendor/add&db='. ($::form->{db} eq 'vendor' ? 'vendor' : 'customer'); - CT->populate_drop_down_boxes(\%myconfig, \%$form); + if ( $::form->{callback} ) { + $url .= '&callback='. uri_encode($::form->{callback}); + } - &form_header; - &form_footer; + print $::form->redirect_header($url); $main::lxdebug->leave_sub(); } -- 2.20.1