Merge pull request #4130 from bafbes/develop
add constant FICHINTER_EMPTY_LINE_DESC to allow empty line descriptions in interventions
This commit is contained in:
commit
53a8cb4475
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 201 Charlie Benke <charlies@patas-monkey.com>
|
* Copyright (C) 201 Charlie Benke <charlies@patas-monkey.com>
|
||||||
|
* Copyright (C) 2015 Abbes Bahfir <bafbes@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -466,8 +467,8 @@ if (empty($reshook))
|
|||||||
// Add line
|
// Add line
|
||||||
else if ($action == "addline" && $user->rights->ficheinter->creer)
|
else if ($action == "addline" && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
if (!GETPOST('np_desc'))
|
if (!GETPOST('np_desc') && empty($conf->global->FICHINTER_EMPTY_LINE_DESC) )
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Description")).'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Description")).'</div>';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -1566,16 +1567,18 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print '<tr '.$bcnd[$var].">\n";
|
print '<tr '.$bcnd[$var] . ">\n";
|
||||||
print '<td>';
|
print '<td>';
|
||||||
// editeur wysiwyg
|
// editeur wysiwyg
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
if (empty($conf->global->FICHINTER_EMPTY_LINE_DESC)) {
|
||||||
$doleditor=new DolEditor('np_desc',GETPOST('np_desc','alpha'),'',100,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70);
|
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||||
$doleditor->Create();
|
$doleditor = new DolEditor('np_desc', GETPOST('np_desc', 'alpha'), '', 100, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_DETAILS, ROWS_2, 70);
|
||||||
print '</td>';
|
$doleditor->Create();
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
// Date intervention
|
// Date intervention
|
||||||
print '<td align="center" class="nowrap">';
|
print '<td align="center" class="nowrap">';
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
$timearray=dol_getdate($now);
|
$timearray=dol_getdate($now);
|
||||||
if (! GETPOST('diday','int')) $timewithnohour=dol_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']);
|
if (! GETPOST('diday','int')) $timewithnohour=dol_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user