From: Tim Otten Date: Fri, 19 May 2023 04:58:51 +0000 (-0700) Subject: (REF) civicrm_data - Extract civicrm_financial_type, civicrm_location_type, etal X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8734ce945386b41cfd1965ff45c5d88311abae02;p=civicrm-core.git (REF) civicrm_data - Extract civicrm_financial_type, civicrm_location_type, etal And also: civicrm_mailing_component, civicrm_membership_status, civicrm_payment_processor_type, civicrm_preferences_date, civicrm_relationship_type, civicrm_tag --- diff --git a/sql/civicrm_data/civicrm_financial_type.sqldata.php b/sql/civicrm_data/civicrm_financial_type.sqldata.php new file mode 100644 index 0000000000..e823d69723 --- /dev/null +++ b/sql/civicrm_data/civicrm_financial_type.sqldata.php @@ -0,0 +1,12 @@ +addValueTable(['name', 'is_deductible'], [ + [ts('Donation'), 1], + [ts('Member Dues'), 1], + [ts('Campaign Contribution'), 0], + [ts('Event Fee'), 0], + ]) + ->addDefaults([ + 'is_reserved' => 0, + 'is_active' => 1, + ]); diff --git a/sql/civicrm_data/civicrm_location_type.sqldata.php b/sql/civicrm_data/civicrm_location_type.sqldata.php new file mode 100644 index 0000000000..4753ed7599 --- /dev/null +++ b/sql/civicrm_data/civicrm_location_type.sqldata.php @@ -0,0 +1,50 @@ +addValues([ + // CRM-9120 for legacy reasons we are continuing to translate the 'name', but this + // field is used mainly as an ID, and display_name will be shown to the user, but + // we have not yet finished modifying all places where the 'name' is shown. + [ + 'name' => ts('Home'), + 'display_name' => ts('Home'), + 'vcard_name' => 'HOME', + 'description' => ts('Place of residence'), + 'is_reserved' => 0, + 'is_default' => 1, + ], + [ + 'name' => ts('Work'), + 'display_name' => ts('Work'), + 'vcard_name' => 'WORK', + 'description' => ts('Work location'), + 'is_reserved' => 0, + ], + [ + 'name' => ts('Main'), + 'display_name' => ts('Main'), + 'vcard_name' => NULL, + 'description' => ts('Main office location'), + 'is_reserved' => 0, + ], + [ + 'name' => ts('Other'), + 'display_name' => ts('Other'), + 'vcard_name' => NULL, + 'description' => ts('Other location'), + 'is_reserved' => 0, + ], + // -- the following location must stay with the untranslated Billing name, CRM-2064 + [ + 'name' => 'Billing', + 'display_name' => ts('Billing'), + 'vcard_name' => NULL, + 'description' => ts('Billing Address location'), + 'is_reserved' => 1, + ], + ]) + ->addDefaults([ + 'is_active' => 1, + 'is_default' => NULL, + // FIXME: Doesn't 0 make more sense than NULL? + ]); diff --git a/sql/civicrm_data/civicrm_mailing_component.sqldata.php b/sql/civicrm_data/civicrm_mailing_component.sqldata.php new file mode 100644 index 0000000000..bd1283618a --- /dev/null +++ b/sql/civicrm_data/civicrm_mailing_component.sqldata.php @@ -0,0 +1,98 @@ +addValues([ + [ + 'name' => ts('Mailing Header'), + "component_type" => 'Header', + 'subject' => ts('Descriptive Title for this Header'), + 'body_html' => ts('Sample Header for HTML formatted content.'), + 'body_text' => ts('Sample Header for TEXT formatted content.'), + ], + [ + 'name' => ts("Mailing Footer"), + "component_type" => "Footer", + 'subject' => ts("Descriptive Title for this Footer."), + 'body_html' => ts('Sample Footer for HTML formatted content
Unsubscribe
{domain.address}'), + 'body_text' => ts("to unsubscribe: {action.optOutUrl}\n{domain.address}"), + ], + [ + 'name' => ts('Subscribe Message'), + "component_type" => 'Subscribe', + 'subject' => ts('Subscription Confirmation Request'), + 'body_html' => ts("You have a pending subscription to the %1 mailing list. To confirm this subscription, reply to this email or click here.", [ + 1 => $subgroup, + 2 => $suburl, + ]), + 'body_text' => ts('You have a pending subscription to the %1 mailing list. To confirm this subscription, reply to this email or click on this link: %2', [ + 1 => $subgroup, + 2 => $suburl, + ]), + ], + [ + 'name' => ts('Welcome Message'), + "component_type" => 'Welcome', + 'subject' => ts('Your Subscription has been Activated'), + 'body_html' => ts('Welcome. Your subscription to the %1 mailing list has been activated.', [1 => $welgroup]), + 'body_text' => ts('Welcome. Your subscription to the %1 mailing list has been activated.', [1 => $welgroup]), + ], + [ + 'name' => ts('Unsubscribe Message'), + 'component_type' => 'Unsubscribe', + 'subject' => ts('Un-subscribe Confirmation'), + 'body_html' => ts("You have been un-subscribed from the following groups: %1. You can re-subscribe by mailing %2 or clicking here.", [ + 1 => $unsubgroup, + 2 => $actresub, + 3 => $actresuburl, + ]), + 'body_text' => ts('You have been un-subscribed from the following groups: %1. You can re-subscribe by mailing %2 or clicking %3', [ + 1 => $unsubgroup, + 2 => $actresub, + 3 => $actresuburl, + ]), + ], + [ + 'name' => ts('Resubscribe Message'), + 'component_type' => 'Resubscribe', + 'subject' => ts('Re-subscribe Confirmation'), + 'body_html' => ts('You have been re-subscribed to the following groups: %1. You can un-subscribe by mailing %2 or clicking here.', [ + 1 => $resubgroup, + 2 => $actunsub, + 3 => $actunsuburl, + ]), + 'body_text' => ts('You have been re-subscribed to the following groups: %1. You can un-subscribe by mailing %2 or clicking %3', [ + 1 => $resubgroup, + 2 => $actunsub, + 3 => $actunsuburl, + ]), + ], + [ + 'name' => ts('Opt-out Message'), + 'component_type' => 'OptOut', + 'subject' => ts('Opt-out Confirmation'), + 'body_html' => ts('Your email address has been removed from %1 mailing lists.', [1 => $domname]), + 'body_text' => ts('Your email address has been removed from %1 mailing lists.', [1 => $domname]), + ], + [ + 'name' => ts('Auto-responder'), + 'component_type' => 'Reply', + 'subject' => ts('Please Send Inquiries to Our Contact Email Address'), + 'body_html' => ts('This is an automated reply from an un-attended mailbox. Please send any inquiries to the contact email address listed on our web-site.'), + 'body_text' => ts('This is an automated reply from an un-attended mailbox. Please send any inquiries to the contact email address listed on our web-site.'), + ], + ]) + ->addDefaults([ + 'is_default' => 1, + 'is_active' => 1, + ]); diff --git a/sql/civicrm_data/civicrm_membership_status.sqldata.php b/sql/civicrm_data/civicrm_membership_status.sqldata.php new file mode 100644 index 0000000000..22e7431edb --- /dev/null +++ b/sql/civicrm_data/civicrm_membership_status.sqldata.php @@ -0,0 +1,117 @@ +addValues([ + [ + 'name' => 'New', + 'label' => ts('New'), + 'start_event' => 'join_date', + 'start_event_adjust_unit' => NULL, + 'start_event_adjust_interval' => NULL, + 'end_event' => 'join_date', + 'end_event_adjust_unit' => 'month', + 'end_event_adjust_interval' => 3, + 'is_current_member' => 1, + 'is_admin' => 0, + 'weight' => 1, + 'is_default' => 0, + 'is_active' => 1, + 'is_reserved' => 0, + ], + [ + 'name' => 'Current', + 'label' => ts('Current'), + 'start_event' => 'start_date', + 'start_event_adjust_unit' => NULL, + 'start_event_adjust_interval' => NULL, + 'end_event' => 'end_date', + 'end_event_adjust_unit' => NULL, + 'end_event_adjust_interval' => NULL, + 'is_current_member' => 1, + 'is_admin' => 0, + 'weight' => 2, + 'is_default' => 1, + 'is_active' => 1, + 'is_reserved' => 0, + ], + [ + 'name' => 'Grace', + 'label' => ts('Grace'), + 'start_event' => 'end_date', + 'start_event_adjust_unit' => NULL, + 'start_event_adjust_interval' => NULL, + 'end_event' => 'end_date', + 'end_event_adjust_unit' => 'month', + 'end_event_adjust_interval' => 1, + 'is_current_member' => 1, + 'is_admin' => 0, + 'weight' => 3, + 'is_default' => 0, + 'is_active' => 1, + 'is_reserved' => 0, + ], + [ + 'name' => 'Expired', + 'label' => ts('Expired'), + 'start_event' => 'end_date', + 'start_event_adjust_unit' => 'month', + 'start_event_adjust_interval' => 1, + 'end_event' => NULL, + 'end_event_adjust_unit' => NULL, + 'end_event_adjust_interval' => NULL, + 'is_current_member' => 0, + 'is_admin' => 0, + 'weight' => 4, + 'is_default' => 0, + 'is_active' => 1, + 'is_reserved' => 0, + ], + [ + 'name' => 'Pending', + 'label' => ts('Pending'), + 'start_event' => 'join_date', + 'start_event_adjust_unit' => NULL, + 'start_event_adjust_interval' => NULL, + 'end_event' => 'join_date', + 'end_event_adjust_unit' => NULL, + 'end_event_adjust_interval' => NULL, + 'is_current_member' => 0, + 'is_admin' => 0, + 'weight' => 5, + 'is_default' => 0, + 'is_active' => 1, + 'is_reserved' => 1, + ], + [ + 'name' => 'Cancelled', + 'label' => ts('Cancelled'), + 'start_event' => 'join_date', + 'start_event_adjust_unit' => NULL, + 'start_event_adjust_interval' => NULL, + 'end_event' => 'join_date', + 'end_event_adjust_unit' => NULL, + 'end_event_adjust_interval' => NULL, + 'is_current_member' => 0, + 'is_admin' => 0, + 'weight' => 6, + 'is_default' => 0, + 'is_active' => 1, + 'is_reserved' => 1, + ], + [ + 'name' => 'Deceased', + 'label' => ts('Deceased'), + 'start_event' => NULL, + 'start_event_adjust_unit' => NULL, + 'start_event_adjust_interval' => NULL, + 'end_event' => NULL, + 'end_event_adjust_unit' => NULL, + 'end_event_adjust_interval' => NULL, + 'is_current_member' => 0, + 'is_admin' => 1, + 'weight' => 7, + 'is_default' => 0, + 'is_active' => 1, + 'is_reserved' => 1, + ], + ]); diff --git a/sql/civicrm_data/civicrm_payment_processor_type.sqldata.php b/sql/civicrm_data/civicrm_payment_processor_type.sqldata.php new file mode 100644 index 0000000000..834a25d0b0 --- /dev/null +++ b/sql/civicrm_data/civicrm_payment_processor_type.sqldata.php @@ -0,0 +1,181 @@ +addValues([ + [ + 'name' => 'PayPal_Standard', + 'title' => ts('PayPal - Website Payments Standard'), + 'description' => NULL, + 'is_active' => 1, + 'is_default' => 0, + 'user_name_label' => ts('Merchant Account Email'), + 'password_label' => NULL, + 'signature_label' => NULL, + 'subject_label' => NULL, + 'class_name' => 'Payment_PayPalImpl', + 'url_site_default' => 'https://www.paypal.com/', + 'url_api_default' => NULL, + 'url_recur_default' => 'https://www.paypal.com/', + 'url_button_default' => NULL, + 'url_site_test_default' => 'https://www.sandbox.paypal.com/', + 'url_api_test_default' => NULL, + 'url_recur_test_default' => 'https://www.sandbox.paypal.com/', + 'url_button_test_default' => NULL, + 'billing_mode' => 4, + 'is_recur' => 1, + ], + [ + 'name' => 'PayPal', + 'title' => ts('PayPal - Website Payments Pro'), + 'description' => NULL, + 'is_active' => 1, + 'is_default' => 0, + 'user_name_label' => ts('User Name'), + 'password_label' => ts('Password'), + 'signature_label' => ts('Signature'), + 'subject_label' => NULL, + 'class_name' => 'Payment_PayPalImpl', + 'url_site_default' => 'https://www.paypal.com/', + 'url_api_default' => 'https://api-3t.paypal.com/', + 'url_recur_default' => 'https://www.paypal.com/', + 'url_button_default' => 'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif', + 'url_site_test_default' => 'https://www.sandbox.paypal.com/', + 'url_api_test_default' => 'https://api-3t.sandbox.paypal.com/', + 'url_recur_test_default' => 'https://www.sandbox.paypal.com/', + 'url_button_test_default' => 'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif', + 'billing_mode' => 3, + 'is_recur' => 1, + ], + [ + 'name' => 'PayPal_Express', + 'title' => ts('PayPal - Express'), + 'description' => NULL, + 'is_active' => 1, + 'is_default' => 0, + 'user_name_label' => ts('User Name'), + 'password_label' => ts('Password'), + 'signature_label' => ts('Signature'), + 'subject_label' => NULL, + 'class_name' => 'Payment_PayPalImpl', + 'url_site_default' => 'https://www.paypal.com/', + 'url_api_default' => 'https://api-3t.paypal.com/', + 'url_recur_default' => NULL, + 'url_button_default' => 'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif', + 'url_site_test_default' => 'https://www.sandbox.paypal.com/', + 'url_api_test_default' => 'https://api-3t.sandbox.paypal.com/', + 'url_recur_test_default' => NULL, + 'url_button_test_default' => 'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif', + 'billing_mode' => 2, + 'is_recur' => 1, + ], + [ + 'name' => 'AuthNet', + 'title' => ts('Authorize.Net'), + 'description' => NULL, + 'is_active' => 1, + 'is_default' => 0, + 'user_name_label' => ts('API Login'), + 'password_label' => ts('Payment Key'), + 'signature_label' => ts('MD5 Hash'), + 'subject_label' => NULL, + 'class_name' => 'Payment_AuthorizeNet', + 'url_site_default' => 'https://secure2.authorize.net/gateway/transact.dll', + 'url_api_default' => NULL, + 'url_recur_default' => 'https://api2.authorize.net/xml/v1/request.api', + 'url_button_default' => NULL, + 'url_site_test_default' => 'https://test.authorize.net/gateway/transact.dll', + 'url_api_test_default' => NULL, + 'url_recur_test_default' => 'https://apitest.authorize.net/xml/v1/request.api', + 'url_button_test_default' => NULL, + 'billing_mode' => 1, + 'is_recur' => 1, + ], + [ + 'name' => 'PayJunction', + 'title' => ts('PayJunction'), + 'description' => NULL, + 'is_active' => 0, + 'is_default' => 0, + 'user_name_label' => 'User Name', + 'password_label' => 'Password', + 'signature_label' => NULL, + 'subject_label' => NULL, + 'class_name' => 'Payment_PayJunction', + 'url_site_default' => 'https://payjunction.com/quick_link', + 'url_api_default' => NULL, + 'url_recur_default' => NULL, + 'url_button_default' => NULL, + 'url_site_test_default' => 'https://www.payjunctionlabs.com/quick_link', + 'url_api_test_default' => NULL, + 'url_recur_test_default' => NULL, + 'url_button_test_default' => NULL, + 'billing_mode' => 1, + 'is_recur' => 1, + ], + [ + 'name' => 'Dummy', + 'title' => ts('Dummy Payment Processor'), + 'description' => NULL, + 'is_active' => 1, + 'is_default' => 1, + 'user_name_label' => ts('User Name'), + 'password_label' => NULL, + 'signature_label' => NULL, + 'subject_label' => NULL, + 'class_name' => 'Payment_Dummy', + 'url_site_default' => NULL, + 'url_api_default' => NULL, + 'url_recur_default' => NULL, + 'url_button_default' => NULL, + 'url_site_test_default' => NULL, + 'url_api_test_default' => NULL, + 'url_recur_test_default' => NULL, + 'url_button_test_default' => NULL, + 'billing_mode' => 1, + 'is_recur' => 1, + ], + [ + 'name' => 'Realex', + 'title' => ts('Realex Payment'), + 'description' => NULL, + 'is_active' => 0, + 'is_default' => 0, + 'user_name_label' => 'Merchant ID', + 'password_label' => 'Password', + 'signature_label' => NULL, + 'subject_label' => 'Account', + 'class_name' => 'Payment_Realex', + 'url_site_default' => 'https://epage.payandshop.com/epage.cgi', + 'url_api_default' => NULL, + 'url_recur_default' => NULL, + 'url_button_default' => NULL, + 'url_site_test_default' => 'https://epage.payandshop.com/epage-remote.cgi', + 'url_api_test_default' => NULL, + 'url_recur_test_default' => NULL, + 'url_button_test_default' => NULL, + 'billing_mode' => 1, + 'is_recur' => 0, + ], + [ + 'name' => 'FirstData', + 'title' => ts('FirstData (aka linkpoint)'), + 'description' => ts('FirstData (aka linkpoint)'), + 'is_active' => 0, + 'is_default' => 0, + 'user_name_label' => 'Store name', + 'password_label' => 'certificate path', + 'signature_label' => NULL, + 'subject_label' => NULL, + 'class_name' => 'Payment_FirstData', + 'url_site_default' => 'https://secure.linkpt.net', + 'url_api_default' => NULL, + 'url_recur_default' => NULL, + 'url_button_default' => NULL, + 'url_site_test_default' => 'https://staging.linkpt.net', + 'url_api_test_default' => NULL, + 'url_recur_test_default' => NULL, + 'url_button_test_default' => NULL, + 'billing_mode' => 1, + 'is_recur' => 0, + ], + ]); diff --git a/sql/civicrm_data/civicrm_preferences_date.sqldata.php b/sql/civicrm_data/civicrm_preferences_date.sqldata.php new file mode 100644 index 0000000000..467460e28d --- /dev/null +++ b/sql/civicrm_data/civicrm_preferences_date.sqldata.php @@ -0,0 +1,60 @@ +addValues([ + [ + 'name' => 'activityDate', + 'start' => 20, + 'end' => 10, + 'date_format' => '', + 'time_format' => '', + 'description' => ts('Date for relationships. activities. contributions: receive, receipt, cancel. membership: join, start, renew. case: start, end.'), + ], + [ + 'name' => 'activityDateTime', + 'start' => 20, + 'end' => 10, + 'date_format' => '', + 'time_format' => 1, + 'description' => ts('Date and time for activity: scheduled. participant: registered.'), + ], + [ + 'name' => 'birth', + 'start' => 100, + 'end' => 0, + 'date_format' => '', + 'time_format' => '', + 'description' => ts('Birth and deceased dates. Only year, month and day fields are supported.'), + ], + [ + 'name' => 'creditCard', + 'start' => 0, + 'end' => 10, + 'date_format' => 'M Y', + 'time_format' => '', + 'description' => ts('Month and year only for credit card expiration.'), + ], + [ + 'name' => 'custom', + 'start' => 20, + 'end' => 20, + 'date_format' => '', + 'time_format' => '', + 'description' => ts('Uses date range passed in by form field. Can pass in a posix date part parameter. Start and end offsets defined here are ignored.'), + ], + [ + 'name' => 'mailing', + 'start' => 0, + 'end' => 1, + 'date_format' => '', + 'time_format' => '', + 'description' => ts('Date and time. Used for scheduling mailings.'), + ], + [ + 'name' => 'searchDate', + 'start' => 20, + 'end' => 20, + 'date_format' => '', + 'time_format' => '', + 'description' => ts('Used in search forms.'), + ], + ]); diff --git a/sql/civicrm_data/civicrm_relationship_type.sqldata.php b/sql/civicrm_data/civicrm_relationship_type.sqldata.php new file mode 100644 index 0000000000..d9967af5b5 --- /dev/null +++ b/sql/civicrm_data/civicrm_relationship_type.sqldata.php @@ -0,0 +1,105 @@ +addValues([ + [ + 'name_a_b' => 'Child of', + 'label_a_b' => ts('Child of'), + 'name_b_a' => 'Parent of', + 'label_b_a' => ts('Parent of'), + 'description' => ts('Parent/child relationship.'), + 'contact_type_a' => 'Individual', + 'contact_type_b' => 'Individual', + 'is_reserved' => 0, + ], + [ + 'name_a_b' => 'Spouse of', + 'label_a_b' => ts('Spouse of'), + 'name_b_a' => 'Spouse of', + 'label_b_a' => ts('Spouse of'), + 'description' => ts('Spousal relationship.'), + 'contact_type_a' => 'Individual', + 'contact_type_b' => 'Individual', + 'is_reserved' => 0, + ], + [ + 'name_a_b' => 'Partner of', + 'label_a_b' => ts('Partner of'), + 'name_b_a' => 'Partner of', + 'label_b_a' => ts('Partner of'), + 'description' => ts('Partner relationship.'), + 'contact_type_a' => 'Individual', + 'contact_type_b' => 'Individual', + 'is_reserved' => 0, + ], + [ + 'name_a_b' => 'Sibling of', + 'label_a_b' => ts('Sibling of'), + 'name_b_a' => 'Sibling of', + 'label_b_a' => ts('Sibling of'), + 'description' => ts('Sibling relationship.'), + 'contact_type_a' => 'Individual', + 'contact_type_b' => 'Individual', + 'is_reserved' => 0, + ], + [ + 'name_a_b' => 'Employee of', + 'label_a_b' => ts('Employee of'), + 'name_b_a' => 'Employer of', + 'label_b_a' => ts('Employer of'), + 'description' => ts('Employment relationship.'), + 'contact_type_a' => 'Individual', + 'contact_type_b' => 'Organization', + 'is_reserved' => 1, + ], + [ + 'name_a_b' => 'Volunteer for', + 'label_a_b' => ts('Volunteer for'), + 'name_b_a' => 'Volunteer is', + 'label_b_a' => ts('Volunteer is'), + 'description' => ts('Volunteer relationship.'), + 'contact_type_a' => 'Individual', + 'contact_type_b' => 'Organization', + 'is_reserved' => 0, + ], + [ + 'name_a_b' => 'Head of Household for', + 'label_a_b' => ts('Head of Household for'), + 'name_b_a' => 'Head of Household is', + 'label_b_a' => ts('Head of Household is'), + 'description' => ts('Head of household.'), + 'contact_type_a' => 'Individual', + 'contact_type_b' => 'Household', + 'is_reserved' => 1, + ], + [ + 'name_a_b' => 'Household Member of', + 'label_a_b' => ts('Household Member of'), + 'name_b_a' => 'Household Member is', + 'label_b_a' => ts('Household Member is'), + 'description' => ts('Household membership.'), + 'contact_type_a' => 'Individual', + 'contact_type_b' => 'Household', + 'is_reserved' => 1, + ], + [ + 'name_a_b' => 'Case Coordinator is', + 'label_a_b' => 'Case Coordinator is', + 'name_b_a' => 'Case Coordinator', + 'label_b_a' => 'Case Coordinator', + 'description' => 'Case Coordinator', + 'contact_type_a' => 'Individual', + 'contact_type_b' => 'Individual', + 'is_reserved' => 0, + ], + [ + 'name_a_b' => 'Supervised by', + 'label_a_b' => 'Supervised by', + 'name_b_a' => 'Supervisor', + 'label_b_a' => 'Supervisor', + 'description' => 'Immediate workplace supervisor', + 'contact_type_a' => 'Individual', + 'contact_type_b' => 'Individual', + 'is_reserved' => 0, + ], + ]); diff --git a/sql/civicrm_data/civicrm_tag.sqldata.php b/sql/civicrm_data/civicrm_tag.sqldata.php new file mode 100644 index 0000000000..ad638610b3 --- /dev/null +++ b/sql/civicrm_data/civicrm_tag.sqldata.php @@ -0,0 +1,34 @@ +addValues([ + [ + 'name' => ts('Non-profit'), + 'description' => ts('Any not-for-profit organization.'), + 'parent_id' => NULL, + 'used_for' => 'civicrm_contact', + ], + [ + 'name' => ts('Company'), + 'description' => ts('For-profit organization.'), + 'parent_id' => NULL, + 'used_for' => 'civicrm_contact', + ], + [ + 'name' => ts('Government Entity'), + 'description' => ts('Any governmental entity.'), + 'parent_id' => NULL, + 'used_for' => 'civicrm_contact', + ], + [ + 'name' => ts('Major Donor'), + 'description' => ts('High-value supporter of our organization.'), + 'parent_id' => NULL, + 'used_for' => 'civicrm_contact', + ], + [ + 'name' => ts('Volunteer'), + 'description' => ts('Active volunteers.'), + 'parent_id' => NULL, + 'used_for' => 'civicrm_contact', + ], + ]); diff --git a/xml/templates/civicrm_data.tpl b/xml/templates/civicrm_data.tpl index 1f7289b0ce..0e59e18c6a 100644 --- a/xml/templates/civicrm_data.tpl +++ b/xml/templates/civicrm_data.tpl @@ -43,82 +43,13 @@ VALUES INSERT INTO civicrm_domain (name, version, contact_id) VALUES (@domainName, '2.2', @contactID); SELECT @domainID := id FROM civicrm_domain where name = 'Default Domain Name'; --- Sample location types --- CRM-9120 for legacy reasons we are continuing to translate the 'name', but this --- field is used mainly as an ID, and display_name will be shown to the user, but --- we have not yet finished modifying all places where the 'name' is shown. -INSERT INTO civicrm_location_type( name, display_name, vcard_name, description, is_reserved, is_active, is_default ) VALUES( '{ts escape="sql"}Home{/ts}', '{ts escape="sql"}Home{/ts}', 'HOME', '{ts escape="sql"}Place of residence{/ts}', 0, 1, 1 ); -INSERT INTO civicrm_location_type( name, display_name, vcard_name, description, is_reserved, is_active ) VALUES( '{ts escape="sql"}Work{/ts}', '{ts escape="sql"}Work{/ts}', 'WORK', '{ts escape="sql"}Work location{/ts}', 0, 1 ); -INSERT INTO civicrm_location_type( name, display_name, vcard_name, description, is_reserved, is_active ) VALUES( '{ts escape="sql"}Main{/ts}', '{ts escape="sql"}Main{/ts}', NULL, '{ts escape="sql"}Main office location{/ts}', 0, 1 ); -INSERT INTO civicrm_location_type( name, display_name, vcard_name, description, is_reserved, is_active ) VALUES( '{ts escape="sql"}Other{/ts}', '{ts escape="sql"}Other{/ts}', NULL, '{ts escape="sql"}Other location{/ts}', 0, 1 ); --- the following location must stay with the untranslated Billing name, CRM-2064 -INSERT INTO civicrm_location_type( name, display_name, vcard_name, description, is_reserved, is_active ) VALUES( 'Billing', '{ts escape="sql"}Billing{/ts}', NULL, '{ts escape="sql"}Billing Address location{/ts}', 1, 1 ); - --- Sample relationship types -INSERT INTO civicrm_relationship_type( name_a_b,label_a_b, name_b_a,label_b_a, description, contact_type_a, contact_type_b, is_reserved ) - VALUES( 'Child of', '{ts escape="sql"}Child of{/ts}', 'Parent of', '{ts escape="sql"}Parent of{/ts}', '{ts escape="sql"}Parent/child relationship.{/ts}', 'Individual', 'Individual', 0 ), - ( 'Spouse of', '{ts escape="sql"}Spouse of{/ts}', 'Spouse of', '{ts escape="sql"}Spouse of{/ts}', '{ts escape="sql"}Spousal relationship.{/ts}', 'Individual', 'Individual', 0 ), - ( 'Partner of', '{ts escape="sql"}Partner of{/ts}', 'Partner of', '{ts escape="sql"}Partner of{/ts}', '{ts escape="sql"}Partner relationship.{/ts}', 'Individual', 'Individual', 0 ), - ( 'Sibling of', '{ts escape="sql"}Sibling of{/ts}', 'Sibling of', '{ts escape="sql"}Sibling of{/ts}', '{ts escape="sql"}Sibling relationship.{/ts}', 'Individual','Individual', 0 ), - ( 'Employee of', '{ts escape="sql"}Employee of{/ts}', 'Employer of', '{ts escape="sql"}Employer of{/ts}', '{ts escape="sql"}Employment relationship.{/ts}','Individual','Organization', 1 ), - ( 'Volunteer for', '{ts escape="sql"}Volunteer for{/ts}', 'Volunteer is', '{ts escape="sql"}Volunteer is{/ts}', '{ts escape="sql"}Volunteer relationship.{/ts}','Individual','Organization', 0 ), - ( 'Head of Household for', '{ts escape="sql"}Head of Household for{/ts}', 'Head of Household is', '{ts escape="sql"}Head of Household is{/ts}', '{ts escape="sql"}Head of household.{/ts}','Individual','Household', 1 ), - ( 'Household Member of', '{ts escape="sql"}Household Member of{/ts}', 'Household Member is', '{ts escape="sql"}Household Member is{/ts}', '{ts escape="sql"}Household membership.{/ts}','Individual','Household', 1 ); - --- Relationship Types for CiviCase -INSERT INTO civicrm_relationship_type( name_a_b,label_a_b, name_b_a,label_b_a, description, contact_type_a, contact_type_b, is_reserved ) - VALUES( 'Case Coordinator is', 'Case Coordinator is', 'Case Coordinator', 'Case Coordinator', 'Case Coordinator', 'Individual', 'Individual', 0 ); -INSERT INTO civicrm_relationship_type( name_a_b,label_a_b, name_b_a,label_b_a, description, contact_type_a, contact_type_b, is_reserved ) - VALUES( 'Supervised by', 'Supervised by', 'Supervisor', 'Supervisor', 'Immediate workplace supervisor', 'Individual', 'Individual', 0 ); - - --- Sample Tags -INSERT INTO civicrm_tag( name, description, parent_id,used_for ) - VALUES - ( '{ts escape="sql"}Non-profit{/ts}', '{ts escape="sql"}Any not-for-profit organization.{/ts}', NULL,'civicrm_contact'), - ( '{ts escape="sql"}Company{/ts}', '{ts escape="sql"}For-profit organization.{/ts}', NULL,'civicrm_contact'), - ( '{ts escape="sql"}Government Entity{/ts}', '{ts escape="sql"}Any governmental entity.{/ts}', NULL,'civicrm_contact'), - ( '{ts escape="sql"}Major Donor{/ts}', '{ts escape="sql"}High-value supporter of our organization.{/ts}', NULL,'civicrm_contact'), - ( '{ts escape="sql"}Volunteer{/ts}', '{ts escape="sql"}Active volunteers.{/ts}', NULL,'civicrm_contact' ); - -{capture assign=subgroup}{ldelim}subscribe.group{rdelim}{/capture} -{capture assign=suburl}{ldelim}subscribe.url{rdelim}{/capture} -{capture assign=welgroup}{ldelim}welcome.group{rdelim}{/capture} -{capture assign=unsubgroup}{ldelim}unsubscribe.group{rdelim}{/capture} -{capture assign=actresub}{ldelim}action.resubscribe{rdelim}{/capture} -{capture assign=actresuburl}{ldelim}action.resubscribeUrl{rdelim}{/capture} -{capture assign=resubgroup}{ldelim}resubscribe.group{rdelim}{/capture} -{capture assign=actunsub}{ldelim}action.unsubscribe{rdelim}{/capture} -{capture assign=actunsuburl}{ldelim}action.unsubscribeUrl{rdelim}{/capture} -{capture assign=domname}{ldelim}domain.name{rdelim}{/capture} - --- sample CiviCRM mailing components -INSERT INTO civicrm_mailing_component - (name,component_type,subject,body_html,body_text,is_default,is_active) -VALUES - ('{ts escape="sql"}Mailing Header{/ts}','Header','{ts escape="sql"}Descriptive Title for this Header{/ts}','{ts escape="sql"}Sample Header for HTML formatted content.{/ts}','{ts escape="sql"}Sample Header for TEXT formatted content.{/ts}',1,1), - ('{ts escape="sql"}Mailing Footer{/ts}','Footer','{ts escape="sql"}Descriptive Title for this Footer.{/ts}','{ts escape="sql"}Sample Footer for HTML formatted content
Unsubscribe
{ldelim}domain.address{rdelim}{/ts}','{ts escape="sql"}to unsubscribe: {ldelim}action.optOutUrl{rdelim} -{ldelim}domain.address{rdelim}{/ts}',1,1), - ('{ts escape="sql"}Subscribe Message{/ts}','Subscribe','{ts escape="sql"}Subscription Confirmation Request{/ts}','{ts escape="sql" 1=$subgroup 2=$suburl}You have a pending subscription to the %1 mailing list. To confirm this subscription, reply to this email or click here.{/ts}','{ts escape="sql" 1=$subgroup 2=$suburl}You have a pending subscription to the %1 mailing list. To confirm this subscription, reply to this email or click on this link: %2{/ts}',1,1), - ('{ts escape="sql"}Welcome Message{/ts}','Welcome','{ts escape="sql"}Your Subscription has been Activated{/ts}','{ts escape="sql" 1=$welgroup}Welcome. Your subscription to the %1 mailing list has been activated.{/ts}','{ts escape="sql" 1=$welgroup}Welcome. Your subscription to the %1 mailing list has been activated.{/ts}',1,1), - ('{ts escape="sql"}Unsubscribe Message{/ts}','Unsubscribe','{ts escape="sql"}Un-subscribe Confirmation{/ts}','{ts escape="sql" 1=$unsubgroup 2=$actresub 3=$actresuburl}You have been un-subscribed from the following groups: %1. You can re-subscribe by mailing %2 or clicking here.{/ts}','{ts escape="sql" 1=$unsubgroup 2=$actresub 3=$actresuburl}You have been un-subscribed from the following groups: %1. You can re-subscribe by mailing %2 or clicking %3{/ts}',1,1), - ('{ts escape="sql"}Resubscribe Message{/ts}','Resubscribe','{ts escape="sql"}Re-subscribe Confirmation{/ts}','{ts escape="sql" 1=$resubgroup 2=$actunsub 3=$actunsuburl}You have been re-subscribed to the following groups: %1. You can un-subscribe by mailing %2 or clicking here.{/ts}','{ts escape="sql" 1=$resubgroup 2=$actunsub 3=$actunsuburl}You have been re-subscribed to the following groups: %1. You can un-subscribe by mailing %2 or clicking %3{/ts}',1,1), - ('{ts escape="sql"}Opt-out Message{/ts}','OptOut','{ts escape="sql"}Opt-out Confirmation{/ts}','{ts escape="sql" 1=$domname}Your email address has been removed from %1 mailing lists.{/ts}','{ts escape="sql" 1=$domname}Your email address has been removed from %1 mailing lists.{/ts}',1,1), - ('{ts escape="sql"}Auto-responder{/ts}','Reply','{ts escape="sql"}Please Send Inquiries to Our Contact Email Address{/ts}','{ts escape="sql"}This is an automated reply from an un-attended mailbox. Please send any inquiries to the contact email address listed on our web-site.{/ts}','{ts escape="sql"}This is an automated reply from an un-attended mailbox. Please send any inquiries to the contact email address listed on our web-site.{/ts}',1,1); - - --- contribution types -INSERT INTO - civicrm_financial_type(name, is_reserved, is_active, is_deductible) -VALUES - ( '{ts escape="sql"}Donation{/ts}' , 0, 1, 1 ), - ( '{ts escape="sql"}Member Dues{/ts}' , 0, 1, 1 ), - ( '{ts escape="sql"}Campaign Contribution{/ts}', 0, 1, 0 ), - ( '{ts escape="sql"}Event Fee{/ts}' , 0, 1, 0 ); - --- option groups and values for 'preferred communication methods' , 'activity types', 'gender', etc. - {php} + echo (include "sql/civicrm_data/civicrm_location_type.sqldata.php")->toSQL(); + echo (include "sql/civicrm_data/civicrm_relationship_type.sqldata.php")->toSQL(); + echo (include "sql/civicrm_data/civicrm_tag.sqldata.php")->toSQL(); + echo (include "sql/civicrm_data/civicrm_mailing_component.sqldata.php")->toSQL(); + echo (include "sql/civicrm_data/civicrm_financial_type.sqldata.php")->toSQL(); + $optionGroups = include 'sql/civicrm_data/civicrm_option_group.php'; $laterGroups = ['encounter_medium', 'soft_credit_type', 'recent_items_providers']; foreach ($optionGroups as $groupName => $group) { @@ -159,49 +90,12 @@ VALUES -- CRM-6138 {include file='languages.tpl'} -{php}echo $optionGroups['encounter_medium']->toSQL();{/php} - --- sample membership status entries -INSERT INTO - civicrm_membership_status(name, label, start_event, start_event_adjust_unit, start_event_adjust_interval, end_event, end_event_adjust_unit, end_event_adjust_interval, is_current_member, is_admin, weight, is_default, is_active, is_reserved) -VALUES - ('New', '{ts escape="sql"}New{/ts}', 'join_date', null, null,'join_date','month',3, 1, 0, 1, 0, 1, 0), - ('Current', '{ts escape="sql"}Current{/ts}', 'start_date', null, null,'end_date', null, null, 1, 0, 2, 1, 1, 0), - ('Grace', '{ts escape="sql"}Grace{/ts}', 'end_date', null, null,'end_date','month', 1, 1, 0, 3, 0, 1, 0), - ('Expired', '{ts escape="sql"}Expired{/ts}', 'end_date', 'month', 1, null, null, null, 0, 0, 4, 0, 1, 0), - ('Pending', '{ts escape="sql"}Pending{/ts}', 'join_date', null, null,'join_date',null,null, 0, 0, 5, 0, 1, 1), - ('Cancelled', '{ts escape="sql"}Cancelled{/ts}', 'join_date', null, null,'join_date',null,null, 0, 0, 6, 0, 1, 1), - ('Deceased', '{ts escape="sql"}Deceased{/ts}', null, null, null, null, null, null, 0, 1, 7, 0, 1, 1); - - -INSERT INTO `civicrm_preferences_date` - (name, start, end, date_format, time_format, description) -VALUES - ( 'activityDate' , 20, 10, '', '', '{ts escape="sql"}Date for relationships. activities. contributions: receive, receipt, cancel. membership: join, start, renew. case: start, end.{/ts}' ), - ( 'activityDateTime', 20, 10, '', 1, '{ts escape="sql"}Date and time for activity: scheduled. participant: registered.{/ts}' ), - ( 'birth' , 100, 0, '', '', '{ts escape="sql"}Birth and deceased dates. Only year, month and day fields are supported.{/ts}' ), - ( 'creditCard' , 0, 10, 'M Y', '', '{ts escape="sql"}Month and year only for credit card expiration.{/ts}' ), - ( 'custom' , 20, 20, '', '', '{ts escape="sql"}Uses date range passed in by form field. Can pass in a posix date part parameter. Start and end offsets defined here are ignored.{/ts}'), - ( 'mailing' , 0, 1, '', '', '{ts escape="sql"}Date and time. Used for scheduling mailings.{/ts}' ), - ( 'searchDate' , 20, 20, '', '', '{ts escape="sql"}Used in search forms.{/ts}' ); - - --- various processor options --- --- Table structure for table `civicrm_payment_processor_type` --- - -INSERT INTO `civicrm_payment_processor_type` - (name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_api_default, url_recur_default, url_button_default, url_site_test_default, url_api_test_default, url_recur_test_default, url_button_test_default, billing_mode, is_recur ) -VALUES - ('PayPal_Standard', '{ts escape="sql"}PayPal - Website Payments Standard{/ts}', NULL,1,0,'{ts escape="sql"}Merchant Account Email{/ts}',NULL,NULL,NULL,'Payment_PayPalImpl','https://www.paypal.com/',NULL,'https://www.paypal.com/',NULL,'https://www.sandbox.paypal.com/',NULL,'https://www.sandbox.paypal.com/',NULL,4,1), - ('PayPal', '{ts escape="sql"}PayPal - Website Payments Pro{/ts}', NULL,1,0,'{ts escape="sql"}User Name{/ts}','{ts escape="sql"}Password{/ts}','{ts escape="sql"}Signature{/ts}',NULL,'Payment_PayPalImpl','https://www.paypal.com/','https://api-3t.paypal.com/','https://www.paypal.com/','https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif','https://www.sandbox.paypal.com/','https://api-3t.sandbox.paypal.com/','https://www.sandbox.paypal.com/','https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif',3, 1), - ('PayPal_Express', '{ts escape="sql"}PayPal - Express{/ts}', NULL,1,0,'{ts escape="sql"}User Name{/ts}','{ts escape="sql"}Password{/ts}','{ts escape="sql"}Signature{/ts}',NULL,'Payment_PayPalImpl','https://www.paypal.com/','https://api-3t.paypal.com/',NULL,'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif','https://www.sandbox.paypal.com/','https://api-3t.sandbox.paypal.com/',NULL,'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif',2, 1), - ('AuthNet', '{ts escape="sql"}Authorize.Net{/ts}', NULL,1,0,'{ts escape="sql"}API Login{/ts}','{ts escape="sql"}Payment Key{/ts}','{ts escape="sql"}MD5 Hash{/ts}',NULL,'Payment_AuthorizeNet','https://secure2.authorize.net/gateway/transact.dll',NULL,'https://api2.authorize.net/xml/v1/request.api',NULL,'https://test.authorize.net/gateway/transact.dll',NULL,'https://apitest.authorize.net/xml/v1/request.api',NULL,1,1), - ('PayJunction', '{ts escape="sql"}PayJunction{/ts}', NULL,0,0,'User Name','Password',NULL,NULL,'Payment_PayJunction','https://payjunction.com/quick_link',NULL,NULL,NULL,'https://www.payjunctionlabs.com/quick_link',NULL,NULL,NULL,1,1), - ('Dummy', '{ts escape="sql"}Dummy Payment Processor{/ts}',NULL,1,1,'{ts escape="sql"}User Name{/ts}',NULL,NULL,NULL,'Payment_Dummy',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1), - ('Realex', '{ts escape="sql"}Realex Payment{/ts}', NULL,0,0,'Merchant ID', 'Password', NULL, 'Account', 'Payment_Realex', 'https://epage.payandshop.com/epage.cgi', NULL, NULL, NULL, 'https://epage.payandshop.com/epage-remote.cgi', NULL, NULL, NULL, 1, 0), - ('FirstData', '{ts escape="sql"}FirstData (aka linkpoint){/ts}', '{ts escape="sql"}FirstData (aka linkpoint){/ts}', 0, 0, 'Store name', 'certificate path', NULL, NULL, 'Payment_FirstData', 'https://secure.linkpt.net', NULL, NULL, NULL, 'https://staging.linkpt.net', NULL, NULL, NULL, 1, 0); +{php} + echo $optionGroups['encounter_medium']->toSQL(); + echo (include "sql/civicrm_data/civicrm_membership_status.sqldata.php")->toSQL(); + echo (include "sql/civicrm_data/civicrm_preferences_date.sqldata.php")->toSQL(); + echo (include "sql/civicrm_data/civicrm_payment_processor_type.sqldata.php")->toSQL(); +{/php} -- the fuzzy default dedupe rules