]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/common/_send_email_dialog.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / common / _send_email_dialog.html
1 [% USE HTML %]
2 [% USE LxERP %]
3 [% USE L %]
4 [% USE P %]
5 [% SET have_files = 0 %]
6
7 [% BLOCK attach_file_list %]
8   [% IF files.as_list.size %]
9     [% SET have_files = 1 ;
10        FOREACH file = files.as_list %]
11       <tr>
12         <th>[% IF loop.first %][% label %][% END %]</th>
13         <td>
14         [% IF checked %]
15           [% P.checkbox_tag("email_form.attach_file_ids[]", label=file.db_file.file_name, value=file.db_file.id, checked="1") %]
16         [% ELSE %]
17           [% P.checkbox_tag("email_form.attach_file_ids[]", label=file.db_file.file_name, value=file.db_file.id, checked="0") %]
18         [% END %]
19           </td>
20       </tr>
21     [% END %]
22   [% END %]
23 [% END %]
24
25
26 <table class="tbl-horizontal">
27   <tbody>
28     <tr>
29       <th>
30         [% IF is_invoice_mail  %]
31           [% LxERP.t8("Invoice to:") %]
32         [% ELSE %]
33           [% LxERP.t8("Recipients") %]
34         [% END %]
35         <span class="interactive cursor-pointer" onclick="$('[data-toggle-recipients=1]').toggle()" data-toggle-recipients="1">[+]</span>
36         <span class="interactive cursor-pointer hidden" onclick="$('[data-toggle-recipients=1]').toggle()" data-toggle-recipients="1">[-]</span>
37       </th>
38       <td>
39         [% L.input_tag("email_form.to", email_form.to, class="wi-wider", readonly=is_invoice_mail) %]
40       </td>
41     </tr>
42     [%- IF ALL_PARTNER_EMAIL_ADDRESSES.size %]
43       [%- FOREACH email = ALL_PARTNER_EMAIL_ADDRESSES %]
44         <tr class="hidden" data-toggle-recipients="1">
45           <th>
46             [%- IF loop.first %]
47               [% LxERP.t8("Other recipients") %]
48             [%- END %]
49           </th>
50           <td>
51             [% P.checkbox_tag("email_form.additional_to[]", label=email, value=email, checked="0") %]
52           </td>
53         </tr>
54       [%- END %]
55     [%- END %]
56     [%- IF ALL_EMPLOYEES.size %]
57       <tr class="hidden" data-toggle-recipients="1">
58         <th>[% LxERP.t8("CC to Employee") %]</th>
59         <td>[% L.select_tag('email_form.cc_employee', ALL_EMPLOYEES, value_key='login' title_key='safe_name', with_empty=1, style=style) %]</td>
60       </tr>
61     [%- END %]
62     <tr class="hidden" data-toggle-recipients="1">
63       <th>[% LxERP.t8("Cc") %]</th>
64       <td>[% L.input_tag("email_form.cc", email_form.cc, class="wi-wider") %]</td>
65     </tr>
66     [% IF show_bcc %]
67       <tr class="hidden" data-toggle-recipients="1">
68         <th>[% LxERP.t8("Bcc") %]</th>
69         <td>[% L.input_tag("email_form.bcc", email_form.bcc, class="wi-wider") %]</td>
70     </tr>
71     [% END %]
72     <tr>
73       <th>[% LxERP.t8("Subject") %]</th>
74       <td>[% L.input_tag("email_form.subject", email_form.subject, class="wi-wider") %]</td>
75     </tr>
76     <tr>
77       <th>[% LxERP.t8("Message") %] <sup> [% L.link("generictranslations.pl?action=edit_email_strings", "1)", title=LxERP.t8('Tired of copying always nice phrases for this message? Click here to use the new preset message option!'), target="_blank") %]</sup> </th>
78       <td>[% L.textarea_tag("email_form.message", email_form.message, style="height:150px", class="texteditor texteditor-space-for-toolbar wi-wider") %]</td>
79     </tr>
80     [% IF INSTANCE_CONF.get_doc_storage %]
81       <tr>
82         <th>[% LxERP.t8("Send printout of record") %]</th>
83         <td>
84           [% 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") %]
85           [%- IF is_final_version %]
86             [% options = [
87                  [ "old_file", LxERP.t8("Send the last version for this record") ],
88                  [ "no_file",  no_file_label ], ]
89             %]
90           [%- ELSE %]
91             [% options = [
92                  [ "old_file", LxERP.t8("Send the last or create the first version for this record") ],
93                  [ "normal",   LxERP.t8("Create and send a new printout for this record") ],
94                  [ "no_file",  no_file_label ], ]
95             %]
96           [%- END %]
97           [% L.select_tag("email_form.attachment_policy", options, onchange="kivi.SalesPurchase.activate_send_email_actions_regarding_printout()", class="wi-wider") %]
98         </td>
99       </tr>
100     [% END %]
101     <tr>
102       <th>[% IF !INSTANCE_CONF.get_doc_storage %] [% LxERP.t8("Attachment name") %] [% END %] </th>
103       <td>[% L.input_tag("email_form.attachment_filename", email_form.attachment_filename, class="wi-wider") %]</td>
104     </tr>
105     [% IF INSTANCE_CONF.get_doc_storage %]
106       [% PROCESS attach_file_list
107                  files = FILES.files
108                  checked = INSTANCE_CONF.get_email_attachment_record_files_checked
109                  label = LxERP.t8("Record's files") %]
110       [% PROCESS attach_file_list
111                  files = FILES.vc_files
112                  checked = INSTANCE_CONF.get_email_attachment_vc_files_checked
113                  label = is_customer ? LxERP.t8("Files from customer") : LxERP.t8("Files from vendor") %]
114
115       [% PROCESS attach_file_list
116                  files = FILES.part_files
117                  checked = INSTANCE_CONF.get_email_attachment_part_files_checked
118                  label = LxERP.t8("Files from parts") %]
119       [% PROCESS attach_file_list
120                  files = FILES.project_files
121                  label = LxERP.t8("Files from projects") %]
122     [% END %]
123   </tbody>
124 </table>
125
126
127 <div id="email_form_print_options"></div>
128
129 <div class="buttons">
130   [% L.button_tag(email_form.js_send_function, LxERP.t8("Send email")) %]
131   [% L.button_tag("\$('#send_email_dialog').dialog('close');", LxERP.t8("Abort"), class="button neutral") %]
132 </div>