From 9116db986fd36013a93c948e9f41a68383ec2023 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 17 Jul 2012 19:45:22 +0200 Subject: [PATCH] Fix: Restore button to edit products. Fix: the template to use for notes is dolibarr_notes. --- htdocs/product/fiche.php | 10 +++++----- htdocs/theme/eldy/ckeditor/config.js | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 03d6dad9356..58a62e9496b 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -821,7 +821,7 @@ else // Note (private, no output on invoices, propales...) print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td>'; require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('note',$_POST["note"],'',180,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); + $doleditor=new DolEditor('note',$_POST["note"],'',180,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); $doleditor->Create(); print "</td></tr>"; @@ -1024,7 +1024,7 @@ else // Note print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="2">'; require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('note',$object->note,'',200,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); + $doleditor=new DolEditor('note',$object->note,'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); $doleditor->Create(); print "</td></tr>"; print '</table>'; @@ -1302,9 +1302,9 @@ if ($action == '' || $action == 'view') { if ($user->rights->produit->creer || $user->rights->service->creer) { - if (isset($object->no_button_edit) && $object->no_button_edit <> 1) print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$object->id.'">'.$langs->trans("Modify").'</a>'; + if (! isset($object->no_button_edit) || $object->no_button_edit <> 1) print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$object->id.'">'.$langs->trans("Modify").'</a>'; - if (isset($object->no_button_copy) && $object->no_button_copy <> 1) + if (! isset($object->no_button_copy) || $object->no_button_copy <> 1) { if (! empty($conf->use_javascript_ajax)) { @@ -1317,8 +1317,8 @@ if ($action == '' || $action == 'view') } } } - $object_is_used = $object->isObjectUsed($object->id); + if (($object->type == 0 && $user->rights->produit->supprimer) || ($object->type == 1 && $user->rights->service->supprimer)) { diff --git a/htdocs/theme/eldy/ckeditor/config.js b/htdocs/theme/eldy/ckeditor/config.js index f1416c7d7c5..1d4cdb4c67c 100644 --- a/htdocs/theme/eldy/ckeditor/config.js +++ b/htdocs/theme/eldy/ckeditor/config.js @@ -45,6 +45,7 @@ CKEDITOR.editorConfig = function( config ) ['Maximize', 'ShowBlocks','-','About'] ]; + // Used for mailing fields config.toolbar_dolibarr_mailings = [ ['Source','Maximize'], @@ -57,9 +58,10 @@ CKEDITOR.editorConfig = function( config ) ['Link','Unlink','Anchor','Image','Table','SpecialChar'] ]; + // Used for notes fields config.toolbar_dolibarr_notes = [ - ['Source'], + ['Source','Maximize'], ['Cut','Copy','Paste','-','SpellChecker'], ['Undo','Redo','-','Find','Replace'], ['Font','FontSize'], @@ -69,6 +71,7 @@ CKEDITOR.editorConfig = function( config ) ['Link','Unlink','Image','Table','SpecialChar'] ]; + // Used for details lines config.toolbar_dolibarr_details = [ ['Source','Maximize'], -- GitLab