Merge pull request #18318 from altairisfr/PROPAL_REOPEN_UNSIGNED_ONLY

NEW : add constant PROPAL_REOPEN_UNSIGNED_ONLY
This commit is contained in:
Laurent Destailleur 2021-08-03 15:09:31 +02:00 committed by GitHub
commit 29715c2f2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2529,7 +2529,7 @@ if ($action == 'create') {
}
// ReOpen
if (($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) && $usercanclose) {
if ( (( ! empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=reopen'.(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#reopen').'"';
print '>'.$langs->trans('ReOpen').'</a>';
}