Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW - Adding mail model #562

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions htdocs/admin/mails_templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@
if (isModEnabled('partnership') && !empty($user->rights->partnership->read)) {
$elementList['partnership_send'] = img_picto('', 'partnership', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToPartnership'));
}
// START BACKPORT WENEOS - A SUPP EN V22.0
if (isModEnabled('product') && !empty($user->rights->produit->lire)) {
$elementList['product_send'] = img_picto('', 'product', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('Product'));
}
// END BACKPORT WENEOS - A SUPP EN V22.0

$parameters = array('elementList'=>$elementList);
$reshook = $hookmanager->executeHooks('emailElementlist', $parameters); // Note that $action and $object may have been modified by some hooks
Expand Down
7 changes: 6 additions & 1 deletion htdocs/core/class/html.formmail.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,12 @@ public function get_form($addfileaction = 'addfile', $removefileaction = 'remove
} 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',
// START BACKPORT WENEOS - A SUPP EN V22.0
'product_send',
// END BACKPORT WENEOS - A SUPP EN V22.0
'all'

))) {
// If list of template is empty
$out .= '<div class="center" style="padding: 0px 0 12px 0">'."\n";
Expand Down
6 changes: 6 additions & 0 deletions htdocs/product/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -2982,6 +2982,12 @@
* Generated documents
*/

// START BACKPORT WENEOS - A SUPP EN V22.0
if (GETPOST('modelselected')) {
$action = 'presend';
}
// END BACKPORT WENEOS - A SUPP EN V22.0

if ($action != 'create' && $action != 'edit' && $action != 'delete') {
print '<div class="fichecenter"><div class="fichehalfleft">';
print '<a name="builddoc"></a>'; // ancre
Expand Down
Loading