1 [%- USE HTML %][%- USE LxERP -%][%- USE L -%][%- USE P -%]
 
   2 [%- SET have_files = 0 %]
 
   4 [% BLOCK attach_file_list %]
 
   5   [% IF files.as_list.size %]
 
   7       FOREACH file = files.as_list %]
 
   9      <th align="right" nowrap>
 
  16         [% P.checkbox_tag("email_form.attach_file_ids[]", label=file.db_file.file_name, value=file.db_file.id, checked="1") %]
 
  18         [% P.checkbox_tag("email_form.attach_file_ids[]", label=file.db_file.file_name, value=file.db_file.id, checked="0") %]
 
  29    <th align="right" nowrap>
 
  30     [% IF is_invoice_mail  %]
 
  31       [% LxERP.t8("Invoice to:") %]
 
  33       [% LxERP.t8("Recipients") %]
 
  37     [% L.input_tag("email_form.to", email_form.to, size="80",readonly=is_invoice_mail ) %]
 
  38     <span class="interactive cursor-pointer"        onclick="$('[data-toggle-recipients=1]').toggle()" data-toggle-recipients="1">[+]</span>
 
  39     <span class="interactive cursor-pointer hidden" onclick="$('[data-toggle-recipients=1]').toggle()" data-toggle-recipients="1">[-]</span>
 
  43   <tr class="hidden" data-toggle-recipients="1">
 
  44    <th align="right" nowrap>[% LxERP.t8("Cc") %]</th>
 
  45    <td>[% L.input_tag("email_form.cc", email_form.cc, size="80") %]</td>
 
  49   <tr class="hidden" data-toggle-recipients="1">
 
  50    <th align="right" nowrap>[% LxERP.t8("Bcc") %]</th>
 
  51    <td>[% L.input_tag("email_form.bcc", email_form.bcc, size="80") %]</td>
 
  56    <th align="right" nowrap>[% LxERP.t8("Subject") %]</th>
 
  57    <td>[% L.input_tag("email_form.subject", email_form.subject, size="80") %]</td>
 
  61    <th align="right" nowrap>[% LxERP.t8("Message") %]
 
  62     <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>
 
  64    <td>[% L.textarea_tag("email_form.message", email_form.message, rows="15" cols="80" wrap="soft") %]</td>
 
  67 [% IF INSTANCE_CONF.get_doc_storage %]
 
  69    <th align="right" nowrap>[% LxERP.t8("Send printout of record") %]</th>
 
  71     [% 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") ;
 
  73              [ "normal",   LxERP.t8("Create and send a new printout for this record") ],
 
  74              [ "old_file", LxERP.t8("Send the last printout created for this record") ],
 
  75              [ "no_file",  no_file_label ],
 
  77        L.select_tag("email_form.attachment_policy", options, onchange="kivi.SalesPurchase.activate_send_email_actions_regarding_printout()") %]
 
  83    <th align="right" nowrap>
 
  84 [% IF !INSTANCE_CONF.get_doc_storage %]
 
  85     [% LxERP.t8("Attachment name") %]
 
  88    <td>[% L.input_tag("email_form.attachment_filename", email_form.attachment_filename, size="80") %]</td>
 
  91 [% IF INSTANCE_CONF.get_doc_storage %]
 
  92   [% PROCESS attach_file_list
 
  94              checked = INSTANCE_CONF.get_email_attachment_record_files_checked
 
  95              label = LxERP.t8("Record's files") %]
 
  97   [% PROCESS attach_file_list
 
  98              files = FILES.vc_files
 
  99              checked = INSTANCE_CONF.get_email_attachment_vc_files_checked
 
 100              label = is_customer ? LxERP.t8("Files from customer") : LxERP.t8("Files from vendor") %]
 
 102   [% PROCESS attach_file_list
 
 103              files = FILES.part_files
 
 104              checked = INSTANCE_CONF.get_email_attachment_part_files_checked
 
 105              label = LxERP.t8("Files from parts") %]
 
 110 <div id="email_form_print_options"></div>
 
 113  [% L.button_tag(email_form.js_send_function, LxERP.t8("Send email")) %]
 
 114  [% L.button_tag("\$('#send_email_dialog').dialog('close');", LxERP.t8("Abort")) %]