diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index d2eabd95e2b..b9cb57e0d80 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -34,10 +34,6 @@ $langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'err $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); -if (!$user->admin) { - accessforbidden(); -} - $usersignature = $user->signature; // For action = test or send, we ensure that content is not html, even for signature, because this we want a test with NO html. if ($action == 'test' || $action == 'send') { @@ -61,6 +57,10 @@ $substitutionarrayfortest = array( ); complete_substitutions_array($substitutionarrayfortest, $langs); +// Security check +if (!$user->admin) { + accessforbidden(); +} /* @@ -394,6 +394,25 @@ if ($action == 'edit') { } print ''; + // AUTH method + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { + print '
'; + } + // ID if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { $mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_ID_EMAILING : ''); @@ -409,24 +428,6 @@ if ($action == 'edit') { print ''; } - // OAUTH - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { - print ''; - } - // PW if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { $mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_PW_EMAILING : ''); @@ -442,7 +443,7 @@ if ($action == 'edit') { print ''; } - // OAUTH service provider + // OAUTH service provider if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { print ''; } - // SMTPS ID - if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { - print ''; - } - // AUTH method if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { $authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING', 'LOGIN'); @@ -558,6 +554,11 @@ if ($action == 'edit') { print ''; } + // SMTPS ID + if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { + print ''; + } + // SMTPS PW if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING') != "XOAUTH2") { print ''; @@ -707,8 +708,8 @@ if ($action == 'edit') { $formmail->withfrom = 1; $formmail->witherrorsto = 1; $formmail->withto = (GETPOSTISSET('sendto') ? GETPOST('sendto', 'restricthtml') : ($user->email ? $user->email : 1)); - $formmail->withtocc = (GETPOSTISSET(['sendtocc']) ? GETPOST('sendtocc', 'restricthtml') : 1); // ! empty to keep field if empty - $formmail->withtoccc = (GETPOSTISSET(['sendtoccc']) ? GETPOST('sendtoccc', 'restricthtml') : 1); // ! empty to keep field if empty + $formmail->withtocc = (GETPOSTISSET('sendtocc') ? GETPOST('sendtocc', 'restricthtml') : 1); // ! empty to keep field if empty + $formmail->withtoccc = (GETPOSTISSET('sendtoccc') ? GETPOST('sendtoccc', 'restricthtml') : 1); // ! empty to keep field if empty $formmail->withtopic = (GETPOSTISSET('subject') ? GETPOST('subject') : $langs->trans("Test")); $formmail->withtopicreadonly = 0; $formmail->withfile = 2; diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index c48146fc937..05d66516cde 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -32,23 +32,28 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'errors')); $action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); $usersignature = $user->signature; // For action = test or send, we ensure that content is not html, even for signature, because this we want a test with NO html. if ($action == 'test' || $action == 'send') { - $usersignature = dol_string_nohtmltag($usersignature); + $usersignature = dol_string_nohtmltag($usersignature, 2); } $substitutionarrayfortest = array( -'__LOGIN__' => $user->login, -'__ID__' => 'TESTIdRecord', -'__EMAIL__' => 'TESTEMail', -'__LASTNAME__' => 'TESTLastname', -'__FIRSTNAME__' => 'TESTFirstname', -'__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), -'__SENDEREMAIL_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails -//'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet + '__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT, + '__ID__' => 'TESTIdRecord', + '__EMAIL__' => 'TESTEMail', + '__LOGIN__' => $user->login, + '__LASTNAME__' => 'TESTLastname', + '__FIRSTNAME__' => 'TESTFirstname', + '__ADDRESS__'=> 'RecipientAddress', + '__ZIP__'=> 'RecipientZip', + '__TOWN_'=> 'RecipientTown', + '__COUNTRY__'=> 'RecipientCountry', + '__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), + '__SENDEREMAIL_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails + //'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet ); complete_substitutions_array($substitutionarrayfortest, $langs); @@ -94,10 +99,10 @@ $trackid = (($action == 'testhtml') ? "testhtml" : "test"); $sendcontext = 'ticket'; // Force to use dedicated context of setup for ticket include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; -if ($action == 'presend' && GETPOST('trackid') == 'test') { +if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'test') { $action = 'test'; } -if ($action == 'presend' && GETPOST('trackid') == 'testhtml') { +if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'testhtml') { $action = 'testhtml'; } @@ -317,12 +322,15 @@ if ($action == 'edit') { // Host server - print ''; + print ''; // Port @@ -351,7 +360,7 @@ if ($action == 'edit') { if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail') { print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); print '| ';
@@ -161,10 +160,25 @@ class doc_generic_contract_odt extends ModelePDFContract
$texte .= ' '; // Scan directories - if (count($listofdir)) { - $texte .= $langs->trans("NumberOfModelFilesFound").': '.count($listoffiles).''; + $nbofiles = count($listoffiles); + if (!empty($conf->global->CONTRACT_ADDON_PDF_ODT_PATH)) { + $texte .= $langs->trans("NumberOfModelFilesFound").': '; + //$texte.=$nbofiles?'':''; + $texte .= count($listoffiles); + //$texte.=$nbofiles?'':''; + $texte .= ''; } + if ($nbofiles) { + $texte .= ' ';
+ // Show list of found files
+ foreach ($listoffiles as $file) {
+ $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'';
+ $texte .= ' '.img_picto('', 'delete').'';
+ $texte .= ' ';
+ }
// Add input to upload a new template file.
$texte .= ''; + } + $texte .= ' '.$langs->trans("UploadNewTemplate");
$maxfilesizearray = getMaxFileSizeArray();
@@ -228,7 +242,7 @@ class doc_generic_contract_odt extends ModelePDFContract
$sav_charset_output = $outputlangs->charset_output;
$outputlangs->charset_output = 'UTF-8';
- // Load traductions files required by page
+ // Load translation files required by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
if ($conf->contrat->multidir_output[$object->entity]) {
@@ -382,16 +396,21 @@ class doc_generic_contract_odt extends ModelePDFContract
dol_syslog($e->getMessage(), LOG_INFO);
}
+ // Call the ODTSubstitution hook
+ $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
+ $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+
foreach ($tmparray as $key => $value) {
try {
- if (preg_match('/logo$/', $key)) { // Image
+ if (preg_match('/logo$/', $key)) {
+ // Image
if (file_exists($value)) {
$odfHandler->setImage($key, $value);
} else {
$odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
}
- } else // Text
- {
+ } else {
+ // Text
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
} catch (OdfException $e) {
@@ -448,7 +467,7 @@ class doc_generic_contract_odt extends ModelePDFContract
}
// Call the beforeODTSave hook
- $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
+ $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
$reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
// Write new file
@@ -457,6 +476,7 @@ class doc_generic_contract_odt extends ModelePDFContract
$odfHandler->exportAsAttachedPDF($file);
} catch (Exception $e) {
$this->error = $e->getMessage();
+ dol_syslog($e->getMessage(), LOG_INFO);
return -1;
}
} else {
@@ -464,10 +484,12 @@ class doc_generic_contract_odt extends ModelePDFContract
$odfHandler->saveToDisk($file);
} catch (Exception $e) {
$this->error = $e->getMessage();
+ dol_syslog($e->getMessage(), LOG_INFO);
return -1;
}
}
+ $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
$reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if (!empty($conf->global->MAIN_UMASK)) {
diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
index cfb23269ca9..73793c5a757 100644
--- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
+++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
@@ -175,7 +175,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
$texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
}
diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
index 061f18e5442..0b8fa2d4621 100644
--- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
+++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
@@ -174,7 +174,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures
$texte .= ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
}
diff --git a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php
index 2ab951147b9..ed48c93c4de 100644
--- a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php
+++ b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php
@@ -164,7 +164,9 @@ class doc_generic_member_odt extends ModelePDFMember
$texte .= ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
}
diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php
index 42b3c529fe4..b89c4eab2cd 100644
--- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php
+++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php
@@ -175,7 +175,9 @@ class doc_generic_mo_odt extends ModelePDFMo
$texte .= ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
}
diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php
index 4e8be5f6389..2015da21f61 100644
--- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php
+++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php
@@ -468,7 +468,9 @@ class doc_generic_project_odt extends ModelePDFProjects
$texte .= ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
}
diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php
index ba386eedfe7..a7f3eab4a30 100644
--- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php
+++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php
@@ -433,7 +433,9 @@ class doc_generic_task_odt extends ModelePDFTask
$texte .= ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
}
diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
index 4d8edca7f64..4ebc742b4bb 100644
--- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
+++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
@@ -168,7 +168,9 @@ class doc_generic_reception_odt extends ModelePdfReception
$texte .= ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
}
diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
index 0f5adc3fc7d..eb6ba838d7a 100644
--- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
+++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
@@ -172,7 +172,9 @@ class doc_generic_stock_odt extends ModelePDFStock
$texte .= ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
}
diff --git a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php
index f3177233589..12bbcc12edc 100644
--- a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php
@@ -163,7 +163,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
// Scan directories
$nbofiles = count($listoffiles);
- if (!empty($conf->global->COMMANDE_ADDON_PDF_ODT_PATH)) {
+ if (!empty($conf->global->SUPPLIER_ORDER_ADDON_PDF_ODT_PATH)) {
$texte .= $langs->trans("NumberOfModelFilesFound").': ';
//$texte.=$nbofiles?'':'';
$texte .= count($listoffiles);
@@ -175,7 +175,9 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
$texte .= ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
}
diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
index fc75445123a..55a7710c5a4 100644
--- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
@@ -179,7 +179,9 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
$texte .= ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
diff --git a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php
index ff6359be5ce..1a2d1e537cc 100644
--- a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php
+++ b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php
@@ -161,7 +161,9 @@ class doc_generic_ticket_odt extends ModelePDFTicket
$texte .= ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
}
diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
index d129c80f126..1c3e346203b 100644
--- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
+++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
@@ -192,7 +192,9 @@ class doc_generic_user_odt extends ModelePDFUser
$texte .= ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' ';
// Show list of found files
foreach ($listoffiles as $file) {
- $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').' ';
}
diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php
index c5dbf6b0eac..1ce6d859266 100644
--- a/htdocs/imports/import.php
+++ b/htdocs/imports/import.php
@@ -492,7 +492,8 @@ if ($step == 2 && $datatoimport) {
$text = $objmodelimport->getDriverDescForKey($key);
print ''; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= ' '.img_picto('', 'delete').''; + $texte .= ' '; } $texte .= ' '.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key), $text).' | ';
print '';
- print '';
+ $filename = $langs->trans("ExampleOfImportFile").'_'.$datatoimport.'.'.$key;
+ print '';
print img_picto('', 'download', 'class="paddingright opacitymedium"');
print $langs->trans("DownloadEmptyExampleShort");
print '';
@@ -583,7 +584,8 @@ if ($step == 3 && $datatoimport) {
$text = $objmodelimport->getDriverDescForKey($format);
print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format), $text);
print ' | ';
- print '';
+ $filename = $langs->trans("ExampleOfImportFile").'_'.$datatoimport.'.'.$format;
+ print '';
print img_picto('', 'download', 'class="paddingright opacitymedium"');
print $langs->trans("DownloadEmptyExampleShort");
print '';
diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php
index 46967d6e4fa..b7dfc374a52 100644
--- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php
+++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php
@@ -119,7 +119,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
$form = new Form($this->db);
$texte = $this->description.". | ';
-
// Add input to upload a new template file.
$texte .= '\n"; - $texte .= ' '.$langs->trans("UploadNewTemplate");
$maxfilesizearray = getMaxFileSizeArray();
@@ -195,6 +193,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
$texte .= '';
$texte .= '';
$texte .= ' ';
+
$texte .= ' | ';
$texte .= ''.$langs->trans("Permissions").' | '; print ''; -print ''.img_picto('', 'folder-open', 'class="paddingright"').''.$langs->trans("ExpandAll").''; +print ''.img_picto('', 'folder-open', 'class="paddingright"').''.$langs->trans("ExpandAll").''; print ' | '; -print ''.img_picto('', 'folder', 'class="paddingright"').''.$langs->trans("UndoExpandAll").''; +print ''.img_picto('', 'folder', 'class="paddingright"').''.$langs->trans("UndoExpandAll").''; print ' | '; print 'module && $module != "allmodules" ? ' style="display:none"' : '').'>'; + print ' | '; - print 'module || $module == "allmodules" ? ' style="display:none"' : '').'> | '; + print ''; } else { print ''; } print ' | '; } else { if ($caneditperms) { - print ' | module && $module != "allmodules" ? ' style="display:none"' : '').'>'; + print ' | '; - print 'module || $module == "allmodules" ? ' style="display:none"' : '').'> | '; + print ''; } else { print ''; } @@ -510,11 +515,11 @@ if ($result) { } print ' | '; - print ' | ';
- print ' ';
+ print ' ';
+ print '';
- print ' | '; //Add picto + / - when open en closed
@@ -522,7 +527,7 @@ if ($result) {
}
print ''."\n";
- print ' |