|
@@ -185,7 +185,7 @@ else if ($action == 'setmod')
|
|
|
|
|
|
else if ($action == 'set_FICHINTER_FREE_TEXT')
|
|
|
{
|
|
|
- $freetext= GETPOST('FICHINTER_FREE_TEXT','alpha');
|
|
|
+ $freetext= GETPOST('FICHINTER_FREE_TEXT'); // No alpha here, we want exact string
|
|
|
$res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
|
|
|
|
|
if (! $res > 0) $error++;
|
|
@@ -527,7 +527,17 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
print '<input type="hidden" name="action" value="set_FICHINTER_FREE_TEXT">';
|
|
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
|
|
print $langs->trans("FreeLegalTextOnInterventions").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
|
|
-print '<textarea name="FICHINTER_FREE_TEXT" class="flat" cols="120">'.$conf->global->FICHINTER_FREE_TEXT.'</textarea>';
|
|
|
+$variablename='FICHINTER_FREE_TEXT';
|
|
|
+if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
|
|
+{
|
|
|
+ print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
|
|
+}
|
|
|
+else
|
|
|
+{
|
|
|
+ include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
|
|
+ $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details');
|
|
|
+ print $doleditor->Create();
|
|
|
+}
|
|
|
print '</td><td align="right">';
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
print "</td></tr>\n";
|