mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-12 02:42:33 +01:00
Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
Conflicts: htdocs/projet/tasks/task.php
This commit is contained in:
@@ -259,10 +259,6 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
$id = $object->create($user);
|
||||
if ($id < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
if ($id > 0) {
|
||||
dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
|
||||
|
||||
@@ -374,6 +370,9 @@ if (empty($reshook)) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if ($error) {
|
||||
$action = 'create';
|
||||
}
|
||||
} else {
|
||||
$result = $object->create($user);
|
||||
if ($result > 0) {
|
||||
|
||||
@@ -7915,7 +7915,7 @@ abstract class CommonObject
|
||||
// a first td column was already output (and may be another on before if MAIN_VIEW_LINE_NUMBER set), so this td is the next one
|
||||
$out .= '<td '.($html_id ? 'id="'.$html_id.'" ' : '').' class="'.$this->element.'_extras_'.$key.'" '.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
|
||||
} elseif ($display_type == 'line') {
|
||||
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').' style="display: inline-block" class="'.$this->element.'_extras_'.$key.'">';
|
||||
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').' style="display: inline-block" class="'.$this->element.'_extras_'.$key.' extra_inline_'.$extrafields->attributes[$this->table_element]['type'][$key].'">';
|
||||
}
|
||||
|
||||
switch ($mode) {
|
||||
|
||||
@@ -1644,15 +1644,18 @@ class ExtraFields
|
||||
}
|
||||
}
|
||||
} else {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
$toprint = array();
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$c = new Categorie($this->db);
|
||||
$c->fetch($obj->rowid);
|
||||
$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
|
||||
foreach ($ways as $way) {
|
||||
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.img_object('', 'category').' '.$way.'</li>';
|
||||
if ($obj->rowid) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$c = new Categorie($this->db);
|
||||
$result = $c->fetch($obj->rowid);
|
||||
if ($result > 0) {
|
||||
$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
|
||||
foreach ($ways as $way) {
|
||||
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . img_object('', 'category') . ' ' . $way . '</li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
|
||||
}
|
||||
|
||||
@@ -390,11 +390,15 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$mesg = $srcobject->error;
|
||||
$langs->load("errors");
|
||||
setEventMessages($srcobject->error, $srcobject->errors, 'errors');
|
||||
$action = 'create';
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
$mesg = $object->error;
|
||||
$langs->load("errors");
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action = 'create';
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
@@ -418,12 +422,14 @@ if (empty($reshook)) {
|
||||
$langs->load("errors");
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action = 'create';
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty"));
|
||||
$action = 'create';
|
||||
$error++;
|
||||
}
|
||||
} elseif ($action == 'update' && $user->rights->ficheinter->creer) {
|
||||
$object->socid = $socid;
|
||||
|
||||
@@ -119,6 +119,8 @@ if ($action == 'update' && !GETPOST("cancel") && $user->rights->projet->creer) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action = 'edit';
|
||||
}
|
||||
} else {
|
||||
$action = 'edit';
|
||||
}
|
||||
} else {
|
||||
$action = 'edit';
|
||||
|
||||
@@ -319,8 +319,20 @@ if (empty($reshook)) {
|
||||
|
||||
if (!$error) {
|
||||
if ($origin && $originid) {
|
||||
$element = 'supplier_proposal';
|
||||
$subelement = 'supplier_proposal';
|
||||
$element = $subelement = $origin;
|
||||
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
|
||||
$element = $regs[1];
|
||||
$subelement = $regs[2];
|
||||
}
|
||||
|
||||
// For compatibility
|
||||
if ($element == 'order') {
|
||||
$element = $subelement = 'commande';
|
||||
}
|
||||
if ($element == 'propal') {
|
||||
$element = 'comm/propal';
|
||||
$subelement = 'propal';
|
||||
}
|
||||
|
||||
$object->origin = $origin;
|
||||
$object->origin_id = $originid;
|
||||
@@ -1079,8 +1091,20 @@ if ($action == 'create') {
|
||||
|
||||
// Load objectsrc
|
||||
if (!empty($origin) && !empty($originid)) {
|
||||
$element = 'supplier_proposal';
|
||||
$subelement = 'supplier_proposal';
|
||||
$element = $subelement = GETPOST('origin');
|
||||
if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin'), $regs)) {
|
||||
$element = $regs[1];
|
||||
$subelement = $regs[2];
|
||||
}
|
||||
|
||||
// For compatibility
|
||||
if ($element == 'order' || $element == 'commande') {
|
||||
$element = $subelement = 'commande';
|
||||
}
|
||||
if ($element == 'propal') {
|
||||
$element = 'comm/propal';
|
||||
$subelement = 'propal';
|
||||
}
|
||||
|
||||
dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
|
||||
|
||||
|
||||
@@ -7448,6 +7448,11 @@ if (!empty($conf->global->THEME_CUSTOM_CSS)) {
|
||||
|
||||
?>
|
||||
|
||||
div.extra_inline_chkbxlst,
|
||||
div.extra_inline_checkbox {
|
||||
min-width:150px;
|
||||
}
|
||||
|
||||
/* Must be at end */
|
||||
div.flot-text .flot-tick-label .tickLabel, .fa-color-unset {
|
||||
color: unset;
|
||||
|
||||
Reference in New Issue
Block a user