From ecf66ca895f828a996fa867f974b2e755221341c Mon Sep 17 00:00:00 2001 From: Sumeet Pareek Date: Tue, 14 Jan 2014 15:56:16 +0530 Subject: [PATCH] More fields added to Candidate Details references AamAadmiParty/india-standalone-drupal#80 --- .../f_candidate_details.features.field.inc | 575 +++++++++++++++++- .../f_candidate_details.info | 11 + .../f_candidate_details.strongarm.inc | 4 +- 3 files changed, 582 insertions(+), 8 deletions(-) diff --git a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.field.inc b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.field.inc index d22b871..d7c80c0 100644 --- a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.field.inc +++ b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.field.inc @@ -70,7 +70,7 @@ function f_candidate_details_field_default_fields() { 'trim_length' => 600, ), 'type' => 'text_summary_or_trimmed', - 'weight' => 0, + 'weight' => '0', ), ), 'entity_type' => 'node', @@ -95,6 +95,73 @@ function f_candidate_details_field_default_fields() { ), ); + // Exported field: 'node-ct_candidate_details-field_cd_address'. + $fields['node-ct_candidate_details-field_cd_address'] = array( + 'field_config' => array( + 'active' => '1', + 'cardinality' => '1', + 'deleted' => '0', + 'entity_types' => array(), + 'field_name' => 'field_cd_address', + 'foreign keys' => array( + 'format' => array( + 'columns' => array( + 'format' => 'format', + ), + 'table' => 'filter_format', + ), + ), + 'indexes' => array( + 'format' => array( + 0 => 'format', + ), + ), + 'locked' => '0', + 'module' => 'text', + 'settings' => array(), + 'translatable' => '0', + 'type' => 'text_long', + ), + 'field_instance' => array( + 'bundle' => 'ct_candidate_details', + 'default_value' => NULL, + 'deleted' => '0', + 'description' => '', + 'display' => array( + 'default' => array( + 'label' => 'inline', + 'module' => 'text', + 'settings' => array(), + 'type' => 'text_default', + 'weight' => '11', + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => '5', + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_cd_address', + 'label' => 'Address', + 'required' => 0, + 'settings' => array( + 'text_processing' => '0', + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'text', + 'settings' => array( + 'rows' => '5', + ), + 'type' => 'text_textarea', + 'weight' => '13', + ), + ), + ); + // Exported field: 'node-ct_candidate_details-field_cd_age'. $fields['node-ct_candidate_details-field_cd_age'] = array( 'field_config' => array( @@ -133,7 +200,7 @@ function f_candidate_details_field_default_fields() { 'label' => 'above', 'settings' => array(), 'type' => 'hidden', - 'weight' => 0, + 'weight' => '9', ), ), 'entity_type' => 'node', @@ -157,6 +224,75 @@ function f_candidate_details_field_default_fields() { ), ); + // Exported field: 'node-ct_candidate_details-field_cd_education_qualification'. + $fields['node-ct_candidate_details-field_cd_education_qualification'] = array( + 'field_config' => array( + 'active' => '1', + 'cardinality' => '1', + 'deleted' => '0', + 'entity_types' => array(), + 'field_name' => 'field_cd_education_qualification', + 'foreign keys' => array( + 'format' => array( + 'columns' => array( + 'format' => 'format', + ), + 'table' => 'filter_format', + ), + ), + 'indexes' => array( + 'format' => array( + 0 => 'format', + ), + ), + 'locked' => '0', + 'module' => 'text', + 'settings' => array( + 'max_length' => '255', + ), + 'translatable' => '0', + 'type' => 'text', + ), + 'field_instance' => array( + 'bundle' => 'ct_candidate_details', + 'default_value' => NULL, + 'deleted' => '0', + 'description' => '', + 'display' => array( + 'default' => array( + 'label' => 'inline', + 'module' => 'text', + 'settings' => array(), + 'type' => 'text_default', + 'weight' => '7', + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => '3', + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_cd_education_qualification', + 'label' => 'Education Qualification', + 'required' => 0, + 'settings' => array( + 'text_processing' => '0', + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'text', + 'settings' => array( + 'size' => '60', + ), + 'type' => 'text_textfield', + 'weight' => '9', + ), + ), + ); + // Exported field: 'node-ct_candidate_details-field_cd_election'. $fields['node-ct_candidate_details-field_cd_election'] = array( 'field_config' => array( @@ -208,7 +344,7 @@ function f_candidate_details_field_default_fields() { 'label' => 'above', 'settings' => array(), 'type' => 'hidden', - 'weight' => 0, + 'weight' => '8', ), ), 'entity_type' => 'node', @@ -228,6 +364,139 @@ function f_candidate_details_field_default_fields() { ), ); + // Exported field: 'node-ct_candidate_details-field_cd_email'. + $fields['node-ct_candidate_details-field_cd_email'] = array( + 'field_config' => array( + 'active' => '1', + 'cardinality' => '1', + 'deleted' => '0', + 'entity_types' => array(), + 'field_name' => 'field_cd_email', + 'foreign keys' => array( + 'format' => array( + 'columns' => array( + 'format' => 'format', + ), + 'table' => 'filter_format', + ), + ), + 'indexes' => array( + 'format' => array( + 0 => 'format', + ), + ), + 'locked' => '0', + 'module' => 'text', + 'settings' => array( + 'max_length' => '255', + ), + 'translatable' => '0', + 'type' => 'text', + ), + 'field_instance' => array( + 'bundle' => 'ct_candidate_details', + 'default_value' => NULL, + 'deleted' => '0', + 'description' => '', + 'display' => array( + 'default' => array( + 'label' => 'inline', + 'module' => 'text', + 'settings' => array(), + 'type' => 'text_default', + 'weight' => '9', + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => '4', + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_cd_email', + 'label' => 'Email', + 'required' => 0, + 'settings' => array( + 'text_processing' => '0', + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'text', + 'settings' => array( + 'size' => '60', + ), + 'type' => 'text_textfield', + 'weight' => '11', + ), + ), + ); + + // Exported field: 'node-ct_candidate_details-field_cd_gender'. + $fields['node-ct_candidate_details-field_cd_gender'] = array( + 'field_config' => array( + 'active' => '1', + 'cardinality' => '1', + 'deleted' => '0', + 'entity_types' => array(), + 'field_name' => 'field_cd_gender', + 'foreign keys' => array(), + 'indexes' => array( + 'value' => array( + 0 => 'value', + ), + ), + 'locked' => '0', + 'module' => 'list', + 'settings' => array( + 'allowed_values' => array( + 'male' => 'Male', + 'female' => 'Female', + 'other' => 'Other', + ), + 'allowed_values_function' => '', + ), + 'translatable' => '0', + 'type' => 'list_text', + ), + 'field_instance' => array( + 'bundle' => 'ct_candidate_details', + 'default_value' => NULL, + 'deleted' => '0', + 'description' => 'Ignore the N/A value and chose between Male, Female or Other.', + 'display' => array( + 'default' => array( + 'label' => 'inline', + 'module' => 'list', + 'settings' => array(), + 'type' => 'list_default', + 'weight' => '5', + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => '12', + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_cd_gender', + 'label' => 'Gender', + 'required' => 0, + 'settings' => array( + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'options', + 'settings' => array(), + 'type' => 'options_buttons', + 'weight' => '7', + ), + ), + ); + // Exported field: 'node-ct_candidate_details-field_cd_name'. $fields['node-ct_candidate_details-field_cd_name'] = array( 'field_config' => array( @@ -274,7 +543,7 @@ function f_candidate_details_field_default_fields() { 'label' => 'above', 'settings' => array(), 'type' => 'hidden', - 'weight' => 0, + 'weight' => '13', ), ), 'entity_type' => 'node', @@ -348,7 +617,7 @@ function f_candidate_details_field_default_fields() { 'label' => 'above', 'settings' => array(), 'type' => 'hidden', - 'weight' => 0, + 'weight' => '11', ), ), 'entity_type' => 'node', @@ -371,6 +640,289 @@ function f_candidate_details_field_default_fields() { ), ); + // Exported field: 'node-ct_candidate_details-field_cd_phone'. + $fields['node-ct_candidate_details-field_cd_phone'] = array( + 'field_config' => array( + 'active' => '1', + 'cardinality' => '-1', + 'deleted' => '0', + 'entity_types' => array(), + 'field_name' => 'field_cd_phone', + 'foreign keys' => array( + 'format' => array( + 'columns' => array( + 'format' => 'format', + ), + 'table' => 'filter_format', + ), + ), + 'indexes' => array( + 'format' => array( + 0 => 'format', + ), + ), + 'locked' => '0', + 'module' => 'text', + 'settings' => array( + 'max_length' => '255', + ), + 'translatable' => '0', + 'type' => 'text', + ), + 'field_instance' => array( + 'bundle' => 'ct_candidate_details', + 'default_value' => NULL, + 'deleted' => '0', + 'description' => '', + 'display' => array( + 'default' => array( + 'label' => 'inline', + 'module' => 'text', + 'settings' => array(), + 'type' => 'text_default', + 'weight' => '10', + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => '6', + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_cd_phone', + 'label' => 'Phone', + 'required' => 0, + 'settings' => array( + 'text_processing' => '0', + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'text', + 'settings' => array( + 'size' => '60', + ), + 'type' => 'text_textfield', + 'weight' => '12', + ), + ), + ); + + // Exported field: 'node-ct_candidate_details-field_cd_photo'. + $fields['node-ct_candidate_details-field_cd_photo'] = array( + 'field_config' => array( + 'active' => '1', + 'cardinality' => '1', + 'deleted' => '0', + 'entity_types' => array(), + 'field_name' => 'field_cd_photo', + 'foreign keys' => array( + 'fid' => array( + 'columns' => array( + 'fid' => 'fid', + ), + 'table' => 'file_managed', + ), + ), + 'indexes' => array( + 'fid' => array( + 0 => 'fid', + ), + ), + 'locked' => '0', + 'module' => 'image', + 'settings' => array( + 'default_image' => 0, + 'uri_scheme' => 'public', + ), + 'translatable' => '0', + 'type' => 'image', + ), + 'field_instance' => array( + 'bundle' => 'ct_candidate_details', + 'deleted' => '0', + 'description' => 'Strictly upload an image of size 300 x 400 pixels. All other images will be rejected.', + 'display' => array( + 'default' => array( + 'label' => 'hidden', + 'module' => 'image', + 'settings' => array( + 'image_link' => '', + 'image_style' => '', + ), + 'type' => 'image', + 'weight' => '0', + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => '2', + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_cd_photo', + 'label' => 'Photo', + 'required' => 0, + 'settings' => array( + 'alt_field' => 0, + 'default_image' => 0, + 'file_directory' => 'field_cd_photo', + 'file_extensions' => 'png gif jpg jpeg', + 'max_filesize' => '', + 'max_resolution' => '300x400', + 'min_resolution' => '300x400', + 'title_field' => 0, + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'image', + 'settings' => array( + 'preview_image_style' => 'thumbnail', + 'progress_indicator' => 'throbber', + ), + 'type' => 'image_image', + 'weight' => '5', + ), + ), + ); + + // Exported field: 'node-ct_candidate_details-field_cd_profession_occupation'. + $fields['node-ct_candidate_details-field_cd_profession_occupation'] = array( + 'field_config' => array( + 'active' => '1', + 'cardinality' => '1', + 'deleted' => '0', + 'entity_types' => array(), + 'field_name' => 'field_cd_profession_occupation', + 'foreign keys' => array( + 'format' => array( + 'columns' => array( + 'format' => 'format', + ), + 'table' => 'filter_format', + ), + ), + 'indexes' => array( + 'format' => array( + 0 => 'format', + ), + ), + 'locked' => '0', + 'module' => 'text', + 'settings' => array( + 'max_length' => '255', + ), + 'translatable' => '0', + 'type' => 'text', + ), + 'field_instance' => array( + 'bundle' => 'ct_candidate_details', + 'default_value' => NULL, + 'deleted' => '0', + 'description' => '', + 'display' => array( + 'default' => array( + 'label' => 'inline', + 'module' => 'text', + 'settings' => array(), + 'type' => 'text_default', + 'weight' => '8', + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => '1', + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_cd_profession_occupation', + 'label' => 'Profession / Occupation', + 'required' => 0, + 'settings' => array( + 'text_processing' => '0', + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'text', + 'settings' => array( + 'size' => '60', + ), + 'type' => 'text_textfield', + 'weight' => '10', + ), + ), + ); + + // Exported field: 'node-ct_candidate_details-field_cd_special_category'. + $fields['node-ct_candidate_details-field_cd_special_category'] = array( + 'field_config' => array( + 'active' => '1', + 'cardinality' => '1', + 'deleted' => '0', + 'entity_types' => array(), + 'field_name' => 'field_cd_special_category', + 'foreign keys' => array(), + 'indexes' => array( + 'value' => array( + 0 => 'value', + ), + ), + 'locked' => '0', + 'module' => 'list', + 'settings' => array( + 'allowed_values' => array( + 'sc' => 'SC', + 'st' => 'ST', + 'obc' => 'OBC', + 'none' => 'None', + ), + 'allowed_values_function' => '', + ), + 'translatable' => '0', + 'type' => 'list_text', + ), + 'field_instance' => array( + 'bundle' => 'ct_candidate_details', + 'default_value' => NULL, + 'deleted' => '0', + 'description' => 'Ignore the N/A value and chose between the other values.', + 'display' => array( + 'default' => array( + 'label' => 'inline', + 'module' => 'list', + 'settings' => array(), + 'type' => 'list_default', + 'weight' => '6', + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => '7', + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_cd_special_category', + 'label' => 'Special Category', + 'required' => 0, + 'settings' => array( + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'options', + 'settings' => array(), + 'type' => 'options_buttons', + 'weight' => '8', + ), + ), + ); + // Exported field: 'node-ct_candidate_details-field_cd_state'. $fields['node-ct_candidate_details-field_cd_state'] = array( 'field_config' => array( @@ -422,7 +974,7 @@ function f_candidate_details_field_default_fields() { 'label' => 'above', 'settings' => array(), 'type' => 'hidden', - 'weight' => 0, + 'weight' => '10', ), ), 'entity_type' => 'node', @@ -449,14 +1001,25 @@ function f_candidate_details_field_default_fields() { // Included for use with string extractors like potx. t('Start typing the Parliament Constituency (PC) name for auto-completion. Enter a value that is most relevant to this candidate + the election. Example: If a candidate belonging to the state Rajasthan is standing from a seat in Amethi, Uttar Pradesh for Lok Sabha Elections, then the you should enter the value \'Amethi\' in this field. '); t('Start typing the state name for auto-completion. Enter the state that is most relevant to this candidate + the election. Example: If a candidate belonging to the state Rajasthan is standing from a seat in Uttar Pradesh for Lok Sabha Elections, then the you should enter the value \'Uttar Pradesh\' in this field. '); + t('Address'); t('Candidate Age'); t('Candidate Description'); t('Candidate Name'); + t('Education Qualification'); t('Election'); + t('Email'); t('Enter a long textual description of the candidate that otherwise does not fit into the specific fields.'); + t('Gender'); + t('Ignore the N/A value and chose between Male, Female or Other.'); + t('Ignore the N/A value and chose between the other values.'); t('Parliament Constituency'); + t('Phone'); + t('Photo'); + t('Profession / Occupation'); t('Select the election for which this candidate is being nominated.'); + t('Special Category'); t('State'); + t('Strictly upload an image of size 300 x 400 pixels. All other images will be rejected.'); return $fields; } diff --git a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.info b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.info index 832db3b..be5f070 100644 --- a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.info +++ b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.info @@ -2,11 +2,14 @@ name = Candidate Details description = Content and functionality built around Candidate Details core = 7.x package = AAP Features +php = 5.2.4 version = 7.x-1.0 project = f_candidate_details dependencies[] = ctools dependencies[] = f_site_controller dependencies[] = features +dependencies[] = image +dependencies[] = list dependencies[] = metatag dependencies[] = node dependencies[] = number @@ -18,10 +21,18 @@ dependencies[] = text features[ctools][] = strongarm:strongarm:1 features[features_api][] = api:1 features[field][] = node-ct_candidate_details-body +features[field][] = node-ct_candidate_details-field_cd_address features[field][] = node-ct_candidate_details-field_cd_age +features[field][] = node-ct_candidate_details-field_cd_education_qualification features[field][] = node-ct_candidate_details-field_cd_election +features[field][] = node-ct_candidate_details-field_cd_email +features[field][] = node-ct_candidate_details-field_cd_gender features[field][] = node-ct_candidate_details-field_cd_name features[field][] = node-ct_candidate_details-field_cd_pc +features[field][] = node-ct_candidate_details-field_cd_phone +features[field][] = node-ct_candidate_details-field_cd_photo +features[field][] = node-ct_candidate_details-field_cd_profession_occupation +features[field][] = node-ct_candidate_details-field_cd_special_category features[field][] = node-ct_candidate_details-field_cd_state features[node][] = ct_candidate_details features[user_permission][] = create ct_candidate_details content diff --git a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.strongarm.inc b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.strongarm.inc index 4311543..b7cdf65 100644 --- a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.strongarm.inc +++ b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.strongarm.inc @@ -78,13 +78,13 @@ function f_candidate_details_strongarm() { 'extra_fields' => array( 'form' => array( 'metatags' => array( - 'weight' => '7', + 'weight' => '15', ), 'title' => array( 'weight' => '0', ), 'path' => array( - 'weight' => '8', + 'weight' => '16', ), ), 'display' => array(),