From 3a6d52b8250bc5dad8862931e71189bc51308d70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 13 Feb 2012 14:56:58 +0100 Subject: [PATCH] =?utf8?q?gel=C3=B6schte=20Benutzer=20in=20ct/form=5Fheade?= =?utf8?q?r=20ausblenden?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/ct.pl | 8 ++++---- templates/webpages/ct/form_header.html | 18 ++---------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index b525535c2..2eb6c242f 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -314,17 +314,17 @@ sub form_header { my %myconfig = %main::myconfig; my $locale = $main::locale; - $form->get_lists(employees => "ALL_EMPLOYEES", - taxzones => "ALL_TAXZONES", + $form->get_lists(taxzones => "ALL_TAXZONES", currencies => "ALL_CURRENCIES"); $form->get_pricegroup(\%myconfig, { all => 1 }); $form->get_lists(customers => { key => "ALL_SALESMAN_CUSTOMERS", business_is_salesman => 1 }) if $::lx_office_conf{features}->{vertreter}; + $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{FU_created_for_user}, deleted => 0 ] ]); + $form->{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); + $form->{USER} = SL::DB::Manager::Employee->current; - $form->{ALL_SALESMEN} = $form->{ALL_EMPLOYEES}; $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : ""; $form->{is_customer} = $form->{db} eq 'customer'; - $form->{salesman_label} = sub { $_[0]->{name} ne "" ? $_[0]->{name} : $_[0]->{login} }; $form->{shipto_label} = \&_shipto_label; $form->{contacts_label} = \&_contacts_label; $form->{taxzone_id} = 0 if !$form->{id}; diff --git a/templates/webpages/ct/form_header.html b/templates/webpages/ct/form_header.html index 4d6ee5a29..501ebaae1 100644 --- a/templates/webpages/ct/form_header.html +++ b/templates/webpages/ct/form_header.html @@ -279,15 +279,7 @@ [%- IF is_customer && !conf_vertreter %] [% 'Salesman' | $T8 %] - - [%- INCLUDE generic/multibox.html - name = 'salesman_id', - DATA = ALL_SALESMEN, - show_empty = 1, - id_key = 'id', - label_sub = 'salesman_label', - -%] - + [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=salesman_id, show_empty=1, title='safe_name')) %] [%- END %] @@ -407,13 +399,7 @@ [% 'for' | $T8 %] - + [% L.select_tag('FU_created_for_user', L.options_for_select(ALL_EMPLOYEES, default=(FU_created_for_user ? FU_created_for_user : USER.id), title='safe_name')) %] -- 2.20.1