3b6f7f45aa59d69317dbdba89b83ea0d3fab6dab
[kivitendo-erp.git] / templates / webpages / projects / project_form.html
1 [%- USE T8 %]
2 [%- USE L %]
3 [%- USE HTML %][%- USE LxERP %]
4
5  [%- IF message %]
6  <p>[% message %]</p>
7
8  <hr>
9  [%- END %]
10
11  <p><div class="listtop">[% title %]  [% HTML.escape(project.projectnumber) %]</div></p>
12
13  <form method="post" action="projects.pl">
14
15   <input type="hidden" name="project.id" value="[% HTML.escape(project.id) %]">
16   <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
17
18   <ul id="maintab" class="shadetabs">
19    <li class="selected"><a href="#" rel="basic_data">[% 'Basic Data' | $T8 %]</a></li>
20    [%- IF CUSTOM_VARIABLES.size %]
21    <li><a href="#" rel="custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
22    [%- END %]
23   </ul>
24
25   <div class="tabcontentstyle">
26
27    <div id="basic_data" class="tabcontent">
28
29     <table>
30      <tr>
31       <th align="right">[% 'Number' | $T8 %]</th>
32       <td><input name="project.projectnumber" size="60" value="[% HTML.escape(project.projectnumber) %]"></td>
33      </tr>
34
35      <tr>
36       <th align="right">[% 'Description' | $T8 %]</th>
37       <td>
38        [%- SET rows = LxERP.numtextrows(project.description, 60) %]
39        [%- IF rows > 1 %]
40        <textarea name="project.description" rows="[% rows %]" cols="60" style="width: 100%" wrap="soft">[% HTML.escape(project.description) %]</textarea>
41        [%- ELSE %]
42        <input name="project.description" size="60" value="[% HTML.escape(project.description) %]">
43        [%- END %]
44       </td>
45      </tr>
46
47      <tr>
48       <th align="right">[% 'Type' | $T8 %]</th>
49       <td>[% L.input_tag('project.type', project.type, size=60) %]</td>
50      </tr>
51
52      <tr>
53       <th align="right">[% 'Customer' | $T8 %]</th>
54       <td>[% L.select_tag('project.customer_id', ALL_CUSTOMERS, default=project.customer_id, title_key='name', style='width: 300px') %]</td>
55      </tr>
56
57      <tr>
58       <th align="right">[% 'Valid' | $T8 %]</th>
59       <td>[% L.select_tag('project.valid', [ [ 1, LxERP.t8('Valid') ], [ 0, LxERP.t8('Invalid') ] ], default=project.valid, style='width: 300px') %]</td>
60      </tr>
61
62      [%- IF project.id %]
63      <tr>
64       <th align="right">[% 'Active' | $T8 %]</th>
65       <td>[% L.select_tag('project.active', [ [ 1, LxERP.t8('Active') ], [ 0, LxERP.t8('Inactive') ] ], default=project.valid, style='width: 300px') %]</td>
66      </tr>
67      [%- END %]
68     </table>
69
70     <br style="clear: left" />
71    </div>
72
73    [%- IF CUSTOM_VARIABLES.size %]
74    <div id="custom_variables" class="tabcontent">
75
76     <p>
77      <table>
78       [%- FOREACH var = CUSTOM_VARIABLES %]
79       <tr>
80        <td align="right" valign="top">[% HTML.escape(var.description) %]</td>
81        <td valign="top">[% var.HTML_CODE %]</td>
82       </tr>
83       [%- END %]
84      </table>
85     </p>
86
87     <br style="clear: left" />
88    </div>
89    [%- END %]
90
91   </div>
92
93   <p>
94   [% L.online_help_tag('add_project') %]
95    <input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]">
96    [%- IF project.id %]
97    <input type="submit" class="submit" name="action" value="[% 'Save as new' | $T8 %]">
98    [%- IF project.orphaned %]
99    <input type="submit" class="submit" name="action" value="[% 'Delete' | $T8 %]">
100    [%- END %]
101    <input type="button" onclick="set_history_window([% HTML.escape(project.id) %]);" name="history" id="history" value="[% 'history' | $T8 %]">
102    [%- END %]
103   </p>
104  </form>
105
106  <script type="text/javascript">
107   <!--
108       var maintab = new ddtabcontent("maintab");
109       maintab.setpersist(true);
110       maintab.setselectedClassTarget("link"); //"link" or "linkparent"
111       maintab.init();
112     -->
113  </script>