2 [%- USE L %][%- USE P %]
3 [%- USE HTML %][%- USE LxERP %]
5 [%- INCLUDE 'common/flash.html' %]
7 <div class="listtop">[% title %]</div>
9 <form method="post" action="controller.pl">
10 [% L.hidden_tag("callback", callback) %]
11 [% L.hidden_tag("id", SELF.project.id) %]
13 <div class="tabwidget">
15 <li><a href="#basic_data">[% 'Basic Data' | $T8 %]</a></li>
16 [%- IF CUSTOM_VARIABLES.size %]
17 <li><a href="#custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
19 [%- IF SELF.project.id %]
20 <li><a href="#linked_records">[% 'Linked Records' | $T8 %]</a></li>
28 <th align="right">[% 'Number' | $T8 %]</th>
29 <td>[% L.input_tag("project.projectnumber", SELF.project.projectnumber, size=60) %]</td>
33 <th align="right">[% 'Description' | $T8 %]</th>
35 [%- SET rows = LxERP.numtextrows(SELF.project.description, 60) %]
37 [%- L.textarea_tag("project.description", SELF.project.description, rows=row, size=60, style="width: 100%", wrap="soft") %]
39 [%- L.input_tag("project.description", SELF.project.description, size=60) %]
45 <th align="right">[% 'Type' | $T8 %]</th>
46 <td>[% L.input_tag('project.type', SELF.project.type, size=60) %]</td>
50 <th align="right">[% 'Customer' | $T8 %]</th>
51 <td>[% L.select_tag('project.customer_id', ALL_CUSTOMERS, default=SELF.project.customer_id, title_key='name', style='width: 300px') %]</td>
55 <th align="right">[% 'Valid' | $T8 %]</th>
56 <td>[% L.select_tag('project.valid', [ [ 1, LxERP.t8('Valid') ], [ 0, LxERP.t8('Invalid') ] ], default=SELF.project.valid, style='width: 300px') %]</td>
59 [%- IF SELF.project.id %]
61 <th align="right">[% 'Active' | $T8 %]</th>
62 <td>[% L.select_tag('project.active', [ [ 1, LxERP.t8('Active') ], [ 0, LxERP.t8('Inactive') ] ], default=SELF.project.active, style='width: 300px') %]</td>
68 [%- IF CUSTOM_VARIABLES.size %]
69 <div id="custom_variables">
73 [%- FOREACH var = CUSTOM_VARIABLES %]
75 <td align="right" valign="top">[% HTML.escape(var.description) %]</td>
76 <td valign="top">[% var.HTML_CODE %]</td>
84 [%- IF SELF.project.id %]
85 <div id="linked_records">
86 [% P.grouped_record_list(SELF.linked_records) %]
93 [% L.online_help_tag('add_project') %]
94 [% L.hidden_tag("action", "Project/dispatch") %]
95 [% L.submit_tag("action_" _ (SELF.project.id ? "update" : "create"), LxERP.t8('Save')) %]
96 [%- IF SELF.project.id %]
97 [% L.submit_tag("action_create", LxERP.t8('Save as new')) %]
98 [% L.submit_tag("action_destroy", LxERP.t8('Delete'), confirm=LxERP.t8('Do you really want to delete this object?')) IF !SELF.project.is_used %]
100 <a href="[% IF callback %][% callback %][% ELSE %][% SELF.url_for(action => 'search') %][% END %]">[%- LxERP.t8('Abort') %]</a>