From 590047d7bc7fa5312f8e4c36e3562c2507e3d8a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 13 Feb 2012 15:35:41 +0100 Subject: [PATCH] =?utf8?q?gel=C3=B6schte=20Benutzer=20in=20do/form=5Fheade?= =?utf8?q?r=20ausblenden?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/do.pl | 5 +++-- templates/webpages/do/form_header.html | 16 ++-------------- 2 files changed, 5 insertions(+), 16 deletions(-) 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 %] -- 2.20.1