| 
														
															@@ -244,6 +244,7 @@ function field_group_field_attach_delete_bundle($entity_type, $bundle) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * Implements hook_field_attach_form(). 
														 | 
														
														 | 
														
															  * Implements hook_field_attach_form(). 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  */ 
														 | 
														
														 | 
														
															  */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 function field_group_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) { 
														 | 
														
														 | 
														
															 function field_group_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $form['#attached']['css'][] = drupal_get_path('module', 'field_group') . '/field_group.field_ui.css'; 
														 | 
														
														 | 
														
															   $form['#attached']['css'][] = drupal_get_path('module', 'field_group') . '/field_group.field_ui.css'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   field_group_attach_groups($form, 'form', $form_state); 
														 | 
														
														 | 
														
															   field_group_attach_groups($form, 'form', $form_state); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $form['#pre_render'][] = 'field_group_form_pre_render'; 
														 | 
														
														 | 
														
															   $form['#pre_render'][] = 'field_group_form_pre_render'; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -291,7 +292,7 @@ function field_group_field_group_formatter_info() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       'html-element' => array( 
														 | 
														
														 | 
														
															       'html-element' => array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'label' => t('HTML element'), 
														 | 
														
														 | 
														
															         'label' => t('HTML element'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'description' => t('This fieldgroup renders the inner content in a HTML element with classes and attributes.'), 
														 | 
														
														 | 
														
															         'description' => t('This fieldgroup renders the inner content in a HTML element with classes and attributes.'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        'instance_settings' => array('element' => 'div', 'classes' => '', 'attributes' => '', 'required_fields' => 1), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        'instance_settings' => array('element' => 'div', 'show_label' => 0, 'label_element' => 'div', 'classes' => '', 'attributes' => '', 'required_fields' => 1), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       ), 
														 | 
														
														 | 
														
															       ), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       'div' => array( 
														 | 
														
														 | 
														
															       'div' => array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'label' => t('Div'), 
														 | 
														
														 | 
														
															         'label' => t('Div'), 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -303,7 +304,7 @@ function field_group_field_group_formatter_info() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       'html5' => array( 
														 | 
														
														 | 
														
															       'html5' => array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'label' => t('HTML5'), 
														 | 
														
														 | 
														
															         'label' => t('HTML5'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'description' => t('This fieldgroup renders the inner content in a semantic HTML5 wrapper'), 
														 | 
														
														 | 
														
															         'description' => t('This fieldgroup renders the inner content in a semantic HTML5 wrapper'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        'instance_settings' => array('wrapper' => '', 'classes' => ''), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        'instance_settings' => array('wrapper' => '', 'classes' => '', 'id' => ''), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       ), 
														 | 
														
														 | 
														
															       ), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       'fieldset' => array( 
														 | 
														
														 | 
														
															       'fieldset' => array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'label' => t('Fieldset'), 
														 | 
														
														 | 
														
															         'label' => t('Fieldset'), 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -365,19 +366,19 @@ function field_group_field_group_formatter_info() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       'html-element' => array( 
														 | 
														
														 | 
														
															       'html-element' => array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'label' => t('HTML element'), 
														 | 
														
														 | 
														
															         'label' => t('HTML element'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'description' => t('This fieldgroup renders the inner content in a HTML element with classes and attributes.'), 
														 | 
														
														 | 
														
															         'description' => t('This fieldgroup renders the inner content in a HTML element with classes and attributes.'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        'instance_settings' => array('element' => 'div', 'classes' => '', 'attributes' => '', 'required_fields' => 1), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        'instance_settings' => array('element' => 'div', 'show_label' => 0, 'label_element' => 'div', 'classes' => '', 'attributes' => '', 'required_fields' => 1), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       ), 
														 | 
														
														 | 
														
															       ), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       'div' => array( 
														 | 
														
														 | 
														
															       'div' => array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'label' => t('Div'), 
														 | 
														
														 | 
														
															         'label' => t('Div'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'description' => t('This fieldgroup renders the inner content in a simple div with the title as legend.'), 
														 | 
														
														 | 
														
															         'description' => t('This fieldgroup renders the inner content in a simple div with the title as legend.'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'format_types' => array('open', 'collapsible', 'collapsed'), 
														 | 
														
														 | 
														
															         'format_types' => array('open', 'collapsible', 'collapsed'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        'instance_settings' => array('description' => '', 'show_label' => 1, 'label_element' => 'h3', 'effect' => 'none', 'speed' => 'fast', 'classes' => ''), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        'instance_settings' => array('description' => '', 'show_label' => 1, 'label_element' => 'h3', 'effect' => 'none', 'speed' => 'fast', 'classes' => '', 'id' => ''), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'default_formatter' => 'collapsible', 
														 | 
														
														 | 
														
															         'default_formatter' => 'collapsible', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       ), 
														 | 
														
														 | 
														
															       ), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       'html5' => array( 
														 | 
														
														 | 
														
															       'html5' => array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'label' => t('HTML5'), 
														 | 
														
														 | 
														
															         'label' => t('HTML5'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'description' => t('This fieldgroup renders the inner content in a semantic HTML5 wrapper'), 
														 | 
														
														 | 
														
															         'description' => t('This fieldgroup renders the inner content in a semantic HTML5 wrapper'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        'instance_settings' => array('wrapper' => '', 'classes' => ''), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        'instance_settings' => array('wrapper' => '', 'classes' => '', 'id' => ''), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       ), 
														 | 
														
														 | 
														
															       ), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       'fieldset' => array( 
														 | 
														
														 | 
														
															       'fieldset' => array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         'label' => t('Fieldset'), 
														 | 
														
														 | 
														
															         'label' => t('Fieldset'), 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -452,7 +453,7 @@ function field_group_field_group_format_settings($group) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       '#type' => 'select', 
														 | 
														
														 | 
														
															       '#type' => 'select', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       '#options' => drupal_map_assoc($formatter['format_types']), 
														 | 
														
														 | 
														
															       '#options' => drupal_map_assoc($formatter['format_types']), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       '#default_value' => isset($group->format_settings['formatter']) ? $group->format_settings['formatter'] : $formatter['default_formatter'], 
														 | 
														
														 | 
														
															       '#default_value' => isset($group->format_settings['formatter']) ? $group->format_settings['formatter'] : $formatter['default_formatter'], 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      '#weight' => 1, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      '#weight' => -4, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     ); 
														 | 
														
														 | 
														
															     ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -470,7 +471,7 @@ function field_group_field_group_format_settings($group) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       '#title' => t('ID'), 
														 | 
														
														 | 
														
															       '#title' => t('ID'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       '#type' => 'textfield', 
														 | 
														
														 | 
														
															       '#type' => 'textfield', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       '#default_value' => isset($group->format_settings['instance_settings']['id']) ? $group->format_settings['instance_settings']['id'] : (isset($formatter['instance_settings']['id']) ? $formatter['instance_settings']['id'] : ''), 
														 | 
														
														 | 
														
															       '#default_value' => isset($group->format_settings['instance_settings']['id']) ? $group->format_settings['instance_settings']['id'] : (isset($formatter['instance_settings']['id']) ? $formatter['instance_settings']['id'] : ''), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      '#weight' => 3, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      '#weight' => 10, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       '#element_validate' => array('field_group_validate_id'), 
														 | 
														
														 | 
														
															       '#element_validate' => array('field_group_validate_id'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     ); 
														 | 
														
														 | 
														
															     ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -479,7 +480,7 @@ function field_group_field_group_format_settings($group) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       '#title' => t('Extra CSS classes'), 
														 | 
														
														 | 
														
															       '#title' => t('Extra CSS classes'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       '#type' => 'textfield', 
														 | 
														
														 | 
														
															       '#type' => 'textfield', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       '#default_value' => isset($group->format_settings['instance_settings']['classes']) ? $group->format_settings['instance_settings']['classes'] : (isset($formatter['instance_settings']['classes']) ? $formatter['instance_settings']['classes'] : ''), 
														 | 
														
														 | 
														
															       '#default_value' => isset($group->format_settings['instance_settings']['classes']) ? $group->format_settings['instance_settings']['classes'] : (isset($formatter['instance_settings']['classes']) ? $formatter['instance_settings']['classes'] : ''), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      '#weight' => 4, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      '#weight' => 11, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       '#element_validate' => array('field_group_validate_css_class'), 
														 | 
														
														 | 
														
															       '#element_validate' => array('field_group_validate_css_class'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     ); 
														 | 
														
														 | 
														
															     ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -501,9 +502,24 @@ function field_group_field_group_format_settings($group) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         '#type' => 'textfield', 
														 | 
														
														 | 
														
															         '#type' => 'textfield', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         '#default_value' => isset($group->format_settings['instance_settings']['element']) ? $group->format_settings['instance_settings']['element'] : $formatter['instance_settings']['element'], 
														 | 
														
														 | 
														
															         '#default_value' => isset($group->format_settings['instance_settings']['element']) ? $group->format_settings['instance_settings']['element'] : $formatter['instance_settings']['element'], 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         '#description' => t('E.g. div, section, aside etc.'), 
														 | 
														
														 | 
														
															         '#description' => t('E.g. div, section, aside etc.'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        '#weight' => 1, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      $form['instance_settings']['show_label'] = array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        '#title' => t('Show label'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        '#type' => 'select', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        '#options' => array(0 => t('No'), 1 => t('Yes')), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        '#default_value' => isset($group->format_settings['instance_settings']['show_label']) ? $group->format_settings['instance_settings']['show_label'] : $formatter['instance_settings']['show_label'], 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         '#weight' => 2, 
														 | 
														
														 | 
														
															         '#weight' => 2, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       ); 
														 | 
														
														 | 
														
															       ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      $form['instance_settings']['label_element'] = array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        '#title' => t('Label element'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        '#type' => 'textfield', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        '#default_value' => isset($group->format_settings['instance_settings']['label_element']) ? $group->format_settings['instance_settings']['label_element'] : $formatter['instance_settings']['label_element'], 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        '#weight' => 3, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       $form['instance_settings']['attributes'] = array( 
														 | 
														
														 | 
														
															       $form['instance_settings']['attributes'] = array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         '#title' => t('Attributes'), 
														 | 
														
														 | 
														
															         '#title' => t('Attributes'), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         '#type' => 'textfield', 
														 | 
														
														 | 
														
															         '#type' => 'textfield', 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -533,7 +549,7 @@ function field_group_field_group_format_settings($group) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         '#type' => 'select', 
														 | 
														
														 | 
														
															         '#type' => 'select', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         '#options' => array('none' => t('None'), 'blind' => t('Blind')), 
														 | 
														
														 | 
														
															         '#options' => array('none' => t('None'), 'blind' => t('Blind')), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         '#default_value' => isset($group->format_settings['instance_settings']['effect']) ? $group->format_settings['instance_settings']['effect'] : $formatter['instance_settings']['effect'], 
														 | 
														
														 | 
														
															         '#default_value' => isset($group->format_settings['instance_settings']['effect']) ? $group->format_settings['instance_settings']['effect'] : $formatter['instance_settings']['effect'], 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        '#weight' => 2, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        '#weight' => 3, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       ); 
														 | 
														
														 | 
														
															       ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       $form['instance_settings']['speed'] = array( 
														 | 
														
														 | 
														
															       $form['instance_settings']['speed'] = array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         '#title' => t('Speed'), 
														 | 
														
														 | 
														
															         '#title' => t('Speed'), 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -617,7 +633,7 @@ function field_group_pre_render_prepare(&$group) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $classes = _field_group_get_html_classes($group); 
														 | 
														
														 | 
														
															   $classes = _field_group_get_html_classes($group); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $group->classes = implode(' ', $classes->required); 
														 | 
														
														 | 
														
															   $group->classes = implode(' ', $classes->required); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  $group->description = isset($group->format_settings['instance_settings']['description']) ? filter_xss_admin(t($group->format_settings['instance_settings']['description'])) : ''; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  $group->description = !empty($group->format_settings['instance_settings']['description']) ? filter_xss_admin(t($group->format_settings['instance_settings']['description'])) : ''; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -627,7 +643,7 @@ function field_group_pre_render_prepare(&$group) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * @param Array $elements by address. 
														 | 
														
														 | 
														
															  * @param Array $elements by address. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * @param Object $group The Field group info. 
														 | 
														
														 | 
														
															  * @param Object $group The Field group info. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  */ 
														 | 
														
														 | 
														
															  */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-function field_group_field_group_pre_render(& $element, &$group, & $form) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+function field_group_field_group_pre_render(&$element, &$group, & $form) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   field_group_pre_render_prepare($group); 
														 | 
														
														 | 
														
															   field_group_pre_render_prepare($group); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -640,10 +656,7 @@ function field_group_field_group_pre_render(& $element, &$group, & $form) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   ); 
														 | 
														
														 | 
														
															   ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   if (isset($group->format_settings['instance_settings']['id']) && !empty($group->format_settings['instance_settings']['id'])) { 
														 | 
														
														 | 
														
															   if (isset($group->format_settings['instance_settings']['id']) && !empty($group->format_settings['instance_settings']['id'])) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    $element['#id'] = $group->format_settings['instance_settings']['id']; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  else { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    $element['#id'] = $form['#entity_type'] . '_' . $form['#bundle'] . '_' . $view_mode . '_' . $group->group_name; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    $element['#id'] = drupal_html_id($group->format_settings['instance_settings']['id']); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $element['#weight'] = $group->weight; 
														 | 
														
														 | 
														
															   $element['#weight'] = $group->weight; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -691,6 +704,8 @@ function field_group_pre_render_fieldset(&$element, $group, &$form) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  */ 
														 | 
														
														 | 
														
															  */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 function field_group_pre_render_html_element(&$element, $group, &$form) { 
														 | 
														
														 | 
														
															 function field_group_pre_render_html_element(&$element, $group, &$form) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $html_element = isset($group->format_settings['instance_settings']['element']) ? $group->format_settings['instance_settings']['element'] : 'div'; 
														 | 
														
														 | 
														
															   $html_element = isset($group->format_settings['instance_settings']['element']) ? $group->format_settings['instance_settings']['element'] : 'div'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  $show_label = isset($group->format_settings['instance_settings']['show_label']) ? $group->format_settings['instance_settings']['show_label'] : 0; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  $label_element = isset($group->format_settings['instance_settings']['label_element']) ? $group->format_settings['instance_settings']['label_element'] : 'div'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $attributes = isset($group->format_settings['instance_settings']['attributes']) ? ' ' . $group->format_settings['instance_settings']['attributes'] : ''; 
														 | 
														
														 | 
														
															   $attributes = isset($group->format_settings['instance_settings']['attributes']) ? ' ' . $group->format_settings['instance_settings']['attributes'] : ''; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $group->classes = trim($group->classes); 
														 | 
														
														 | 
														
															   $group->classes = trim($group->classes); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -715,6 +730,9 @@ function field_group_pre_render_html_element(&$element, $group, &$form) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $attributes = drupal_attributes($element_attributes); 
														 | 
														
														 | 
														
															   $attributes = drupal_attributes($element_attributes); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $element['#prefix'] = '<' . $html_element . $attributes . '>'; 
														 | 
														
														 | 
														
															   $element['#prefix'] = '<' . $html_element . $attributes . '>'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  if ($show_label) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    $element['#prefix'] .= '<' . $label_element . '><span>' . check_plain(t($group->label)) . '</span></' . $label_element . '>'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $element['#suffix'] = '</' . $html_element . '>'; 
														 | 
														
														 | 
														
															   $element['#suffix'] = '</' . $html_element . '>'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -733,18 +751,19 @@ function field_group_pre_render_div(&$element, $group, &$form) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $effect = isset($group->format_settings['instance_settings']['effect']) ? $group->format_settings['instance_settings']['effect'] : 'none'; 
														 | 
														
														 | 
														
															   $effect = isset($group->format_settings['instance_settings']['effect']) ? $group->format_settings['instance_settings']['effect'] : 'none'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $element['#type'] = 'markup'; 
														 | 
														
														 | 
														
															   $element['#type'] = 'markup'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  $id = isset($element['#id']) ? ' id="' . $element['#id'] . '"' : ''; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   if ($group->format_settings['formatter'] != 'open') { 
														 | 
														
														 | 
														
															   if ($group->format_settings['formatter'] != 'open') { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    $element['#prefix'] = '<div class="' . $group->classes . '"> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    $element['#prefix'] = '<div' . $id . ' class="' . $group->classes . '"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       <' . $label_element . '><span class="field-group-format-toggler">' . check_plain(t($group->label)) . '</span></' . $label_element . '> 
														 | 
														
														 | 
														
															       <' . $label_element . '><span class="field-group-format-toggler">' . check_plain(t($group->label)) . '</span></' . $label_element . '> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       <div class="field-group-format-wrapper" style="display: ' . (!empty($group->collapsed) ? 'none' : 'block') . ';">'; 
														 | 
														
														 | 
														
															       <div class="field-group-format-wrapper" style="display: ' . (!empty($group->collapsed) ? 'none' : 'block') . ';">'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     $element['#suffix'] = '</div></div>'; 
														 | 
														
														 | 
														
															     $element['#suffix'] = '</div></div>'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   else { 
														 | 
														
														 | 
														
															   else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    $class_attribute = ''; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    if (!empty($group->classes)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      $class_attribute = 'class = "' . $group->classes . '"'; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    $element['#prefix'] = '<div id="' . $element['#id'] . '"' . $class_attribute . '>'; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    $class_attribute = !empty($group->classes) ? ' class="' . $group->classes . '"' : ''; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    $element['#prefix'] = '<div' . $id . $class_attribute . '>'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if ($show_label) { 
														 | 
														
														 | 
														
															     if ($show_label) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       $element['#prefix'] .= '<' . $label_element . '><span>' . check_plain(t($group->label)) . '</span></' . $label_element . '>'; 
														 | 
														
														 | 
														
															       $element['#prefix'] .= '<' . $label_element . '><span>' . check_plain(t($group->label)) . '</span></' . $label_element . '>'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -769,9 +788,11 @@ function field_group_pre_render_div(&$element, $group, &$form) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * @param $form The root element or form. 
														 | 
														
														 | 
														
															  * @param $form The root element or form. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  */ 
														 | 
														
														 | 
														
															  */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 function field_group_pre_render_html5(&$element, $group, &$form) { 
														 | 
														
														 | 
														
															 function field_group_pre_render_html5(&$element, $group, &$form) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  $id = !empty($element['#id']) ? ' id="' . $element['#id'] . '"' : ''; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  $class = !empty($group->classes) ? ' class="' . $group->classes . '"' : ''; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $element += array( 
														 | 
														
														 | 
														
															   $element += array( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     '#type' => 'markup', 
														 | 
														
														 | 
														
															     '#type' => 'markup', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    '#prefix' => '<' . $group->format_settings['instance_settings']['wrapper'] . ' id="' . $element['#id'] . '" class="' . $group->classes . '">', 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    '#prefix' => '<' . $group->format_settings['instance_settings']['wrapper'] . $id . $class . '>', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     '#suffix' => '</' . $group->format_settings['instance_settings']['wrapper'] . '>', 
														 | 
														
														 | 
														
															     '#suffix' => '</' . $group->format_settings['instance_settings']['wrapper'] . '>', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   ); 
														 | 
														
														 | 
														
															   ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1113,11 +1134,13 @@ function field_group_remove_empty_form_groups($name, & $element, $groups, &$form 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   $hasChildren = FALSE; 
														 | 
														
														 | 
														
															   $hasChildren = FALSE; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   if (count($children)) { 
														 | 
														
														 | 
														
															   if (count($children)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     foreach ($children as $childname) { 
														 | 
														
														 | 
														
															     foreach ($children as $childname) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       if (in_array($childname, $groups)) { 
														 | 
														
														 | 
														
															       if (in_array($childname, $groups)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         field_group_remove_empty_form_groups($childname, $element[$childname], $groups, $form_groups, $entity); 
														 | 
														
														 | 
														
															         field_group_remove_empty_form_groups($childname, $element[$childname], $groups, $form_groups, $entity); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       } 
														 | 
														
														 | 
														
															       } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       $exception = $entity . '__' . $childname; 
														 | 
														
														 | 
														
															       $exception = $entity . '__' . $childname; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      $hasChildren = $hasChildren ? TRUE : (isset($element[$childname]['#type']) || in_array($exception, $exceptions)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      $hasChildren = $hasChildren ? TRUE : (isset($element[$childname]['#type']) || isset($element[$childname]['#markup']) || in_array($exception, $exceptions)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1443,7 +1466,7 @@ function form_process_multipage($element, &$form_state) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     '#default_value' => $element['#default_control'], 
														 | 
														
														 | 
														
															     '#default_value' => $element['#default_control'], 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     '#attributes' => array('class' => array('multipage-active-control')), 
														 | 
														
														 | 
														
															     '#attributes' => array('class' => array('multipage-active-control')), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   ); 
														 | 
														
														 | 
														
															   ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-   
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   return $element; 
														 | 
														
														 | 
														
															   return $element; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1566,8 +1589,10 @@ function field_group_info_groups($entity_type = NULL, $bundle = NULL, $view_mode 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       $groups = $cached->data; 
														 | 
														
														 | 
														
															       $groups = $cached->data; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     else { 
														 | 
														
														 | 
														
															     else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      drupal_static_reset('ctools_export_load_object'); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      drupal_static_reset('ctools_export_load_object_all'); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      $ctools_export_load_object = &drupal_static('ctools_export_load_object'); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      $ctools_export_load_object_all = &drupal_static('ctools_export_load_object_all'); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      unset($ctools_export_load_object['field_group']); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      unset($ctools_export_load_object_all['field_group']); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       $groups = field_group_read_groups(); 
														 | 
														
														 | 
														
															       $groups = field_group_read_groups(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       cache_set('field_groups', $groups, 'cache_field'); 
														 | 
														
														 | 
														
															       cache_set('field_groups', $groups, 'cache_field'); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1680,7 +1705,7 @@ function field_group_exists($group_name, $entity_type, $bundle, $mode) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  *   Field group object. 
														 | 
														
														 | 
														
															  *   Field group object. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  */ 
														 | 
														
														 | 
														
															  */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 function field_group_unpack($packed_group) { 
														 | 
														
														 | 
														
															 function field_group_unpack($packed_group) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  if (!isset($packed_group->data)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  if (empty($packed_group->data)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     return $packed_group; 
														 | 
														
														 | 
														
															     return $packed_group; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1847,7 +1872,7 @@ function field_group_attach_groups(&$element, $view_mode, $form_state = array()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 /** 
														 | 
														
														 | 
														
															 /** 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * Pre render callback for rendering groups. 
														 | 
														
														 | 
														
															  * Pre render callback for rendering groups. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * @see field_group_field_attach_form 
														 | 
														
														 | 
														
															  * @see field_group_field_attach_form 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- * @param $element Form that is beïng rendered. 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ * @param $element Form that is being rendered. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  */ 
														 | 
														
														 | 
														
															  */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 function field_group_form_pre_render(&$element) { 
														 | 
														
														 | 
														
															 function field_group_form_pre_render(&$element) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   return field_group_build_entity_groups($element, 'form'); 
														 | 
														
														 | 
														
															   return field_group_build_entity_groups($element, 'form'); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1860,7 +1885,7 @@ function field_group_form_pre_render(&$element) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * @see field_group_theme_registry_alter 
														 | 
														
														 | 
														
															  * @see field_group_theme_registry_alter 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * @see field_group_fields_nest() 
														 | 
														
														 | 
														
															  * @see field_group_fields_nest() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * @param $vars preprocess vars or form element 
														 | 
														
														 | 
														
															  * @param $vars preprocess vars or form element 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- * @param $type The type of object beïng rendered 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ * @param $type The type of object being rendered 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * @return $element Array with re-arranged fields in forms. 
														 | 
														
														 | 
														
															  * @return $element Array with re-arranged fields in forms. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  */ 
														 | 
														
														 | 
														
															  */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 function field_group_build_entity_groups(&$vars, $type) { 
														 | 
														
														 | 
														
															 function field_group_build_entity_groups(&$vars, $type) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1890,8 +1915,13 @@ function field_group_build_entity_groups(&$vars, $type) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     return $element; 
														 | 
														
														 | 
														
															     return $element; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  // No groups on the entity. Prerender removed empty field groups. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  if (empty($element['#fieldgroups'])) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    return $element; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   // Put groups inside content if we are rendering an entity_view. 
														 | 
														
														 | 
														
															   // Put groups inside content if we are rendering an entity_view. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  foreach ($element['#groups'] as $group) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  foreach ($element['#fieldgroups'] as $group) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if (!empty($element[$group->group_name]) && $type != 'user_profile') { 
														 | 
														
														 | 
														
															     if (!empty($element[$group->group_name]) && $type != 'user_profile') { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       $vars['content'][$group->group_name] = $element[$group->group_name]; 
														 | 
														
														 | 
														
															       $vars['content'][$group->group_name] = $element[$group->group_name]; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1914,7 +1944,7 @@ function field_group_build_entity_groups(&$vars, $type) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * @param Array $element 
														 | 
														
														 | 
														
															  * @param Array $element 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  *   The current element to analyse for grouping. 
														 | 
														
														 | 
														
															  *   The current element to analyse for grouping. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * @param Array $vars 
														 | 
														
														 | 
														
															  * @param Array $vars 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- *   Rendering vars from the entity beïng viewed. 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ *   Rendering vars from the entity being viewed. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  */ 
														 | 
														
														 | 
														
															  */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 function field_group_fields_nest(&$element, &$vars = NULL) { 
														 | 
														
														 | 
														
															 function field_group_fields_nest(&$element, &$vars = NULL) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1947,11 +1977,11 @@ function field_group_fields_nest(&$element, &$vars = NULL) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     // Entity being viewed 
														 | 
														
														 | 
														
															     // Entity being viewed 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if ($vars) { 
														 | 
														
														 | 
														
															     if ($vars) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       // If not a group, check vars['content'] for empty field. 
														 | 
														
														 | 
														
															       // If not a group, check vars['content'] for empty field. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      if (!isset($element['#groups'][$child_name]) && isset($vars['content'][$child_name])) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      if (!isset($element['#fieldgroups'][$child_name]) && isset($vars['content'][$child_name])) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         $group_references[$parent_name][$child_name] = $vars['content'][$child_name]; 
														 | 
														
														 | 
														
															         $group_references[$parent_name][$child_name] = $vars['content'][$child_name]; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         unset($vars['content'][$child_name]); 
														 | 
														
														 | 
														
															         unset($vars['content'][$child_name]); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       } 
														 | 
														
														 | 
														
															       } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      elseif (!isset($element['#groups'][$child_name]) && isset($vars['user_profile'][$child_name])) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      elseif (!isset($element['#fieldgroups'][$child_name]) && isset($vars['user_profile'][$child_name])) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         $group_references[$parent_name][$child_name] = $vars['user_profile'][$child_name]; 
														 | 
														
														 | 
														
															         $group_references[$parent_name][$child_name] = $vars['user_profile'][$child_name]; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         unset($vars['user_profile'][$child_name]); 
														 | 
														
														 | 
														
															         unset($vars['user_profile'][$child_name]); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       } 
														 | 
														
														 | 
														
															       } 
														 |