Merge pull request #6841 from grandoc/new_branch_12_05

Update code using new css class
This commit is contained in:
Laurent Destailleur 2017-05-13 19:46:08 +02:00 committed by GitHub
commit 4221bdcc97
2 changed files with 7 additions and 17 deletions

View File

@ -1757,7 +1757,7 @@ else
if ($action == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == GETPOST('rowid')) if ($action == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == GETPOST('rowid'))
{ {
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1); print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1);
if ($ret == 'html') print '<table class="notopnoleftnoright" width="100%"><tr '.$bc[$var].' height="6"><td></td></tr></table>'; if ($ret == 'html') print '<table class="notopnoleftnoright" width="100%"><tr class="oddeven" height="6"><td></td></tr></table>';
} }
/* /*
@ -1777,7 +1777,7 @@ else
array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid)); array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid));
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion); $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion);
print '<table class="notopnoleftnoright" width="100%"><tr '.$bc[$var].' height="6"><td></td></tr></table>'; print '<table class="notopnoleftnoright" width="100%"><tr class="oddeven" height="6"><td></td></tr></table>';
} }
/* /*
@ -1789,7 +1789,7 @@ else
$dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
$comment = GETPOST('comment'); $comment = GETPOST('comment');
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1); $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1);
print '<table class="notopnoleftnoright" width="100%"><tr '.$bc[$var].' height="6"><td></td></tr></table>'; print '<table class="notopnoleftnoright" width="100%"><tr class="oddeven" height="6"><td></td></tr></table>';
} }
/* /*
@ -1801,7 +1801,7 @@ else
$dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
$comment = GETPOST('comment'); $comment = GETPOST('comment');
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1); $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1);
print '<table class="notopnoleftnoright" width="100%"><tr '.$bc[$var].' height="6"><td></td></tr></table>'; print '<table class="notopnoleftnoright" width="100%"><tr class="oddeven" height="6"><td></td></tr></table>';
} }

View File

@ -77,7 +77,6 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele
// Search contract // Search contract
if (! empty($conf->contrat->enabled)) if (! empty($conf->contrat->enabled))
{ {
$var=false;
print '<form method="post" action="'.DOL_URL_ROOT.'/contrat/list.php">'; print '<form method="post" action="'.DOL_URL_ROOT.'/contrat/list.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover" width="100%">'; print '<table class="noborder nohover" width="100%">';
@ -181,7 +180,6 @@ else
print '<table class="noborder nohover" width="100%">'; print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Services").'</th></tr>'."\n"; print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Services").'</th></tr>'."\n";
$var=true;
$listofstatus=array(0,4,4,5); $bool=false; $listofstatus=array(0,4,4,5); $bool=false;
foreach($listofstatus as $status) foreach($listofstatus as $status)
{ {
@ -204,13 +202,11 @@ if (! empty($conf->use_javascript_ajax))
dol_print_graph('stats',300,180,$data,1,'pie',1); dol_print_graph('stats',300,180,$data,1,'pie',1);
print '</td></tr>'; print '</td></tr>';
} }
$var=true;
$listofstatus=array(0,4,4,5); $bool=false; $listofstatus=array(0,4,4,5); $bool=false;
foreach($listofstatus as $status) foreach($listofstatus as $status)
{ {
if (empty($conf->use_javascript_ajax)) if (empty($conf->use_javascript_ajax))
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$staticcontratligne->LibStatut($status,0,($bool?1:0)).'</td>'; print '<td>'.$staticcontratligne->LibStatut($status,0,($bool?1:0)).'</td>';
print '<td align="right"><a href="services.php?mode='.$status.($bool?'&filter=expired':'').'">'.($nb[$status.$bool]?$nb[$status.$bool]:0).' '.$staticcontratligne->LibStatut($status,3,($bool?1:0)).'</a></td>'; print '<td align="right"><a href="services.php?mode='.$status.($bool?'&filter=expired':'').'">'.($nb[$status.$bool]?$nb[$status.$bool]:0).' '.$staticcontratligne->LibStatut($status,3,($bool?1:0)).'</a></td>';
@ -243,7 +239,6 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
if ( $resql ) if ( $resql )
{ {
$var = false;
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
@ -277,7 +272,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
} }
else else
{ {
print '<tr '.$bc[$var].' class><td colspan="3" class="opacitymedium">'.$langs->trans("NoContracts").'</td></tr>'; print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("NoContracts").'</td></tr>';
} }
print "</table><br>"; print "</table><br>";
$db->free($resql); $db->free($resql);
@ -330,11 +325,9 @@ if ($result)
print '<th align="center" width="80" colspan="4">'.$langs->trans("Services").'</th>'; print '<th align="center" width="80" colspan="4">'.$langs->trans("Services").'</th>';
print "</tr>\n"; print "</tr>\n";
$var=True;
while ($i < $num) while ($i < $num)
{ {
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td width="110" class="nowrap">'; print '<td width="110" class="nowrap">';
@ -397,7 +390,6 @@ if ($resql)
print '<tr class="liste_titre"><th colspan="4">'.$langs->trans("LastModifiedServices",$max).'</th>'; print '<tr class="liste_titre"><th colspan="4">'.$langs->trans("LastModifiedServices",$max).'</th>';
print "</tr>\n"; print "</tr>\n";
$var=True;
while ($i < min($num,$max)) while ($i < min($num,$max))
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
@ -478,7 +470,6 @@ if ($resql)
print '<tr class="liste_titre"><th colspan="4">'.$langs->trans("NotActivatedServices").' <a href="'.DOL_URL_ROOT.'/contrat/services.php?mode=0"><span class="badge">'.$num.'</span></a></th>'; print '<tr class="liste_titre"><th colspan="4">'.$langs->trans("NotActivatedServices").' <a href="'.DOL_URL_ROOT.'/contrat/services.php?mode=0"><span class="badge">'.$num.'</span></a></th>';
print "</tr>\n"; print "</tr>\n";
$var=True;
while ($i < $num) while ($i < $num)
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
@ -559,7 +550,6 @@ if ($resql)
print '<tr class="liste_titre"><th colspan="4">'.$langs->trans("ListOfExpiredServices").' <a href="'.DOL_URL_ROOT.'/contrat/services.php?mode=4&amp;filter=expired"><span class="badge">'.$num.'</span></a></th>'; print '<tr class="liste_titre"><th colspan="4">'.$langs->trans("ListOfExpiredServices").' <a href="'.DOL_URL_ROOT.'/contrat/services.php?mode=4&amp;filter=expired"><span class="badge">'.$num.'</span></a></th>';
print "</tr>\n"; print "</tr>\n";
$var=True;
while ($i < $num) while ($i < $num)
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);