gelöschte Benutzer in oe/form_header ausblenden
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 13 Feb 2012 12:08:33 +0000 (13:08 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 13 Feb 2012 12:09:00 +0000 (13:09 +0100)
bin/mozilla/oe.pl
templates/webpages/oe/form_header.html

index 58f4cf5..3b62071 100644 (file)
@@ -331,8 +331,6 @@ sub form_header {
                    "projects"      => { "key"      => "ALL_PROJECTS",
                                         "all"      => 0,
                                         "old_id"   => \@old_project_ids },
-                   "employees"     => "ALL_EMPLOYEES",
-                   "salesmen"      => "ALL_SALESMEN",
                    "taxzones"      => "ALL_TAXZONES",
                    "payments"      => "ALL_PAYMENTS",
                    "currencies"    => "ALL_CURRENCIES",
@@ -342,6 +340,8 @@ sub form_header {
                    "price_factors" => "ALL_PRICE_FACTORS");
 
   # label subs
+  $TMPL_VAR{ALL_EMPLOYEES}         = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id},  deleted => 0 ] ]);
+  $TMPL_VAR{ALL_SALESMEN}          = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id},  deleted => 0 ] ]);
   $TMPL_VAR{ALL_CONTACTS}          = SL::DB::Manager::Contact->get_all(query => [
     or => [
       cp_cv_id => $::form->{"$::form->{vc}_id"} * 1,
index 3c17033..68c2286 100644 (file)
                   <tr>
                     <th align="right">[% 'Employee' | $T8 %]</th>
                     <td>
-                      [% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, default=employee_id, title_sub=\sales_employee_labels)) %]
+                      [% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, default=employee_id, title='safe_name')) %]
                     </td>
                   </tr>
 [%- IF is_sales and ALL_SALESMEN.size %]
                   <tr>
                     <th align="right">[% 'Salesman' | $T8 %]</th>
                     <td>
-                      [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title_sub=\sales_employee_labels)) %]
+                      [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title='safe_name')) %]
                     </td>
                   </tr>
 [%- END %]