Dateimanagement: Alle Anhänge per E-Mail versendbar machen
[kivitendo-erp.git] / templates / webpages / generic / edit_email.html
1 [%- USE T8 %]
2 [%- USE HTML %][%- USE LxERP -%][%- USE L -%]
3 <h1>[% title %]</h1>
4
5 <form name="Form" method="post" action="[% script %]">
6
7 <table width="100%">
8   <tr>
9     <td style="width: 500px">
10       <table>
11         <tr>
12           <th align="right" nowrap>[% 'To' | $T8 %]</th>
13
14           <td>[% L.input_tag('email', email, size=30, class=(email ? '' : 'initial_focus')) %]</td>
15         </tr>
16         <tr>
17           <th align="right" nowrap>[% 'Cc' | $T8 %]</th>
18           <td><input name="cc" size="30" value="[% HTML.escape(cc) %]"></td>
19         </tr>
20 [%- IF SHOW_BCC %]
21         <tr>
22           <th align="right" nowrap>[% 'Bcc' | $T8 %]</th>
23           <td><input name="bcc" size="30" value="[% HTML.escape(bcc) %]"></td>
24         </tr>
25 [%- END %]
26         <tr>
27           <th align="right" nowrap>[% 'Subject' | $T8 %]</th>
28           <td>[% L.input_tag('subject', subject, size=30, class=(email ? 'initial_focus' : '')) %]</td>
29         </tr>
30         <tr>
31           <th align="right" nowrap>[% 'Attachment name' | $T8 %]</th>
32           <td><input name="attachment_filename" size="30" value="[% HTML.escape(a_filename) %]"></td>
33         </tr>
34       </table>
35     </td>
36 [%- IF INSTANCE_CONF.get_doc_storage %]
37     <td align="left" rowspan="2">
38       <table>
39 [%- USE ATT_it = Iterator(FILES) %]
40 [% FOREACH file = ATT_it %]
41 [% END %]
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 %]">
46         </tr>
47          <tr class="">
48            <th align="left" nowrap></th>
49            <th align="left" nowrap>[% LxERP.t8('Filename') %]</th>
50            <th align="left" nowrap></th>
51         </tr>
52         <tr><td colspan="3"><hr size="1" style="height:1px;background-color:#000;" noshade></td></tr>
53        [% FOREACH file = ATT_it %]
54          <tr class="listrow">
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>
58          </tr>
59         [% END %]
60 [%- END %]
61 [%- USE ATT_it = Iterator(VC_FILES) %]
62 [% FOREACH file = ATT_it %]
63 [% END %]
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') %]
70            </th>
71          </tr>
72         <tr class="">
73            <th align="left" nowrap></th>
74            <th align="left" nowrap>[% LxERP.t8('Filename') %]</th>
75            <th align="left" nowrap></th>
76         </tr>
77         <tr><td colspan="3"><hr size="1" style="height:1px;background-color:#000;" noshade></td></tr>
78         [% FOREACH file = ATT_it %]
79          <tr class="listrow">
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>
83          </tr>
84         [% END %]
85 [%- END %]
86 [%- USE ATT_it = Iterator(PART_FILES) %]
87 [%- SET lastpartid = '' %]  
88 [%- FOREACH file = ATT_it %]
89 [%- END %]
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') %]
96           </th>
97         </tr>
98         <tr class="">
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>
102         </tr>
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 %]          
108         <tr class="listrow">
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>
113          </tr>
114         [% END %]
115 [%- END %]
116       </table>
117     </td>
118 [%- ELSE %]
119     <td rowspan="2">
120     </td>
121 [%- END %]
122   </tr>
123
124   <tr>
125     <td>
126       <table>
127         <tr>
128           <th align="left" nowrap>[% 'Message' | $T8 %]</th>
129         </tr>
130         <tr>
131           <td><textarea name="message" id="message" rows="15" cols="60" wrap="soft">[% HTML.escape(message) %]</textarea></td>
132
133         </tr>
134       </table>
135     </td>
136   </tr>
137   <tr>
138     <td colspan="2">
139
140 [% print_options %]
141 [% FOREACH row = HIDDEN %]<input type="hidden" name="[% row.name %]" value="[% HTML.escape(row.value) %]">
142 [% END %]
143
144     </td>
145   </tr>
146
147   <tr>
148     <td colspan="2"><hr size="3" noshade></td>
149   </tr>
150 </table>
151
152 [% L.hidden_tag('action', action) %]
153
154 <br>
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();") %]
158 [%- END %]
159 [% L.submit_tag('action_nofile',  LxERP.t8('No document'), onclick="return check_prerequisites();") %]
160 </form>
161
162 <script type="text/javascript">
163 <!--
164 function check_prerequisites() {
165   if (!$('#email,#subject,#message').filter(function(idx, elt) { return $(elt).val() === ""; }).size())
166     return true;
167
168   alert(kivi.t8('The recipient, subject or body is missing.'));
169   return false;
170 }
171 -->
172 </script>