37 print
"Error, template page can't be called as URL";
41@phan-var-force ?int<0,1> $permissionnote
42@phan-var-force string $moreparam
43@phan-var-force ?int $colwidth
49$note_public =
'note_public';
50$note_private =
'note_private';
52if ($module ==
"product") {
53 '@phan-var-force Product $object';
57$colwidth = (isset($colwidth) ? $colwidth : (empty($cssclass) ?
'25' :
''));
59$permission = (isset($permissionnote) ? $permissionnote : (isset($permission) ? $permission : ($user->hasRight($module,
'create') ? $user->rights->$module->create : ($user->hasRight($module,
'creer') ? $user->rights->$module->creer : 0))));
60$moreparam = (isset($moreparam) ? $moreparam :
'');
61$value_public =
$object->note_public;
62$value_private =
$object->note_private;
65 if (
GETPOST(
'action',
'aZ09') ==
'edit'.$note_public) {
66 $value_public =
dol_concatdesc($value_public, ($value_public ?
"\n" :
"").
"-- ".$stringtoadd);
68 $value_public .=
"<br>\n";
70 $value_public .=
"\n";
76 if (
GETPOST(
'action',
'aZ09') ==
'edit'.$note_private) {
77 $value_private =
dol_concatdesc($value_private, ($value_private ?
"\n" :
"").
"-- ".$stringtoadd);
79 $value_private .=
"<br>\n";
81 $value_private .=
"\n";
87if ($module ==
'propal') {
88 $permission = $user->hasRight(
"propal",
"creer");
89} elseif ($module ==
'supplier_proposal') {
90 $permission = $user->hasRight(
"supplier_proposal",
"creer");
91} elseif ($module ==
'fichinter') {
92 $permission = $user->hasRight(
"ficheinter",
"creer");
93} elseif ($module ==
'project') {
94 $permission = $user->hasRight(
"projet",
"creer");
95} elseif ($module ==
'project_task') {
96 $permission = $user->hasRight(
"projet",
"creer");
97} elseif ($module ==
'invoice_supplier') {
99 $permission = $user->hasRight(
"fournisseur",
"facture",
"creer");
101 $permission = $user->hasRight(
"supplier_invoice",
"creer");
103} elseif ($module ==
'order_supplier') {
105 $permission = $user->hasRight(
"fournisseur",
"commande",
"creer");
107 $permission = $user->hasRight(
"supplier_order",
"creer");
109} elseif ($module ==
'societe') {
110 $permission = $user->hasRight(
"societe",
"creer");
111} elseif ($module ==
'contact') {
112 $permission = $user->hasRight(
"societe",
"creer");
113} elseif ($module ==
'shipping') {
114 $permission = $user->hasRight(
"expedition",
"creer");
115} elseif ($module ==
'product') {
116 $permission = $user->hasRight(
"product",
"creer");
117} elseif ($module ==
'service') {
118 $permission = $user->hasRight(
"service",
"creer");
119} elseif ($module ==
'ecmfiles') {
120 $permission = $user->hasRight(
"ecm",
"setup");
121} elseif ($module ==
'user') {
122 $permission = $user->hasRight(
"user",
"self",
"write");
127 $typeofdatapub =
'ckeditor:dolibarr_notes:100%:200::1:12:95%:0';
129 $typeofdatapub =
'textarea:12:95%';
132 $typeofdatapriv =
'ckeditor:dolibarr_notes:100%:200::1:12:95%:0';
134 $typeofdatapriv =
'textarea:12:95%';
137print
'<!-- BEGIN PHP TEMPLATE NOTES -->'.
"\n";
138print
'<div class="tagtable border table-border tableforfield centpercent">'.
"\n";
139print
'<div class="tagtr table-border-row">'.
"\n";
140$editmode = (
GETPOST(
'action',
'aZ09') ==
'edit'.$note_public);
141print
'<div class="tagtd tagtdnote tdtop'.($editmode ?
'' :
' sensiblehtmlcontent').
' table-key-border-col'.(empty($cssclass) ?
'' :
' '.$cssclass).
'"'.($colwidth ?
' style="width: '.$colwidth.
'%"' :
'').
'>'.
"\n";
142print $form->editfieldkey((empty($textNotePub) ?
"NotePublic" : $textNotePub), $note_public, (string) $value_public,
$object, $permission, $typeofdatapub, $moreparam, 0, 0);
144print
'<div class="tagtd wordbreak table-val-border-col'.($editmode ?
'' :
' sensiblehtmlcontent').
'">'.
"\n";
145print $form->editfieldval(
"NotePublic", $note_public, (
string) $value_public,
$object, $permission, $typeofdatapub,
'',
null,
null, $moreparam, 1).
"\n";
148if (empty($user->socid)) {
150 print
'<div class="tagtr table-border-row">'.
"\n";
151 $editmode = (
GETPOST(
'action',
'aZ09') ==
'edit'.$note_private);
152 print
'<div class="tagtd tagtdnote tdtop'.($editmode ?
'' :
' sensiblehtmlcontent').
' table-key-border-col'.(empty($cssclass) ?
'' :
' '.$cssclass).
'"'.($colwidth ?
' style="width: '.$colwidth.
'%"' :
'').
'>'.
"\n";
153 print $form->editfieldkey((empty($textNotePrive) ?
"NotePrivate" : $textNotePrive), $note_private, (string) $value_private,
$object, $permission, $typeofdatapriv, $moreparam, 0, 0);
155 print
'<div class="tagtd wordbreak table-val-border-col'.($editmode ?
'' :
' sensiblehtmlcontent').
'">'.
"\n";
156 print $form->editfieldval(
"NotePrivate", $note_private, (
string) $value_private,
$object, $permission, $typeofdatapriv,
'',
null,
null, $moreparam, 1);
162<!-- END PHP TEMPLATE NOTES-->
if(! $sortfield) if(! $sortorder) $object
const TYPE_SERVICE
Service.
dol_now($mode='gmt')
Return date for now.
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.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.