Pflichtenheftitems: Typen direkt in Tabelle speichern
[kivitendo-erp.git] / templates / webpages / requirement_spec_item / _function_block_form.html
1 [%- USE LxERP -%][%- USE L -%][%- USE HTML -%][%- USE JavaScript -%][%- USE P -%][% SET style="width: 500px" %]
2 [% DEFAULT id_base = 'edit_function_block_' _ SELF.item.id %]
3 [%- SET a_options = '' %]
4 [%- IF SELF.item.id %]
5  [%- SET a_options = "to_show: '#" _ SELF.item.item_type _ "-content-top-" _ SELF.item.id _ "'" %]
6 [%- END %]
7 [%- IF SELF.item.item_type == 'sub-function-block' %]
8  [%- SET a_options = a_options ? a_options _ ', ' : a_options %]
9  [%- SET a_options = a_options _ "to_hide_if_empty: '#sub-function-block-container-" _ SELF.item.parent_id _ "'" %]
10 [%- END %]
11 <form method="post" id="[% id_base %]_form" class="function-block-form">
12  [% L.hidden_tag('form_prefix',                    id_base,      id=id_base _ '_form_prefix') %]
13  [% L.hidden_tag('id',                             SELF.item.id, id=id_base _ '_id') %]
14  [% L.hidden_tag(id_base _ '.requirement_spec_id', SELF.item.requirement_spec_id) %]
15  [% L.hidden_tag(id_base _ '.parent_id',           SELF.item.parent_id) %]
16  [% L.hidden_tag(id_base _ '.item_type',           SELF.item.item_type) %]
17  [% IF insert_after %]
18   [% L.hidden_tag(id_base _ '.insert_after',       insert_after) %]
19  [% END %]
20
21  <div>
22   <div style="width: 19%; float: right;">
23    [%- LxERP.t8("Dependencies") %]:<br>
24    [%- L.select_tag(id_base _ '.dependencies[]', DEPENDENCIES, default=SELECTED_DEPENDENCIES, with_optgroups=1, multiple=1, size=8, style="width: 100%") %]
25   </div>
26
27   <div style="width: 19%; float: right; margin-right: 5px">
28    [%- LxERP.t8("Complexity") %]:<br>
29    [%- L.select_tag(id_base _ '.complexity_id', SELF.complexities, title_key='description', default=SELF.item.complexity_id, style="width: 100%") %]<br>
30
31    [%- LxERP.t8("Risk") %]:<br>
32    [%- L.select_tag(id_base _ '.risk_id', SELF.risks, title_key='description', default=SELF.item.risk_id, style="width: 100%") %]<br>
33
34 [%- IF !SELF.item.children.size %]
35    [%- LxERP.t8("Time estimate") %]:<br>
36    [%- P.man_days_tag(id_base _ '.time_estimation', SELF.item) %]
37 [%- END %]
38   </div>
39
40   <div style="width: 59%">
41 [%- IF SELF.item.id -%]
42    [% LxERP.t8("Description of #1", SELF.item.fb_number) %]
43 [%- ELSIF SELF.item.item_type == 'function-block' -%]
44    [%- LxERP.t8("Add function block") %]
45 [%- ELSE -%]
46    [%- LxERP.t8("Add sub function block") %]
47 [%- END -%]:<br>
48    [% L.textarea_tag(id_base _ '.description', SELF.item.description, rows=8, style="width: 100%") %]
49   </div>
50  </div>
51
52  <p>
53   [% L.ajax_submit_tag('controller.pl?action=RequirementSpecItem/ajax_' _ (SELF.item.id ? 'update' : 'create'), '#' _ id_base _ '_form', LxERP.t8('Save')) %]
54   <a href="#" onclick="cancel_edit_item_form('[% id_base %]', { [% a_options %] })">[%- LxERP.t8("Cancel") %]</a>
55  </p>
56 </form>