dolibarr 21.0.0-alpha
skilldet.fiche.tpl.php
1<?php
2/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
3 */
4
5// Protection to avoid direct call of template
6if (empty($object) || !is_object($object)) {
7 print "Error, template page can't be called as URL";
8 exit(1);
9}
10
11if (!empty($object->table_element_line)) {
12 // Show object lines
13 $result = $object->getLinesArray();
14}
15
16// Supposed provided before includion of the tpl
17'
18@phan-var-force string $note_public
19@phan-var-force string $note_private
20@phan-var-force int $colwidth
21@phan-var-force string $moreparam
22@phan-var-force bool $permission
23@phan-var-force string $typeofdata
24@phan-var-force string $value_public
25@phan-var-force string $value_private
26';
27
28
29print '<!-- BEGIN PHP TEMPLATE hrm/core/tpl/skilldet.fiche.tpl.php -->'."\n";
30
31print '<div class="tagtable border table-border tableforfield centpercent">'."\n";
32print '<div class="tagtr table-border-row">'."\n";
33$editmode = (GETPOST('action', 'aZ09') == 'edit'.$note_public);
34print '<div class="tagtd tagtdnote tdtop'.($editmode ? '' : ' sensiblehtmlcontent').' table-key-border-col'.(empty($cssclass) ? '' : ' '.$cssclass).'"'.($colwidth ? ' style="width: '.$colwidth.'%"' : '').'>'."\n";
35print $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam, 0, 0);
36print '</div>'."\n";
37print '<div class="tagtd wordbreak table-val-border-col'.($editmode ? '' : ' sensiblehtmlcontent').'">'."\n";
38print $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam, 1)."\n";
39print '</div>'."\n";
40print '</div>'."\n";
41if (empty($user->socid)) {
42 // Private notes (always hidden to external users)
43 print '<div class="tagtr table-border-row">'."\n";
44 $editmode = (GETPOST('action', 'aZ09') == 'edit'.$note_private);
45 print '<div class="tagtd tagtdnote tdtop'.($editmode ? '' : ' sensiblehtmlcontent').' table-key-border-col'.(empty($cssclass) ? '' : ' '.$cssclass).'"'.($colwidth ? ' style="width: '.$colwidth.'%"' : '').'>'."\n";
46 print $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam, 0, 0);
47 print '</div>'."\n";
48 print '<div class="tagtd wordbreak table-val-border-col'.($editmode ? '' : ' sensiblehtmlcontent').'">'."\n";
49 print $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam, 1);
50 print '</div>'."\n";
51 print '</div>'."\n";
52}
53print '</div>'."\n";
54?>
55<!-- END PHP TEMPLATE NOTES-->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.