Fix: Creation of notes was not using DolEditor class.
This commit is contained in:
parent
4a3ade6264
commit
325d47c882
@ -626,16 +626,27 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("NotePublic").'</td><td valign="top">';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor('note_public', GETPOST('note_public'), '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, 70);
|
||||
print $doleditor->Create(1);
|
||||
/*
|
||||
print '<textarea name="note_public" wrap="soft" cols="70" rows="'.ROWS_3.'">';
|
||||
print GETPOST("note_public");
|
||||
print '</textarea></td></tr>';
|
||||
*/
|
||||
|
||||
if (! $user->societe_id)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("NotePrivate").'</td><td valign="top">';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor('note', GETPOST('note'), '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, 70);
|
||||
print $doleditor->Create(1);
|
||||
/*
|
||||
print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">';
|
||||
print GETPOST("note");
|
||||
print '</textarea></td></tr>';
|
||||
print '</textarea>';*/
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
|
||||
@ -50,13 +50,13 @@ $object->fetch($id,$ref);
|
||||
|
||||
if ($action == 'setnote_public' && $user->rights->contrat->creer)
|
||||
{
|
||||
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
||||
$result=$object->update_note_public(dol_html_entity_decode(dol_htmlcleanlastbr(GETPOST('note_public')), ENT_QUOTES));
|
||||
if ($result < 0) dol_print_error($db,$object->error);
|
||||
}
|
||||
|
||||
else if ($action == 'setnote' && $user->rights->contrat->creer)
|
||||
{
|
||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
||||
$result=$object->update_note(dol_html_entity_decode(dol_htmlcleanlastbr(GETPOST('note')), ENT_QUOTES));
|
||||
if ($result < 0) dol_print_error($db,$object->error);
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ if ($id > 0 || ! empty($ref))
|
||||
else print $langs->trans("CompanyHasNoAbsoluteDiscount");
|
||||
print '.';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<br>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user