FIX duplicate confirm message. Missing reposition class

This commit is contained in:
Laurent Destailleur 2018-02-26 10:33:39 +01:00
parent 4866d63ece
commit 667c9045a2

View File

@ -602,7 +602,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
if ($projectstatic->id > 0)
{
if ($action == 'deleteline')
if ($action == 'deleteline' && ! empty($projectidforalltimes))
{
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.'&lineid='.$_GET["lineid"].($withproject?'&withproject=1':''),$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1);
}
@ -976,12 +976,12 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
if ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids) || $user->rights->projet->all->creer)
{
print ' ';
print '<a href="'.$_SERVER["PHP_SELF"].'?'.($projectidforalltimes?'projectid='.$projectidforalltimes.'&amp;':'').'id='.$task_time->fk_task.'&amp;action=editline&amp;lineid='.$task_time->rowid.($withproject?'&amp;withproject=1':'').'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?'.($projectidforalltimes?'projectid='.$projectidforalltimes.'&amp;':'').'id='.$task_time->fk_task.'&amp;action=editline&amp;lineid='.$task_time->rowid.($withproject?'&amp;withproject=1':'').'">';
print img_edit();
print '</a>';
print '&nbsp;';
print '<a href="'.$_SERVER["PHP_SELF"].'?'.($projectidforalltimes?'projectid='.$projectidforalltimes.'&amp;':'').'id='.$task_time->fk_task.'&amp;action=deleteline&amp;lineid='.$task_time->rowid.($withproject?'&amp;withproject=1':'').'">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?'.($projectidforalltimes?'projectid='.$projectidforalltimes.'&amp;':'').'id='.$task_time->fk_task.'&amp;action=deleteline&amp;lineid='.$task_time->rowid.($withproject?'&amp;withproject=1':'').'">';
print img_delete();
print '</a>';
}