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

This commit is contained in:
Laurent Destailleur 2024-06-29 19:21:27 +02:00
commit 03bd82f61b

View File

@ -101,8 +101,8 @@ if (empty($reshook)) {
$object->update($user);
}
// Reopend
if ($action == 'reopen') {
// Valid or Reopend
if ($action == 'reopen' || $action == 'validate') {
$object->status = Opensurveysondage::STATUS_VALIDATED;
$object->update($user);
}
@ -376,6 +376,11 @@ if ($action != 'edit' && $user->hasRight('opensurvey', 'write')) {
// Modify button
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.urlencode($numsondage).'">'.$langs->trans("Modify").'</a>';
if ($object->status == Opensurveysondage::STATUS_DRAFT) {
// Validate button
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.urlencode($numsondage).'">'.$langs->trans("Valid").'</a>';
}
if ($object->status == Opensurveysondage::STATUS_VALIDATED) {
// Close button
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=close&token='.newToken().'&id='.urlencode($numsondage).'">'.$langs->trans("Close").'</a>';