0c4e4e415bfb5a51187ff95d9087e847a7180846
[kivitendo-erp.git] / templates / webpages / letter / edit.html
1 [%- USE HTML %]
2 [%- USE T8 %]
3 [%- USE L %]
4 [%- USE P %]
5 [%- USE LxERP %]
6 [%- SET WEBDAV = SELF.webdav_objects %]
7 <h1>[% title | html %]</h1>
8
9 <form action='controller.pl' method='POST' id='form'>
10   <input type="hidden" name="letter.id" value="[% letter.id | html %]">
11   <input type="hidden" name="draft.id" value="[% draft.id | html %]">
12   <input type="hidden" name="type" value="[% FORM.type | html %]">
13   [% L.hidden_tag('is_sales', SELF.is_sales) %]
14
15   [%- INCLUDE 'common/flash.html' %]
16
17   <div id="oe_tabs" class="tabwidget">
18    <ul>
19     <li><a href="#ui-tabs-letter">[% LxERP.t8("Letter") %]</a></li>
20 [%- IF letter.id %]
21  [%- IF INSTANCE_CONF.get_webdav %]
22      <li><a href="#ui-tabs-webdav">[% LxERP.t8('WebDAV') %]</a></li>
23  [%- END %]
24  [%- IF INSTANCE_CONF.get_doc_storage %]
25       <li><a href="controller.pl?action=File/list&file_type=document&object_type=[% HTML.escape(FORM.type) %]&object_id=[% HTML.url(letter.id) %]">[% 'Documents' | $T8 %]</a></li>
26  [%- END %]
27     <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Letter&object_id=[% HTML.url(letter.id) %]">[% LxERP.t8("Linked Records") %]</a></li>
28 [%- END %]
29    </ul>
30
31    <div id="ui-tabs-letter">
32
33 <table width=100%>
34 <tr>
35  <td width=50%>
36   <!-- upper left block -->
37    <table width=90%>
38 [%- IF SELF.is_sales %]
39     <tr>
40      <th align='right'>[% 'Customer' | $T8 %]:</th>
41      <td>[% P.customer_vendor.picker('letter.customer_id', letter.customer_id, type='customer') %]</td>
42     </tr>
43 [%- ELSE %]
44     <tr>
45      <th align='right'>[% 'Vendor' | $T8 %]:</th>
46      <td>[% P.customer_vendor.picker('letter.vendor_id', letter.vendor_id, type='vendor') %]</td>
47     </tr>
48 [%- END %]
49     <tr>
50      <th align='right'>[% 'Contact Person' | $T8 %]</th>
51      <td>[% L.select_tag('letter.cp_id', letter.customer_vendor_id ? letter.customer_vendor.contacts : [], value_key='cp_id', title_key='full_name', default=letter.cp_id) %]</td>
52     </tr>
53     <tr>
54      <th align='right'>[% 'Your Reference' | $T8 %]:</th>
55      <td><input name='letter.reference' style='width:70%' value='[% letter.reference | html %]'></td>
56     </tr>
57    </table>
58   <!-- /upper left block -->
59  </td>
60  <td width=50%>
61   <!-- upper right block -->
62    <table align=center width=90%>
63     <tr>
64      <th align='right'>[% 'Letternumber' | $T8 %]:</th>
65      <td><input name='letter.letternumber' style='width:70%' value='[% letter.letternumber | html %]'></td>
66     </tr>
67     <tr>
68      <th align='right'>[% 'Date' | $T8 %]:</th>
69       <td>[% L.date_tag('letter.date_as_date', letter.date_as_date, readonly=readonly) %]</td>
70      </td>
71     </tr>
72    </table>
73   <!-- /upper right block -->
74  </td>
75 </tr>
76
77 <tr height=20></tr>
78
79 <tr>
80  <td colspan=2 width=100%>
81   <!-- central block -->
82    <table width=80%>
83     <tr>
84      <th align=right>[% 'Subject' | $T8 %]</th>
85      <td><textarea name='letter.subject' style='width:100%;font-weight:bold' rows=1>[% letter.subject | html %]</textarea></td>
86     </tr>
87      <th align=right>[% 'Greeting' | $T8 %]</th>
88      <td><input name='letter.greeting' style='width:100%;font-weight:bold' value="[% letter.greeting | html %]"></td>
89     </tr>
90     <tr>
91     <tr>
92      <th align=right>[% 'Body' | $T8 %]</th>
93      <td>[% L.textarea_tag('letter.body_as_restricted_html', letter.body_as_restricted_html, style='width:100%', rows=20, class="texteditor") %]</td>
94     </tr>
95     <tr height=10></tr>
96      <th align=right>[% 'Internal Notes' | $T8 %]</th>
97      <td><textarea name='letter.intnotes' style='width:100%' rows=4>[% letter.intnotes | html %]</textarea></td>
98     </tr>
99
100     <tr>
101      <th></th>
102      <td>
103       <table width=90% align='center'>
104        <tr>
105         <td>
106          <table width=100%>
107           <tr>
108            <td>[% 'Employee' | $T8 %]</td>
109           </tr>
110           <tr>
111            <td>
112             [%- L.select_tag('letter.employee_id', employees, default=letter.employee_id, title_key='safe_name', class='bold', allow_empty=1, style='width:70%') %]
113            </td>
114           </tr>
115          </table>
116         </td>
117         <td>
118          <table width=100%>
119           <tr>
120            <td>[% 'Salesman' | $T8 %]</td>
121           </tr>
122           <tr>
123            <td>
124             [%- L.select_tag('letter.salesman_id', employees, default=letter.salesman_id, title_key='safe_name', class='bold', allow_empty=1, style='width:70%') %]
125            </td>
126           </tr>
127          </table>
128         </td>
129         <td>
130         </td>
131        </tr>
132       </table>
133      </td>
134     </tr>
135    </table>
136   <!-- /central block -->
137  </td>
138 </tr>
139 </table>
140
141 <div id="email_inputs" class="hidden"></div>
142 <div id="print_options" class="hidden">
143  [% print_options %]
144 </div>
145
146  </div>
147  [% PROCESS 'webdav/_list.html' %]
148  <div id="ui-tabs-1">
149   [%- LxERP.t8("Loading...") %]
150  </div>
151 </div>
152 </form>
153
154 <div id="print_dialog" class="hidden">
155  [%- PROCESS 'common/_print_dialog.html' %]
156 </div>