Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2021-01-23 17:32:49 +01:00
commit 6d0cbd3ee5
9 changed files with 26 additions and 25 deletions

View File

@ -444,9 +444,6 @@ if ($id)
// Form to add a new line // Form to add a new line
if ($tabname[$id]) if ($tabname[$id])
{ {
$alabelisused = 0;
$var = false;
$fieldlist = explode(',', $tabfield[$id]); $fieldlist = explode(',', $tabfield[$id]);
// Line for title // Line for title
@ -481,7 +478,6 @@ if ($id)
} }
print '</td>'; print '</td>';
} }
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
} }
print '<td>'; print '<td>';
@ -612,7 +608,7 @@ if ($id)
print '&nbsp;<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>'; print '&nbsp;<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
} else { } else {
$tmpaction = 'view'; $tmpaction = 'view';
$parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error; $errors = $hookmanager->errors; $error = $hookmanager->error; $errors = $hookmanager->errors;

View File

@ -438,8 +438,6 @@ if ($id)
// Form to add a new line // Form to add a new line
if ($tabname[$id]) if ($tabname[$id])
{ {
$alabelisused = 0;
$fieldlist = explode(',', $tabfield[$id]); $fieldlist = explode(',', $tabfield[$id]);
// Line for title // Line for title
@ -496,7 +494,6 @@ if ($id)
else print $valuetoshow; else print $valuetoshow;
print '</td>'; print '</td>';
} }
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
} }
print '<td>'; print '<td>';

View File

@ -407,8 +407,6 @@ if ($id)
// Form to add a new line // Form to add a new line
if ($tabname[$id]) if ($tabname[$id])
{ {
$alabelisused = 0;
$fieldlist = explode(',', $tabfield[$id]); $fieldlist = explode(',', $tabfield[$id]);
// Line for title // Line for title
@ -437,7 +435,6 @@ if ($id)
else print $valuetoshow; else print $valuetoshow;
print '</td>'; print '</td>';
} }
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
} }
print '<td>'; print '<td>';

View File

@ -236,7 +236,7 @@ $tabsqlsort[3] = "country ASC, code ASC";
$tabsqlsort[4] = "code ASC"; $tabsqlsort[4] = "code ASC";
$tabsqlsort[5] = "label ASC"; $tabsqlsort[5] = "label ASC";
$tabsqlsort[6] = "a.type ASC, a.module ASC, a.position ASC, a.code ASC"; $tabsqlsort[6] = "a.type ASC, a.module ASC, a.position ASC, a.code ASC";
$tabsqlsort[7] = "country ASC, code ASC, a.libelle ASC"; $tabsqlsort[7] = "c.label ASC, a.code ASC, a.libelle ASC";
$tabsqlsort[8] = "country DESC,".(!empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? ' t.position ASC,' : '')." libelle ASC"; $tabsqlsort[8] = "country DESC,".(!empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? ' t.position ASC,' : '')." libelle ASC";
$tabsqlsort[9] = "label ASC"; $tabsqlsort[9] = "label ASC";
$tabsqlsort[10] = "country ASC, code ASC, taux ASC, recuperableonly ASC, localtax1 ASC, localtax2 ASC"; $tabsqlsort[10] = "country ASC, code ASC, taux ASC, recuperableonly ASC, localtax1 ASC, localtax2 ASC";
@ -1069,6 +1069,7 @@ if ($id)
elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code); elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code);
elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code); elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code);
elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code); elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code);
elseif ($search_code != '' && $id == 7) $sql .= natural_search("a.code", $search_code);
elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code); elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code);
if ($sortfield) if ($sortfield)
@ -1107,7 +1108,6 @@ if ($id)
// Form to add a new line // Form to add a new line
if ($tabname[$id]) if ($tabname[$id])
{ {
$alabelisused = 0;
$withentity = null; $withentity = null;
$fieldlist = explode(',', $tabfield[$id]); $fieldlist = explode(',', $tabfield[$id]);
@ -1214,7 +1214,6 @@ if ($id)
else $tdsoffields .= $valuetoshow; else $tdsoffields .= $valuetoshow;
$tdsoffields .= '</td>'; $tdsoffields .= '</td>';
} }
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
} }
if ($id == 4) $tdsoffields .= '<td></td>'; if ($id == 4) $tdsoffields .= '<td></td>';

View File

@ -435,9 +435,6 @@ if ($id)
// Form to add a new line // Form to add a new line
if ($tabname[$id]) if ($tabname[$id])
{ {
$alabelisused = 0;
$var = false;
$fieldlist = explode(',', $tabfield[$id]); $fieldlist = explode(',', $tabfield[$id]);
// Line for title // Line for title
@ -461,7 +458,6 @@ if ($id)
} else print $valuetoshow; } else print $valuetoshow;
print '</td>'; print '</td>';
} }
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
} }
print '<td colspan="4">'; print '<td colspan="4">';
@ -469,7 +465,7 @@ if ($id)
print '</tr>'; print '</tr>';
// Line to enter new values // Line to enter new values
print "<tr ".$bcnd[$var].">"; print '<tr class="oddeven">';
$obj = new stdClass(); $obj = new stdClass();
// If data was already input, we define them in obj to populate input fields. // If data was already input, we define them in obj to populate input fields.
@ -570,7 +566,7 @@ if ($id)
print '&nbsp;<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>'; print '&nbsp;<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
} else { } else {
$tmpaction = 'view'; $tmpaction = 'view';
$parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook = $hookmanager->executeHooks('viewWebsiteFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('viewWebsiteFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error; $errors = $hookmanager->errors; $error = $hookmanager->error; $errors = $hookmanager->errors;

View File

@ -429,9 +429,7 @@ if (empty($reshook))
$object->note_public = (string) GETPOST("note_public", 'restricthtml'); $object->note_public = (string) GETPOST("note_public", 'restricthtml');
$object->note_private = (string) GETPOST("note_private", 'restricthtml'); $object->note_private = (string) GETPOST("note_private", 'restricthtml');
if (GETPOSTISSET("roles")) { $object->roles = GETPOST("roles", 'array'); // Note GETPOSTISSET("role") is null when combo is empty
$object->roles = GETPOST("roles", 'array');
}
// Fill array 'array_options' with data from add form // Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object); $ret = $extrafields->setOptionalsFromPost(null, $object);

View File

@ -1763,14 +1763,14 @@ class Contact extends CommonObject
if (count($this->roles) > 0) { if (count($this->roles) > 0) {
foreach ($this->roles as $keyRoles => $valRoles) { foreach ($this->roles as $keyRoles => $valRoles) {
$idrole = 0; $idrole = 0;
if (is_array($idrole)) { if (is_array($valRoles)) {
$idrole = $valRoles['id']; $idrole = $valRoles['id'];
} else { } else {
$idrole = $valRoles; $idrole = $valRoles;
} }
$socid = 0; $socid = 0;
if (is_array($idrole)) { if (is_array($valRoles)) {
$socid = $valRoles['socid']; $socid = $valRoles['socid'];
} else { } else {
$socid = $this->socid; $socid = $this->socid;

View File

@ -670,6 +670,15 @@ textarea.centpercent {
.nounderline { .nounderline {
text-decoration: none; text-decoration: none;
} }
.nopadding {
padding: 0;
}
.nopaddingleft {
padding-left: 0;
}
.nopaddingright {
padding-right: 0;
}
.paddingleft { .paddingleft {
padding-<?php print $left; ?>: 4px; padding-<?php print $left; ?>: 4px;
} }

View File

@ -770,6 +770,15 @@ textarea.centpercent {
.nounderline { .nounderline {
text-decoration: none; text-decoration: none;
} }
.nopadding {
padding: 0;
}
.nopaddingleft {
padding-left: 0;
}
.nopaddingright {
padding-right: 0;
}
.paddingleft { .paddingleft {
padding-<?php print $left; ?>: 4px; padding-<?php print $left; ?>: 4px;
} }