Look and feel v12

This commit is contained in:
Laurent Destailleur 2020-04-08 16:13:29 +02:00
parent 18f2087cc6
commit fe614658c8
8 changed files with 191 additions and 181 deletions

View File

@ -109,7 +109,7 @@ print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'" name="form_index">'
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">';
print '<table class="noborder centpercent">';
print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
// Name

View File

@ -410,7 +410,7 @@ print '<form enctype="multipart/form-data" method="POST" action="'.$_SERVER["PHP
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">';
print '<table class="noborder centpercent">';
print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
// Name
@ -493,7 +493,7 @@ if (!empty($mysoc->logo_mini)) {
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_mini).'">';
print '</div>';
}
print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a></div>';
print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'</a></div>';
} else {
print '<img height="60" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
}
@ -511,7 +511,7 @@ if (!empty($mysoc->logo_squarred_mini)) {
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini).'">';
print '</div>';
}
print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogosquarred">'.img_delete($langs->trans("Delete")).'</a></div>';
print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogosquarred">'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'</a></div>';
} else {
print '<img height="60" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
}
@ -527,7 +527,7 @@ print '</table>';
// Social networks
print '<br>';
print '<table class="noborder centpercent">';
print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->trans("SocialNetworksInformation").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
@ -547,7 +547,7 @@ print "</table>";
print '<br>';
// IDs of the company (country-specific)
print '<table class="noborder centpercent">';
print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
$langs->load("companies");
@ -680,7 +680,7 @@ print '</table>';
// Fiscal year start
print '<br>';
print '<table class="noborder centpercent">';
print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
@ -695,7 +695,7 @@ print '<br>';
// Sales taxes (VAT, IRPF, ...)
print load_fiche_titre($langs->trans("TypeOfSaleTaxes"));
print '<table class="noborder centpercent">';
print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">';
print '<td width="25%">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
print '<td class="right">&nbsp;</td>';
@ -721,7 +721,7 @@ print "</table>";
// Second tax
print '<br>';
print '<table class="noborder centpercent">';
print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">';
print '<td width="25%">'.$form->textwithpicto($langs->transcountry("LocalTax1Management", $mysoc->country_code), $langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code)).'</td><td>'.$langs->trans("Description").'</td>';
print '<td class="right">&nbsp;</td>';
@ -758,9 +758,9 @@ if ($mysoc->useLocalTax(1))
} else {
if (empty($mysoc->country_code))
{
print '<tr class="oddeven"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>';
print '<tr class="oddeven nohover"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>';
} else {
print '<tr class="oddeven"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry" , $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryVAT"), $langs->transnoentitiesnoconv("LocalTax1Management")).'</td></tr>';
print '<tr class="oddeven nohover"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry" , $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryVAT"), $langs->transnoentitiesnoconv("LocalTax1Management")).'</td></tr>';
}
}
@ -768,7 +768,7 @@ print "</table>";
// Third tax system
print '<br>';
print '<table class="noborder centpercent">';
print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">';
print '<td width="25%">'.$form->textwithpicto($langs->transcountry("LocalTax2Management", $mysoc->country_code), $langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code)).'</td><td>'.$langs->trans("Description").'</td>';
print '<td class="right">&nbsp;</td>';
@ -804,18 +804,18 @@ if ($mysoc->useLocalTax(2))
} else {
if (empty($mysoc->country_code))
{
print '<tr class="oddeven"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>';
print '<tr class="oddeven nohover"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>';
} else {
print '<tr class="oddeven"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry" , $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryVAT"), $langs->transnoentitiesnoconv("LocalTax2Management")).'</td></tr>';
print '<tr class="oddeven nohover"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry" , $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryVAT"), $langs->transnoentitiesnoconv("LocalTax2Management")).'</td></tr>';
}
}
print "</table>";
// Third tax system
// Tax stamp
print '<br>';
print '<table class="noborder centpercent">';
print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">';
print '<td width="25%">'.$form->textwithpicto($langs->trans("RevenueStamp"), $langs->trans("RevenueStampDesc")).'</td><td>'.$langs->trans("Description").'</td>';
print '<td class="right">&nbsp;</td>';
@ -823,7 +823,7 @@ print "</tr>\n";
if ($mysoc->useRevenueStamp())
{
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
print "<tr class=\"oddeven\"><td>";
print '<tr class="oddeven"><td>';
print $langs->trans("UseRevenueStamp");
print "</td>";
print '<td colspan="2">';
@ -832,9 +832,9 @@ if ($mysoc->useRevenueStamp())
} else {
if (empty($mysoc->country_code))
{
print '<tr class="oddeven"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>';
print '<tr class="oddeven nohover"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>';
} else {
print '<tr class="oddeven"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry" , $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryRevenueStamp"), $langs->transnoentitiesnoconv("RevenueStamp")).'</td></tr>';
print '<tr class="oddeven nohover"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry" , $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryRevenueStamp"), $langs->transnoentitiesnoconv("RevenueStamp")).'</td></tr>';
}
}

View File

@ -569,9 +569,11 @@ if ($mode == 'common' || $mode == 'commonkanban')
// Show list of modules
$oldfamily = '';
$linenum = 0;
foreach ($orders as $key => $value)
{
$linenum++;
$tab = explode('_', $value);
$familykey = $tab[1];
$module_position = $tab[2];
@ -617,6 +619,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
if ($search_nature)
{
if (preg_match('/^external/', $search_nature) && $objMod->isCoreOrExternalModule() != 'external') continue;
$reg = array();
if (preg_match('/^external_(.*)$/', $search_nature, $reg))
{
//print $reg[1].'-'.dol_escape_htmltag($objMod->getPublisher());
@ -685,12 +688,161 @@ if ($mode == 'common' || $mode == 'commonkanban')
$imginfo = "info_black";
}
$codeenabledisable = '';
$codetoconfig = '';
// Activate/Disable and Setup (2 columns)
if (!empty($conf->global->$const_name)) // If module is already activated
{
// Set $codeenabledisable
$disableSetup = 0;
if (!empty($arrayofwarnings[$modName]))
{
$codeenabledisable .= '<!-- This module has a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
}
if (!empty($objMod->disabled))
{
$codeenabledisable .= $langs->trans("Disabled");
}
elseif (!empty($objMod->always_enabled) || ((!empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity != 1)))
{
if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) $codeenabledisable .= $langs->trans("Used");
else {
$codeenabledisable .= img_picto($langs->trans("Required"), 'switch_on', '', false, 0, 0, '', 'opacitymedium');
//print $langs->trans("Required");
}
if (!empty($conf->multicompany->enabled) && $user->entity) $disableSetup++;
}
else
{
if (!empty($objMod->warnings_unactivation[$mysoc->country_code]) && method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) {
$codeenabledisable .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=reset_confirm&amp;confirm_message_code='.$objMod->warnings_unactivation[$mysoc->country_code].'&amp;value='.$modName.'&amp;mode='.$mode.$param.'">';
$codeenabledisable .= img_picto($langs->trans("Activated"), 'switch_on');
$codeenabledisable .= '</a>';
}
else {
$codeenabledisable .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=reset&amp;value='.$modName.'&amp;mode='.$mode.'&amp;confirm=yes'.$param.'">';
$codeenabledisable .= img_picto($langs->trans("Activated"), 'switch_on');
$codeenabledisable .= '</a>';
}
}
// Set $codetoconfig
if (!empty($objMod->config_page_url) && !$disableSetup)
{
$backtourlparam = '';
if ($search_keyword != '') $backtourlparam .= ($backtourlparam ? '&' : '?').'search_keyword='.$search_keyword; // No urlencode here, done later
if ($search_nature > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_nature='.$search_nature;
if ($search_version > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_version='.$search_version;
if ($search_status > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_status='.$search_status;
$backtourl = $_SERVER["PHP_SELF"].$backtourlparam;
$regs = array();
if (is_array($objMod->config_page_url))
{
$i = 0;
foreach ($objMod->config_page_url as $page)
{
$urlpage = $page;
if ($i++)
{
$codetoconfig .= '<a href="'.$urlpage.'" title="'.$langs->trans($page).'">'.img_picto(ucfirst($page), "setup").'</a>';
// print '<a href="'.$page.'">'.ucfirst($page).'</a>&nbsp;';
}
else
{
if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs))
{
$urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1);
$codetoconfig .= '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
else
{
$urltouse = $urlpage;
$codetoconfig .= '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
}
}
}
elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs))
{
$codetoconfig .= '<a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
else
{
$codetoconfig .= '<a href="'.$objMod->config_page_url.'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
}
else
{
$codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"');
}
}
else // Module not yet activated
{
// Set $codeenabledisable
if (!empty($objMod->always_enabled))
{
// Should never happened
}
elseif (!empty($objMod->disabled))
{
$codeenabledisable .= $langs->trans("Disabled");
}
else
{
// Module qualified for activation
$warningmessage = '';
if (!empty($arrayofwarnings[$modName]))
{
$codeenabledisable .= '<!-- This module is a core module and it may have a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
foreach ($arrayofwarnings[$modName] as $keycountry => $cursorwarningmessage)
{
if (preg_match('/^always/', $keycountry) || ($mysoc->country_code && preg_match('/^'.$mysoc->country_code.'/', $keycountry)))
{
$warningmessage .= ($warningmessage ? "\n" : "").$langs->trans($cursorwarningmessage, $objMod->getName(), $mysoc->country_code);
}
}
}
if ($objMod->isCoreOrExternalModule() == 'external' && !empty($arrayofwarningsext))
{
$codeenabledisable .= '<!-- This module is an external module and it may have a warning to show (note: your country is '.$mysoc->country_code.') -->'."\n";
foreach ($arrayofwarningsext as $keymodule => $arrayofwarningsextbycountry)
{
$keymodulelowercase = strtolower(preg_replace('/^mod/', '', $keymodule));
if (in_array($keymodulelowercase, $conf->modules)) // If module that request warning is on
{
foreach ($arrayofwarningsextbycountry as $keycountry => $cursorwarningmessage)
{
if (preg_match('/^always/', $keycountry) || ($mysoc->country_code && preg_match('/^'.$mysoc->country_code.'/', $keycountry)))
{
$warningmessage .= ($warningmessage ? "\n" : "").$langs->trans($cursorwarningmessage, $objMod->getName(), $mysoc->country_code, $modules[$keymodule]->getName());
$warningmessage .= ($warningmessage ? "\n" : "").($warningmessage ? "\n" : "").$langs->trans("Module").' : '.$objMod->getName();
if (!empty($objMod->editor_name)) $warningmessage .= ($warningmessage ? "\n" : "").$langs->trans("Publisher").' : '.$objMod->editor_name;
if (!empty($objMod->editor_name)) $warningmessage .= ($warningmessage ? "\n" : "").$langs->trans("ModuleTriggeringThisWarning").' : '.$modules[$keymodule]->getName();
}
}
}
}
}
$codeenabledisable .= '<!-- Message to show: '.$warningmessage.' -->'."\n";
$codeenabledisable .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=set&amp;value='.$modName.'&amp;mode='.$mode.$param.'"';
if ($warningmessage) $codeenabledisable .= ' onclick="return confirm(\''.dol_escape_js($warningmessage).'\');"';
$codeenabledisable .= '>';
$codeenabledisable .= img_picto($langs->trans("Disabled"), 'switch_off');
$codeenabledisable .= "</a>\n";
}
// Set $codetoconfig
$codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"');
}
if ($mode == 'commonkanban') {
// Output Kanban
print $objMod->getKanbanView();
print $objMod->getKanbanView($codeenabledisable, $codetoconfig);
} else {
print '<tr class="oddeven">'."\n";
if (!empty($conf->global->MAIN_MODULES_SHOW_LINENUMBERS)) print '<td width="20px">'.++$linenum.'</td>';
if (!empty($conf->global->MAIN_MODULES_SHOW_LINENUMBERS)) print '<td width="20px">'.$linenum.'</td>';
// Picto + Name of module
print ' <td width="200px">';
@ -723,7 +875,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
// Version
print '<td class="center nowrap" width="120px">';
print $versiontrans;
if (!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)) {
if (!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)) { // This is a bad practice to activate a synch external access during building of a page. 1 external module can hang the application.
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
if (!empty($objMod->url_last_version)) {
$newversion = getURLContent($objMod->url_last_version);
@ -736,158 +888,15 @@ if ($mode == 'common' || $mode == 'commonkanban')
}
print "</td>\n";
// Activate/Disable and Setup (2 columns)
if (!empty($conf->global->$const_name)) // If module is already activated
{
$disableSetup = 0;
// Link enable/disable
print '<td class="center valignmiddle" width="60px">';
print $codeenabledisable;
print "</td>\n";
// Link enable/disabme
print '<td class="center valignmiddle" width="60px">';
if (!empty($arrayofwarnings[$modName]))
{
print '<!-- This module has a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
}
if (!empty($objMod->disabled))
{
print $langs->trans("Disabled");
}
elseif (!empty($objMod->always_enabled) || ((!empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity != 1)))
{
if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) print $langs->trans("Used");
else {
print img_picto($langs->trans("Required"), 'switch_on', '', false, 0, 0, '', 'opacitymedium');
//print $langs->trans("Required");
}
if (!empty($conf->multicompany->enabled) && $user->entity) $disableSetup++;
}
else
{
if (!empty($objMod->warnings_unactivation[$mysoc->country_code]) && method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=reset_confirm&amp;confirm_message_code='.$objMod->warnings_unactivation[$mysoc->country_code].'&amp;value='.$modName.'&amp;mode='.$mode.$param.'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=reset&amp;value='.$modName.'&amp;mode='.$mode.'&amp;confirm=yes'.$param.'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
}
print '</td>'."\n";
// Link config
print '<td class="tdsetuppicto right" width="60px">';
if (!empty($objMod->config_page_url) && !$disableSetup)
{
$backtourlparam = '';
if ($search_keyword != '') $backtourlparam .= ($backtourlparam ? '&' : '?').'search_keyword='.$search_keyword; // No urlencode here, done later
if ($search_nature > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_nature='.$search_nature;
if ($search_version > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_version='.$search_version;
if ($search_status > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_status='.$search_status;
$backtourl = $_SERVER["PHP_SELF"].$backtourlparam;
$regs = array();
if (is_array($objMod->config_page_url))
{
$i = 0;
foreach ($objMod->config_page_url as $page)
{
$urlpage = $page;
if ($i++)
{
print '<a href="'.$urlpage.'" title="'.$langs->trans($page).'">'.img_picto(ucfirst($page), "setup").'</a>';
// print '<a href="'.$page.'">'.ucfirst($page).'</a>&nbsp;';
}
else
{
if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs))
{
$urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1);
print '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
else
{
$urltouse = $urlpage;
print '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
}
}
}
elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs))
{
print '<a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
else
{
print '<a href="'.$objMod->config_page_url.'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
}
else
{
print img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"');
}
print '</td>';
}
else // Module not yet activated
{
// Link enable/disable
print '<td class="center valignmiddle" width="60px">';
if (!empty($objMod->always_enabled))
{
// Should never happened
}
elseif (!empty($objMod->disabled))
{
print $langs->trans("Disabled");
}
else
{
// Module qualified for activation
$warningmessage = '';
if (!empty($arrayofwarnings[$modName]))
{
print '<!-- This module is a core module and it may have a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
foreach ($arrayofwarnings[$modName] as $keycountry => $cursorwarningmessage)
{
if (preg_match('/^always/', $keycountry) || ($mysoc->country_code && preg_match('/^'.$mysoc->country_code.'/', $keycountry)))
{
$warningmessage .= ($warningmessage ? "\n" : "").$langs->trans($cursorwarningmessage, $objMod->getName(), $mysoc->country_code);
}
}
}
if ($objMod->isCoreOrExternalModule() == 'external' && !empty($arrayofwarningsext))
{
print '<!-- This module is an external module and it may have a warning to show (note: your country is '.$mysoc->country_code.') -->'."\n";
foreach ($arrayofwarningsext as $keymodule => $arrayofwarningsextbycountry)
{
$keymodulelowercase = strtolower(preg_replace('/^mod/', '', $keymodule));
if (in_array($keymodulelowercase, $conf->modules)) // If module that request warning is on
{
foreach ($arrayofwarningsextbycountry as $keycountry => $cursorwarningmessage)
{
if (preg_match('/^always/', $keycountry) || ($mysoc->country_code && preg_match('/^'.$mysoc->country_code.'/', $keycountry)))
{
$warningmessage .= ($warningmessage ? "\n" : "").$langs->trans($cursorwarningmessage, $objMod->getName(), $mysoc->country_code, $modules[$keymodule]->getName());
$warningmessage .= ($warningmessage ? "\n" : "").($warningmessage ? "\n" : "").$langs->trans("Module").' : '.$objMod->getName();
if (!empty($objMod->editor_name)) $warningmessage .= ($warningmessage ? "\n" : "").$langs->trans("Publisher").' : '.$objMod->editor_name;
if (!empty($objMod->editor_name)) $warningmessage .= ($warningmessage ? "\n" : "").$langs->trans("ModuleTriggeringThisWarning").' : '.$modules[$keymodule]->getName();
}
}
}
}
}
print '<!-- Message to show: '.$warningmessage.' -->'."\n";
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=set&amp;value='.$modName.'&amp;mode='.$mode.$param.'"';
if ($warningmessage) print ' onclick="return confirm(\''.dol_escape_js($warningmessage).'\');"';
print '>';
print img_picto($langs->trans("Disabled"), 'switch_off');
print "</a>\n";
}
print "</td>\n";
// Link config
print '<td class="tdsetuppicto right valignmiddle" width="60px">'.img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"').'</td>';
}
// Link config
print '<td class="tdsetuppicto right valignmiddle" width="60px">';
print $codetoconfig;
print '</td>';
print "</tr>\n";
}

View File

@ -89,7 +89,7 @@ if (empty($action) || $action == 'edit' || $action == 'updateedit')
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">';
print '<table class="noborder centpercent">';
print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("Day").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
print '<tr class="oddeven"><td>';

View File

@ -3504,15 +3504,16 @@ function img_view($titlealt = 'default', $float = 0, $other = '')
*
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
* @param string $other Add more attributes on img
* @param string $morecss More CSS
* @return string Retourne tag img
*/
function img_delete($titlealt = 'default', $other = 'class="pictodelete"')
function img_delete($titlealt = 'default', $other = 'class="pictodelete"', $morecss = '')
{
global $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Delete');
return img_picto($titlealt, 'delete.png', $other);
return img_picto($titlealt, 'delete.png', $other, false, 0, 0, '', $morecss);
}
/**

View File

@ -8,7 +8,7 @@ BrowseBlockedLog=Unalterable logs
ShowAllFingerPrintsMightBeTooLong=Show all archived logs (might be long)
ShowAllFingerPrintsErrorsMightBeTooLong=Show all non-valid archive logs (might be long)
DownloadBlockChain=Download fingerprints
KoCheckFingerprintValidity=Archived log entry is not valid. It means someone (a hacker?) has modified some data of this re after it was recorded, or has erased the previous archived record (check that line with previous # exists).
KoCheckFingerprintValidity=Archived log entry is not valid. It means someone (a hacker?) has modified some data of this record after it was recorded, or has erased the previous archived record (check that line with previous # exists).
OkCheckFingerprintValidity=Archived log record is valid. The data on this line was not modified and the entry follows the previous one.
OkCheckFingerprintValidityButChainIsKo=Archived log seems valid compared to previous one but the chain was corrupted previously.
AddedByAuthority=Stored into remote authority

View File

@ -3194,7 +3194,7 @@ table.hidepaginationnext .paginationnext {
<?php } ?>
.nohover:hover {
background: unset;
background: unset !important;
}
.nohoverborder:hover {
border: unset;
@ -3443,7 +3443,7 @@ div.tabBar .noborder {
/* Prepare to remove class pair - impair */
.noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre),
.noborder:not(.editmode) > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(even):not(.liste_titre)
{
@ -3459,7 +3459,7 @@ div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft
border-bottom: 1px solid #e0e0e0;
}
.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre),
.noborder:not(.editmode) > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre)
{

View File

@ -3218,7 +3218,7 @@ ul.noborder li:nth-child(odd):not(.liste_titre) {
<?php } ?>
.nohover:hover {
background: unset;
background: unset !important;
}
.nohoverborder:hover {
border: unset;