Merge pull request #9122 from grandoc/new_branch_19_07_2018
Clean and update code
This commit is contained in:
commit
42e8bcb832
@ -352,8 +352,6 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<td colspan="3"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var = false;
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="addcontact">';
|
||||
@ -436,7 +434,6 @@ if ($id > 0 || ! empty($ref))
|
||||
print "</tr>\n";
|
||||
|
||||
$companystatic = new Societe($db);
|
||||
$var = true;
|
||||
|
||||
foreach(array('internal','external') as $source)
|
||||
{
|
||||
@ -446,9 +443,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
print '<tr '.$bc[$var].' valign="top">';
|
||||
print '<tr class="oddeven" valign="top">';
|
||||
|
||||
// Source
|
||||
print '<td align="left">';
|
||||
|
||||
@ -1001,7 +1001,7 @@ class ActionsTicket
|
||||
*/
|
||||
public function viewTicketLogs($show_user = true)
|
||||
{
|
||||
global $conf, $langs, $bc;
|
||||
global $conf, $langs;
|
||||
|
||||
// Load logs in cache
|
||||
$ret = $this->dao->loadCacheLogsTicket();
|
||||
@ -1021,11 +1021,8 @@ class ActionsTicket
|
||||
print '</th>';
|
||||
}
|
||||
|
||||
$var = true;
|
||||
|
||||
foreach ($this->dao->cache_logs_ticket as $id => $arraylogs) {
|
||||
$var = !$var;
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><strong>';
|
||||
print dol_print_date($arraylogs['datec'], 'dayhour');
|
||||
print '</strong></td>';
|
||||
@ -1042,7 +1039,7 @@ class ActionsTicket
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="2">';
|
||||
print dol_nl2br($arraylogs['message']);
|
||||
|
||||
@ -1064,7 +1061,7 @@ class ActionsTicket
|
||||
*/
|
||||
public function viewTimelineTicketLogs($show_user = true, $object = true)
|
||||
{
|
||||
global $conf, $langs, $bc;
|
||||
global $conf, $langs;
|
||||
|
||||
// Load logs in cache
|
||||
$ret = $object->loadCacheLogsTicket();
|
||||
@ -1171,7 +1168,7 @@ class ActionsTicket
|
||||
*/
|
||||
public function viewTicketMessages($show_private, $show_user = true)
|
||||
{
|
||||
global $conf, $langs, $user, $bc;
|
||||
global $conf, $langs, $user;
|
||||
global $object;
|
||||
|
||||
// Load logs in cache
|
||||
@ -1202,8 +1199,7 @@ class ActionsTicket
|
||||
|| ($arraymsgs['private'] == "1" && $show_private)
|
||||
) {
|
||||
//print '<tr>';
|
||||
$var = !$var;
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><strong>';
|
||||
print dol_print_date($arraymsgs['datec'], 'dayhour');
|
||||
print '<strong></td>';
|
||||
@ -1221,7 +1217,7 @@ class ActionsTicket
|
||||
print '</td>';
|
||||
}
|
||||
print '</td>';
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="2">';
|
||||
print $arraymsgs['message'];
|
||||
print '</td>';
|
||||
@ -1244,7 +1240,7 @@ class ActionsTicket
|
||||
*/
|
||||
public function viewTicketTimelineMessages($show_private, $show_user, Ticket $object)
|
||||
{
|
||||
global $conf, $langs, $user, $bc;
|
||||
global $conf, $langs, $user;
|
||||
|
||||
// Load logs in cache
|
||||
$ret = $object->loadCacheMsgsTicket();
|
||||
|
||||
@ -244,7 +244,7 @@ if ($action == 'edit')
|
||||
print '<td>';
|
||||
print (empty($conf->global->MAIN_LANDING_PAGE)?'':$conf->global->MAIN_LANDING_PAGE);
|
||||
print '</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_LANDING_PAGE" id="check_MAIN_LANDING_PAGE" type="checkbox" '.(! empty($object->conf->MAIN_LANDING_PAGE)?" checked":"");
|
||||
print '<td align="left" class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_LANDING_PAGE" id="check_MAIN_LANDING_PAGE" type="checkbox" '.(! empty($object->conf->MAIN_LANDING_PAGE)?" checked":"");
|
||||
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
@ -259,7 +259,7 @@ if ($action == 'edit')
|
||||
print $s?$s.' ':'';
|
||||
print ($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
|
||||
print '</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_LANG_DEFAULT" id="check_MAIN_LANG_DEFAULT" type="checkbox" '.(! empty($object->conf->MAIN_LANG_DEFAULT)?" checked":"");
|
||||
print '<td align="left" class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_LANG_DEFAULT" id="check_MAIN_LANG_DEFAULT" type="checkbox" '.(! empty($object->conf->MAIN_LANG_DEFAULT)?" checked":"");
|
||||
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
@ -269,7 +269,7 @@ if ($action == 'edit')
|
||||
// Taille max des listes
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MaxSizeList").'</td>';
|
||||
print '<td>'.$conf->global->MAIN_SIZE_LISTE_LIMIT.'</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_SIZE_LISTE_LIMIT" id="check_SIZE_LISTE_LIMIT" type="checkbox" '.(! empty($object->conf->MAIN_SIZE_LISTE_LIMIT)?" checked":"");
|
||||
print '<td align="left" class="nowrap" width="20%"><input class="oddeven" name="check_SIZE_LISTE_LIMIT" id="check_SIZE_LISTE_LIMIT" type="checkbox" '.(! empty($object->conf->MAIN_SIZE_LISTE_LIMIT)?" checked":"");
|
||||
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td><input class="flat" name="main_size_liste_limit" id="main_size_liste_limit" size="4" value="' . (! empty($object->conf->MAIN_SIZE_LISTE_LIMIT)?$object->conf->MAIN_SIZE_LISTE_LIMIT:'') . '"></td></tr>';
|
||||
@ -306,7 +306,7 @@ else
|
||||
print '<td>';
|
||||
print (empty($conf->global->MAIN_LANDING_PAGE)?'':$conf->global->MAIN_LANDING_PAGE);
|
||||
print '</td>';
|
||||
print '<td align="left" class="nowrap"><input '.$bc[$var].' name="check_MAIN_LANDING_PAGE" disabled id="check_MAIN_LANDING_PAGE" type="checkbox" '.(! empty($object->conf->MAIN_LANDING_PAGE)?" checked":"");
|
||||
print '<td align="left" class="nowrap"><input class="oddeven" name="check_MAIN_LANDING_PAGE" disabled id="check_MAIN_LANDING_PAGE" type="checkbox" '.(! empty($object->conf->MAIN_LANDING_PAGE)?" checked":"");
|
||||
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
@ -326,7 +326,7 @@ else
|
||||
print ($s?$s.' ':'');
|
||||
print (isset($conf->global->MAIN_LANG_DEFAULT) && $conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
|
||||
print '</td>';
|
||||
print '<td align="left" class="nowrap"><input '.$bc[$var].' type="checkbox" disabled '.(! empty($object->conf->MAIN_LANG_DEFAULT)?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td align="left" class="nowrap"><input class="oddeven" type="checkbox" disabled '.(! empty($object->conf->MAIN_LANG_DEFAULT)?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
$s=(isset($object->conf->MAIN_LANG_DEFAULT) ? picto_from_langcode($object->conf->MAIN_LANG_DEFAULT) : '');
|
||||
print ($s?$s.' ':'');
|
||||
@ -336,7 +336,7 @@ else
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MaxSizeList").'</td>';
|
||||
print '<td>'.(! empty($conf->global->MAIN_SIZE_LISTE_LIMIT)?$conf->global->MAIN_SIZE_LISTE_LIMIT:' ').'</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' type="checkbox" disabled '.(! empty($object->conf->MAIN_SIZE_LISTE_LIMIT)?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(! empty($object->conf->MAIN_SIZE_LISTE_LIMIT)?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>' . (! empty($object->conf->MAIN_SIZE_LISTE_LIMIT)?$object->conf->MAIN_SIZE_LISTE_LIMIT:' ') . '</td></tr>';
|
||||
|
||||
print '</table><br>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user