diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 4d4a20f3a5c..943afe69a1a 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -2997,7 +2997,7 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF
* @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
* @param string $alt Force alt for bind people
* @param string $morecss Add more class css on img tag (For example 'myclascss'). Work only if $moreatt is empty.
- * @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left maring on picto, 0 = No margin left. Works for fontawesome picto only.
+ * @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No margin left. Works for fontawesome picto only.
* @return string Return img tag
* @see img_object(), img_picto_common()
*/
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index 0bb48af3b46..234746a0d83 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -480,10 +480,15 @@ if ($dirins && $action == 'initcss' && !empty($module))
'Mon module'=>$modulename,
'mon module'=>$modulename,
'htdocs/modulebuilder/template'=>strtolower($modulename),
- '---Put here your own copyright and developer email---'=>dol_print_date($now, '%Y').' '.$user->getFullName($langs).($user->email?' <'.$user->email.'>':'')
+ '---Put here your own copyright and developer email---'=>dol_print_date($now, '%Y').' '.$user->getFullName($langs).($user->email?' <'.$user->email.'>':''),
);
dolReplaceInFile($destfile, $arrayreplacement);
+
+ // Update descriptor file to uncomment file
+ $srcfile = $dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php';
+ $arrayreplacement = array('/\/\/\s*\''.preg_quote('/'.strtolower($module).'/css/'.strtolower($module).'.css.php', '/').'\'/' => '\'/'.strtolower($module).'/css/'.strtolower($module).'.css.php\'');
+ dolReplaceInFile($srcfile, $arrayreplacement, '', 0, 0, 1);
}
else
{
@@ -518,6 +523,11 @@ if ($dirins && $action == 'initjs' && !empty($module))
);
dolReplaceInFile($destfile, $arrayreplacement);
+
+ // Update descriptor file to uncomment file
+ $srcfile = $dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php';
+ $arrayreplacement = array('/\/\/\s*\''.preg_quote('/'.strtolower($module).'/js/'.strtolower($module).'.js.php', '/').'\'/' => '\'/'.strtolower($module).'/js/'.strtolower($module).'.js.php\'');
+ dolReplaceInFile($srcfile, $arrayreplacement, '', 0, 0, 1);
}
else
{
@@ -635,6 +645,14 @@ if ($dirins && $action == 'confirm_removefile' && !empty($module))
$result = dol_delete_file($filetodelete);
if (dol_is_dir_empty($dirtodelete)) dol_delete_dir($dirtodelete);
+
+ // Update descriptor file to comment file
+ if (in_array($tab, array('css', 'js')))
+ {
+ $srcfile = $dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php';
+ $arrayreplacement = array('/^\s*\''.preg_quote('/'.$relativefilename, '/').'\',*/m'=>' // \'/'.$relativefilename.'\',');
+ dolReplaceInFile($srcfile, $arrayreplacement, '', 0, 0, 1);
+ }
}
}
@@ -1623,14 +1641,14 @@ elseif (! empty($module))
$linktoenabledisable='';
if (! empty($conf->global->$const_name)) // If module is already activated
{
- $linktoenabledisable.='numero.'&action=reset&value=mod' . $module . $param . '">';
- $linktoenabledisable.=img_picto($langs->trans("Activated"), 'switch_on');
+ $linktoenabledisable.='numero.'&action=reset&value=mod' . $module . $param . '">';
+ $linktoenabledisable.=img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', '', 1);
$linktoenabledisable.='';
}
else
{
- $linktoenabledisable.='numero.'&action=set&value=mod' . $module . $param . '">';
- $linktoenabledisable.=img_picto($langs->trans("Disabled"), 'switch_off');
+ $linktoenabledisable.='numero.'&action=set&value=mod' . $module . $param . '">';
+ $linktoenabledisable.=img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', 1);
$linktoenabledisable.="\n";
}
if (! empty($conf->$modulelowercase->enabled))
@@ -1967,7 +1985,10 @@ elseif (! empty($module))
print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.'';
print ' '.img_picto($langs->trans("Edit"), 'edit').'';
print '
';
- print ' '.$langs->trans("LanguageFile").' : '.$dicts['langs'].'
';
+ print ' '.$langs->trans("LanguageFile").' : ';
+ if (! is_array($dicts) || empty($dicts)) print ''.$langs->trans("NoDictionaries").'';
+ else print ''.$dicts['langs'].'';
+ print '
';
print load_fiche_titre($langs->trans("ListOfDictionariesEntries"), '', '');
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index c3bbc92af9c..cf5c4f9703a 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -521,7 +521,8 @@ body[class*="colorblind-"] .text-success{
}
.fa-toggle-on, .fa-toggle-off { font-size: 2em; }
-.websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off { font-size: 1.5em; vertical-align: text-bottom; }
+.websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off,
+.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off { font-size: 1.5em; vertical-align: text-bottom; }
/* Themes for badges */