Lieferwertbericht um Filter nach Warengruppen erweitert
[kivitendo-erp.git] / templates / webpages / requirement_spec / _filter.html
index be59c7d..2e4209a 100644 (file)
@@ -7,47 +7,78 @@
 <div class="filter_toggle" style="display:none">
  <a href="#" onClick="javascript:$('.filter_toggle').toggle()">[% LxERP.t8("Hide Filter") %]</a>
 
- <form method="post" action="controller.pl">
+ <form method="post" action="controller.pl" id="search_form">
   [%- L.hidden_tag("is_template", is_template) %]
+  [%- L.hidden_tag("_include_cvars_from_form", 1) %]
 
   <p>
-   <table class="rs_input_field">
+   <table>
     <tr>
      <th align="right">[% LxERP.t8("Title") %]</th>
-     <td>[% L.input_tag('filter.title:substr::ilike', filter.title_substr__ilike) %]</td>
+     <td>[% L.input_tag('filter.title:substr::ilike', filter.title_substr__ilike, class="rs_input_field") %]</td>
     </tr>
 
 [%- UNLESS is_template %]
     <tr>
      <th align="right">[% LxERP.t8("Customer") %]</th>
-     <td>[% L.input_tag('filter.customer.name:substr::ilike', filter.customer.name_substr__ilike) %]</td>
+     <td>[% L.input_tag('filter.customer.name:substr::ilike', filter.customer.name_substr__ilike, class="rs_input_field") %]</td>
     </tr>
 
     <tr>
      <th align="right">[% LxERP.t8("Customer Number") %]</th>
-     <td>[% L.input_tag('filter.customer.customernumber:substr::ilike', filter.customer.customernumber_substr__ilike) %]</td>
+     <td>[% L.input_tag('filter.customer.customernumber:substr::ilike', filter.customer.customernumber_substr__ilike, class="rs_input_field") %]</td>
     </tr>
 
     <tr>
      <th align="right">[% LxERP.t8("Requirement Spec Type") %]</th>
-     <td>[% L.select_tag('filter.type_id', SELF.types, default=filter.type_id, title_key="description", with_empty=1) %]</td>
+     <td>[% L.select_tag('filter.type_id', SELF.types, default=filter.type_id, title_key="description", with_empty=1, class="rs_input_field") %]</td>
     </tr>
 
     <tr>
      <th align="right">[% LxERP.t8("Requirement Spec Status") %]</th>
-     <td>[% L.select_tag('filter.status_id', SELF.statuses, default=filter.status_id, title_key="description", with_empty=1) %]</td>
+     <td>[% L.select_tag('filter.status_id[]', SELF.statuses, default=filter.status_id_, title_key="description", multiple=1, class="rs_input_field") %][%# NOTE: the trailing '_' is NOT a mistake -- look at SL::Controller::Helper::Filtered for the explanation! %]</td>
     </tr>
 
     <tr>
-     <th align="right">[% LxERP.t8("Project") %]</th>
-     <td>[% L.select_tag('filter.project_id', SELF.projects, default=filter.project_id, title_key="full_description", with_empty=1) %]</td>
+     <th align="right">[% LxERP.t8("Project Number") %]</th>
+     <td>[% L.input_tag('filter.project.projectnumber:substr::ilike', filter.project.projectnumber_substr__ilike, class="rs_input_field") %]</td>
     </tr>
+    <tr>
+     <th align="right">[% LxERP.t8("Project Description") %]</th>
+     <td>[% L.input_tag('filter.project.description:substr::ilike', filter.project.description_substr__ilike, class="rs_input_field") %]</td>
+    </tr>
+
+    [% FOREACH cvar_cfg = SELF.cvar_configs %]
+     [%- IF cvar_cfg.searchable %]
+      <tr>
+       <th align="right">[% HTML.escape(cvar_cfg.description) %]</th>
+       <td>[% INCLUDE 'common/render_cvar_filter_input.html' cvar_cfg=cvar_cfg cvar_class="rs_input_field" %]</td>
+      </tr>
+     [% END %]
+    [% END %]
+
+    [% IF SELF.includeable_cvar_configs.size %]
+     <tr>
+      <th align="right">[% LxERP.t8("Include in Report") %]</th>
+      <td>
+       <table>
+        <tr>
+         [% FOREACH cvar_cfg = SELF.includeable_cvar_configs %]
+          <td>
+           [% name__ = cvar_cfg.name;
+              L.checkbox_tag("include_cvars_" _ name__, value="1", checked=(SELF.include_cvars.$name__ ? 1 : ''), label=cvar_cfg.description) %]
+          </td>
+          [%- IF !loop.last && ((loop.count % 3) == 0) %]
+           </tr><tr>
+          [% END %]
+         [% END %]
+        </tr>
+       </table>
+      </td>
+     </tr>
+    [% END %]
 [%- END %]
    </table>
   </p>
-
-  [% L.hidden_tag("action", "RequirementSpec/list") %]
-
-  <p>[% L.submit_tag("dummy", LxERP.t8("Continue")) %]</p>
  </form>
 </div>