Skip to content

Commit

Permalink
Fix column not visible after switching column when visibility=3
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 7, 2020
1 parent ccceaac commit a1803f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion htdocs/core/tpl/commonfields_view.tpl.php
Expand Up @@ -84,7 +84,9 @@
continue;
}

if (abs($val['visible']) != 1) continue; // Discard such field from form
// Discard if extrafield is a hidden field on form
if (abs($val['visible']) != 1 && abs($val['visible']) != 3 && abs($val['visible']) != 4) continue;

if (array_key_exists('enabled', $val) && isset($val['enabled']) && !$val['enabled']) continue; // We don't want this field
if (in_array($key, array('ref', 'status'))) continue; // Ref and status are already in dol_banner

Expand Down
2 changes: 1 addition & 1 deletion htdocs/modulebuilder/template/myobject_card.php
Expand Up @@ -371,7 +371,7 @@ function init_myfunc()
print '<table class="border centpercent">'."\n";

// Common attributes
//$keyforbreak='fieldkeytoswitchonsecondcolumn';
//$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just after this field
//unset($object->fields['fk_project']); // Hide field already shown in banner
//unset($object->fields['fk_soc']); // Hide field already shown in banner
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
Expand Down

0 comments on commit a1803f5

Please sign in to comment.