6 [%- SET WEBDAV = SELF.webdav_objects %]
7 <h1>[% title | html %]</h1>
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) %]
15 [%- INCLUDE 'common/flash.html' %]
17 <div id="oe_tabs" class="tabwidget">
19 <li><a href="#ui-tabs-letter">[% LxERP.t8("Letter") %]</a></li>
21 [%- IF INSTANCE_CONF.get_webdav %]
22 <li><a href="#ui-tabs-webdav">[% LxERP.t8('WebDAV') %]</a></li>
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>
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>
31 <div id="ui-tabs-letter">
36 <!-- upper left block -->
38 [%- IF SELF.is_sales %]
40 <th align='right'>[% 'Customer' | $T8 %]:</th>
41 <td>[% P.customer_vendor.picker('letter.customer_id', letter.customer_id, type='customer') %]</td>
45 <th align='right'>[% 'Vendor' | $T8 %]:</th>
46 <td>[% P.customer_vendor.picker('letter.vendor_id', letter.vendor_id, type='vendor') %]</td>
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>
54 <th align='right'>[% 'Your Reference' | $T8 %]:</th>
55 <td><input name='letter.reference' style='width:70%' value='[% letter.reference | html %]'></td>
58 <!-- /upper left block -->
61 <!-- upper right block -->
62 <table align=center width=90%>
64 <th align='right'>[% 'Letternumber' | $T8 %]:</th>
65 <td><input name='letter.letternumber' style='width:70%' value='[% letter.letternumber | html %]'></td>
68 <th align='right'>[% 'Date' | $T8 %]:</th>
69 <td>[% L.date_tag('letter.date_as_date', letter.date_as_date, readonly=readonly) %]</td>
73 <!-- /upper right block -->
80 <td colspan=2 width=100%>
81 <!-- central block -->
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>
87 <th align=right>[% 'Greeting' | $T8 %]</th>
88 <td><input name='letter.greeting' style='width:100%;font-weight:bold' value="[% letter.greeting | html %]"></td>
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>
96 <th align=right>[% 'Internal Notes' | $T8 %]</th>
97 <td><textarea name='letter.intnotes' style='width:100%' rows=4>[% letter.intnotes | html %]</textarea></td>
103 <table width=90% align='center'>
108 <td>[% 'Employee' | $T8 %]</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%') %]
120 <td>[% 'Salesman' | $T8 %]</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%') %]
136 <!-- /central block -->
141 <div id="email_inputs" class="hidden"></div>
142 <div id="print_options" class="hidden">
147 [% PROCESS 'webdav/_list.html' %]
149 [%- LxERP.t8("Loading...") %]
154 <div id="print_dialog" class="hidden">
155 [%- PROCESS 'common/_print_dialog.html' %]