60134b736c163f04d7aba7c7e8be44c43f9d02cd
[kivitendo-erp.git] / templates / webpages / partsgroup / form.html
1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
2
3 [% SET style="width: 400px" %]
4 [% SET size=15 %]
5
6 <h1>[% HTML.escape(title) %]</h1>
7
8 <form action="controller.pl" method="post">
9
10 [%- INCLUDE 'common/flash.html' %]
11
12 [%- L.hidden_tag("id", SELF.partsgroup.id) %]
13
14 <table>
15   <tr>
16     <th align="right">[% 'Description' | $T8 %]</th>
17     <td>
18        [%- L.input_tag("partsgroup.partsgroup", SELF.partsgroup.partsgroup) %]
19    </td>
20   [% IF SELF.partsgroup.id %]
21   <tr>
22     <th align="right">[% 'Obsolete' | $T8 %]</th>
23     <td>[% L.checkbox_tag('partsgroup.obsolete', checked = SELF.partsgroup.obsolete, for_submit=1) %]</td>
24   </tr>
25   </tr>
26   [% END %]
27 </table>
28
29  <p>
30   [% L.hidden_tag("action", "PartsGroup/dispatch") %]
31   [% L.submit_tag("action_" _  (SELF.partsgroup.id ? "update" : "create"), LxERP.t8('Save'), onclick="return check_prerequisites();") %]
32   [%- IF SELF.partsgroup.id AND SELF.partsgroup.orphaned -%]
33     [% L.submit_tag("action_delete", LxERP.t8('Delete')) %]
34   [%- END %]
35   <a href="[% SELF.url_for(action='list') %]">[%- LxERP.t8("Cancel") %]</a>
36  </p>
37
38  <hr>
39
40 <script type="text/javascript">
41 <!--
42 function check_prerequisites() {
43   if ($('#partsgroup_partsgroup').val() === "") {
44     alert(kivi.t8('The description is missing.'));
45     return false;
46   }
47   return true;
48 }
49 -->
50 </script>