mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Adding model Mail
This commit is contained in:
parent
e3856d0de5
commit
4afb100767
|
|
@ -252,6 +252,9 @@ if (isModEnabled('eventorganization') && $user->hasRight('eventorganization', 'r
|
|||
if (isModEnabled('partnership') && $user->hasRight('partnership', 'read')) {
|
||||
$elementList['partnership_send'] = img_picto('', 'partnership', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToPartnership'));
|
||||
}
|
||||
if (isModEnabled('product') && !empty($user->rights->produit->lire)) {
|
||||
$elementList['product_send'] = img_picto('', 'product', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('Product'));
|
||||
}
|
||||
|
||||
$parameters = array('elementList' => $elementList);
|
||||
$reshook = $hookmanager->executeHooks('emailElementlist', $parameters); // Note that $action and $object may have been modified by some hooks
|
||||
|
|
|
|||
|
|
@ -534,6 +534,7 @@ class FormMail extends Form
|
|||
$listofmimes = array();
|
||||
$keytoavoidconflict = empty($this->trackid) ? '' : '-'.$this->trackid; // this->trackid must be defined
|
||||
|
||||
if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelselected') && GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1')) {
|
||||
if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelselected') && GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1')) {
|
||||
if (!empty($arraydefaultmessage->joinfiles) && !empty($this->param['fileinit']) && is_array($this->param['fileinit'])) {
|
||||
foreach ($this->param['fileinit'] as $path) {
|
||||
|
|
@ -624,7 +625,7 @@ class FormMail extends Form
|
|||
} elseif (!empty($this->param['models']) && in_array($this->param['models'], array(
|
||||
'propal_send', 'order_send', 'facture_send',
|
||||
'shipping_send', 'fichinter_send', 'supplier_proposal_send', 'order_supplier_send',
|
||||
'invoice_supplier_send', 'thirdparty', 'contract', 'user', 'recruitmentcandidature_send', 'all'
|
||||
'invoice_supplier_send', 'thirdparty', 'contract', 'user', 'recruitmentcandidature_send', 'product_send', 'all'
|
||||
))) {
|
||||
// If list of template is empty
|
||||
$out .= '<div class="center" style="padding: 0px 0 12px 0">'."\n";
|
||||
|
|
|
|||
|
|
@ -3176,6 +3176,10 @@ if (getDolGlobalString('PRODUCT_ADD_FORM_ADD_TO') && $object->id && ($action ==
|
|||
* Generated documents
|
||||
*/
|
||||
|
||||
if (GETPOST('modelselected')) {
|
||||
$action = 'presend';
|
||||
}
|
||||
|
||||
if ($action != 'create' && $action != 'edit' && $action != 'delete') {
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
print '<a name="builddoc"></a>'; // ancre
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user