New: Add option MAIN_AUTO_TIMESTAMP_IN_PUBLIC_NOTES and

MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES to automatically add
timestamp and user line into editionf field when editing a note.
This commit is contained in:
Laurent Destailleur 2014-01-20 00:31:32 +01:00
parent 73be349233
commit 699a079ed7
3 changed files with 8 additions and 4 deletions

View File

@ -9,8 +9,8 @@ For users:
- New: Add option MAIN_HIDE_INACTIVETAB_ON_PRINT to hide inactive tabs when you
use the "print" view on screen.
- New: Add menu entry to barcode genration page.
- New: Add option MAIN_AUTO_TIMESTAMP_IN_NOTES to automatically add timestamp
and user line into editionf field when editing a note.
- New: Add option MAIN_AUTO_TIMESTAMP_IN_PUBLIC_NOTES and MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES
to automatically add timestamp and user line into editionf field when editing a note.
- New: Add button cancel into edition of notes.
- New: Improved Opensurvey module and added options to disable comments and disable
public votes

View File

@ -49,7 +49,7 @@ $object = new Propal($db);
/* Actions */
/******************************************************************************/
$permission=$user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php
$permissionnote=$user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once

View File

@ -26,7 +26,7 @@ $permission=(isset($permission)?$permission:(isset($user->rights->$module->creer
$moreparam=(isset($moreparam)?$moreparam:'');
$value_public=$object->note_public;
$value_private=$object->note_private;
if (! empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_NOTES))
if (! empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_PUBLIC_NOTES))
{
$stringtoadd=dol_print_date(dol_now(), 'dayhour').' '.$user->getFullName($langs).' --';
if (GETPOST('action') == 'edit'.$note_public)
@ -35,6 +35,10 @@ if (! empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_NOTES))
if (dol_textishtml($value_public)) $value_public.="<br>\n";
else $value_public.="\n";
}
}
if (! empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES))
{
$stringtoadd=dol_print_date(dol_now(), 'dayhour').' '.$user->getFullName($langs).' --';
if (GETPOST('action') == 'edit'.$note_private)
{
$value_private=dol_concatdesc($value_private, ($value_private?"\n":"")."-- ".$stringtoadd);