Issue #2784911: Add quantity fields to water test logs

This commit is contained in:
Michael Stenta 2020-04-21 14:45:37 -04:00
parent 6cb3626faf
commit 81daf61664
3 changed files with 76 additions and 9 deletions

View File

@ -52,7 +52,7 @@ function farm_water_test_field_default_field_instances() {
'module' => 'file', 'module' => 'file',
'settings' => array(), 'settings' => array(),
'type' => 'file_table', 'type' => 'file_table',
'weight' => 8, 'weight' => 10,
), ),
), ),
'entity_type' => 'log', 'entity_type' => 'log',
@ -89,7 +89,7 @@ function farm_water_test_field_default_field_instances() {
'module' => 'list', 'module' => 'list',
'settings' => array(), 'settings' => array(),
'type' => 'list_default', 'type' => 'list_default',
'weight' => 4, 'weight' => 6,
), ),
), ),
'entity_type' => 'log', 'entity_type' => 'log',
@ -120,7 +120,7 @@ function farm_water_test_field_default_field_instances() {
'module' => 'farm_map_geofield', 'module' => 'farm_map_geofield',
'settings' => array(), 'settings' => array(),
'type' => 'farm_map_geofield', 'type' => 'farm_map_geofield',
'weight' => 1, 'weight' => 2,
), ),
), ),
'entity_type' => 'log', 'entity_type' => 'log',
@ -181,7 +181,7 @@ function farm_water_test_field_default_field_instances() {
'colorbox_node_style_first' => 'large', 'colorbox_node_style_first' => 'large',
), ),
'type' => 'colorbox', 'type' => 'colorbox',
'weight' => 7, 'weight' => 9,
), ),
), ),
'entity_type' => 'log', 'entity_type' => 'log',
@ -223,7 +223,7 @@ function farm_water_test_field_default_field_instances() {
'module' => 'taxonomy', 'module' => 'taxonomy',
'settings' => array(), 'settings' => array(),
'type' => 'taxonomy_term_reference_link', 'type' => 'taxonomy_term_reference_link',
'weight' => 5, 'weight' => 7,
), ),
), ),
'entity_type' => 'log', 'entity_type' => 'log',
@ -257,7 +257,7 @@ function farm_water_test_field_default_field_instances() {
'link' => FALSE, 'link' => FALSE,
), ),
'type' => 'entityreference_label', 'type' => 'entityreference_label',
'weight' => 6, 'weight' => 8,
), ),
), ),
'entity_type' => 'log', 'entity_type' => 'log',
@ -288,7 +288,7 @@ function farm_water_test_field_default_field_instances() {
'module' => 'text', 'module' => 'text',
'settings' => array(), 'settings' => array(),
'type' => 'text_default', 'type' => 'text_default',
'weight' => 3, 'weight' => 5,
), ),
), ),
'entity_type' => 'log', 'entity_type' => 'log',
@ -310,6 +310,39 @@ function farm_water_test_field_default_field_instances() {
), ),
); );
// Exported field_instance: 'log-farm_water_test-field_farm_quantity'.
$field_instances['log-farm_water_test-field_farm_quantity'] = array(
'bundle' => 'farm_water_test',
'default_value' => NULL,
'deleted' => 0,
'description' => 'Optionally, use this quantity field to record an observed quantity.',
'display' => array(
'default' => array(
'label' => 'inline',
'module' => 'field_collection',
'settings' => array(
'view_mode' => 'full',
),
'type' => 'field_collection_fields',
'weight' => 4,
),
),
'entity_type' => 'log',
'field_name' => 'field_farm_quantity',
'label' => 'Quantity',
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 0,
'module' => 'field_collection',
'settings' => array(),
'type' => 'field_collection_embed',
'weight' => 12,
),
);
// Exported field_instance: 'log-farm_water_test-field_farm_water_lab'. // Exported field_instance: 'log-farm_water_test-field_farm_water_lab'.
$field_instances['log-farm_water_test-field_farm_water_lab'] = array( $field_instances['log-farm_water_test-field_farm_water_lab'] = array(
'bundle' => 'farm_water_test', 'bundle' => 'farm_water_test',
@ -322,7 +355,7 @@ function farm_water_test_field_default_field_instances() {
'module' => 'text', 'module' => 'text',
'settings' => array(), 'settings' => array(),
'type' => 'text_default', 'type' => 'text_default',
'weight' => 2, 'weight' => 3,
), ),
), ),
'entity_type' => 'log', 'entity_type' => 'log',
@ -355,7 +388,9 @@ function farm_water_test_field_default_field_instances() {
t('Log category'); t('Log category');
t('Notes'); t('Notes');
t('Optionally assign this task to one or more people.'); t('Optionally assign this task to one or more people.');
t('Optionally, use this quantity field to record an observed quantity.');
t('Photos'); t('Photos');
t('Quantity');
t('Sample points'); t('Sample points');
t('Use the map to pinpoint the location(s) from which this sample is taken.'); t('Use the map to pinpoint the location(s) from which this sample is taken.');
t('Use this to organize your logs into categories for easier searching and filtering later.'); t('Use this to organize your logs into categories for easier searching and filtering later.');

View File

@ -79,7 +79,7 @@ function farm_water_test_field_group_info() {
$field_group->parent_name = 'group_farm_tabs'; $field_group->parent_name = 'group_farm_tabs';
$field_group->data = array( $field_group->data = array(
'label' => 'Files', 'label' => 'Files',
'weight' => '4', 'weight' => '5',
'children' => array( 'children' => array(
0 => 'field_farm_files', 0 => 'field_farm_files',
1 => 'field_farm_images', 1 => 'field_farm_images',
@ -185,6 +185,32 @@ function farm_water_test_field_group_info() {
); );
$field_groups['group_farm_location|log|farm_water_test|form'] = $field_group; $field_groups['group_farm_location|log|farm_water_test|form'] = $field_group;
$field_group = new stdClass();
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
$field_group->api_version = 1;
$field_group->identifier = 'group_farm_quantity|log|farm_water_test|form';
$field_group->group_name = 'group_farm_quantity';
$field_group->entity_type = 'log';
$field_group->bundle = 'farm_water_test';
$field_group->mode = 'form';
$field_group->parent_name = 'group_farm_tabs';
$field_group->data = array(
'label' => 'Quantity',
'weight' => '4',
'children' => array(
0 => 'field_farm_quantity',
),
'format_type' => 'field_group_easy_responsive_tabs_nav_item',
'format_settings' => array(
'formatter' => '',
'instance_settings' => array(
'classes' => 'group-farm-quantity field-group-field_group_easy_responsive_tabs_nav_item',
'required_fields' => 1,
),
),
);
$field_groups['group_farm_quantity|log|farm_water_test|form'] = $field_group;
$field_group = new stdClass(); $field_group = new stdClass();
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */ $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
$field_group->api_version = 1; $field_group->api_version = 1;
@ -201,6 +227,7 @@ function farm_water_test_field_group_info() {
0 => 'group_farm_files', 0 => 'group_farm_files',
1 => 'group_farm_general', 1 => 'group_farm_general',
2 => 'group_farm_location', 2 => 'group_farm_location',
3 => 'group_farm_quantity',
), ),
'format_type' => 'field_group_easy_responsive_tabs_nav', 'format_type' => 'field_group_easy_responsive_tabs_nav',
'format_settings' => array( 'format_settings' => array(
@ -229,6 +256,7 @@ function farm_water_test_field_group_info() {
t('Files'); t('Files');
t('General'); t('General');
t('Location'); t('Location');
t('Quantity');
t('Sample points'); t('Sample points');
t('Tabs'); t('Tabs');

View File

@ -12,8 +12,10 @@ dependencies[] = farm_flags
dependencies[] = farm_map dependencies[] = farm_map
dependencies[] = farm_map_geofield dependencies[] = farm_map_geofield
dependencies[] = farm_map_kml dependencies[] = farm_map_kml
dependencies[] = farm_quantity
dependencies[] = farm_water dependencies[] = farm_water
dependencies[] = features dependencies[] = features
dependencies[] = field_collection
dependencies[] = field_group dependencies[] = field_group
dependencies[] = field_group_easy_responsive_tabs dependencies[] = field_group_easy_responsive_tabs
dependencies[] = file dependencies[] = file
@ -38,6 +40,7 @@ features[field_group][] = group_farm_files|log|farm_water_test|form
features[field_group][] = group_farm_general|log|farm_water_test|form features[field_group][] = group_farm_general|log|farm_water_test|form
features[field_group][] = group_farm_geometry|log|farm_water_test|form features[field_group][] = group_farm_geometry|log|farm_water_test|form
features[field_group][] = group_farm_location|log|farm_water_test|form features[field_group][] = group_farm_location|log|farm_water_test|form
features[field_group][] = group_farm_quantity|log|farm_water_test|form
features[field_group][] = group_farm_tabs|log|farm_water_test|form features[field_group][] = group_farm_tabs|log|farm_water_test|form
features[field_instance][] = log-farm_water_test-field_farm_area features[field_instance][] = log-farm_water_test-field_farm_area
features[field_instance][] = log-farm_water_test-field_farm_files features[field_instance][] = log-farm_water_test-field_farm_files
@ -47,6 +50,7 @@ features[field_instance][] = log-farm_water_test-field_farm_images
features[field_instance][] = log-farm_water_test-field_farm_log_category features[field_instance][] = log-farm_water_test-field_farm_log_category
features[field_instance][] = log-farm_water_test-field_farm_log_owner features[field_instance][] = log-farm_water_test-field_farm_log_owner
features[field_instance][] = log-farm_water_test-field_farm_notes features[field_instance][] = log-farm_water_test-field_farm_notes
features[field_instance][] = log-farm_water_test-field_farm_quantity
features[field_instance][] = log-farm_water_test-field_farm_water_lab features[field_instance][] = log-farm_water_test-field_farm_water_lab
features[log_type][] = farm_water_test features[log_type][] = farm_water_test
features[views_view][] = farm_water_test features[views_view][] = farm_water_test