Mahnungssuche: Kundensuche immer nur via Eingabefeld
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 23 Jan 2017 11:31:07 +0000 (12:31 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 23 Jan 2017 13:56:07 +0000 (14:56 +0100)
bin/mozilla/dn.pl
templates/webpages/dunning/search.html

index 8a10912..443b693 100644 (file)
@@ -306,8 +306,6 @@ sub search {
 
   DN->get_config(\%myconfig, \%$form);
 
-  $form->{SHOW_CUSTOMER_DDBOX}   = scalar @{ $form->{ALL_CUSTOMERS} } <= $myconfig{vclimit};
-  $form->{SHOW_DEPARTMENT_DDBOX} = scalar @{ $form->{ALL_CUSTOMERS} };
   $form->{SHOW_DUNNING_LEVELS}   = scalar @{ $form->{DUNNING} };
 
   $form->{title}    = $locale->text('Dunnings');
index 83b59c6..c708094 100644 (file)
@@ -1,6 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
-[%- USE L %]
+[%- USE L %][%- USE P -%]
 <h1>[% title %]</h1>
 
 [% PROCESS 'common/flash.html' %]
      <table>
       <tr>
        <th align="right">[% 'Customer' | $T8 %]</th>
-       <td colspan="3">
-        [% IF SHOW_CUSTOMER_DDBOX %]
-         <select id='customer' name="customer_id" class="initial_focus">
-          <option value=""></option>
-          [% FOREACH row = ALL_CUSTOMERS %]<option value="[% HTML.escape(row.id) %]">[% HTML.escape(row.name) %]</option>
-          [% END %]
-         </select>
-         [% ELSE %]
-         <input id='customer' name="customer" size="35" class="initial_focus">
-        [% END %]
-       </td>
+       <td colspan="3">[% P.input_tag("customer", "", size="35", class="initial_focus") %]</td>
       </tr>
 
       [% IF SHOW_DUNNING_LEVELS %]
@@ -39,7 +29,7 @@
        </tr>
       [% END %]
 
-      [% IF SHOW_DEPARTMENT_DDBOX %]
+      [% IF ALL_DEPARTMENTS.as_list.size %]
        <tr>
         <th align="right" nowrap>[% 'Department' | $T8 %]</th>
         <td colspan="3">