Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2019-11-05 10:11:49 +01:00
commit c0daa1e5d3
13 changed files with 47 additions and 24 deletions

View File

@ -138,7 +138,7 @@ if (empty($reshook))
if ($result > 0)
{
setEventMessages($langs->trans("ChartLoaded"), null);
setEventMessages($langs->trans("ChartLoaded"), null, 'mesgs');
}
else
{

View File

@ -197,6 +197,7 @@ if ($resql) {
$param="&socid=".$socid;
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="socid" value="' . $object->id . '">';
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';

View File

@ -195,6 +195,7 @@ if ($resql) {
$param="&socid=".$socid;
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="socid" value="' . $object->id . '">';
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';

View File

@ -259,6 +259,7 @@ print '<br>';
print img_picto('', 'puce').' '.$langs->trans("DocForAllMembersCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' ';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="foruserid" value="all">';
print '<input type="hidden" name="mode" value="card">';
print '<input type="hidden" name="action" value="builddoc">';
@ -278,6 +279,7 @@ print '<br><br>';
print img_picto('', 'puce').' '.$langs->trans("DocForOneMemberCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' ';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="mode" value="cardlogin">';
print '<input type="hidden" name="action" value="builddoc">';
print $langs->trans("DescADHERENT_CARD_TYPE").' ';
@ -297,6 +299,7 @@ print '<br><br>';
print img_picto('', 'puce').' '.$langs->trans("DocForLabels", $conf->global->ADHERENT_ETIQUETTE_TYPE).' ';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="mode" value="label">';
print '<input type="hidden" name="action" value="builddoc">';
print $langs->trans("DescADHERENT_ETIQUETTE_TYPE").' ';

View File

@ -617,6 +617,7 @@ if ($rowid > 0)
}
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input class="flat" type="hidden" name="rowid" value="'.$object->id.'" size="12"></td>';
print '<br>';

View File

@ -324,6 +324,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
}
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="set">';
print '<table class="noborder allwidth">'."\n";

View File

@ -180,6 +180,7 @@ $head=agenda_prepare_head();
dol_fiche_head($head, 'reminders', $langs->trans("Agenda"), -1, 'action');
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="set">';
print '<table class="noborder allwidth">'."\n";

View File

@ -119,6 +119,7 @@ if (! empty($conf->global->CLICKTODIAL_URL))
if (GETPOST('phonefortest')) $phonefortest=GETPOST('phonefortest');
print '<form action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print $langs->trans("LinkToTestClickToDial", $user->login).' : ';
print '<input class="flat" type="text" name="phonefortest" value="'.dol_escape_htmltag($phonefortest).'">';
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("RefreshPhoneLink")).'">';

View File

@ -185,6 +185,7 @@ else
print '<br>'."\n";
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
// Skins
show_skin(null, 1);

View File

@ -318,6 +318,7 @@ if ($action=="create" || $action=="start")
print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'cash-register');
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1')
{
print '<input type="hidden" name="action" value="add">';

View File

@ -62,7 +62,7 @@ class modCollab extends DolibarrModules
// Config pages
//-------------
$this->config_page_url = array('collab.php');
$this->config_page_url = array(/*'collab.php'*/);
// Dependancies
//-------------
@ -109,17 +109,19 @@ class modCollab extends DolibarrModules
// Main menu entries
$r=0;
$this->menu[$r]=array( 'fk_menu'=>'0', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'top', // This is a Left menu entry
'titre'=>'Collab',
'mainmenu'=>'collab',
'url'=>'/collab/index.php',
'langs'=>'collab', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->collab->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$this->menu[$r]=array(
'fk_menu'=>'0', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'top', // This is a Left menu entry
'titre'=>'Collab',
'mainmenu'=>'collab',
'url'=>'/collab/index.php',
'langs'=>'collab', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->collab->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2 // 0=Menu for internal users, 1=external users, 2=both
);
$r++;
}
}

View File

@ -69,13 +69,14 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele
{
// Search ficheinter
$var=false;
print '<table class="noborder nohover" width="100%">';
print '<form method="post" action="'.DOL_URL_ROOT.'/fichinter/list.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr class="oddeven"><td>';
print $langs->trans("Intervention").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print "</form></table><br>\n";
print "</table></div></form><br>\n";
}
@ -121,6 +122,7 @@ if ($resql)
$i++;
}
$db->free($resql);
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Interventions").'</th></tr>'."\n";
$listofstatus=array(0,1,2);
@ -167,7 +169,7 @@ if ($resql)
//if ($totalinprocess != $total)
//print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')</td><td class="right">'.$totalinprocess.'</td></tr>';
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">'.$total.'</td></tr>';
print "</table><br>";
print "</table></div><br>";
}
else
{
@ -193,6 +195,7 @@ if (! empty($conf->ficheinter->enabled))
$resql=$db->query($sql);
if ($resql)
{
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<th colspan="2">'.$langs->trans("DraftFichinter").'</th></tr>';
@ -211,7 +214,7 @@ if (! empty($conf->ficheinter->enabled))
$i++;
}
}
print "</table><br>";
print "</table></div><br>";
}
}
@ -241,6 +244,7 @@ $sql.= $db->plimit($max, 0);
$resql=$db->query($sql);
if ($resql)
{
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<th colspan="4">'.$langs->trans("LastModifiedInterventions", $max).'</th></tr>';
@ -284,7 +288,7 @@ if ($resql)
$i++;
}
}
print "</table><br>";
print "</table></div><br>";
}
else dol_print_error($db);
@ -311,6 +315,7 @@ if (! empty($conf->ficheinter->enabled))
{
$num = $db->num_rows($resql);
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<th colspan="3">'.$langs->trans("FichinterToProcess").' <a href="'.DOL_URL_ROOT.'/fichinter/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></th></tr>';
@ -354,7 +359,7 @@ if (! empty($conf->ficheinter->enabled))
}
}
print "</table><br>";
print "</table></div><br>";
}
else dol_print_error($db);
}

View File

@ -71,12 +71,13 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele
{
print '<form method="post" action="'.DOL_URL_ROOT.'/supplier_proposal/list.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr class="oddeven"><td>';
print $langs->trans("SupplierProposal").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '</tr>';
print "</table></form><br>\n";
print "</table></div></form><br>\n";
}
@ -121,6 +122,7 @@ if ($resql)
}
$db->free($resql);
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("CommRequests").'</th></tr>'."\n";
$listofstatus=array(0,1,2,3,4);
@ -153,7 +155,7 @@ if ($resql)
}
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">'.$total.'</td></tr>';
print "</table><br>";
print "</table></div><br>";
}
else
{
@ -179,6 +181,7 @@ if (! empty($conf->supplier_proposal->enabled))
$resql=$db->query($sql);
if ($resql)
{
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<th colspan="2">'.$langs->trans("DraftRequests").'</th></tr>';
@ -206,7 +209,7 @@ if (! empty($conf->supplier_proposal->enabled))
$i++;
}
}
print "</table><br>";
print "</table></div><br>";
}
}
@ -235,6 +238,7 @@ $sql.= $db->plimit($max, 0);
$resql=$db->query($sql);
if ($resql)
{
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<th colspan="4">'.$langs->trans("LastModifiedRequests", $max).'</th></tr>';
@ -283,7 +287,7 @@ if ($resql)
$i++;
}
}
print "</table><br>";
print "</table></div><br>";
}
else dol_print_error($db);
@ -316,6 +320,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
$i = 0;
if ($num > 0)
{
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("RequestsOpened").' <a href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></th></tr>';
@ -370,7 +375,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
{
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total").'</td><td class="right">'.price($total)."</td><td>&nbsp;</td></tr>";
}
print "</table><br>";
print "</table></div><br>";
}
}
else