f32e71524db2f7a509e49794b80c69906e9ee7fd
[kivitendo-erp.git] / templates / webpages / requirement_spec_order / _assignment_form.html
1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%]
2 [% SET style="width: 400px" %]
3
4 <table>
5 [% IF for_new %]
6  <tr>
7   <td>[% LxERP.t8("Record type to create") %]:</td>
8   <td>[% L.select_tag('quotation', [ [ 1, LxERP.t8('Sales quotation') ], [ 0, LxERP.t8('Sales Order') ] ], style=style, no_id=1) %]</td>
9  </tr>
10
11  <tr>
12   <td>[% LxERP.t8("Customer") %]:</td>
13   <td>[% L.select_tag('customer_id', SELF.all_customers, default=SELF.requirement_spec.customer_id, title_key='name', style=style, no_id=1) %]</td>
14  </tr>
15 [% END %]
16
17  <tr>
18   <td>[% LxERP.t8("Assign the following article to all sections") %]:</td>
19   <td>
20    [% L.select_tag('quotations_and_orders_dummy', SELF.all_parts, default=INSTANCE_CONF.get_requirement_spec_section_order_part_id, title_sub=\make_part_title, id='quoations_and_orders_order_id', style=style) %]
21    [% L.button_tag('kivi.requirement_spec.assign_order_part_id_to_all()', LxERP.t8('Assign article')) %]
22   </td>
23  </tr>
24 </table>
25
26 <form id="quotations_and_orders_article_assignment_form">
27  <table style="width: 100%">
28   <thead>
29    <tr class="listheading">
30     <th>[% LxERP.t8("Number") %]</th>
31     <th>[% LxERP.t8("Title") %]</th>
32     <th>[% LxERP.t8("Description") %]</th>
33     <th>[% LxERP.t8("Article") %]</th>
34    </tr>
35   </thead>
36
37   <tbody>
38    [% FOREACH section = SELF.requirement_spec.sections_sorted %]
39    <tr class="listrow">
40     [% L.hidden_tag("sections[+].id", section.id, no_id=1) %]
41     <td>[% HTML.escape(section.fb_number) %]</td>
42     <td>[% HTML.escape(section.title) %]</td>
43     <td>[% HTML.escape(P.truncate(section.description)) %]</td>
44     <td>[% L.select_tag('sections[].order_part_id', SELF.all_parts, default=section.order_part_id, with_empty=!for_new, title_sub=\make_part_title, style=style, no_id=1) %]</td>
45    </tr>
46    [% END %]
47   </tbody>
48  </table>
49 </form>