Merge branch 'develop' of github.com:Dolibarr/dolibarr into fix_php8
This commit is contained in:
commit
52a4f4869d
@ -201,9 +201,9 @@ if ($object->id > 0) {
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateActionStart").'</td><td colspan="3">';
|
||||
if (!$object->fulldayevent) {
|
||||
print dol_print_date($object->datep, 'dayhour');
|
||||
print dol_print_date($object->datep, 'dayhour', 'tzuser');
|
||||
} else {
|
||||
print dol_print_date($object->datep, 'day');
|
||||
print dol_print_date($object->datep, 'day', 'tzuser');
|
||||
}
|
||||
if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) {
|
||||
print img_warning($langs->trans("Late"));
|
||||
@ -214,9 +214,9 @@ if ($object->id > 0) {
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="3">';
|
||||
if (!$object->fulldayevent) {
|
||||
print dol_print_date($object->datef, 'dayhour');
|
||||
print dol_print_date($object->datef, 'dayhour', 'tzuser');
|
||||
} else {
|
||||
print dol_print_date($object->datef, 'day');
|
||||
print dol_print_date($object->datef, 'day', 'tzuser');
|
||||
}
|
||||
if ($object->percentage > 0 && $object->percentage < 100 && $object->datef && $object->datef < ($now - $delay_warning)) {
|
||||
print img_warning($langs->trans("Late"));
|
||||
|
||||
@ -120,6 +120,8 @@ if (GETPOST("rel") == 'prev') {
|
||||
$found = true;
|
||||
}
|
||||
|
||||
$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -74,6 +74,8 @@ if ($id > 0 || !empty($ref)) {
|
||||
|
||||
$result = restrictedArea($user, 'banque', $object->id, 'bank_account', '', '');
|
||||
|
||||
$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -69,6 +69,9 @@ $object->fetch($id, $ref);
|
||||
$upload_dir = $conf->bank->dir_output.'/'.dol_sanitizeFileName($object->id);
|
||||
$modulepart = 'banque';
|
||||
|
||||
$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -42,12 +42,6 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'deplacement', $id, '');
|
||||
|
||||
|
||||
// Get parameters
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
@ -74,6 +68,14 @@ $object->fetch($id, $ref);
|
||||
$upload_dir = $conf->deplacement->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart = 'trip';
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'deplacement', $id, '');
|
||||
|
||||
$permissiontoadd = $user->rights->deplacement->creer; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -78,6 +78,8 @@ if ($user->socid) {
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges');
|
||||
|
||||
$permissiontoadd = $user->rights->tax->charges->creer; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -79,6 +79,8 @@ if ($user->socid) {
|
||||
}
|
||||
$result = restrictedArea($user, 'tax', '', 'tva', 'charges');
|
||||
|
||||
$permissiontoadd = $user->rights->tax->charges->creer; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -86,7 +88,7 @@ $result = restrictedArea($user, 'tax', '', 'tva', 'charges');
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||
|
||||
if ($action == 'setlib' && $user->rights->tax->charges->creer) {
|
||||
if ($action == 'setlib' && $permissiontoadd) {
|
||||
$object->fetch($id);
|
||||
$result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY');
|
||||
if ($result < 0) {
|
||||
|
||||
@ -49,12 +49,6 @@ if (!empty($canvas)) {
|
||||
$objcanvas->getCanvas('contact', 'contactcard', $canvas);
|
||||
}
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission
|
||||
|
||||
// Get parameters
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@ -91,6 +85,15 @@ $modulepart = 'contact';
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('contactdocument'));
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission
|
||||
|
||||
$permissiontoadd = $user->rights->societe->contact->creer; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
@ -84,6 +84,8 @@ $modulepart = 'contract';
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('contractcard', 'globalcard'));
|
||||
|
||||
$permissiontoadd = $user->rights->contrat->creer; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -36,8 +36,19 @@ if (GETPOST('uploadform', 'int') && empty($_POST) && empty($_FILES)) {
|
||||
die;
|
||||
}
|
||||
|
||||
if ((GETPOST('sendit', 'alpha')
|
||||
|| GETPOST('linkit', 'restricthtml')
|
||||
|| ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||
|| ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha'))
|
||||
|| ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha'))) && empty($permissiontoadd)) {
|
||||
dol_syslog('The file actions_linkedfiles.inc.php was included but paramater $permissiontoadd as not set before.');
|
||||
print 'The file actions_linkedfiles.inc.php was included but paramater $permissiontoadd as not set before.';
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
// Submit file/link
|
||||
if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && (!isset($permissiontoadd) || $permissiontoadd)) {
|
||||
if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && !empty($permissiontoadd)) {
|
||||
if (!empty($_FILES)) {
|
||||
if (is_array($_FILES['userfile']['tmp_name'])) {
|
||||
$userfiles = $_FILES['userfile']['tmp_name'];
|
||||
@ -75,7 +86,7 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && (!is
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif (GETPOST('linkit', 'restricthtml') && !empty($conf->global->MAIN_UPLOAD_DOC) && (!isset($permissiontoadd) || $permissiontoadd)) {
|
||||
} elseif (GETPOST('linkit', 'restricthtml') && !empty($conf->global->MAIN_UPLOAD_DOC) && !empty($permissiontoadd)) {
|
||||
$link = GETPOST('link', 'alpha');
|
||||
if ($link) {
|
||||
if (substr($link, 0, 7) != 'http://' && substr($link, 0, 8) != 'https://' && substr($link, 0, 7) != 'file://' && substr($link, 0, 7) != 'davs://') {
|
||||
@ -87,7 +98,7 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && (!is
|
||||
|
||||
|
||||
// Delete file/link
|
||||
if ($action == 'confirm_deletefile' && $confirm == 'yes' && (!isset($permissiontoadd) || $permissiontoadd)) {
|
||||
if ($action == 'confirm_deletefile' && $confirm == 'yes' && !empty($permissiontoadd)) {
|
||||
$urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||
if (GETPOST('section', 'alpha')) {
|
||||
// For a delete from the ECM module, upload_dir is ECM root dir and urlfile contains relative path from upload_dir
|
||||
@ -158,7 +169,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes' && (!isset($permissiont
|
||||
exit;
|
||||
}
|
||||
}
|
||||
} elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha') && (!isset($permissiontoadd) || $permissiontoadd)) {
|
||||
} elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha') && !empty($permissiontoadd)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
||||
$langs->load('link');
|
||||
$link = new Link($db);
|
||||
@ -176,7 +187,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes' && (!isset($permissiont
|
||||
} else {
|
||||
//error fetching
|
||||
}
|
||||
} elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha') && (!isset($permissiontoadd) || $permissiontoadd)) {
|
||||
} elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha') && !empty($permissiontoadd)) {
|
||||
// For documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile.
|
||||
if (!empty($upload_dir)) {
|
||||
$filenamefrom = dol_sanitizeFileName(GETPOST('renamefilefrom', 'alpha'), '_', 0); // Do not remove accents
|
||||
|
||||
@ -205,12 +205,14 @@ if ($type == 'directory') {
|
||||
'product',
|
||||
'tax',
|
||||
'project',
|
||||
'project_task',
|
||||
'fichinter',
|
||||
'user',
|
||||
'expensereport',
|
||||
'holiday',
|
||||
'recruitment-recruitmentcandidature',
|
||||
'banque',
|
||||
'chequereceipt',
|
||||
'mrp-mo'
|
||||
);
|
||||
|
||||
@ -243,6 +245,8 @@ if ($type == 'directory') {
|
||||
$upload_dir = $conf->tax->dir_output;
|
||||
} elseif ($module == 'project') {
|
||||
$upload_dir = $conf->projet->dir_output;
|
||||
} elseif ($module == 'project_task') {
|
||||
$upload_dir = $conf->projet->dir_output;
|
||||
} elseif ($module == 'fichinter') {
|
||||
$upload_dir = $conf->ficheinter->dir_output;
|
||||
} elseif ($module == 'user') {
|
||||
@ -255,8 +259,10 @@ if ($type == 'directory') {
|
||||
$upload_dir = $conf->recruitment->dir_output.'/recruitmentcandidature';
|
||||
} elseif ($module == 'banque') {
|
||||
$upload_dir = $conf->bank->dir_output;
|
||||
} elseif ($module == 'chequereceipt') {
|
||||
$upload_dir = $conf->bank->dir_output.'/checkdeposits';
|
||||
} elseif ($module == 'mrp-mo') {
|
||||
$upload_dir = $conf->mrp->dir_output.'/mo';
|
||||
$upload_dir = $conf->mrp->dir_output;
|
||||
} else {
|
||||
$parameters = array('modulepart'=>$module);
|
||||
$reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters);
|
||||
|
||||
126
htdocs/core/bookmarks_page.php
Normal file
126
htdocs/core/bookmarks_page.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This file is a modified version of datepicker.php from phpBSM to fix some
|
||||
* bugs, to add new features and to dramatically increase speed.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/bookmarks_page.php
|
||||
* \brief File to return a page with the complete list of bookmarks (all search input fields)
|
||||
*/
|
||||
|
||||
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
|
||||
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language
|
||||
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations
|
||||
if (!defined('NOCSRFCHECK')) {
|
||||
define('NOCSRFCHECK', 1);
|
||||
}
|
||||
if (!defined('NOTOKENRENEWAL')) {
|
||||
define('NOTOKENRENEWAL', 1);
|
||||
}
|
||||
//if (! defined('NOLOGIN')) define('NOLOGIN',1); // Not disabled cause need to load personalized language
|
||||
if (!defined('NOREQUIREMENU')) {
|
||||
define('NOREQUIREMENU', 1);
|
||||
}
|
||||
//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||
|
||||
require_once '../main.inc.php';
|
||||
|
||||
if (GETPOST('lang', 'aZ09')) {
|
||||
$langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||
}
|
||||
|
||||
$langs->load("main");
|
||||
|
||||
$right = ($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right');
|
||||
$left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left');
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$title = $langs->trans("Bookmarks");
|
||||
|
||||
// URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests
|
||||
$head = '<!-- Bookmarks access -->'."\n";
|
||||
$arrayofjs = array();
|
||||
$arrayofcss = array();
|
||||
top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
|
||||
|
||||
|
||||
|
||||
print '<body>'."\n";
|
||||
print '<div>';
|
||||
//print '<br>';
|
||||
|
||||
$nbofsearch = 0;
|
||||
|
||||
// Instantiate hooks of thirdparty module
|
||||
$hookmanager->initHooks(array('bookmarks'));
|
||||
|
||||
// Define $bookmarks
|
||||
$bookmarks = '';
|
||||
|
||||
|
||||
$arrayresult = array();
|
||||
//include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php';
|
||||
|
||||
$i = 0;
|
||||
$accesskeyalreadyassigned = array();
|
||||
foreach ($arrayresult as $key => $val) {
|
||||
$tmp = explode('?', $val['url']);
|
||||
$urlaction = $tmp[0];
|
||||
$keysearch = 'search_all';
|
||||
|
||||
$accesskey = '';
|
||||
if (!$accesskeyalreadyassigned[$val['label'][0]]) {
|
||||
$accesskey = $val['label'][0];
|
||||
$accesskeyalreadyassigned[$accesskey] = $accesskey;
|
||||
}
|
||||
|
||||
//$bookmarks .= printSearchForm($urlaction, $urlaction, $val['label'], 'minwidth200', $keysearch, $accesskey, $key, $val['img'], $showtitlebefore, ($i > 0 ? 0 : 1));
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
// Execute hook printSearchForm
|
||||
$parameters = array('bookmarks'=>$bookmarks);
|
||||
$reshook = $hookmanager->executeHooks('printBookmarks', $parameters); // Note that $action and $object may have been modified by some hooks
|
||||
if (empty($reshook)) {
|
||||
$bookmarks .= $hookmanager->resPrint;
|
||||
} else {
|
||||
$bookmarks = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
|
||||
print "\n";
|
||||
print "<!-- Begin Bookmarks list -->\n";
|
||||
print '<div class="center"><div class="center" style="padding: 6px;">';
|
||||
print '<style>.menu_titre { padding-top: 7px; }</style>';
|
||||
print '<div id="blockvmenusearch" class="tagtable center searchpage">'."\n";
|
||||
print $bookmarks;
|
||||
print '</div>'."\n";
|
||||
print '</div></div>';
|
||||
print "\n<!-- End SearchForm -->\n";
|
||||
|
||||
print '</div>';
|
||||
print '</body></html>'."\n";
|
||||
|
||||
$db->close();
|
||||
@ -1678,6 +1678,9 @@ class FormFile
|
||||
} elseif ($modulepart == 'project') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
$object_instance = new Project($this->db);
|
||||
} elseif ($modulepart == 'project_task') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
$object_instance = new Task($this->db);
|
||||
} elseif ($modulepart == 'fichinter') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||
$object_instance = new Fichinter($this->db);
|
||||
@ -1696,6 +1699,9 @@ class FormFile
|
||||
} elseif ($modulepart == 'banque') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
$object_instance = new Account($this->db);
|
||||
} elseif ($modulepart == 'chequereceipt') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||
$object_instance = new RemiseCheque($this->db);
|
||||
} elseif ($modulepart == 'mrp-mo') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
|
||||
$object_instance = new Mo($this->db);
|
||||
@ -1750,14 +1756,19 @@ class FormFile
|
||||
$id = (isset($reg[1]) ? $reg[1] : '');
|
||||
} elseif ($modulepart == 'invoice_supplier') {
|
||||
preg_match('/([^\/]+)\/[^\/]+$/', $relativefile, $reg);
|
||||
$ref = (isset($reg[1]) ? $reg[1] : ''); if (is_numeric($ref)) {
|
||||
$ref = (isset($reg[1]) ? $reg[1] : '');
|
||||
if (is_numeric($ref)) {
|
||||
$id = $ref;
|
||||
$ref = '';
|
||||
}
|
||||
} elseif ($modulepart == 'user' || $modulepart == 'holiday') {
|
||||
} elseif ($modulepart == 'user') {
|
||||
// $ref may be also id with old supplier invoices
|
||||
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg);
|
||||
$id = (isset($reg[1]) ? $reg[1] : '');
|
||||
} elseif ($modulepart == 'project_task') {
|
||||
// $ref of task is the sub-directory of the project
|
||||
$reg = explode("/", $relativefile);
|
||||
$ref = (isset($reg[1]) ? $reg[1] : '');
|
||||
} elseif (in_array($modulepart, array(
|
||||
'invoice',
|
||||
'propal',
|
||||
@ -1767,11 +1778,14 @@ class FormFile
|
||||
'contract',
|
||||
'product',
|
||||
'project',
|
||||
'project_task',
|
||||
'fichinter',
|
||||
'expensereport',
|
||||
'recruitment-recruitmentcandidature',
|
||||
'mrp-mo',
|
||||
'banque'))) {
|
||||
'banque',
|
||||
'chequereceipt',
|
||||
'holiday'))) {
|
||||
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg);
|
||||
$ref = (isset($reg[1]) ? $reg[1] : '');
|
||||
} else {
|
||||
|
||||
@ -258,12 +258,12 @@ print '
|
||||
window.getSelection().removeAllRanges();
|
||||
|
||||
/* Show message */
|
||||
var lastchild = this.parentNode.lastChild;
|
||||
var lastchild = this.parentNode.lastChild; /* .parentNode is clipboardCP and last child is clipboardCPText */
|
||||
var tmp = lastchild.innerHTML
|
||||
if (succeed) {
|
||||
lastchild.innerHTML = \''.dol_escape_js($langs->trans('CopiedToClipboard')).'\';
|
||||
lastchild.innerHTML = \'<div class="clipboardCPTextDivInside opacitymedium">'.dol_escape_js($langs->trans('CopiedToClipboard')).'</div>\';
|
||||
} else {
|
||||
lastchild.innerHTML = \''.dol_escape_js($langs->trans('Error')).'\';
|
||||
lastchild.innerHTML = \'<div class="clipboardCPTextDivInside opacitymedium">'.dol_escape_js($langs->trans('Error')).'</div>\';
|
||||
}
|
||||
setTimeout(() => { lastchild.innerHTML = tmp; }, 1000);
|
||||
});
|
||||
|
||||
@ -10522,9 +10522,9 @@ function showValueWithClipboardCPButton($valuetocopy, $showonlyonhover = 1, $tex
|
||||
|
||||
$tag = 'span'; // Using div does not work when using the js copy code.
|
||||
if ($texttoshow) {
|
||||
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><'.$tag.' class="clipboardCPValue hidewithsize">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'><span class="clipboardCPValueToPrint">'.dol_escape_htmltag($texttoshow, 1, 1).'</span><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText opacitymedium"></span></span>';
|
||||
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><'.$tag.' class="clipboardCPValue hidewithsize">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'><span class="clipboardCPValueToPrint">'.dol_escape_htmltag($texttoshow, 1, 1).'</span><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText"></span></span>';
|
||||
} else {
|
||||
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><'.$tag.' class="clipboardCPValue">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText opacitymedium"></span></span>';
|
||||
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><'.$tag.' class="clipboardCPValue">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText"></span></span>';
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
@ -364,7 +364,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
||||
// Check write permission from module (we need to know write permission to create but also to delete drafts record or to upload files)
|
||||
$createok = 1;
|
||||
$nbko = 0;
|
||||
$wemustcheckpermissionforcreate = (GETPOST('sendit', 'alpha') || GETPOST('linkit', 'alpha') || GETPOST('action', 'aZ09') == 'create' || GETPOST('action', 'aZ09') == 'update') || GETPOST('roworder', 'alpha', 2);
|
||||
$wemustcheckpermissionforcreate = (GETPOST('sendit', 'alpha') || GETPOST('linkit', 'alpha') || in_array(GETPOST('action', 'aZ09'), array('create', 'update', 'add_element_resource', 'confirm_delete_linked_resource')) || GETPOST('roworder', 'alpha', 2));
|
||||
$wemustcheckpermissionfordeletedraft = ((GETPOST("action", "aZ09") == 'confirm_delete' && GETPOST("confirm", "aZ09") == 'yes') || GETPOST("action", "aZ09") == 'delete');
|
||||
|
||||
if ($wemustcheckpermissionforcreate || $wemustcheckpermissionfordeletedraft) {
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* \defgroup propale Module commercial proposals
|
||||
* \brief Module pour gerer la tenue de propositions commerciales
|
||||
* \brief Module to manage commercial proposals
|
||||
* \file htdocs/core/modules/modPropale.class.php
|
||||
* \ingroup propale
|
||||
* \brief Description and activation file for the module customer proposal
|
||||
@ -36,7 +36,6 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
|
||||
*/
|
||||
class modPropale extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor. Define names, constants, directories, boxes, permissions
|
||||
*
|
||||
|
||||
@ -93,7 +93,10 @@ if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafiel
|
||||
// Key
|
||||
print "<td>".dol_escape_htmltag($key)."</td>\n";
|
||||
// Type
|
||||
print "<td>".dol_escape_htmltag($type2label[$extrafields->attributes[$elementtype]['type'][$key]])."</td>\n";
|
||||
$typetoshow = $type2label[$extrafields->attributes[$elementtype]['type'][$key]];
|
||||
print '<td title="'.dol_escape_htmltag($typetoshow).'" class="tdoverflowmax150">';
|
||||
print dol_escape_htmltag($typetoshow);
|
||||
print "</td>\n";
|
||||
// Size
|
||||
print '<td class="right">'.dol_escape_htmltag($extrafields->attributes[$elementtype]['size'][$key])."</td>\n";
|
||||
// Computed field
|
||||
|
||||
@ -19,13 +19,8 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
|
||||
|
||||
foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val) {
|
||||
if (!empty($arrayfields[$extrafieldsobjectprefix.$key]['checked'])) {
|
||||
$align = $extrafields->getAlignFlag($key, $extrafieldsobjectkey);
|
||||
print '<td';
|
||||
if ($align) {
|
||||
print ' class="'.$align.'"';
|
||||
}
|
||||
print ' data-key="'.$key.'"';
|
||||
print '>';
|
||||
$cssclass = $extrafields->getAlignFlag($key, $extrafieldsobjectkey);
|
||||
|
||||
$tmpkey = 'options_'.$key;
|
||||
|
||||
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && !is_numeric($obj->$tmpkey)) {
|
||||
@ -47,8 +42,16 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
|
||||
//var_dump($value);
|
||||
}
|
||||
|
||||
print $extrafields->showOutputField($key, $value, '', $extrafieldsobjectkey);
|
||||
$valuetoshow = $extrafields->showOutputField($key, $value, '', $extrafieldsobjectkey);
|
||||
$title = dol_string_nohtmltag($valuetoshow);
|
||||
|
||||
print '<td'.($cssclass ? ' class="'.$cssclass.'"' : ''); // TODO Add 'css' and 'cssview' and 'csslist' for extrafields and use here 'csslist'
|
||||
print ' data-key="'.$extrafieldsobjectkey.'.'.$key.'"';
|
||||
print ($title ? ' title="'.dol_escape_htmltag($title).'"' : '');
|
||||
print '>';
|
||||
print $valuetoshow;
|
||||
print '</td>';
|
||||
|
||||
if (!$i) {
|
||||
if (empty($totalarray)) {
|
||||
$totalarray['nbfield'] = 0;
|
||||
|
||||
@ -262,10 +262,10 @@ class Delivery extends CommonObject
|
||||
* @param string $qty Quantity
|
||||
* @param string $fk_product Id of predefined product
|
||||
* @param string $description Description
|
||||
* @param int $array_options Array options
|
||||
* @param array $array_options Array options
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function create_line($origin_id, $qty, $fk_product, $description, $array_options = 0)
|
||||
public function create_line($origin_id, $qty, $fk_product, $description, $array_options = null)
|
||||
{
|
||||
// phpcs:enable
|
||||
$error = 0;
|
||||
@ -601,12 +601,12 @@ class Delivery extends CommonObject
|
||||
/**
|
||||
* Add line
|
||||
*
|
||||
* @param int $origin_id Origin id
|
||||
* @param int $qty Qty
|
||||
* @param int $array_options Array options
|
||||
* @param int $origin_id Origin id
|
||||
* @param int $qty Qty
|
||||
* @param array $array_options Array options
|
||||
* @return void
|
||||
*/
|
||||
public function addline($origin_id, $qty, $array_options = 0)
|
||||
public function addline($origin_id, $qty, $array_options = null)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
@ -80,6 +80,8 @@ $object->fetch($id, $ref);
|
||||
$upload_dir = $conf->don->dir_output.'/'.get_exdir($filename, 0, 0, 0, $object, 'donation').'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart = 'don';
|
||||
|
||||
$permissiontoadd = $user->rights->don->creer; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -341,6 +341,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||
}
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Projects")));
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'project_task', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Tasks"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Tasks")));
|
||||
}
|
||||
if (!empty($conf->ficheinter->enabled)) {
|
||||
$langs->load("interventions"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions")));
|
||||
@ -353,6 +354,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||
}
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
$langs->load("banks"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'banque', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount")));
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'chequereceipt', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("CheckReceipt"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("CheckReceipt")));
|
||||
}
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
$langs->load("mrp"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'mrp-mo', 'test'=>$conf->mrp->enabled, 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders")));
|
||||
|
||||
@ -122,7 +122,7 @@ if ($user->socid) {
|
||||
$result = restrictedArea($user, 'expedition', $object->id, '');
|
||||
|
||||
$permissiondellink = $user->rights->expedition->delivery->creer; // Used by the include of actions_dellink.inc.php
|
||||
//var_dump($object->lines[0]->detail_batch);
|
||||
$permissiontoadd = $user->rights->expedition->creer;
|
||||
|
||||
|
||||
/*
|
||||
@ -152,7 +152,6 @@ if (empty($reshook)) {
|
||||
|
||||
// Actions to build doc
|
||||
$upload_dir = $conf->expedition->dir_output.'/sending';
|
||||
$permissiontoadd = $user->rights->expedition->creer;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
|
||||
// Reopen
|
||||
|
||||
@ -443,7 +443,7 @@ class Expedition extends CommonObject
|
||||
* @param array $array_options extrafields array
|
||||
* @return int <0 if KO, line_id if OK
|
||||
*/
|
||||
public function create_line($entrepot_id, $origin_line_id, $qty, $rang = 0, $array_options = 0)
|
||||
public function create_line($entrepot_id, $origin_line_id, $qty, $rang = 0, $array_options = null)
|
||||
{
|
||||
//phpcs:enable
|
||||
global $user;
|
||||
|
||||
@ -76,6 +76,8 @@ if ($user->socid) {
|
||||
}
|
||||
$result = restrictedArea($user, 'expedition', $object->id, '');
|
||||
|
||||
$permissiontoadd = $user->rights->expedition->creer; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -139,6 +139,8 @@ if ($user->socid) {
|
||||
}
|
||||
$result = restrictedArea($user, 'expensereport', $object->id, 'expensereport');
|
||||
|
||||
$permissiontoadd = $user->rights->expensereport->creer; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -1339,7 +1341,6 @@ if (empty($reshook)) {
|
||||
|
||||
// Actions to build doc
|
||||
$upload_dir = $conf->expensereport->dir_output;
|
||||
$permissiontoadd = $user->rights->expensereport->creer;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
}
|
||||
|
||||
|
||||
@ -44,13 +44,6 @@ $confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
$childids = $user->getAllChildIds(1);
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'expensereport', $id, 'expensereport');
|
||||
|
||||
|
||||
// Get parameters
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
@ -81,6 +74,12 @@ $modulepart = 'trip';
|
||||
// Load object
|
||||
//include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'expensereport', $id, 'expensereport');
|
||||
|
||||
if ($object->id > 0) {
|
||||
// Check current user can read this expense report
|
||||
$canread = 0;
|
||||
@ -95,6 +94,8 @@ if ($object->id > 0) {
|
||||
}
|
||||
}
|
||||
|
||||
$permissiontoadd = $user->rights->expensereport->creer; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -66,17 +66,13 @@ $originid = (GETPOST('originid', 'int') ?GETPOST('originid', 'int') : GETPOST('o
|
||||
$note_public = GETPOST('note_public', 'restricthtml');
|
||||
$lineid = GETPOST('line_id', 'int');
|
||||
|
||||
$error = 0;
|
||||
|
||||
//PDF
|
||||
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
|
||||
$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0));
|
||||
$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0));
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('interventioncard', 'globalcard'));
|
||||
|
||||
@ -96,11 +92,15 @@ if ($id > 0 || !empty($ref)) {
|
||||
}
|
||||
}
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
||||
|
||||
$permissionnote = $user->rights->ficheinter->creer; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->rights->ficheinter->creer; // Used by the include of actions_dellink.inc.php
|
||||
|
||||
$error = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -78,6 +78,8 @@ $object->fetch($id, $ref);
|
||||
$upload_dir = $conf->ficheinter->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart = 'fichinter';
|
||||
|
||||
$permissiontoadd = $user->rights->ficheinter->creer; // Used by the include of actions_setnotes.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -46,12 +46,6 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande');
|
||||
|
||||
// Get parameters
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@ -81,6 +75,15 @@ if ($object->fetch($id, $ref) < 0) {
|
||||
$upload_dir = $conf->fournisseur->commande->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
// Security check
|
||||
$socid = 0;
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande');
|
||||
|
||||
$permissiontoadd = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); // Used by the include of actions_setnotes.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -77,6 +77,8 @@ if ($object->fetch($id, $ref)) {
|
||||
$upload_dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').$ref;
|
||||
}
|
||||
|
||||
$permissiontoadd = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); // Used by the include of actions_setnotes.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -79,6 +79,9 @@ if ($object->fetch($id, $ref)) {
|
||||
$upload_dir = $conf->fournisseur->payment->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
}
|
||||
|
||||
$permissiontoadd = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); // Used by the include of actions_setnotes.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
@ -120,6 +120,7 @@ if ($user->socid) {
|
||||
}
|
||||
$result = restrictedArea($user, 'holiday', $object->id, 'holiday');
|
||||
|
||||
$permissiontoadd = $user->rights->holiday->write; // Used by the include of actions_setnotes.inc.php
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -16,4 +16,4 @@
|
||||
-- ========================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code_entity (code, entity);
|
||||
ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code_entity (entity, code);
|
||||
|
||||
@ -570,19 +570,27 @@ dolibarr_install_syslog("Exit ".$ret);
|
||||
|
||||
dolibarr_install_syslog("- step2: end");
|
||||
|
||||
// Force here a value we need after because master.inc.php is not loaded into step2.
|
||||
// This code must be similar with the one into main.inc.php
|
||||
$conf->file->instance_unique_id = (empty($dolibarr_main_instance_unique_id) ? (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id); // Unique id of instance
|
||||
|
||||
$out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno" value="checked" checked="true"> ';
|
||||
$hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id);
|
||||
|
||||
$out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno"'.((!empty($conf->global->MAIN_FIRST_PING_OK_ID) && $conf->global->MAIN_FIRST_PING_OK_ID == 'disabled') ? '' : ' value="checked" checked="true"').'> ';
|
||||
$out .= '<label for="dolibarrpingno">'.$langs->trans("MakeAnonymousPing").'</label>';
|
||||
|
||||
$out .= '<!-- Add js script to manage the uncheck of option to not send the ping -->';
|
||||
$out .= '<script type="text/javascript">';
|
||||
$out .= 'jQuery(document).ready(function(){';
|
||||
$out .= ' document.cookie = "DOLINSTALLNOPING_'.md5($dolibarr_main_instance_unique_id).'=0; path=/"'."\n";
|
||||
$out .= ' document.cookie = "DOLINSTALLNOPING_'.$hash_unique_id.'=0; path=/"'."\n";
|
||||
$out .= ' jQuery("#dolibarrpingno").click(function() {';
|
||||
$out .= ' if (! $(this).is(\':checked\')) {';
|
||||
$out .= ' console.log("We uncheck anonymous ping");';
|
||||
$out .= ' document.cookie = "DOLINSTALLNOPING_'.md5($dolibarr_main_instance_unique_id).'=1; path=/"'."\n";
|
||||
$out .= ' }';
|
||||
$out .= ' document.cookie = "DOLINSTALLNOPING_'.$hash_unique_id.'=1; path=/"'."\n";
|
||||
$out .= ' } else {'."\n";
|
||||
$out .= ' console.log("We check anonymous ping");';
|
||||
$out .= ' document.cookie = "DOLINSTALLNOPING_'.$hash_unique_id.'=0; path=/"'."\n";
|
||||
$out .= ' }'."\n";
|
||||
$out .= ' });';
|
||||
$out .= '});';
|
||||
$out .= '</script>';
|
||||
|
||||
@ -80,7 +80,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
//if ($user->socid > 0) $socid = $user->socid;
|
||||
//$result = restrictedArea($user, 'knowledgemanagement', $object->id);
|
||||
|
||||
$permissiontoadd = $user->rights->knowledgemanagement->knowledgerecord->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
$permissiontoadd = $user->rights->knowledgemanagement->knowledgerecord->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||
|
||||
|
||||
|
||||
|
||||
@ -71,6 +71,8 @@ if ($id > 0) {
|
||||
$upload_dir = $conf->loan->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart = 'loan';
|
||||
|
||||
$permissiontoadd = $user->rights->loan->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -1795,7 +1795,6 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
|
||||
global $hookmanager, $menumanager;
|
||||
|
||||
$searchform = '';
|
||||
$bookmarks = '';
|
||||
|
||||
// Instantiate hooks for external modules
|
||||
$hookmanager->initHooks(array('toprightmenu'));
|
||||
@ -1825,7 +1824,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
|
||||
// Show menu entries
|
||||
print '<div id="tmenu_tooltip'.(empty($conf->global->MAIN_MENU_INVERT) ? '' : 'invert').'" class="tmenu">'."\n";
|
||||
$menumanager->atarget = $target;
|
||||
$menumanager->showmenu('top', array('searchform'=>$searchform, 'bookmarks'=>$bookmarks)); // This contains a \n
|
||||
$menumanager->showmenu('top', array('searchform'=>$searchform)); // This contains a \n
|
||||
print "</div>\n";
|
||||
|
||||
// Define link to login card
|
||||
@ -1890,7 +1889,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
|
||||
}
|
||||
|
||||
// Link to print main content area
|
||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $conf->browser->layout != 'phone') {
|
||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$qs = dol_escape_htmltag($_SERVER["QUERY_STRING"]);
|
||||
|
||||
if (isset($_POST) && is_array($_POST)) {
|
||||
@ -2712,7 +2711,6 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
|
||||
global $hookmanager, $menumanager;
|
||||
|
||||
$searchform = '';
|
||||
$bookmarks = '';
|
||||
|
||||
if (!empty($menu_array_before)) {
|
||||
dol_syslog("Deprecated parameter menu_array_before was used when calling main::left_menu function. Menu entries of module should now be defined into module descriptor and not provided when calling left_menu.", LOG_WARNING);
|
||||
@ -2783,7 +2781,7 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
|
||||
// Show left menu with other forms
|
||||
$menumanager->menu_array = $menu_array_before;
|
||||
$menumanager->menu_array_after = $menu_array_after;
|
||||
$menumanager->showmenu('left', array('searchform'=>$searchform, 'bookmarks'=>$bookmarks)); // output menu_array and menu found in database
|
||||
$menumanager->showmenu('left', array('searchform'=>$searchform)); // output menu_array and menu found in database
|
||||
|
||||
// Dolibarr version + help + bug report link
|
||||
print "\n";
|
||||
@ -3225,6 +3223,7 @@ if (!function_exists("llxFooter")) {
|
||||
if (($_SERVER["PHP_SELF"] == DOL_URL_ROOT.'/index.php') || $forceping) {
|
||||
//print '<!-- instance_unique_id='.$conf->file->instance_unique_id.' MAIN_FIRST_PING_OK_ID='.$conf->global->MAIN_FIRST_PING_OK_ID.' -->';
|
||||
$hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id);
|
||||
|
||||
if (empty($conf->global->MAIN_FIRST_PING_OK_DATE)
|
||||
|| (!empty($conf->file->instance_unique_id) && ($hash_unique_id != $conf->global->MAIN_FIRST_PING_OK_ID) && ($conf->global->MAIN_FIRST_PING_OK_ID != 'disabled'))
|
||||
|| $forceping) {
|
||||
@ -3233,7 +3232,7 @@ if (!function_exists("llxFooter")) {
|
||||
print "\n<!-- NO JS CODE TO ENABLE the anonymous Ping. It is an alpha version -->\n";
|
||||
} elseif (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]) || $forceping) { // Cookie is set when we uncheck the checkbox in the installation wizard.
|
||||
// MAIN_LAST_PING_KO_DATE
|
||||
// Disable ping if MAIN_LAST_PING_KO_DATE is set and is recent
|
||||
// Disable ping if MAIN_LAST_PING_KO_DATE is set and is recent (this month)
|
||||
if (!empty($conf->global->MAIN_LAST_PING_KO_DATE) && substr($conf->global->MAIN_LAST_PING_KO_DATE, 0, 6) == dol_print_date(dol_now(), '%Y%m') && !$forceping) {
|
||||
print "\n<!-- NO JS CODE TO ENABLE the anonymous Ping. An error already occured this month, we will try later. -->\n";
|
||||
} else {
|
||||
|
||||
@ -83,12 +83,14 @@ if ($id > 0 || !empty($ref)) {
|
||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
$result = restrictedArea($user, 'mrp', $object->id, 'mrp_mo', '', 'fk_soc', 'rowid', $isdraft);
|
||||
|
||||
$permissiontoadd = $user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -643,13 +643,12 @@ class MultiCurrency extends CommonObject
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||
|
||||
$urlendpoint = 'http://apilayer.net/api/live?access_key='.$key;
|
||||
//$urlendpoint.='&format=1';
|
||||
$urlendpoint .= (empty($conf->global->MULTICURRENCY_APP_SOURCE) ? '' : '&source='.$conf->global->MULTICURRENCY_APP_SOURCE);
|
||||
$urlendpoint = 'http://api.currencylayer.com/live?access_key='.$key;
|
||||
$urlendpoint .= '&source=' . (empty($conf->global->MULTICURRENCY_APP_SOURCE) ? 'USD' : $conf->global->MULTICURRENCY_APP_SOURCE);
|
||||
|
||||
dol_syslog("Call url endpoint ".$urlendpoint);
|
||||
|
||||
$resget = getURLContent($urlendpoint, 'GET', '', 1, array(), array('http', 'https'), 1);
|
||||
$resget = getURLContent($urlendpoint);
|
||||
|
||||
if ($resget['content']) {
|
||||
$response = $resget['content'];
|
||||
|
||||
@ -179,6 +179,9 @@ if ($object->id > 0) {
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('productcard', 'globalcard'));
|
||||
|
||||
$usercanread = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->lire) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->lire));
|
||||
$usercancreate = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer));
|
||||
$usercandelete = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->supprimer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->supprimer));
|
||||
|
||||
|
||||
/*
|
||||
@ -189,9 +192,6 @@ if ($cancel) {
|
||||
$action = '';
|
||||
}
|
||||
|
||||
$usercanread = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->lire) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->lire));
|
||||
$usercancreate = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer));
|
||||
$usercandelete = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->supprimer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->supprimer));
|
||||
$createbarcode = empty($conf->barcode->enabled) ? 0 : 1;
|
||||
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->creer_advance)) {
|
||||
$createbarcode = 0;
|
||||
|
||||
@ -96,8 +96,6 @@ if ($id > 0 || !empty($ref)) {
|
||||
$modulepart = 'produit';
|
||||
|
||||
|
||||
$permissiontoadd = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer));
|
||||
|
||||
if ($object->id > 0) {
|
||||
if ($object->type == $object::TYPE_PRODUCT) {
|
||||
restrictedArea($user, 'produit', $object->id, 'product&product', '', '');
|
||||
@ -109,6 +107,8 @@ if ($object->id > 0) {
|
||||
restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype);
|
||||
}
|
||||
|
||||
$permissiontoadd = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer));
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -87,6 +87,10 @@ if ($id > 0 || !empty($ref)) {
|
||||
}
|
||||
}
|
||||
|
||||
$usercanread = (($user->rights->stock->lire));
|
||||
$usercancreate = (($user->rights->stock->creer));
|
||||
$usercandelete = (($user->rights->stock->supprimer));
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -94,10 +98,6 @@ if ($id > 0 || !empty($ref)) {
|
||||
|
||||
$error = 0;
|
||||
|
||||
$usercanread = (($user->rights->stock->lire));
|
||||
$usercancreate = (($user->rights->stock->creer));
|
||||
$usercandelete = (($user->rights->stock->supprimer));
|
||||
|
||||
$parameters = array('id'=>$id, 'ref'=>$ref);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
|
||||
@ -443,6 +443,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') {
|
||||
*/
|
||||
|
||||
$now = dol_now();
|
||||
$error = 0;
|
||||
|
||||
$form = new Form($db);
|
||||
$formproduct = new FormProduct($db);
|
||||
|
||||
@ -100,6 +100,7 @@ if (empty($upload_dir)) {
|
||||
|
||||
$permissiontoread = $usercanread;
|
||||
$permissiontoadd = $usercancreate;
|
||||
$permtoedit = $user->rights->produit->creer;
|
||||
//$permissiontodelete = $usercandelete;
|
||||
|
||||
// Security check
|
||||
@ -130,8 +131,6 @@ if (empty($reshook)) {
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||
}
|
||||
|
||||
$permtoedit = $user->rights->produit->creer;
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
|
||||
@ -82,6 +82,7 @@ $socid = 0;
|
||||
//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement.
|
||||
$result = restrictedArea($user, 'projet', $id, 'projet&project');
|
||||
|
||||
$permissiontoadd = $user->rights->projet->creer;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -74,6 +74,7 @@ $socid = 0;
|
||||
|
||||
restrictedArea($user, 'projet', $object->fk_project, 'projet&project');
|
||||
|
||||
$permissiontoadd = $$user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -71,14 +71,18 @@ if (!$sortorder) {
|
||||
$sortorder = 'DESC,DESC';
|
||||
}
|
||||
|
||||
$object = new DolResource($db);
|
||||
$object->fetch($id, $ref);
|
||||
|
||||
// Initialize technical objects
|
||||
//$object=new MyObject($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$hookmanager->initHooks(array('agendaresource'));
|
||||
|
||||
$object = new DolResource($db);
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
$result = restrictedArea($user, 'resource', $object->id, 'resource');
|
||||
|
||||
// Security check
|
||||
if (!$user->rights->resource->read) {
|
||||
accessforbidden();
|
||||
|
||||
@ -48,10 +48,6 @@ if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
if (!$user->rights->resource->read) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$object = new Dolresource($db);
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
@ -59,6 +55,14 @@ $extrafields = new ExtraFields($db);
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
|
||||
$result = restrictedArea($user, 'resource', $object->id, 'resource');
|
||||
|
||||
$permissiontoadd = $user->rights->resource->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -38,14 +38,21 @@ $id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
$object = new DolResource($db);
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$result = restrictedArea($user, 'resource', $id, 'resource');
|
||||
$result = restrictedArea($user, 'resource', $object->id, 'resource');
|
||||
|
||||
$object = new DolResource($db);
|
||||
$result = $object->fetch($id, $ref);
|
||||
// Security check
|
||||
if (!$user->rights->resource->read) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -70,11 +70,17 @@ if (!$sortfield) {
|
||||
|
||||
|
||||
$object = new DolResource($db);
|
||||
$object->fetch($id, $ref);
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
$upload_dir = $conf->resource->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart = 'resource';
|
||||
|
||||
$result = restrictedArea($user, 'resource', $object->id, 'resource');
|
||||
|
||||
$permissiontoadd = $user->rights->resource->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -76,6 +76,19 @@ if ($socid > 0) { // Special for thirdparty
|
||||
$element = 'societe';
|
||||
}
|
||||
|
||||
// Permission is not permission on resources. We just make link here on objects.
|
||||
if ($element == 'action') {
|
||||
$result = restrictedArea($user, 'agenda', $element_id, 'actioncomm&societe', 'myactions|allactions', 'fk_soc', 'id');
|
||||
}
|
||||
if ($element == 'fichinter') {
|
||||
$result = restrictedArea($user, 'ficheinter', $element_id, 'fichinter');
|
||||
}
|
||||
if ($element == 'product' || $element == 'service') { // When RESOURCE_ON_PRODUCTS or RESOURCE_ON_SERVICES is set
|
||||
$tmpobject = new Product($db);
|
||||
$tmpobject->fetch($element_id);
|
||||
$fieldtype = $tmpobject->type;
|
||||
$result = restrictedArea($user, 'produit|service', $element_id, 'product&product', '', '', $fieldtype);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@ -370,9 +383,9 @@ if (!$ret) {
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateActionStart").'</td><td colspan="3">';
|
||||
if (!$act->fulldayevent) {
|
||||
print dol_print_date($act->datep, 'dayhour');
|
||||
print dol_print_date($act->datep, 'dayhour', 'tzuser');
|
||||
} else {
|
||||
print dol_print_date($act->datep, 'day');
|
||||
print dol_print_date($act->datep, 'day', 'tzuser');
|
||||
}
|
||||
if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) {
|
||||
print img_warning($langs->trans("Late"));
|
||||
@ -383,9 +396,9 @@ if (!$ret) {
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="3">';
|
||||
if (!$act->fulldayevent) {
|
||||
print dol_print_date($act->datef, 'dayhour');
|
||||
print dol_print_date($act->datef, 'dayhour', 'tzuser');
|
||||
} else {
|
||||
print dol_print_date($act->datef, 'day');
|
||||
print dol_print_date($act->datef, 'day', 'tzuser');
|
||||
}
|
||||
if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now - $delay_warning)) {
|
||||
print img_warning($langs->trans("Late"));
|
||||
|
||||
@ -66,10 +66,10 @@ $filter = array();
|
||||
|
||||
$param = '';
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
$param .= '&contextpage='.urlencode($contextpage);
|
||||
$param .= '&contextpage='.urlencode($contextpage);
|
||||
}
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
$param .= '&limit='.urlencode($limit);
|
||||
$param .= '&limit='.urlencode($limit);
|
||||
}
|
||||
|
||||
if ($search_ref != '') {
|
||||
@ -126,9 +126,6 @@ $offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
if (!$user->rights->resource->read) {
|
||||
accessforbidden();
|
||||
}
|
||||
$arrayfields = array(
|
||||
't.ref' => array(
|
||||
'label' => $langs->trans("Ref"),
|
||||
@ -156,6 +153,10 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$filter = array();
|
||||
}
|
||||
|
||||
if (empty($user->rights->resource->read)) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Action
|
||||
|
||||
@ -43,10 +43,12 @@ if ($user->socid) {
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('resourcenote'));
|
||||
|
||||
$result = restrictedArea($user, 'resource', $id, 'resource');
|
||||
|
||||
$object = new DolResource($db);
|
||||
$object->fetch($id, $ref);
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
$result = restrictedArea($user, 'resource', $object->id, 'resource');
|
||||
|
||||
$permissionnote = $user->rights->resource->write; // Used by the include of actions_setnotes.inc.php
|
||||
|
||||
|
||||
@ -104,6 +104,8 @@ if ($user->socid) {
|
||||
}
|
||||
restrictedArea($user, 'salaries', $object->id, 'salary', '');
|
||||
|
||||
$permissiontoadd = $user->rights->salaries->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -85,6 +85,8 @@ if ($user->socid > 0) {
|
||||
}
|
||||
$result = restrictedArea($user, 'societe', $object->id, '&societe');
|
||||
|
||||
$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@ -1094,7 +1094,7 @@ if (!empty($arrayfields['country.code_iso']['checked'])) {
|
||||
if (!empty($arrayfields['typent.code']['checked'])) {
|
||||
print '<td class="liste_titre maxwidthonsmartphone center">';
|
||||
// We use showempty=0 here because there is already an unknown value into dictionary.
|
||||
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'minwidth50 maxwidth100', 1);
|
||||
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'minwidth50 maxwidth125', 1);
|
||||
print '</td>';
|
||||
}
|
||||
// Multiprice level
|
||||
@ -1508,11 +1508,13 @@ while ($i < min($num, $limit)) {
|
||||
}
|
||||
// Type ent
|
||||
if (!empty($arrayfields['typent.code']['checked'])) {
|
||||
print '<td class="center">';
|
||||
if (!isset($typenArray) || !is_array($typenArray) || count($typenArray) == 0) {
|
||||
$typenArray = $formcompany->typent_array(1);
|
||||
}
|
||||
print empty($typenArray[$obj->typent_code]) ? '' : $typenArray[$obj->typent_code];
|
||||
$labeltypeofcompany= empty($typenArray[$obj->typent_code]) ? '' : $typenArray[$obj->typent_code];
|
||||
|
||||
print '<td class="center tdoverflowmax125" title="'.dol_escape_htmltag($labeltypeofcompany).'">';
|
||||
print dol_escape_htmltag($labeltypeofcompany);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
|
||||
@ -73,6 +73,15 @@ $object->fetch($id, $ref);
|
||||
if ($object->id > 0) {
|
||||
$object->fetch_thirdparty();
|
||||
$upload_dir = $conf->supplier_proposal->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($object->id > 0) {
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||
}
|
||||
|
||||
@ -80,6 +89,7 @@ if ($object->id > 0) {
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$title = $langs->trans('CommRequest')." - ".$langs->trans('Documents');
|
||||
$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
@ -6870,6 +6870,29 @@ div.clipboardCPValue.hidewithsize {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* To make a div popup, we must use a position aboluste inside a position relative */
|
||||
.clipboardCPText {
|
||||
position: relative;
|
||||
}
|
||||
.clipboardCPTextDivInside {
|
||||
position: absolute;
|
||||
background: #f8f8fa;
|
||||
color: #888;
|
||||
border: 1px solid #E0E0E0;
|
||||
opacity: 1;
|
||||
z-index: 20;
|
||||
padding: 2px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
top: -5px;
|
||||
left: 0px;
|
||||
border-radius: 5px;
|
||||
white-space: nowrap;
|
||||
font-size: 0.9em;
|
||||
box-shadow: 1px 1px 6px #ddd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* CSS style used for small screen */
|
||||
@ -7027,7 +7050,7 @@ div.clipboardCPValue.hidewithsize {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
padding-bottom: 16px;
|
||||
top: inherit !important;
|
||||
top: auto;
|
||||
left: 0 !important;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
|
||||
@ -1869,11 +1869,6 @@ body.sidebar-collapse .side-nav, body.sidebar-collapse .login_block
|
||||
.side-nav-vert {
|
||||
margin-left: 0;
|
||||
}
|
||||
div.login_block {
|
||||
/* border-right: none ! important; */
|
||||
top: inherit !important;
|
||||
border-right: 1px solid rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.side-nav {
|
||||
<?php
|
||||
@ -1899,10 +1894,6 @@ div.backgroundsemitransparent {
|
||||
|
||||
/* Login */
|
||||
|
||||
div.login_block {
|
||||
/* position: initial !important;*/
|
||||
/*display: none;*/
|
||||
}
|
||||
.login_block_getinfo {
|
||||
text-align: center;
|
||||
}
|
||||
@ -2722,11 +2713,10 @@ table.login_table_securitycode tr td {
|
||||
}
|
||||
|
||||
div.login_block {
|
||||
/* border-right: 1px solid rgba(0,0,0,0.3); */
|
||||
top: 0;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
<?php print $left; ?>: 0;
|
||||
top: 0px;
|
||||
<?php if (in_array($conf->browser->layout, array('phone', 'tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?>
|
||||
position: absolute;
|
||||
<?php } else { ?>
|
||||
@ -6708,6 +6698,30 @@ div.clipboardCPValue.hidewithsize {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* To make a div popup, we must use a position aboluste inside a position relative */
|
||||
|
||||
.clipboardCPText {
|
||||
position: relative;
|
||||
}
|
||||
.clipboardCPTextDivInside {
|
||||
position: absolute;
|
||||
background: #EEE;
|
||||
color: 888;
|
||||
border: 1px solid #DDD;
|
||||
opacity: 1;
|
||||
z-index: 20;
|
||||
padding: 2px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
top: -5px;
|
||||
left: 0px;
|
||||
border-radius: 5px;
|
||||
white-space: nowrap;
|
||||
font-size: 0.95em;
|
||||
box-shadow: 1px 1px 6px #ddd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* CSS style used for small screen */
|
||||
@ -6810,6 +6824,11 @@ div.clipboardCPValue.hidewithsize {
|
||||
/* rule to reduce top menu - 3rd reduction */
|
||||
@media only screen and (max-width: 570px)
|
||||
{
|
||||
div.login_block {
|
||||
border-right: 1px solid rgba(0,0,0,0.3);
|
||||
top: auto;
|
||||
}
|
||||
|
||||
div#tmenu_tooltip {
|
||||
<?php if (GETPOST('optioncss', 'aZ09') == 'print') { ?>
|
||||
display:none;
|
||||
@ -6821,6 +6840,10 @@ div.clipboardCPValue.hidewithsize {
|
||||
min-width: 30px;
|
||||
}
|
||||
|
||||
div.login_block {
|
||||
border-right: 1px solid rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
div.tmenucenter {
|
||||
text-overflow: clip;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ if ($result < 0) {
|
||||
$upload_dir = $conf->ticket->dir_output."/".dol_sanitizeFileName($object->ref);
|
||||
}
|
||||
|
||||
$permissiontoadd = $user->rights->ticket->write;
|
||||
$permissiontoadd = $user->rights->ticket->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
|
||||
|
||||
// Security check - Protection if external user
|
||||
$result = restrictedArea($user, 'ticket', $object->id);
|
||||
|
||||
@ -60,7 +60,7 @@ if ($id) {
|
||||
|| (($user->id != $id) && $user->rights->user->user->password));
|
||||
}
|
||||
|
||||
$permissiontoadd = $caneditfield;
|
||||
$permissiontoadd = $caneditfield; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
|
||||
$permtoedit = $caneditfield;
|
||||
|
||||
// Security check
|
||||
@ -107,6 +107,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$hookmanager->initHooks(array('usercard', 'userdoc', 'globalcard'));
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
@ -139,8 +140,6 @@ if ($object->id) {
|
||||
}
|
||||
$head = user_prepare_head($object);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
print dol_get_fiche_head($head, 'document', $langs->trans("User"), -1, 'user');
|
||||
|
||||
$linkback = '';
|
||||
|
||||
@ -339,6 +339,7 @@ if ($action == 'replacesiteconfirm') {
|
||||
}
|
||||
|
||||
$usercanedit = $user->rights->website->write;
|
||||
$permissiontoadd = $user->rights->website->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
|
||||
$permissiontodelete = $user->rights->website->delete;
|
||||
|
||||
|
||||
|
||||
@ -74,12 +74,12 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->workstation->multidir_output[$object->entity ? $object->entity : $conf->entity]."/workstation/".get_exdir(0, 0, 0, 1, $object);
|
||||
}
|
||||
|
||||
$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check
|
||||
$isdraft = 0;
|
||||
restrictedArea($user, $object->element, $object->id, $object->table_element, 'workstation', 'fk_soc', 'rowid', $isdraft);
|
||||
|
||||
$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
Loading…
Reference in New Issue
Block a user