Merge pull request #14828 from TobiasSekan/NewAllowReopenIntervention
NEW Allow to reopen interventions (green button)
This commit is contained in:
commit
52d1f57276
@ -555,6 +555,20 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reopen
|
||||||
|
elseif ($action == 'confirm_reopen' && $user->rights->ficheinter->creer)
|
||||||
|
{
|
||||||
|
$result = $object->setStatut(Fichinter::STATUS_VALIDATED);
|
||||||
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$mesg = $object->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mise a jour d'une ligne d'intervention
|
* Mise a jour d'une ligne d'intervention
|
||||||
*/
|
*/
|
||||||
@ -1099,6 +1113,12 @@ if ($action == 'create')
|
|||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify', '', 0, 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify', '', 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Confirm back to open
|
||||||
|
if ($action == 'reopen')
|
||||||
|
{
|
||||||
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Reopen'), $langs->trans('ConfirmReopenIntervention', $object->ref), 'confirm_reopen', '', 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// Confirm deletion of line
|
// Confirm deletion of line
|
||||||
if ($action == 'ask_deleteline')
|
if ($action == 'ask_deleteline')
|
||||||
{
|
{
|
||||||
@ -1596,6 +1616,15 @@ if ($action == 'create')
|
|||||||
print '</a></div>';
|
print '</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reopen
|
||||||
|
if ($object->statut > Fichinter::STATUS_CLOSED)
|
||||||
|
{
|
||||||
|
if ($user->rights->ficheinter->creer)
|
||||||
|
{
|
||||||
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen">'.$langs->trans('Reopen').'</a></div>';
|
||||||
|
} else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans('Reopen').'</a></div>';
|
||||||
|
}
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
if (empty($user->socid)) {
|
if (empty($user->socid)) {
|
||||||
if ($object->statut > Fichinter::STATUS_DRAFT)
|
if ($object->statut > Fichinter::STATUS_DRAFT)
|
||||||
|
|||||||
@ -64,3 +64,5 @@ InterLineDuration=Line duration intervention
|
|||||||
InterLineDesc=Line description intervention
|
InterLineDesc=Line description intervention
|
||||||
RepeatableIntervention=Template of intervention
|
RepeatableIntervention=Template of intervention
|
||||||
ToCreateAPredefinedIntervention=To create a predefined or recurring intervention, create a common intervention and convert it into intervention template
|
ToCreateAPredefinedIntervention=To create a predefined or recurring intervention, create a common intervention and convert it into intervention template
|
||||||
|
Reopen=Reopen
|
||||||
|
ConfirmReopenIntervention=Are you sure you want to open back the intervention <b>%s</b>?
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user