Fixed labels for permission errors
This commit is contained in:
parent
cc9c30d8c1
commit
840437d312
@ -263,7 +263,7 @@ if (empty($reshook)) {
|
|||||||
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer))
|
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer))
|
||||||
|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer) && empty($user->rights->expensereport->writeall_advance))) {
|
|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer) && empty($user->rights->expensereport->writeall_advance))) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors');
|
setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors');
|
||||||
}
|
}
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) {
|
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) {
|
||||||
|
|||||||
@ -482,7 +482,7 @@ if ($resql) {
|
|||||||
if ($canedit) {
|
if ($canedit) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create&fk_user_author='.$fuser->id.'" class="butAction">'.$langs->trans("AddTrip").'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create&fk_user_author='.$fuser->id.'" class="butAction">'.$langs->trans("AddTrip").'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="#" class="butActionRefused" title="'.$langs->trans("NotEnoughPermission").'">'.$langs->trans("AddTrip").'</a>';
|
print '<a href="#" class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("AddTrip").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -344,7 +344,7 @@ KiloBytes=Kilobytes
|
|||||||
MegaBytes=Megabytes
|
MegaBytes=Megabytes
|
||||||
GigaBytes=Gigabytes
|
GigaBytes=Gigabytes
|
||||||
TeraBytes=Terabytes
|
TeraBytes=Terabytes
|
||||||
UserAuthor=Ceated by
|
UserAuthor=Created by
|
||||||
UserModif=Updated by
|
UserModif=Updated by
|
||||||
b=b.
|
b=b.
|
||||||
Kb=Kb
|
Kb=Kb
|
||||||
@ -709,6 +709,7 @@ FeatureDisabled=Feature disabled
|
|||||||
MoveBox=Move widget
|
MoveBox=Move widget
|
||||||
Offered=Offered
|
Offered=Offered
|
||||||
NotEnoughPermissions=You don't have permission for this action
|
NotEnoughPermissions=You don't have permission for this action
|
||||||
|
UserNotInHierachy=This action is reserved to the supervisors of this user
|
||||||
SessionName=Session name
|
SessionName=Session name
|
||||||
Method=Method
|
Method=Method
|
||||||
Receive=Receive
|
Receive=Receive
|
||||||
|
|||||||
@ -692,7 +692,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
|||||||
if ($permissiontoaddbankaccount) {
|
if ($permissiontoaddbankaccount) {
|
||||||
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create');
|
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create');
|
||||||
} else {
|
} else {
|
||||||
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), 'NotEnoughPermission', 'fa fa-plus-circle', '', '', -2);
|
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), $langs->trans('NotEnoughPermissions'), 'fa fa-plus-circle', '', '', -2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), 'AlreadyOneBankAccount', 'fa fa-plus-circle', '', '', -2);
|
$morehtmlright = dolGetButtonTitle($langs->trans('Add'), 'AlreadyOneBankAccount', 'fa fa-plus-circle', '', '', -2);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user