ActionBar/Dateimanagement: Verschicken von Dateien via E-Mail wieder implementiert
[kivitendo-erp.git] / templates / webpages / common / _send_email_dialog.html
1 [%- USE HTML %][%- USE LxERP -%][%- USE L -%][%- USE P -%]
2 [%- SET have_files = 0 %]
3
4 [% BLOCK attach_file_list %]
5   [% IF files.as_list.size %]
6    [% SET have_files = 1 ;
7       FOREACH file = files.as_list %]
8     <tr>
9      <th align="right" nowrap>
10       [% IF loop.first %]
11        [% label %]
12       [% END %]
13      </th>
14      <td>
15       [% P.checkbox_tag("email_form.attach_file_ids[]", label=file.db_file.file_name, value=file.db_file.id, checked="1") %]
16      </td>
17     </tr>
18    [% END %]
19   [% END %]
20 [% END %]
21
22 <table>
23  <tbody>
24   <tr>
25    <th align="right" nowrap>
26     [% LxERP.t8("Recipients") %]
27    </th>
28    <td>
29     [% L.input_tag("email_form.to", email_form.to, size="80") %]
30     <span class="interactive cursor-pointer"        onclick="$('[data-toggle-recipients=1]').toggle()" data-toggle-recipients="1">[+]</span>
31     <span class="interactive cursor-pointer hidden" onclick="$('[data-toggle-recipients=1]').toggle()" data-toggle-recipients="1">[-]</span>
32    </td>
33   </tr>
34
35   <tr class="hidden" data-toggle-recipients="1">
36    <th align="right" nowrap>[% LxERP.t8("Cc") %]</th>
37    <td>[% L.input_tag("email_form.cc", email_form.cc, size="80") %]</td>
38   </tr>
39
40  [%- IF show_bcc %]
41   <tr class="hidden" data-toggle-recipients="1">
42    <th align="right" nowrap>[% LxERP.t8("Bcc") %]</th>
43    <td>[% L.input_tag("email_form.bcc", email_form.bcc, size="80") %]</td>
44   </tr>
45  [%- END %]
46
47   <tr>
48    <th align="right" nowrap>[% LxERP.t8("Subject") %]</th>
49    <td>[% L.input_tag("email_form.subject", email_form.subject, size="80") %]</td>
50   </tr>
51
52   <tr valign="top">
53    <th align="right" nowrap>[% LxERP.t8("Message") %]</th>
54    <td>[% L.textarea_tag("email_form.message", email_form.message, rows="15" cols="80" wrap="soft") %]</td>
55   </tr>
56
57 [% IF INSTANCE_CONF.get_doc_storage %]
58   <tr>
59    <th align="right" nowrap>[% LxERP.t8("Send printout of record") %]</th>
60    <td>
61     [% SET no_file_label = have_files ? LxERP.t8("Don't include a printout of the record with the email, only selected files") : LxERP.t8("Don't include a printout of the record with the email") ;
62            options       = [
63              [ "normal",   LxERP.t8("Create and send a new printout for this record") ],
64              [ "old_file", LxERP.t8("Send the last printout created for this record") ],
65              [ "no_file",  no_file_label ],
66            ] ;
67        L.select_tag("email_form.attachment_policy", options, onchange="kivi.SalesPurchase.activate_send_email_actions_regarding_printout()") %]
68    </td>
69   </tr>
70 [% END %]
71
72   <tr>
73    <th align="right" nowrap>
74 [% IF !INSTANCE_CONF.get_doc_storage %]
75     [% LxERP.t8("Attachment name") %]
76 [% END %]
77    </th>
78    <td>[% L.input_tag("email_form.attachment_filename", email_form.attachment_filename, size="80") %]</td>
79   </tr>
80
81 [% IF INSTANCE_CONF.get_doc_storage %]
82   [% PROCESS attach_file_list
83              files = FILES.files
84              label = LxERP.t8("Record's files") %]
85
86   [% PROCESS attach_file_list
87              files = FILES.vc_files
88              label = is_customer ? LxERP.t8("Files from customer") : LxERP.t8("Files from vendor") %]
89
90   [% PROCESS attach_file_list
91              files = FILES.part_files
92              label = LxERP.t8("Files from parts") %]
93 [% END %]
94  </tbody>
95 </table>
96
97 <div id="email_form_print_options"></div>
98
99 <p>
100  [% L.button_tag("kivi.SalesPurchase.send_email()", LxERP.t8("Send email")) %]
101  [% L.button_tag("\$('#send_email_dialog').dialog('close');", LxERP.t8("Abort")) %]
102 </p>