Browse Source

Fixed labels for permission errors

Yoan Mollard 2 years ago
parent
commit
edb2e95aaf

+ 1 - 1
htdocs/expensereport/card.php

@@ -263,7 +263,7 @@ if (empty($reshook)) {
 		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))) {
 			$error++;
-			setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors');
+			setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors');
 		}
 		if (!$error) {
 			if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) {

+ 1 - 1
htdocs/expensereport/list.php

@@ -482,7 +482,7 @@ if ($resql) {
 			if ($canedit) {
 				print '<a href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create&fk_user_author='.$fuser->id.'" class="butAction">'.$langs->trans("AddTrip").'</a>';
 			} 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>';

+ 2 - 1
htdocs/langs/en_US/main.lang

@@ -345,7 +345,7 @@ KiloBytes=Kilobytes
 MegaBytes=Megabytes
 GigaBytes=Gigabytes
 TeraBytes=Terabytes
-UserAuthor=Ceated by
+UserAuthor=Created by
 UserModif=Updated by
 b=b.
 Kb=Kb
@@ -712,6 +712,7 @@ FeatureDisabled=Feature disabled
 MoveBox=Move widget
 Offered=Offered
 NotEnoughPermissions=You don't have permission for this action
+UserNotInHierachy=This action is reserved to the supervisors of this user
 SessionName=Session name
 Method=Method
 Receive=Receive

+ 1 - 1
htdocs/user/bank.php

@@ -748,7 +748,7 @@ if ($action != 'edit' && $action != 'create') {		// If not bank account yet, $ac
 		if ($permissiontoaddbankaccount) {
 			$morehtmlright = dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=create');
 		} 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 {
 		$morehtmlright = dolGetButtonTitle($langs->trans('Add'), 'AlreadyOneBankAccount', 'fa fa-plus-circle', '', '', -2);