From bf80809a96b2b82cb5f235ef70483f3296b6fd9a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jan 2024 01:34:53 +0100 Subject: [PATCH 1/5] Debug v19 --- .../modulebuilder/template/core/modules/modMyModule.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 7ff829ad411..6954d50d110 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -169,7 +169,7 @@ class modMyModule extends DolibarrModules 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' )*/ - if (!isset($conf->mymodule) || !isset($conf->mymodule->enabled)) { + if (!isModEnabled("mymodule")) { $conf->mymodule = new stdClass(); $conf->mymodule->enabled = 0; } From 6f19f3c1fb04b51d065020c8ea62491e1d2c9e8c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jan 2024 23:38:18 +0100 Subject: [PATCH 2/5] Clean css --- htdocs/public/test/test_forms.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index d24171680b0..235c687472a 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -23,14 +23,12 @@ llxHeader(); ?> -

This page is a sample of page using Dolibarr HTML widget methods. It is designed to make test with
- css (add parameter &theme=newtheme to test another theme or edit css of current theme)
- jmobile (add parameter ">dol_use_jmobile=1&dol_optimize_smallscreen=1 and switch to small screen < 570 to enable with emulated jmobile)
- no javascript / usage for bind people (add parameter ">nojs=1 to force disable javascript)
- use with a text browser (add parameter ">textbrowser=1 to force detection of a text browser)
-

-
+

selectDate('', 'test1b', 1, 1, 0); print '

'."\n"; // Test2: form->selectDate using tzuser date -print "Test 2: We must have here 1970-01-01 00:00:00 selected (fields can be empty)
\n"; +print "Test 2: We must have here 1970-01-01 selected (fields can be empty)
\n"; print $form->selectDate(dol_get_first_day(1970, 1, false), 'test2', 1, 1, 1); print '

'."\n"; @@ -120,7 +118,7 @@ if (is_file(DOL_DOCUMENT_ROOT.'/includes/flowjs/flow.js')) { print ' '; + } return $html; } -/** - * Generate list of quickadd items - * - * @return string HTML output - */ + /** + * Generate list of quickadd items + * + * @return string HTML output + */ function printDropdownQuickadd() { global $conf, $user, $langs, $hookmanager; @@ -2849,11 +2851,11 @@ function printDropdownQuickadd() return $dropDownQuickAddHtml; } -/** - * Build the tooltip on top menu bookmark - * - * @return string HTML content - */ + /** + * Build the tooltip on top menu bookmark + * + * @return string HTML content + */ function top_menu_bookmark() { global $langs, $conf, $db, $user; @@ -2932,11 +2934,11 @@ function top_menu_bookmark() return $html; } -/** - * Build the tooltip on top menu tsearch - * - * @return string HTML content - */ + /** + * Build the tooltip on top menu tsearch + * + * @return string HTML content + */ function top_menu_search() { global $langs, $conf, $db, $user, $hookmanager; @@ -3099,20 +3101,20 @@ function top_menu_search() return $html; } -/** - * Show left menu bar - * - * @param array $menu_array_before Table of menu entries to show before entries of menu handler. This param is deprectaed and must be provided to ''. - * @param string $helppagename Name of wiki page for help ('' by default). - * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage|DE:GermanPage - * For other external page: http://server/url - * @param string $notused Deprecated. Used in past to add content into left menu. Hooks can be used now. - * @param array $menu_array_after Table of menu entries to show after entries of menu handler - * @param int $leftmenuwithoutmainarea Must be set to 1. 0 by default for backward compatibility with old modules. - * @param string $title Title of web page - * @param int $acceptdelayedhtml 1 if caller request to have html delayed content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) - * @return void - */ + /** + * Show left menu bar + * + * @param array $menu_array_before Table of menu entries to show before entries of menu handler. This param is deprectaed and must be provided to ''. + * @param string $helppagename Name of wiki page for help ('' by default). + * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage|DE:GermanPage + * For other external page: http://server/url + * @param string $notused Deprecated. Used in past to add content into left menu. Hooks can be used now. + * @param array $menu_array_after Table of menu entries to show after entries of menu handler + * @param int $leftmenuwithoutmainarea Must be set to 1. 0 by default for backward compatibility with old modules. + * @param string $title Title of web page + * @param int $acceptdelayedhtml 1 if caller request to have html delayed content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) + * @return void + */ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_array_after = array(), $leftmenuwithoutmainarea = 0, $title = '', $acceptdelayedhtml = 0) { global $user, $conf, $langs, $db, $form; @@ -3357,12 +3359,12 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ } -/** - * Begin main area - * - * @param string $title Title - * @return void - */ + /** + * Begin main area + * + * @param string $title Title + * @return void + */ function main_area($title = '') { global $conf, $langs, $hookmanager; @@ -3418,13 +3420,13 @@ function main_area($title = '') } -/** - * Return helpbaseurl, helppage and mode - * - * @param string $helppagename Page name ('EN:xxx,ES:eee,FR:fff,DE:ddd...' or 'http://localpage') - * @param Translate $langs Language - * @return array Array of help urls - */ + /** + * Return helpbaseurl, helppage and mode + * + * @param string $helppagename Page name ('EN:xxx,ES:eee,FR:fff,DE:ddd...' or 'http://localpage') + * @param Translate $langs Language + * @return array Array of help urls + */ function getHelpParamFor($helppagename, $langs) { $helpbaseurl = ''; @@ -3469,22 +3471,22 @@ function getHelpParamFor($helppagename, $langs) } -/** - * Show a search area. - * Used when the javascript quick search is not used. - * - * @param string $urlaction Url post - * @param string $urlobject Url of the link under the search box - * @param string $title Title search area - * @param string $htmlmorecss Add more css - * @param string $htmlinputname Field Name input form - * @param string $accesskey Accesskey - * @param string $prefhtmlinputname Complement for id to avoid multiple same id in the page - * @param string $img Image to use - * @param int $showtitlebefore Show title before input text instead of into placeholder. This can be set when output is dedicated for text browsers. - * @param int $autofocus Set autofocus on field - * @return string - */ + /** + * Show a search area. + * Used when the javascript quick search is not used. + * + * @param string $urlaction Url post + * @param string $urlobject Url of the link under the search box + * @param string $title Title search area + * @param string $htmlmorecss Add more css + * @param string $htmlinputname Field Name input form + * @param string $accesskey Accesskey + * @param string $prefhtmlinputname Complement for id to avoid multiple same id in the page + * @param string $img Image to use + * @param int $showtitlebefore Show title before input text instead of into placeholder. This can be set when output is dedicated for text browsers. + * @param int $autofocus Set autofocus on field + * @return string + */ function printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinputname, $accesskey = '', $prefhtmlinputname = '', $img = '', $showtitlebefore = 0, $autofocus = 0) { global $langs, $user; From 2a7a47d3ad6bc34bb1802a09515bad5dcc9f54a6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jan 2024 00:14:19 +0100 Subject: [PATCH 4/5] Debug v19 - missing migration line --- htdocs/install/mysql/migration/18.0.0-19.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql index 3b287fbcf3e..6a136fdfc4b 100644 --- a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql +++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql @@ -147,6 +147,7 @@ UPDATE llx_product set stockable_product = 0 WHERE type = 1; ALTER TABLE llx_prelevement_lignes ADD COLUMN fk_user integer NULL; +ALTER TABLE llx_hrm_evaluation ADD COLUMN last_main_doc varchar(255); ALTER TABLE llx_hrm_evaluationdet ADD COLUMN comment TEXT; ALTER TABLE llx_resource ADD COLUMN address varchar(255) DEFAULT NULL AFTER fk_code_type_resource; From f3ce7a2a93e9818dbea5aa1066c3c32ff3429ea8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jan 2024 00:37:48 +0100 Subject: [PATCH 5/5] Debug v19 Fix label of option --- htdocs/compta/facture/card-rec.php | 8 ++++---- htdocs/fourn/facture/card-rec.php | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index bb3c6938396..f396b437f11 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -1595,17 +1595,17 @@ if ($action == 'create') { print ''; print ''; - // Status of generated invoices + // Status of auto generated invoices print ''; if ($action == 'auto_validate' || $object->frequency > 0) { - print $form->editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->hasRight('facture', 'creer')); + print $form->editfieldkey($langs->trans("StatusOfAutoGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->hasRight('facture', 'creer')); } else { - print $langs->trans("StatusOfGeneratedInvoices"); + print $langs->trans("StatusOfAutoGeneratedInvoices"); } print ''; $select = 'select;0:'.$langs->trans('BillStatusDraft').',1:'.$langs->trans('BillStatusValidated'); if ($action == 'auto_validate' || $object->frequency > 0) { - print $form->editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->hasRight('facture', 'creer'), $select); + print $form->editfieldval($langs->trans("StatusOfAutoGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->hasRight('facture', 'creer'), $select); } print ''; // Auto generate documents diff --git a/htdocs/fourn/facture/card-rec.php b/htdocs/fourn/facture/card-rec.php index d508a32abc5..332185c17ee 100644 --- a/htdocs/fourn/facture/card-rec.php +++ b/htdocs/fourn/facture/card-rec.php @@ -1053,14 +1053,14 @@ if ($action == 'create') { print ""; // Auto validate the invoice - print "" . $langs->trans("StatusOfGeneratedInvoices") . ""; + print "" . $langs->trans("StatusOfAutoGeneratedInvoices") . ""; $select = array('0' => $langs->trans('BillStatusDraft'), '1' => $langs->trans('BillStatusValidated')); print $form->selectarray('auto_validate', $select, GETPOST('auto_validate')); print ""; // Auto generate document if (getDolGlobalString('INVOICE_REC_CAN_DISABLE_DOCUMENT_FILE_GENERATION')) { - print "" . $langs->trans("StatusOfAutoGeneratedDocuments") . ""; + print "" . $langs->trans("StatusOfGeneratedDocuments") . ""; $select = array('0' => $langs->trans('DoNotGenerateDoc'), '1' => $langs->trans('AutoGenerateDoc')); print $form->selectarray('generate_pdf', $select, GETPOST('generate_pdf')); print ""; @@ -1484,14 +1484,14 @@ if ($action == 'create') { // Status of generated invoices print ''; if ($action == 'auto_validate' || $object->frequency > 0) { - print $form->editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $usercancreate); + print $form->editfieldkey($langs->trans("StatusOfAutoGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $usercancreate); } else { - print $langs->trans("StatusOfGeneratedInvoices"); + print $langs->trans("StatusOfAutoGeneratedInvoices"); } print ''; $select = 'select;0:' . $langs->trans('BillStatusDraft') . ',1:' . $langs->trans('BillStatusValidated'); if ($action == 'auto_validate' || $object->frequency > 0) { - print $form->editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $usercancreate, $select); + print $form->editfieldval($langs->trans("StatusOfAutoGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $usercancreate, $select); } print ''; // Auto generate documents