2 [%- USE HTML %][%- USE LxERP -%][%- USE L -%]
5 <form name="Form" method="post" action="[% script %]">
9 <td style="width: 500px">
12 <th align="right" nowrap>[% 'To' | $T8 %]</th>
14 <td>[% L.input_tag('email', email, size=30, class=(email ? '' : 'initial_focus')) %]</td>
17 <th align="right" nowrap>[% 'Cc' | $T8 %]</th>
18 <td><input name="cc" size="30" value="[% HTML.escape(cc) %]"></td>
22 <th align="right" nowrap>[% 'Bcc' | $T8 %]</th>
23 <td><input name="bcc" size="30" value="[% HTML.escape(bcc) %]"></td>
27 <th align="right" nowrap>[% 'Subject' | $T8 %]</th>
28 <td>[% L.input_tag('subject', subject, size=30, class=(email ? 'initial_focus' : '')) %]</td>
31 <th align="right" nowrap>[% 'Attachment name' | $T8 %]</th>
32 <td><input name="attachment_filename" size="30" value="[% HTML.escape(a_filename) %]"></td>
36 [%- IF INSTANCE_CONF.get_doc_storage %]
37 <td align="left" rowspan="2">
39 [%- USE ATT_it = Iterator(FILES) %]
40 [% FOREACH file = ATT_it %]
42 [%- IF ATT_it.size > 0 %]
43 <tr class="listheading">
44 <th colspan="3" align="left" nowrap>[% LxERP.t8('other Document Attachments') %]</th>
45 <input type="hidden" name="attfile_count" id="m_attfile_count" value="[% ATT_it.size %]">
48 <th align="left" nowrap></th>
49 <th align="left" nowrap>[% LxERP.t8('Filename') %]</th>
50 <th align="left" nowrap></th>
52 <tr><td colspan="3"><hr size="1" style="height:1px;background-color:#000;" noshade></td></tr>
53 [% FOREACH file = ATT_it %]
55 <td></td><td>[% file.file_name %]
56 <input type="hidden" name="attfile_[% ATT_it.count %]" value="[% file.id %]">
57 <td><input name="attsel_[% ATT_it.count %]" type="checkbox" class="checkbox" ></td>
61 [%- USE ATT_it = Iterator(VC_FILES) %]
62 [% FOREACH file = ATT_it %]
64 [%- IF ATT_it.size > 0 %]
65 <tr><td colspan="3"><hr size="1" noshade></td></tr>
66 <tr class="listheading">
67 <th colspan="3" align="left" nowrap>
68 <input type="hidden" name="attfile_cv_count" id="m_attfile_cv_count" value="[% ATT_it.size %]">
69 [% LxERP.t8('Customer Attachments') %]
73 <th align="left" nowrap></th>
74 <th align="left" nowrap>[% LxERP.t8('Filename') %]</th>
75 <th align="left" nowrap></th>
77 <tr><td colspan="3"><hr size="1" style="height:1px;background-color:#000;" noshade></td></tr>
78 [% FOREACH file = ATT_it %]
80 <td></td><td>[% file.file_name %]
81 <input type="hidden" name="attfile_cv_[% ATT_it.count %]" value="[% file.id %]">
82 <td><input name="attsel_cv_[% ATT_it.count %]" type="checkbox" class="checkbox" ></td>
86 [%- USE ATT_it = Iterator(PART_FILES) %]
87 [%- SET lastpartid = '' %]
88 [%- FOREACH file = ATT_it %]
90 [%- IF ATT_it.size > 0 %]
91 <tr><td colspan="3"><hr size="1" noshade></td></tr>
92 <tr class="listheading">
93 <th colspan="3" align="left" nowrap>
94 <input type="hidden" name="attfile_part_count" id="m_attfile_part_count" value="[% ATT_it.size %]">
95 [% LxERP.t8('Part Attachments') %]
99 <th align="left" nowrap>[% LxERP.t8('Part Number') %]</th>
100 <th align="left" nowrap>[% LxERP.t8('Filename') %]</th>
101 <th align="left" nowrap></th>
103 [% FOREACH file = ATT_it %]
104 [%- IF lastpartid != file.trans_id %]
105 [%- SET lastpartid = file.trans_id %][%- SET partname = file.partname %]
106 <tr><td colspan="3"><hr size="1" style="height:1px;background-color:#000;" noshade></td></tr>
107 [%- ELSE %][%- SET partname = '' %][% END %]
109 <td>[% partname %]</td>
110 <td>[% file.file_name %]
111 <input type="hidden" name="attfile_part_[% ATT_it.count %]" value="[% file.id %]">
112 <td><input name="attsel_part_[% ATT_it.count %]" type="checkbox" class="checkbox" ></td>
128 <th align="left" nowrap>[% 'Message' | $T8 %]</th>
131 <td><textarea name="message" id="message" rows="15" cols="60" wrap="soft">[% HTML.escape(message) %]</textarea></td>
141 [% FOREACH row = HIDDEN %]<input type="hidden" name="[% row.name %]" value="[% HTML.escape(row.value) %]">
148 <td colspan="2"><hr size="3" noshade></td>
152 [% L.hidden_tag('action', action) %]
155 [% L.submit_tag('action_newfile', LxERP.t8('Make new document'), onclick="return check_prerequisites();") %]
156 [%- IF has_document %]
157 [% L.submit_tag('action_oldfile', LxERP.t8('use actual document'), onclick="return check_prerequisites();") %]
159 [% L.submit_tag('action_nofile', LxERP.t8('No document'), onclick="return check_prerequisites();") %]
162 <script type="text/javascript">
164 function check_prerequisites() {
165 if (!$('#email,#subject,#message').filter(function(idx, elt) { return $(elt).val() === ""; }).size())
168 alert(kivi.t8('The recipient, subject or body is missing.'));