diff --git a/ChangeLog b/ChangeLog
index 60e7c871cf3..7c9c7fc22a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ English Dolibarr ChangeLog
***** ChangeLog for 3.5 compared to 3.4.* *****
For users:
+- New: Add hidden option BANK_DISABLE_DIRECT_INPUT.
- New: More options to select status of users into select user list.
- New: [ task #862 ] Add ODT on shipments
- New: [ task #149 ] Add # of notes and attachments in tabs
diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php
index 040905ddf73..d4da7ec74ac 100644
--- a/htdocs/compta/bank/account.php
+++ b/htdocs/compta/bank/account.php
@@ -104,6 +104,7 @@ if ($action == 'add' && $id && ! isset($_POST["cancel"]) && $user->rights->banqu
$insertid = $object->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user);
if ($insertid > 0)
{
+ setEventMessage($langs->trans("RecordSaved"));
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id."&action=addline");
exit;
}
@@ -796,13 +797,20 @@ if ($id > 0 || ! empty($ref))
if ($action != 'addline')
{
- if ($user->rights->banque->modifier)
+ if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT))
{
- print 'id.'&page='.$page.($vline?'&vline='.$vline:'').'">'.$langs->trans("AddBankRecord").'';
+ if ($user->rights->banque->modifier)
+ {
+ print 'id.'&page='.$page.($vline?'&vline='.$vline:'').'">'.$langs->trans("AddBankRecord").'';
+ }
+ else
+ {
+ print ''.$langs->trans("AddBankRecord").'';
+ }
}
else
{
- print ''.$langs->trans("AddBankRecord").'';
+ print ''.$langs->trans("AddBankRecord").'';
}
}