X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Ffu.pl;h=ef80a73cd4077919cd11a3c0135f194097cc4ea3;hb=937e37ad007405c6a3a389ee18006379ffecc073;hp=1879be0ee7d4820b4d833e26526211ccd18eb06c;hpb=883a5485970d83d429baeba7735c19e75327f1c4;p=kivitendo-erp.git diff --git a/bin/mozilla/fu.pl b/bin/mozilla/fu.pl index 1879be0ee..ef80a73cd 100644 --- a/bin/mozilla/fu.pl +++ b/bin/mozilla/fu.pl @@ -10,6 +10,8 @@ use strict; sub _collect_links { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $dest = shift; my $form = $main::form; @@ -28,6 +30,8 @@ sub _collect_links { sub add { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $form = $main::form; my %myconfig = %main::myconfig; my $locale = $main::locale; @@ -57,6 +61,8 @@ sub add { sub edit { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $form = $main::form; my $locale = $main::locale; @@ -82,6 +88,8 @@ sub edit { sub display_form { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $form = $main::form; $form->get_lists("employees" => "EMPLOYEES"); @@ -93,7 +101,7 @@ sub display_form { $form->{jsscript} = 1; - $form->header(); + $form->header(no_layout => $::form->{POPUP_MODE}); print $form->parse_html_template('fu/add_edit'); $main::lxdebug->leave_sub(); @@ -102,6 +110,8 @@ sub display_form { sub save_follow_up { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $form = $main::form; my $locale = $main::locale; @@ -118,7 +128,7 @@ sub save_follow_up { if ($form->{POPUP_MODE}) { $form->header(); print $form->parse_html_template('fu/close_window'); - exit 0; + ::end_of_request(); } $form->{SAVED_MESSAGE} = $locale->text('Follow-Up saved.'); @@ -139,6 +149,8 @@ sub save_follow_up { sub finish { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $form = $main::form; my $locale = $main::locale; @@ -162,7 +174,7 @@ sub finish { if ($form->{POPUP_MODE}) { $form->header(); print $form->parse_html_template('fu/close_window'); - exit 0; + ::end_of_request(); } $form->redirect() if ($form->{callback}); @@ -175,6 +187,8 @@ sub finish { sub delete { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $form = $main::form; my $locale = $main::locale; @@ -198,7 +212,7 @@ sub delete { if ($form->{POPUP_MODE}) { $form->header(); print $form->parse_html_template('fu/close_window'); - exit 0; + ::end_of_request(); } $form->redirect() if ($form->{callback}); @@ -211,6 +225,8 @@ sub delete { sub search { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $form = $main::form; my $locale = $main::locale; @@ -228,10 +244,12 @@ sub search { sub report { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $form = $main::form; my %myconfig = %main::myconfig; my $locale = $main::locale; - my $cgi = $main::cgi; + my $cgi = $::request->{cgi}; my @report_params = qw(created_for subject body reference follow_up_date_from follow_up_date_to itime_from itime_to due_only all_users done not_done); @@ -300,6 +318,7 @@ sub report { 'attachment_basename' => $locale->text('follow_up_list') . strftime('_%Y%m%d', localtime time), ); $report->set_options_from_form(); + $locale->set_numberformat_wo_thousands_separator(\%myconfig) if lc($report->{options}->{output_format}) eq 'csv'; my $idx = 0; my $callback = build_std_url('action=report', grep { $form->{$_} } @report_params); @@ -339,6 +358,8 @@ sub report { sub report_for_todo_list { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $form = $main::form; my @report_params = qw(created_for subject body reference follow_up_date_from follow_up_date_to itime_from itime_to due_only all_users done not_done); @@ -378,12 +399,14 @@ sub report_for_todo_list { sub edit_access_rights { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $form = $main::form; my $locale = $main::locale; my $access = FU->retrieve_access_rights(); - $form->get_lists("employees" => "EMPLOYEES"); + $form->{EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); map { $_->{access} = $access->{$_->{id}} } @{ $form->{EMPLOYEES} }; @@ -398,6 +421,8 @@ sub edit_access_rights { sub save_access_rights { $main::lxdebug->enter_sub(); + $main::auth->assert('productivity'); + my $form = $main::form; my $locale = $main::locale; @@ -426,6 +451,8 @@ sub continue { } sub save { + $main::auth->assert('productivity'); + if ($main::form->{save_nextsub}) { call_sub($main::form->{save_nextsub}); } else {