31 print
"Error, template page can't be called as URL";
38$note_public =
'note_public';
39$note_private =
'note_private';
41if ($module ==
"product") {
44$colwidth = (isset($colwidth) ? $colwidth : (empty($cssclass) ?
'25' :
''));
46$permission = (isset($permissionnote) ? $permissionnote : (isset($permission) ? $permission : ($user->hasRight($module,
'create') ? $user->rights->$module->create : ($user->hasRight($module,
'creer') ? $user->rights->$module->creer : 0))));
47$moreparam = (isset($moreparam) ? $moreparam :
'');
48$value_public =
$object->note_public;
49$value_private =
$object->note_private;
52 if (
GETPOST(
'action',
'aZ09') ==
'edit'.$note_public) {
53 $value_public =
dol_concatdesc($value_public, ($value_public ?
"\n" :
"").
"-- ".$stringtoadd);
55 $value_public .=
"<br>\n";
57 $value_public .=
"\n";
63 if (
GETPOST(
'action',
'aZ09') ==
'edit'.$note_private) {
64 $value_private =
dol_concatdesc($value_private, ($value_private ?
"\n" :
"").
"-- ".$stringtoadd);
66 $value_private .=
"<br>\n";
68 $value_private .=
"\n";
74if ($module ==
'propal') {
75 $permission = $user->hasRight(
"propal",
"creer");
76} elseif ($module ==
'supplier_proposal') {
77 $permission = $user->hasRight(
"supplier_proposal",
"creer");
78} elseif ($module ==
'fichinter') {
79 $permission = $user->hasRight(
"ficheinter",
"creer");
80} elseif ($module ==
'project') {
81 $permission = $user->hasRight(
"projet",
"creer");
82} elseif ($module ==
'project_task') {
83 $permission = $user->hasRight(
"projet",
"creer");
84} elseif ($module ==
'invoice_supplier') {
86 $permission = $user->hasRight(
"fournisseur",
"facture",
"creer");
88 $permission = $user->hasRight(
"supplier_invoice",
"creer");
90} elseif ($module ==
'order_supplier') {
92 $permission = $user->hasRight(
"fournisseur",
"commande",
"creer");
94 $permission = $user->hasRight(
"supplier_order",
"creer");
96} elseif ($module ==
'societe') {
97 $permission = $user->hasRight(
"societe",
"creer");
98} elseif ($module ==
'contact') {
99 $permission = $user->hasRight(
"societe",
"creer");
100} elseif ($module ==
'shipping') {
101 $permission = $user->hasRight(
"expedition",
"creer");
102} elseif ($module ==
'product') {
103 $permission = $user->hasRight(
"product",
"creer");
104} elseif ($module ==
'service') {
105 $permission = $user->hasRight(
"service",
"creer");
106} elseif ($module ==
'ecmfiles') {
107 $permission = $user->hasRight(
"ecm",
"setup");
108} elseif ($module ==
'user') {
109 $permission = $user->hasRight(
"user",
"self",
"write");
114 $typeofdatapub =
'ckeditor:dolibarr_notes:100%:200::1:12:95%:0';
116 $typeofdatapub =
'textarea:12:95%';
118if (isModEnabled(
'fckeditor') &&
getDolGlobalString(
'FCKEDITOR_ENABLE_NOTE_PRIVATE')) {
119 $typeofdatapriv =
'ckeditor:dolibarr_notes:100%:200::1:12:95%:0';
121 $typeofdatapriv =
'textarea:12:95%';
124print
'<!-- BEGIN PHP TEMPLATE NOTES -->'.
"\n";
125print
'<div class="tagtable border table-border tableforfield centpercent">'.
"\n";
126print
'<div class="tagtr table-border-row">'.
"\n";
127$editmode = (
GETPOST(
'action',
'aZ09') ==
'edit'.$note_public);
128print
'<div class="tagtd tagtdnote tdtop'.($editmode ?
'' :
' sensiblehtmlcontent').
' table-key-border-col'.(empty($cssclass) ?
'' :
' '.$cssclass).
'"'.($colwidth ?
' style="width: '.$colwidth.
'%"' :
'').
'>'.
"\n";
129print $form->editfieldkey((empty($textNotePub) ?
"NotePublic" : $textNotePub), $note_public, $value_public,
$object, $permission, $typeofdatapub, $moreparam,
'', 0);
131print
'<div class="tagtd wordbreak table-val-border-col'.($editmode ?
'' :
' sensiblehtmlcontent').
'">'.
"\n";
132print $form->editfieldval(
"NotePublic", $note_public, $value_public,
$object, $permission, $typeofdatapub,
'',
null,
null, $moreparam, 1).
"\n";
135if (empty($user->socid)) {
137 print
'<div class="tagtr table-border-row">'.
"\n";
138 $editmode = (
GETPOST(
'action',
'aZ09') ==
'edit'.$note_private);
139 print
'<div class="tagtd tagtdnote tdtop'.($editmode ?
'' :
' sensiblehtmlcontent').
' table-key-border-col'.(empty($cssclass) ?
'' :
' '.$cssclass).
'"'.($colwidth ?
' style="width: '.$colwidth.
'%"' :
'').
'>'.
"\n";
140 print $form->editfieldkey((empty($textNotePrive) ?
"NotePrivate" : $textNotePrive), $note_private, $value_private,
$object, $permission, $typeofdatapriv, $moreparam,
'', 0);
142 print
'<div class="tagtd wordbreak table-val-border-col'.($editmode ?
'' :
' sensiblehtmlcontent').
'">'.
"\n";
143 print $form->editfieldval(
"NotePrivate", $note_private, $value_private,
$object, $permission, $typeofdatapriv,
'',
null,
null, $moreparam, 1);
149<!-- END PHP TEMPLATE NOTES-->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
const TYPE_SERVICE
Service.
dol_now($mode='auto')
Return date for now.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_concatdesc($text1, $text2, $forxml=false, $invert=false)
Concat 2 descriptions with a new line between them (second operand after first one with appropriate n...
dol_textishtml($msg, $option=0)
Return if a text is a html content.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.