2 [%- USE L %][%- USE P %]
3 [%- USE HTML %][%- USE LxERP %]
7 [%- INCLUDE 'common/flash.html' %]
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, class='initial_focus') %]</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">[% 'Project Type' | $T8 %]</th>
46 <td>[% L.select_tag('project.project_type_id', ALL_PROJECT_TYPES, default=SELF.project.project_type_id, title_key='description', style='width: 300px') %]</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', with_empty=1, 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.hidden_tag("action", "Project/dispatch") %]
94 [% L.submit_tag("action_" _ (SELF.project.id ? "update" : "create"), LxERP.t8('Save')) %]
95 [%- IF SELF.project.id %]
96 [% L.submit_tag("action_create", LxERP.t8('Save as new')) %]
97 [% L.submit_tag("action_destroy", LxERP.t8('Delete'), confirm=LxERP.t8('Do you really want to delete this object?')) IF !SELF.project.is_used %]
99 <a href="[% IF callback %][% callback %][% ELSE %][% SELF.url_for(action => 'search') %][% END %]">[%- LxERP.t8('Abort') %]</a>