Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
4b062847ff
@ -43,10 +43,6 @@ $rowid = GETPOST('rowid', 'alpha');
|
|||||||
|
|
||||||
$id = 1;
|
$id = 1;
|
||||||
|
|
||||||
if (!$user->admin) {
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
$acts[0] = "activate";
|
$acts[0] = "activate";
|
||||||
$acts[1] = "disable";
|
$acts[1] = "disable";
|
||||||
$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off', 'class="size15x"');
|
$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off', 'class="size15x"');
|
||||||
@ -125,6 +121,10 @@ $tabfieldcheck[1] = array();
|
|||||||
$elementList = array();
|
$elementList = array();
|
||||||
$sourceList = array();
|
$sourceList = array();
|
||||||
|
|
||||||
|
if (!$user->admin) {
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -596,7 +596,9 @@ if ($id) {
|
|||||||
|
|
||||||
print '<td colspan="7" class="right"><a name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"> </a>';
|
print '<td colspan="7" class="right"><a name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"> </a>';
|
||||||
print '<input type="submit" class="button button-edit small" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button button-edit small" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||||
print ' <input type="submit" class="button button-cancel small" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
|
print ' ';
|
||||||
|
print '<input type="submit" class="button button-cancel small" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||||
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
$tmpaction = 'view';
|
$tmpaction = 'view';
|
||||||
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||||
|
|||||||
@ -831,7 +831,7 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
if ($this->element == 'contact') {
|
if ($this->element == 'contact') {
|
||||||
$contactid = $this->id;
|
$contactid = $this->id;
|
||||||
$thirdpartyid = empty($object->fk_soc) ? 0 : $object->fk_soc;
|
$thirdpartyid = empty($this->fk_soc) ? 0 : $this->fk_soc;
|
||||||
}
|
}
|
||||||
if ($this->element == 'user') {
|
if ($this->element == 'user') {
|
||||||
$contactid = $this->contact_id;
|
$contactid = $this->contact_id;
|
||||||
|
|||||||
@ -99,12 +99,12 @@ function first_execution() {
|
|||||||
function check_events() {
|
function check_events() {
|
||||||
if (Notification.permission === "granted")
|
if (Notification.permission === "granted")
|
||||||
{
|
{
|
||||||
var newToken = 'notrequired';
|
var currentToken = 'notrequired';
|
||||||
const allMeta = document.getElementsByTagName("meta");
|
const allMeta = document.getElementsByTagName("meta");
|
||||||
for (let i = 0; i < allMeta.length; i++) {
|
for (let i = 0; i < allMeta.length; i++) {
|
||||||
if (allMeta[i].getAttribute("name") == 'anti-csrf-currenttoken') {
|
if (allMeta[i].getAttribute("name") == 'anti-csrf-currenttoken') {
|
||||||
newToken = allMeta[i].getAttribute('content');
|
currentToken = allMeta[i].getAttribute('content');
|
||||||
console.log("newToken in page = "+newToken);
|
console.log("currentToken in page = "+currentToken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
time_js_next_test += time_auto_update;
|
time_js_next_test += time_auto_update;
|
||||||
@ -113,7 +113,7 @@ function check_events() {
|
|||||||
$.ajax("<?php print DOL_URL_ROOT.'/core/ajax/check_notifications.php'; ?>", {
|
$.ajax("<?php print DOL_URL_ROOT.'/core/ajax/check_notifications.php'; ?>", {
|
||||||
type: "post", // Usually post or get
|
type: "post", // Usually post or get
|
||||||
async: true,
|
async: true,
|
||||||
data: { time_js_next_test: time_js_next_test, forcechecknow: 1, token: newToken },
|
data: { time_js_next_test: time_js_next_test, forcechecknow: 1, token: currentToken },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
//console.log(result);
|
//console.log(result);
|
||||||
@ -181,7 +181,7 @@ function check_events() {
|
|||||||
$.ajax("<?php print DOL_URL_ROOT.'/core/ajax/check_notifications.php?action=stopreminder&listofreminderids='; ?>"+listofreminderids, {
|
$.ajax("<?php print DOL_URL_ROOT.'/core/ajax/check_notifications.php?action=stopreminder&listofreminderids='; ?>"+listofreminderids, {
|
||||||
type: "POST", // Usually post or get
|
type: "POST", // Usually post or get
|
||||||
async: true,
|
async: true,
|
||||||
data: { time_js_next_test: time_js_next_test, token: newToken }
|
data: { time_js_next_test: time_js_next_test, token: currentToken }
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log("No reminder to do found, next search at "+time_js_next_test);
|
console.log("No reminder to do found, next search at "+time_js_next_test);
|
||||||
|
|||||||
@ -1132,9 +1132,10 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
|||||||
$extrafieldsobjectkey = $contactstatic->table_element;
|
$extrafieldsobjectkey = $contactstatic->table_element;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||||
|
|
||||||
$sql = "SELECT t.rowid, t.entity, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste, t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo,";
|
$sql = "SELECT t.rowid, t.entity, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste,";
|
||||||
$sql .= " t.civility as civility_id, t.address, t.zip, t.town, t.birthday";
|
$sql .= " t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo, t.fk_soc,";
|
||||||
$sql .= ", t.note_private";
|
$sql .= " t.civility as civility_id, t.address, t.zip, t.town, t.birthday,";
|
||||||
|
$sql .= " t.note_private";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t";
|
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||||
$sql .= " WHERE t.fk_soc = ".((int) $object->id);
|
$sql .= " WHERE t.fk_soc = ".((int) $object->id);
|
||||||
@ -1300,6 +1301,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
|||||||
$contactstatic->email = $obj->email;
|
$contactstatic->email = $obj->email;
|
||||||
$contactstatic->socialnetworks = $obj->socialnetworks;
|
$contactstatic->socialnetworks = $obj->socialnetworks;
|
||||||
$contactstatic->photo = $obj->photo;
|
$contactstatic->photo = $obj->photo;
|
||||||
|
$contactstatic->fk_soc = $obj->fk_soc;
|
||||||
$contactstatic->entity = $obj->entity;
|
$contactstatic->entity = $obj->entity;
|
||||||
|
|
||||||
$country_code = getCountry($obj->country_id, 2);
|
$country_code = getCountry($obj->country_id, 2);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user