From 01c3e6fb82fd95ef28eb3201588e2dab11796358 Mon Sep 17 00:00:00 2001 From: BENKE Charlene Date: Mon, 26 Jun 2017 23:06:24 +0200 Subject: [PATCH] TPL refactoring --- htdocs/core/tpl/notes.tpl.php | 40 +++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index 2538e052ae4..e925fa64783 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -66,21 +66,29 @@ elseif ($module == 'product') { $permission=$user->rights->produit->creer; if (! empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) $typeofdata='ckeditor:dolibarr_notes:100%:200::1:12:95%'; // Rem: This var is for all notes, not only thirdparties note. else $typeofdata='textarea:12:95%'; +print ''."\n"; +print '
'."\n"; +if ($module != 'product') { + // No public note yet on products + print '
'."\n"; + print '
'."\n"; + print $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam, '', 0); + print '
'."\n"; + print '
'."\n"; + print $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam, 1)."\n"; + print '
'."\n"; + print '
'."\n"; +} +if (empty($user->societe_id)) { + print '
'."\n"; + print '
'."\n"; + print $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam, '', 0); + print '
'."\n"; + print '
'."\n"; + print $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam, 1); + print '
'."\n"; + print '
'."\n"; +} +print '
'."\n"; ?> - - -
- -
-
>editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam, '', 0); ?>
-
editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam, 1); ?>
-
- -societe_id)) { ?> -
-
>editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam, '', 0); ?>
-
editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam, 1); ?>
-
- -