From: Sven Schöling Date: Mon, 13 Feb 2012 14:35:41 +0000 (+0100) Subject: gelöschte Benutzer in do/form_header ausblenden X-Git-Tag: release-2.7.0beta2~5^2~18 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=590047d7bc7fa5312f8e4c36e3562c2507e3d8a7;p=kivitendo-erp.git gelöschte Benutzer in do/form_header ausblenden --- diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index f06bd3256..e16286de5 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -272,13 +272,14 @@ sub form_header { "all" => 0, "old_id" => \@old_project_ids }, - "employees" => "ALL_EMPLOYEES", - "salesmen" => "ALL_SALESMEN", $vc => "ALL_VC", "price_factors" => "ALL_PRICE_FACTORS", "departments" => "ALL_DEPARTMENTS", "business_types" => "ALL_BUSINESS_TYPES", ); + + $::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); + $::form->{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); $::form->{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [ or => [ cp_cv_id => $::form->{"$::form->{vc}_id"} * 1, diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index 3ed1be230..b195637e8 100644 --- a/templates/webpages/do/form_header.html +++ b/templates/webpages/do/form_header.html @@ -258,13 +258,7 @@ [% IF row.id == employee_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %] [%- END %] [%- ELSE %] - + [% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, default=employee_id, title='safe_name')) %] [%- END %] @@ -284,13 +278,7 @@ [% IF row.id == the_salesman_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %] [%- END %] [%- ELSE %] - + [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title='safe_name')) %] [%- END %]