Fix not visible button when missing permission
This commit is contained in:
parent
81a94f5642
commit
ab4941a558
@ -1606,8 +1606,9 @@ if ($action == 'create')
|
||||
// Validate
|
||||
if ($object->statut == Fichinter::STATUS_DRAFT && (count($object->lines) > 0 || !empty($conf->global->FICHINTER_DISABLE_DETAILS))) {
|
||||
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->creer) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->ficheinter_advance->validate)) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?id='.$object->id.'&action=validate"';
|
||||
print '>'.$langs->trans("Validate").'</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?id='.$object->id.'&action=validate">'.$langs->trans("Validate").'</a></div>';
|
||||
} else {
|
||||
print '<div class="inline-block divButActionRefused"><span class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Validate").'</span></div>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -1640,7 +1641,7 @@ if ($action == 'create')
|
||||
}
|
||||
}
|
||||
|
||||
// create intervention model
|
||||
// Create intervention model
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 1 && $object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer && (count($object->lines) > 0)) {
|
||||
print '<div class="inline-block divButAction">';
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card-rec.php?id='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableIntervention").'</a>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user