7 [% SET WEBDAV = SELF.webdav_objects %]
9 <h1>[% title | html %]</h1>
11 <form action='controller.pl' method='POST' id='form'>
12 <input type="hidden" name="letter.id" value="[% letter.id | html %]">
13 <input type="hidden" name="draft.id" value="[% draft.id | html %]">
14 <input type="hidden" name="type" value="[% FORM.type | html %]">
15 [% L.hidden_tag('is_sales', SELF.is_sales) %]
17 [% INCLUDE 'common/flash.html' %]
19 <div id="oe_tabs" class="tabwidget">
21 <li><a href="#ui-tabs-letter">[% LxERP.t8("Letter") %]</a></li>
23 [% IF INSTANCE_CONF.get_webdav %]
24 <li><a href="#ui-tabs-webdav">[% LxERP.t8('WebDAV') %]</a></li>
26 [%- IF INSTANCE_CONF.get_doc_storage %]
27 <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>
29 <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Letter&object_id=[% HTML.url(letter.id) %]">[% LxERP.t8("Linked Records") %]</a></li>
33 <div id="ui-tabs-letter">
37 <table class="tbl-horizontal col">
38 <colgroup> <col class="wi-small"><col class="wi-lightwide"> </colgroup>
40 [% IF SELF.is_sales %]
42 <th>[% 'Customer' | $T8 %]</th>
43 <td class="wi-wider">[% P.customer_vendor.picker('letter.customer_id', letter.customer_id, type='customer', class='wi-wider') %]</td>
47 <th>[% 'Vendor' | $T8 %]</th>
48 <td class="wi-wider">[% P.customer_vendor.picker('letter.vendor_id', letter.vendor_id, type='vendor', class='wi-wider') %]</td>
52 <th>[% 'Contact Person' | $T8 %]</th>
53 <td class="wi-wider">[% 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, class='wi-wider') %]</td>
58 <table class="tbl-horizontal col">
61 <th>[% 'Your Reference' | $T8 %]</th>
62 <td><input type="text" name='letter.reference' value='[% letter.reference | html %]' class="wi-small">
66 <th>[% 'Letternumber' | $T8 %]:</th>
67 <td><input type="text" name='letter.letternumber' value='[% letter.letternumber | html %]' class="wi-small">
73 <table class="tbl-horizontal col">
76 <th>[% 'Employee' | $T8 %]</th>
77 <td>[% L.select_tag('letter.employee_id', employees, default=letter.employee_id, title_key='safe_name', class='wi-wide', allow_empty=1,) %]</td>
80 <th>[% 'Salesman' | $T8 %]</th>
81 <td>[% L.select_tag('letter.salesman_id', employees, default=letter.salesman_id, title_key='safe_name', class='wi-wide', allow_empty=1,) %]</td>
86 </div><!-- /.wrapper -->
91 <table class="tbl-horizontal">
92 <colgroup> <col class="wi-small"><col class="wi-wider"> </colgroup>
95 <th>[% 'Date' | $T8 %]</th>
96 <td>[% L.date_tag('letter.date_as_date', letter.date_as_date, readonly=readonly, class='wi-date') %]</td>
99 <th>[% 'Subject' | $T8 %]</th>
100 <td><textarea name='letter.subject' rows="1" class="wi-wider">[% letter.subject | html %]</textarea></td>
103 <th>[% 'Greeting' | $T8 %]</th>
104 <td><input type="text" name='letter.greeting' value="[% letter.greeting | html %]" class="wi-wider"> </td>
107 <th>[% 'Body' | $T8 %]</th>
108 <td class="wi-wider">[% L.textarea_tag('letter.body_as_restricted_html', letter.body_as_restricted_html, rows=20, class='texteditor wi-wider') %]</td>
111 <th>[% 'Internal Notes' | $T8 %]</th>
112 <td><textarea name='letter.intnotes' rows="4" class="wi-wider">[% letter.intnotes | html %]</textarea></td>
117 <div id="email_inputs" class="hidden"></div>
118 <div id="print_options" class="hidden">[% print_options %]</div>
120 </div><!-- /.wrapper -->
122 </div><!-- /.ui-tabs-letter -->
124 [% PROCESS 'webdav/_list.html' %]
126 <div class="wrapper">
127 [% LxERP.t8("Loading...") %]
131 </div><!-- /.tabwidget -->
135 <div id="print_dialog" class="hidden">
136 [% PROCESS 'common/_print_dialog.html' %]