diff --git a/ChangeLog b/ChangeLog index a6b97780aa9..9db45d20863 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,6 +31,8 @@ For users: - New: Enhancement in project module. - New: Add log tab on emailing module. - New: Minor enhancements in look themes. +- New: Add option to hide help in menu. +- Fix: "Now" link works when date popup is not used. - Fix: Debug seriously the email notification module. - Fix: Error Call to a member function trans when refusing a supplier order. - Fix: Fix payment conditions on commercial proposals. diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 9e633ec60d7..0578e00e760 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -64,9 +64,6 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update') dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["main_popup_calendar"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SHOW_BUGTRACK_LINK", $_POST["main_show_bugtrack_link"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SHOW_WORKBOARD", $_POST["main_show_workboard"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["MAIN_SEARCHFORM_CONTACT"],'chaine',0,'',$conf->entity); @@ -74,9 +71,12 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update') dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE",$_POST["MAIN_SEARCHFORM_PRODUITSERVICE"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SEARCHFORM_ADHERENT",$_POST["MAIN_SEARCHFORM_ADHERENT"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"],'chaine',0,'',0); // Param for all entities + dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"],'chaine',0,'',0); // Param for all entities + dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", $_POST["MAIN_BUGTRACK_ENABLELINK"],'chaine',0,'',$conf->entity); + $_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer @@ -136,15 +136,6 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') print ' '; print ''; - /* - $var=!$var; - print ''.$langs->trans("ShowBugTrackLink").''; - print $html->selectyesno('main_show_bugtrack_link',$conf->global->MAIN_SHOW_BUGTRACK_LINK,1); - print ''; - print ' '; - print ''; - */ - // Desactivation javascript et ajax $var=!$var; print ''.$langs->trans("DisableJavascript").''; @@ -216,7 +207,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') print ''; print ''; - // Hide need help link on login page + // Hide help link on login page $var=!$var; print ''; + // Hide help link on login page + $var=!$var; + print ''; + print ''; + print ''; + + /* + // Show bugtrack link + $var=!$var; + print ''; + print ''; + print ''; + */ + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("DisableLinkToHelpCenter").''; print $html->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1); @@ -256,6 +247,24 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') } print '
'.$langs->trans("DisableLinkToHelp").''; + print $html->selectyesno('MAIN_HELP_DISABLELINK',isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1); + print ' 
'.$langs->trans("ShowBugTrackLink").''; + print $html->selectyesno('main_show_bugtrack_link',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); + print ' 
'; print '
'; @@ -287,14 +296,6 @@ else print ' '; print ""; - /* - $var=!$var; - print ''.$langs->trans("ShowBugTrackLink").''; - print yn($conf->global->MAIN_SHOW_BUGTRACK_LINK).""; - print ' '; - print ""; - */ - // Disable javascript/ajax $var=!$var; print ''.$langs->trans("DisableJavascript").''; @@ -375,6 +376,22 @@ else print nl2br($conf->global->MAIN_MOTD); print ''; + // Link to wiki help + $var=!$var; + print ''.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/common/helpdoc.png','',1)).''; + print yn($conf->global->MAIN_HELP_DISABLELINK,1); + print ''; + + /* + // Show bugtrack link + $var=!$var; + print ''.$langs->trans("ShowBugTrackLink").''; + print yn($conf->global->MAIN_BUGTRACK_ENABLELINK).""; + print ' '; + print ""; + */ + + print ''; diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 5178e3a5fe0..6135f1aa552 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -2449,19 +2449,19 @@ class Form } else { - $reset_scripts .= 'this.form.elements[\''.$prefix.'day\'].value=formatDate(new Date(), \'dds\');'; - $reset_scripts .= 'this.form.elements[\''.$prefix.'hour\'].value=formatDate(new Date(), \'MM\');'; - $reset_scripts .= 'this.form.elements[\''.$prefix.'year\'].value=formatDate(new Date(), \'YYYY\');'; + $reset_scripts .= 'this.form.elements[\''.$prefix.'day\'].value=formatDate(new Date(), \'d\'); '; + $reset_scripts .= 'this.form.elements[\''.$prefix.'month\'].value=formatDate(new Date(), \'M\'); '; + $reset_scripts .= 'this.form.elements[\''.$prefix.'year\'].value=formatDate(new Date(), \'yyyy\'); '; } // Generate the hour part if ($h) { - $reset_scripts .= 'this.form.elements[\''.$prefix.'hour\'].value=formatDate(new Date(), \'HH\');'; + $reset_scripts .= 'this.form.elements[\''.$prefix.'hour\'].value=formatDate(new Date(), \'HH\'); '; } // Generate the minute part if ($m) { - $reset_scripts .= 'this.form.elements[\''.$prefix.'min\'].value=formatDate(new Date(), \'mm\');'; + $reset_scripts .= 'this.form.elements[\''.$prefix.'min\'].value=formatDate(new Date(), \'mm\'); '; } // If reset_scripts is not empty, print the button with the reset_scripts in OnClick if ($reset_scripts) diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index 98937143385..060e727206e 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -103,7 +103,7 @@ class MenuLeft { if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small); - print ''; + print '
'; } } diff --git a/htdocs/includes/menus/barre_left/eldy_frontoffice.php b/htdocs/includes/menus/barre_left/eldy_frontoffice.php index a297099d58e..c1546466da7 100644 --- a/htdocs/includes/menus/barre_left/eldy_frontoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_frontoffice.php @@ -103,7 +103,7 @@ class MenuLeft { if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small); - print ''; + print '
'; } } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index c7b0e2fa583..4c98385e17d 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -239,7 +239,8 @@ UMask=UMask parameter for new files on Unix/Linux/BSD file system. UMaskExplanation=This parameter allow you to define permissions set by default on files created by Dolibarr on server (during upload for example).
It must be the octal value (for example, 0666 means read and write for everyone).
Ce paramètre ne sert pas sous un serveur Windows. SeeWikiForAllTeam=Take a look at the wiki page for full list of all actors and their organisation UseACacheDelay = Delay for caching export response in seconds (0 or empty for no cache) -DisableLinkToHelpCenter=Hide link "Need help or support" on login page +DisableLinkToHelpCenter=Hide link "Need help or support" on login page +DisableLinkToHelp=Hide link "%s Online help" on left menu AddCRIfTooLong=There is no automatic wrapping, so if line is out of page on documents because too long, you must add yourself carriage returns in the textarea. ModuleDisabled=Module disabled ModuleDisabledSoNoEvent=Module disabled so event never created diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index da6b68a894e..d38c2d5d7de 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -239,7 +239,8 @@ UMask = Paramètre UMask des nouveaux fichiers sous Unix/Linux/BSD. UMaskExplanation = Ce paramètre permet de définir les droits des fichiers créés sur le serveur par Dolibarr (lors d'upload par exemple).
Ce doit être la valeur octal (par exemple 0666 signifie lecture/ecriture pour tous).
Ce paramètre n'a aucun effet sur un serveur Windows. SeeWikiForAllTeam = Voir le wiki pour le détail de tous les acteurs et leur organisation UseACacheDelay = Delay de mise en cache de l'export en secondes (0 ou vide pour aucun cache) -DisableLinkToHelpCenter=Cacher le lien "Besoin d'un support ou aide" sur la page de login +DisableLinkToHelpCenter=Cacher le lien "Besoin d'un support ou aide" sur la page de login +DisableLinkToHelp=Cacher le lien "%s Aide en ligne" du menu gauche AddCRIfTooLong=Il n'y a pas de coupures de lignes automatiques, aussi si votre texte est trop long sur les documents, il vous faut ajouter par vous-meme des retours chariots dans la zone de saisie du texte. ModuleDisabled=Module désactivé ModuleDisabledSoNoEvent=Module désactivé donc évênement jamais créé diff --git a/htdocs/lib/lib_head.js b/htdocs/lib/lib_head.js index 1e768d142b8..002d59d1075 100644 --- a/htdocs/lib/lib_head.js +++ b/htdocs/lib/lib_head.js @@ -447,6 +447,7 @@ function formatDate(date,format) //alert('substr='+substr); if (substr == 'yyyy') { result=result+year; } else if (substr == 'yy') { result=result+year.substring(2,4); } + else if (substr == 'M') { result=result+month; } else if (substr == 'MM') { result=result+(month<1||month>9?"":"0")+month; } else if (substr == 'd') { result=result+day; } else if (substr == 'dd') { result=result+(day<1||day>9?"":"0")+day; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index de47fe96ccf..211a27ae864 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -756,14 +756,14 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs // Other external js require_once DOL_DOCUMENT_ROOT.'/lib/ajax.lib.php'; - $mini='';$ext=''; - if (! empty($conf->global->MAIN_OPTIMIZE_SPEED)) { $mini='_mini'; $ext=''; } // mini='_mini', ext='.gz' + $mini='';$ext='.js'; + if (! empty($conf->global->MAIN_OPTIMIZE_SPEED)) { $mini='_mini'; $ext='.jgz'; } // mini='_mini', ext='.gz' // This one is required for all Ajax features if (! defined('DISABLE_PROTOTYPE')) { print ''."\n"; - print ''."\n"; + print ''."\n"; } // This one is required for boxes if (! defined('DISABLE_SCRIPTACULOUS')) @@ -779,7 +779,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs { print ''."\n"; // PWC js - print ''."\n"; + print ''."\n"; } } @@ -1005,7 +1005,7 @@ function left_menu($menu_array, $helppagename='', $moresearchform='') } // Link to Dolibarr wiki pages - if ($helppagename && empty($conf->global->MAIN_DISABLE_HELP_LINKS)) + if ($helppagename && empty($conf->global->MAIN_HELP_DISABLELINK)) { $langs->load("help");