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";
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();
}