From 8a2d9daf01083e1271cf6118591bb2c242734261 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 10 Feb 2012 17:06:05 +0100 Subject: [PATCH] =?utf8?q?gel=C3=B6schte=20Benutzer=20in=20ar/search=20aus?= =?utf8?q?blenden?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/ar.pl | 5 +---- templates/webpages/ar/search.html | 28 +++------------------------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index a6e122067..cd30053ed 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -1346,16 +1346,13 @@ sub search { $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }, "departments" => "ALL_DEPARTMENTS", "customers" => "ALL_VC", - "employees" => "ALL_EMPLOYEES", - "salesmen" => "ALL_SALESMEN", "business_types" => "ALL_BUSINESS_TYPES"); + $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); $form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0; # constants and subs for template $form->{jsscript} = 1; $form->{vc_keys} = sub { "$_[0]->{name}--$_[0]->{id}" }; - $form->{employee_labels} = sub { $_[0]->{"name"} || $_[0]->{"login"} }; - $form->{salesman_labels} = $form->{employee_labels}; $form->header; print $form->parse_html_template('ar/search', { %myconfig }); diff --git a/templates/webpages/ar/search.html b/templates/webpages/ar/search.html index a70816efe..d0f529d2b 100644 --- a/templates/webpages/ar/search.html +++ b/templates/webpages/ar/search.html @@ -1,4 +1,5 @@ [%- USE T8 %] +[%- USE L %]
@@ -51,34 +52,11 @@ [% 'Employee' | $T8 %] - - [%- INCLUDE 'generic/multibox.html' - name = 'employee_id', - style = 'width: 250px', - DATA = ALL_EMPLOYEES, - id_key = 'id', - label_sub = 'employee_labels', - limit = vclimit, - show_empty = 1, - allow_textbox = 0, - default = ' ', - -%] - + [% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, title='safe_name', with_empty=1), style='width:250px') %] [% 'Salesman' | $T8 %] - - [%- INCLUDE 'generic/multibox.html' - name = 'salesman_id', - style = 'width: 250px', - DATA = ALL_SALESMEN, - id_key = 'id', - label_sub = 'salesman_labels', - limit = vclimit, - show_empty = 1, - allow_textbox = 0, - -%] - + [% L.select_tag('salesman_id', L.options_for_select(ALL_EMPLOYEES, title='safe_name', with_empty=1), style='width:250px') %] [% 'Transaction description' | $T8 %] -- 2.20.1