page.sheet.mail.php 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php global $_,$myUser,$myFirm,$conf; ?>
  2. <div class="modal sendmail-modal fade" id="sendmail-modal" tabindex="-1" role="dialog" aria-hidden="true">
  3. <!-- Modal d'envoi de fichier-->
  4. <div class="modal-dialog modal-lg" role="document">
  5. <div class="modal-content">
  6. <div class="modal-header">
  7. <h5 class="modal-title" id="exampleModalLabel"><i class="far fa-envelope-open"></i> Envoyer un e-mail</h5>
  8. <button type="button" class="btn btn-mini btn-close" data-dismiss="modal" aria-label="Close">
  9. <i class="fas fa-times"></i>
  10. </button>
  11. </div>
  12. <div class="modal-body">
  13. <div id="sendForm">
  14. <div class="row pt-3 pb-4 px-0 m-auto">
  15. <div class="col-md-8 sendmail-header">
  16. <div class="form-group from-block row">
  17. <label for="from" class="mb-0 col-md-2 col-sm-12"><span class="my-auto mx-0">Expéditeur : </span></label>
  18. <input placeholder="adresse@exemple.com" type="text" value="<?php echo isset($_['from']) && !empty($_['from'])?$_['from']:$myUser->mail; ?>" class="mb-1 form-control form-control-sm flex-element col-md-10" id="from" name="from">
  19. </div>
  20. <ul class="form-group recipient-block row recipientBox">
  21. <label for="recipient" class="mb-0 col-md-2 col-sm-12"><span class="my-auto mx-0">Destinataire(s) : </span></label>
  22. <li class="recipientLine p-0 col-md-10 mb-1">
  23. <div class="input-group input-group-sm flex-element recipient-line ml-auto">
  24. <div class="input-group-prepend px-2">
  25. <select class="recipient-type position-relative" data-type="dropdown-select" title="Type de destinataire">
  26. <option data-icon="fas fa-user" value="to" data-title="Destinataire direct">Pour</option>
  27. <option data-icon="fas fa-user-friends" value="cc" data-title="Destinataire en copie">Cc </option>
  28. <option data-icon="fas fa-user-secret" value="cci" data-title="Destinataire en copie cachée">Cci</option>
  29. </select>
  30. </div>
  31. <input type="text" data-type="to" value="" placeholder="Emails séparés par , ou ;" class="recipient form-control form-control-sm pl-2">
  32. <div class="input-group-append">
  33. <?php if(Plugin::exist('client')): ?>
  34. <button class="btn px-1 text-success" title="Ajouter un destinataire" onclick="sendmail_contact_add(this)"><i class="fas fa-user-plus"></i></button>
  35. <?php endif; ?>
  36. <button class="btn px-1 text-danger" title="Supprimer le destinataire" onclick="sendmail_contact_delete(this)"><i class="far fa-trash-alt"></i></button>
  37. </div>
  38. </div>
  39. </li>
  40. </ul>
  41. <div class="form-group subject-block row mb-0">
  42. <label for="subject" class="mb-0 col-md-2 col-sm-12"><span class="my-auto mx-0">Sujet : </span></label>
  43. <input placeholder="Objet" type="text" value="<?php echo isset($_['subject'])?$_['subject']:'' ?>" class="form-control form-control-sm flex-element col-md-10" id="subject" name="subject">
  44. </div>
  45. </div>
  46. <div class="col-md-4 sendmail-attachments">
  47. <div data-type="dropzone" data-label="Faites glisser vos pièces jointes ici" data-delete="sendmail_delete_document" class="form-control w-100 m-0 h-100" id="attachments" name="attachments"></div>
  48. </div>
  49. </div>
  50. <textarea data-type="wysiwyg" id="message" class="mb-0 mt-0"><?php
  51. echo isset($_['message'])?$_['message']:'';
  52. if (!isset($_['signature']) || $_['signature']==true):
  53. $signature = $conf->get('sendmail_allow_custom_signature') && !$conf->get('sendmail_force_global_signature') ? sendmail_user_signature() : $conf->get('sendmail_default_signature');
  54. echo template($signature,array(
  55. 'user.mail' => $myUser->mail,
  56. 'user.firstname' => $myUser->firstname,
  57. 'user.fullname' => $myUser->fullname(),
  58. 'user.function' => $myUser->function,
  59. 'user.phone' => $myUser->phone,
  60. 'user.mobile' => $myUser->mobile,
  61. 'firm.logo' => $myFirm->logo('publicPath'),
  62. 'firm.label' => $myFirm->label,
  63. 'firm.address' => $myFirm->address(),
  64. 'firm.phone' => $myFirm->phone,
  65. 'firm.mail' => $myFirm->mail,
  66. 'firm.fax' => $myFirm->fax
  67. ), true);
  68. endif; ?>
  69. </textarea>
  70. </div>
  71. </div>
  72. <div class="modal-footer p-2">
  73. <button type="button" class="btn btn-small btn-light" data-dismiss="modal">Fermer</button>
  74. <button type="button" class="btn btn-small btn-primary btn-send" ><i class="far fa-paper-plane"></i> <span>Envoyer</span></button>
  75. </div>
  76. </div>
  77. </div>
  78. </div>