Browse Source

Fixed a bug that newly added panels showing up for all bundles in the 'Arrange Panels' tab

Chun-Huai Cheng 9 years ago
parent
commit
0873049fd7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tripal_fields_layout/tripal_fields_layout.module

+ 2 - 1
tripal_fields_layout/tripal_fields_layout.module

@@ -100,10 +100,11 @@ function tripal_fields_layout_form_field_ui_display_overview_form_alter(&$form,
             ->fields('tp', array('panel_id', 'name', 'label', 'weight'))
             ->condition('name', 'te_base', '<>')
             ->condition('name', 'te_disabled', '<>')
+            ->condition('bundle_id', $bundle->id)
             ->orderby('weight', 'asc')
             ->execute();
   $has_panel = FALSE;
-  foreach ($result as $item) {
+  foreach ($result as $item) {dpm($item);
     $form['te_layout_panels']['panel_items'][$item->panel_id] = array(
       'label' => array(
         '#markup' => check_plain($item->label),