Issue #3092756: Add quantity fields to medical logs
This commit is contained in:
parent
81daf61664
commit
ff88327dac
|
@ -1061,7 +1061,7 @@ function farm_livestock_field_default_field_instances() {
|
|||
'module' => 'file',
|
||||
'settings' => array(),
|
||||
'type' => 'file_table',
|
||||
'weight' => 8,
|
||||
'weight' => 10,
|
||||
),
|
||||
),
|
||||
'entity_type' => 'log',
|
||||
|
@ -1138,7 +1138,7 @@ function farm_livestock_field_default_field_instances() {
|
|||
'colorbox_node_style_first' => 'large',
|
||||
),
|
||||
'type' => 'colorbox',
|
||||
'weight' => 7,
|
||||
'weight' => 9,
|
||||
),
|
||||
),
|
||||
'entity_type' => 'log',
|
||||
|
@ -1182,7 +1182,7 @@ function farm_livestock_field_default_field_instances() {
|
|||
'view_mode' => 'full',
|
||||
),
|
||||
'type' => 'field_collection_fields',
|
||||
'weight' => 2,
|
||||
'weight' => 4,
|
||||
),
|
||||
),
|
||||
'entity_type' => 'log',
|
||||
|
@ -1280,7 +1280,7 @@ function farm_livestock_field_default_field_instances() {
|
|||
'view_mode' => 'full',
|
||||
),
|
||||
'type' => 'field_collection_fields',
|
||||
'weight' => 1,
|
||||
'weight' => 2,
|
||||
),
|
||||
),
|
||||
'entity_type' => 'log',
|
||||
|
@ -1329,7 +1329,40 @@ function farm_livestock_field_default_field_instances() {
|
|||
'rows' => 5,
|
||||
),
|
||||
'type' => 'text_textarea',
|
||||
'weight' => 2,
|
||||
'weight' => -6,
|
||||
),
|
||||
);
|
||||
|
||||
// Exported field_instance: 'log-farm_medical-field_farm_quantity'.
|
||||
$field_instances['log-farm_medical-field_farm_quantity'] = array(
|
||||
'bundle' => 'farm_medical',
|
||||
'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' => 3,
|
||||
),
|
||||
),
|
||||
'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' => 14,
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -1398,8 +1431,10 @@ function farm_livestock_field_default_field_instances() {
|
|||
t('Nickname(s)');
|
||||
t('Notes');
|
||||
t('Optionally assign this task to one or more people.');
|
||||
t('Optionally, use this quantity field to record an observed quantity.');
|
||||
t('Parent(s)');
|
||||
t('Photos');
|
||||
t('Quantity');
|
||||
t('Reference the animals that were born. Alternatively, if you just want to increase the head count of another animal record, add an inventory adjustment below.');
|
||||
t('Sex');
|
||||
t('Species/breed');
|
||||
|
|
|
@ -50,7 +50,7 @@ function farm_livestock_field_group_info() {
|
|||
$field_group->parent_name = 'group_farm_general';
|
||||
$field_group->data = array(
|
||||
'label' => 'Assignment',
|
||||
'weight' => '5',
|
||||
'weight' => '-3',
|
||||
'children' => array(
|
||||
0 => 'field_farm_log_owner',
|
||||
),
|
||||
|
@ -108,7 +108,7 @@ function farm_livestock_field_group_info() {
|
|||
$field_group->parent_name = 'group_farm_general';
|
||||
$field_group->data = array(
|
||||
'label' => 'Category',
|
||||
'weight' => '4',
|
||||
'weight' => '-4',
|
||||
'children' => array(
|
||||
0 => 'field_farm_log_category',
|
||||
),
|
||||
|
@ -220,7 +220,7 @@ function farm_livestock_field_group_info() {
|
|||
$field_group->parent_name = 'group_farm_tabs';
|
||||
$field_group->data = array(
|
||||
'label' => 'Files',
|
||||
'weight' => '5',
|
||||
'weight' => '6',
|
||||
'children' => array(
|
||||
0 => 'field_farm_files',
|
||||
1 => 'field_farm_images',
|
||||
|
@ -458,7 +458,7 @@ function farm_livestock_field_group_info() {
|
|||
$field_group->parent_name = 'group_farm_tabs';
|
||||
$field_group->data = array(
|
||||
'label' => 'Inventory',
|
||||
'weight' => '4',
|
||||
'weight' => '5',
|
||||
'children' => array(
|
||||
0 => 'field_farm_inventory',
|
||||
),
|
||||
|
@ -537,7 +537,7 @@ function farm_livestock_field_group_info() {
|
|||
$field_group->parent_name = 'group_farm_tabs';
|
||||
$field_group->data = array(
|
||||
'label' => 'Location',
|
||||
'weight' => '2',
|
||||
'weight' => '1',
|
||||
'children' => array(
|
||||
0 => 'field_farm_movement',
|
||||
),
|
||||
|
@ -578,6 +578,34 @@ function farm_livestock_field_group_info() {
|
|||
);
|
||||
$field_groups['group_farm_mother|log|farm_birth|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_medical|form';
|
||||
$field_group->group_name = 'group_farm_quantity';
|
||||
$field_group->entity_type = 'log';
|
||||
$field_group->bundle = 'farm_medical';
|
||||
$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' => 'fieldset',
|
||||
'format_settings' => array(
|
||||
'formatter' => 'collapsible',
|
||||
'instance_settings' => array(
|
||||
'description' => '',
|
||||
'classes' => 'group-farm-quantity field-group-fieldset',
|
||||
'required_fields' => 1,
|
||||
'id' => '',
|
||||
),
|
||||
),
|
||||
);
|
||||
$field_groups['group_farm_quantity|log|farm_medical|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;
|
||||
|
@ -673,6 +701,7 @@ function farm_livestock_field_group_info() {
|
|||
1 => 'group_farm_general',
|
||||
2 => 'group_farm_inventory',
|
||||
3 => 'group_farm_location',
|
||||
4 => 'group_farm_quantity',
|
||||
),
|
||||
'format_type' => 'field_group_easy_responsive_tabs_nav',
|
||||
'format_settings' => array(
|
||||
|
@ -708,6 +737,7 @@ function farm_livestock_field_group_info() {
|
|||
t('Lineage');
|
||||
t('Location');
|
||||
t('Mother');
|
||||
t('Quantity');
|
||||
t('Tabs');
|
||||
|
||||
return $field_groups;
|
||||
|
|
|
@ -20,6 +20,7 @@ dependencies[] = farm_map
|
|||
dependencies[] = farm_map_geofield
|
||||
dependencies[] = farm_map_kml
|
||||
dependencies[] = farm_movement
|
||||
dependencies[] = farm_quantity
|
||||
dependencies[] = farm_quantity_log
|
||||
dependencies[] = farm_term
|
||||
dependencies[] = features
|
||||
|
@ -76,6 +77,7 @@ features[field_group][] = group_farm_lineage|farm_asset|animal|form
|
|||
features[field_group][] = group_farm_location|log|farm_birth|form
|
||||
features[field_group][] = group_farm_location|log|farm_medical|form
|
||||
features[field_group][] = group_farm_mother|log|farm_birth|form
|
||||
features[field_group][] = group_farm_quantity|log|farm_medical|form
|
||||
features[field_group][] = group_farm_tabs|farm_asset|animal|form
|
||||
features[field_group][] = group_farm_tabs|log|farm_birth|form
|
||||
features[field_group][] = group_farm_tabs|log|farm_medical|form
|
||||
|
@ -115,6 +117,7 @@ features[field_instance][] = log-farm_medical-field_farm_log_category
|
|||
features[field_instance][] = log-farm_medical-field_farm_log_owner
|
||||
features[field_instance][] = log-farm_medical-field_farm_movement
|
||||
features[field_instance][] = log-farm_medical-field_farm_notes
|
||||
features[field_instance][] = log-farm_medical-field_farm_quantity
|
||||
features[field_instance][] = log-farm_medical-field_farm_vet
|
||||
features[log_type][] = farm_birth
|
||||
features[log_type][] = farm_medical
|
||||
|
|
Loading…
Reference in New Issue