Scopes reported on token creation screen

This commit is contained in:
Faustin 2022-09-27 02:20:37 +02:00
parent e936231ccb
commit dee9237381
2 changed files with 12 additions and 1 deletions

View File

@ -85,7 +85,11 @@ if ($action == 'update') {
}
}
if (GETPOSTISSET($constvalue.'_SCOPE')) {
$scopestring = implode(',', GETPOST($constvalue.'_SCOPE'));
if (is_array(GETPOST($constvalue.'_SCOPE'))) {
$scopestring = implode(',', GETPOST($constvalue.'_SCOPE'));
} else {
$scopestring = GETPOST($constvalue.'_SCOPE');
}
if (!dolibarr_set_const($db, $constvalue.'_SCOPE', $scopestring, 'chaine', 0, '', $conf->entity)) {
$error++;
}

View File

@ -377,6 +377,13 @@ if ($mode == 'setup' && $user->admin) {
print '</tr>';
}
// Scopes
print '<tr class="oddeven">';
print '<td>'.$langs->trans("Scopes").'</td>';
print '<td colspan="2">';
$currentscopes = getDolGlobalString($key[4]);
print $currentscopes;
print '</td></tr>';
print '</table>';
print '</div>';