Kosmetik
[kivitendo-erp.git] / templates / webpages / department / form.html
1 [% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %]
2 [% SET is_used = SELF.department.is_used %]
3 <body>
4
5  <form method="post" action="controller.pl">
6   <div class="listtop">[% FORM.title %]</div>
7
8 [%- INCLUDE 'common/flash.html' %]
9
10   <table>
11    <tr>
12     <td>[%- 'Description' | $T8 %]</td>
13     <td>[% L.input_tag("department.description", SELF.department.description) %]</td>
14    </tr>
15
16    <tr>
17     <td valign="top">[%- 'Type' | $T8 %]</td>
18     <td valign="top">
19      [%- IF is_used %]
20       [% L.hidden_tag("role", SELF.department.role) %]
21       [%- IF SELF.department.role == "C" %][%- LxERP.t8('Cost Center') %][%- ELSE %][%- LxERP.t8('Profit Center') %][%- END %]
22      [%- ELSE %]
23       [% L.radio_button_tag("department.role", "value", "C", "label", LxERP.t8("Cost Center"), "checked", SELF.department.role == "C") %]
24       <br>
25       [% L.radio_button_tag("department.role", "value", "P", "label", LxERP.t8("Profit Center"), "checked", SELF.department.role == "P") %]
26      [%- END %]
27     </td>
28    </tr>
29   </table>
30
31   <p>
32    [% L.hidden_tag("id", SELF.department.id) %]
33    [% L.hidden_tag("action", "Department/dispatch") %]
34    [% L.submit_tag("action_" _  (SELF.department.id ? "update" : "create"), LxERP.t8('Save')) %]
35    [%- IF SELF.department.id && !is_used %]
36     [% L.submit_tag("action_destroy", LxERP.t8("Delete"), "confirm", LxERP.t8("Are you sure you want to delete this department?")) %]
37    [%- END %]
38    <a href="[% SELF.url_for(action => 'list') %]">[%- 'Abort' | $T8 %]</a>
39   </p>
40  </form>
41 </body>
42 </html>