Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
3b4cbf54d7
@ -1969,7 +1969,7 @@ class Adherent extends CommonObject
|
|||||||
$this->fullname=$this->getFullName($langs);
|
$this->fullname=$this->getFullName($langs);
|
||||||
|
|
||||||
// For avoid ldap error when firstname and lastname are empty
|
// For avoid ldap error when firstname and lastname are empty
|
||||||
if ($this->morphy == 'mor' && empty($this->fullname)) {
|
if ($this->morphy == 'mor' && (empty($this->fullname) || $this->fullname == $this->societe)) {
|
||||||
$this->fullname = $this->societe;
|
$this->fullname = $this->societe;
|
||||||
$this->lastname = $this->societe;
|
$this->lastname = $this->societe;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5620,7 +5620,7 @@ abstract class CommonObject
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
if (empty($extrafields->attribute_list[$key])) continue; // 0 = Never visible field
|
if (empty($extrafields->attribute_list[$key])) continue; // 0 = Never visible field
|
||||||
if (($mode == 'create' || $mode == 'edit') && abs($extrafields->attribute_list[$key]) != 1) continue; // <> -1 and <> 1 = not visible on forms, only on list
|
if (($mode == 'create' || $mode == 'edit') && abs($extrafields->attribute_list[$key]) != 1 && abs($extrafields->attribute_list[$key]) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list
|
||||||
|
|
||||||
// Load language if required
|
// Load language if required
|
||||||
if (! empty($extrafields->attributes[$this->table_element]['langfile'][$key])) $langs->load($extrafields->attributes[$this->table_element]['langfile'][$key]);
|
if (! empty($extrafields->attributes[$this->table_element]['langfile'][$key])) $langs->load($extrafields->attributes[$this->table_element]['langfile'][$key]);
|
||||||
|
|||||||
@ -43,7 +43,8 @@ if (empty($reshook) && ! empty($extrafields->attributes[$object->table_element][
|
|||||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label)
|
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label)
|
||||||
{
|
{
|
||||||
// Discard if extrafield is a hidden field on form
|
// Discard if extrafield is a hidden field on form
|
||||||
if (abs($extrafields->attributes[$object->table_element]['list'][$key]) != 1) continue;
|
if (empty($extrafields->attributes[$object->table_element]['list'][$key])) continue; // 0 = Never visible field
|
||||||
|
if (abs($extrafields->attributes[$object->table_element]['list'][$key]) != 1 && abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list
|
||||||
|
|
||||||
// Load language if required
|
// Load language if required
|
||||||
if (! empty($extrafields->attributes[$object->table_element]['langfile'][$key])) $langs->load($extrafields->attributes[$object->table_element]['langfile'][$key]);
|
if (! empty($extrafields->attributes[$object->table_element]['langfile'][$key])) $langs->load($extrafields->attributes[$object->table_element]['langfile'][$key]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user