Merge pull request #67 from dpradeep/merge-20140827
authorKurund Jalmi <kurund@civicrm.org>
Wed, 27 Aug 2014 13:54:20 +0000 (19:24 +0530)
committerKurund Jalmi <kurund@civicrm.org>
Wed, 27 Aug 2014 13:54:20 +0000 (19:24 +0530)
merging civicrm canonical master into master

649 files changed:
CRM/ACL/Form/ACL.php
CRM/Activity/Form/Activity.php
CRM/Activity/Import/Parser/Activity.php
CRM/Activity/Page/Tab.php
CRM/Admin/Form.php
CRM/Admin/Form/ContactType.php
CRM/Admin/Form/LocationType.php
CRM/Admin/Form/MailSettings.php
CRM/Admin/Form/Mapping.php
CRM/Admin/Form/Options.php
CRM/Admin/Form/RelationshipType.php
CRM/Admin/Form/Setting/Component.php
CRM/Admin/Form/Setting/Debugging.php
CRM/Admin/Form/Setting/Mapping.php
CRM/Admin/Form/Setting/UpdateConfigBackend.php
CRM/Admin/Form/Tag.php
CRM/Admin/Page/Mapping.php
CRM/Badge/BAO/Badge.php
CRM/Campaign/BAO/Query.php
CRM/Campaign/BAO/Survey.php
CRM/Campaign/Form/Campaign.php
CRM/Campaign/Form/Task/Reserve.php
CRM/Case/BAO/CaseType.php
CRM/Case/Form/ActivityToCase.php
CRM/Case/Form/CaseView.php
CRM/Case/Info.php
CRM/Case/Page/Tab.php
CRM/Case/XMLRepository.php
CRM/Case/xml/configuration.sample/case_sample.mysql.tpl [new file with mode: 0644]
CRM/Contact/BAO/Contact.php
CRM/Contact/BAO/Group.php
CRM/Contact/BAO/GroupContactCache.php
CRM/Contact/BAO/ProximityQuery.php
CRM/Contact/BAO/Query.php
CRM/Contact/Form/DedupeFind.php
CRM/Contact/Form/Edit/Household.php
CRM/Contact/Form/Edit/Individual.php
CRM/Contact/Form/Edit/Organization.php
CRM/Contact/Form/Edit/TagsAndGroups.php
CRM/Contact/Form/Merge.php
CRM/Contact/Form/Search.php
CRM/Contact/Form/Search/Builder.php
CRM/Contact/Form/Search/Criteria.php
CRM/Contact/Form/Search/Custom/Basic.php
CRM/Contact/Form/Search/Custom/ContribSYBNT.php
CRM/Contact/Form/Search/Custom/ContributionAggregate.php
CRM/Contact/Form/Search/Custom/DateAdded.php
CRM/Contact/Form/Search/Custom/EmployerListing.php
CRM/Contact/Form/Search/Custom/FullText.php
CRM/Contact/Form/Search/Custom/Group.php
CRM/Contact/Form/Search/Custom/MultipleValues.php
CRM/Contact/Form/Search/Custom/PostalMailing.php
CRM/Contact/Form/Search/Custom/PriceSet.php
CRM/Contact/Form/Search/Custom/Proximity.php
CRM/Contact/Form/Search/Custom/RandomSegment.php
CRM/Contact/Form/Search/Custom/Sample.php
CRM/Contact/Form/Search/Custom/TagContributions.php
CRM/Contact/Form/Search/Custom/ZipCodeRange.php
CRM/Contact/Form/Task.php
CRM/Contact/Form/Task/AddToGroup.php
CRM/Contact/Form/Task/AddToHousehold.php
CRM/Contact/Form/Task/AddToOrganization.php
CRM/Contact/Form/Task/Batch.php
CRM/Contact/Form/Task/Label.php
CRM/Contact/Form/Task/PickProfile.php
CRM/Contact/Form/Task/RemoveFromGroup.php
CRM/Contact/Form/Task/SMS.php
CRM/Contact/Import/Form/Preview.php
CRM/Contact/Import/Parser/Contact.php
CRM/Contact/Page/Inline/ContactName.php
CRM/Contact/Page/View/CustomData.php
CRM/Contact/Page/View/Note.php
CRM/Contact/Page/View/Relationship.php
CRM/Contact/Page/View/Summary.php
CRM/Contact/Selector.php
CRM/Contribute/BAO/Contribution.php
CRM/Contribute/BAO/ContributionRecur.php
CRM/Contribute/Form.php
CRM/Contribute/Form/AdditionalPayment.php
CRM/Contribute/Form/Contribution.php
CRM/Contribute/Form/Contribution/Confirm.php
CRM/Contribute/Form/ManagePremiums.php
CRM/Contribute/Form/Search.php
CRM/Contribute/Import/Form/MapField.php
CRM/Contribute/Page/ContributionRecur.php
CRM/Contribute/Page/Tab.php
CRM/Core/BAO/Address.php
CRM/Core/BAO/CustomField.php
CRM/Core/BAO/CustomGroup.php
CRM/Core/BAO/CustomQuery.php
CRM/Core/BAO/Dashboard.php
CRM/Core/BAO/Note.php
CRM/Core/BAO/Setting.php
CRM/Core/BAO/Tag.php
CRM/Core/BAO/UFField.php
CRM/Core/BAO/UFGroup.php
CRM/Core/Component.php
CRM/Core/Form.php
CRM/Core/Form/Search.php
CRM/Core/Form/Tag.php
CRM/Core/Page/AJAX/Location.php
CRM/Core/Payment/AuthorizeNetIPN.php
CRM/Core/Payment/Form.php
CRM/Core/PseudoConstant.php
CRM/Core/Smarty/plugins/modifier.crmReplace.php
CRM/Custom/Form/DeleteField.php
CRM/Custom/Form/Field.php
CRM/Custom/Form/Group.php
CRM/Custom/Form/Option.php
CRM/Custom/Page/Field.php
CRM/Event/BAO/Participant.php
CRM/Event/BAO/ParticipantStatusType.php
CRM/Event/Form/ManageEvent/Fee.php
CRM/Event/Form/ManageEvent/ScheduleReminders.php
CRM/Event/Form/Participant.php
CRM/Event/Form/Registration/Confirm.php
CRM/Event/Import/Form/MapField.php
CRM/Event/Page/Tab.php
CRM/Export/BAO/Export.php
CRM/Export/Form/Select.php
CRM/Financial/Form/BatchTransaction.php
CRM/Financial/Form/FinancialAccount.php
CRM/Financial/Form/FinancialBatch.php
CRM/Financial/Form/FinancialType.php
CRM/Financial/Form/FinancialTypeAccount.php
CRM/Financial/Form/Search.php
CRM/Grant/Form/Grant.php
CRM/Grant/Form/GrantView.php
CRM/Grant/Form/Search.php
CRM/Grant/Form/Task.php
CRM/Grant/Page/Tab.php
CRM/Grant/Selector/Search.php
CRM/Group/Page/AJAX.php
CRM/Group/Page/Group.php
CRM/Mailing/Form/Group.php
CRM/Mailing/MailStore.php
CRM/Member/BAO/MembershipType.php
CRM/Member/Form/Membership.php
CRM/Member/Form/MembershipRenewal.php
CRM/Member/Form/MembershipType.php
CRM/Member/Page/Tab.php
CRM/Note/Form/Note.php
CRM/Pledge/Form/Payment.php
CRM/Pledge/Form/Pledge.php
CRM/Pledge/Page/Payment.php
CRM/Pledge/Page/Tab.php
CRM/Pledge/Selector/Search.php
CRM/Price/Form/Field.php
CRM/Price/Form/Set.php
CRM/Price/Page/Field.php
CRM/Profile/Page/Listings.php
CRM/Profile/Selector/Listings.php
CRM/Report/BAO/ReportInstance.php
CRM/Report/Form.php
CRM/Report/Form/Case/Demographics.php
CRM/Report/Form/Contact/Detail.php
CRM/Report/Form/Contact/Relationship.php
CRM/Report/Form/Contact/Summary.php
CRM/Report/Form/Contribute/Bookkeeping.php
CRM/Report/Form/Contribute/Detail.php
CRM/Report/Form/Contribute/History.php
CRM/Report/Form/Contribute/Lybunt.php
CRM/Report/Form/Contribute/Repeat.php
CRM/Report/Form/Contribute/SoftCredit.php
CRM/Report/Form/Contribute/Summary.php
CRM/Report/Form/Contribute/Sybunt.php
CRM/Report/Form/Contribute/TopDonor.php
CRM/Report/Form/Event/Income.php
CRM/Report/Form/Event/ParticipantListing.php
CRM/Report/Form/Mailing/Bounce.php
CRM/Report/Form/Mailing/Clicks.php
CRM/Report/Form/Mailing/Detail.php
CRM/Report/Form/Mailing/Opened.php
CRM/Report/Form/Member/ContributionDetail.php
CRM/Report/Form/Member/Detail.php
CRM/Report/Form/Member/Lapse.php
CRM/Report/Form/Pledge/Detail.php
CRM/Report/Form/Pledge/Summary.php
CRM/SMS/Form/Group.php
CRM/SMS/Form/Provider.php
CRM/UF/Form/Field.php
CRM/UF/Form/Group.php
CRM/Upgrade/3.1.alpha1.msg_template/message_templates/contribution_dupalert_html.tpl
CRM/Upgrade/3.1.alpha1.msg_template/message_templates/contribution_dupalert_text.tpl
CRM/Upgrade/3.1.alpha2.msg_template/message_templates/contribution_dupalert_html.tpl
CRM/Upgrade/4.4.alpha1.msg_template/message_templates/contribution_dupalert_html.tpl
CRM/Upgrade/4.4.alpha1.msg_template/message_templates/contribution_dupalert_text.tpl
CRM/Upgrade/Incremental/sql/4.5.beta6.mysql.tpl [new file with mode: 0644]
CRM/Upgrade/Incremental/sql/4.5.beta7.mysql.tpl [new file with mode: 0644]
CRM/Upgrade/Incremental/sql/4.5.beta8.mysql.tpl [new file with mode: 0644]
CRM/Upgrade/Incremental/sql/README.txt
CRM/Upgrade/Page/Upgrade.php
CRM/Utils/DeprecatedUtils.php
CRM/Utils/File.php
CRM/Utils/Geocode/Yahoo.php
CRM/Utils/Hook/DrupalBase.php
CRM/Utils/HttpClient.php
CRM/Utils/Pager.php
CRM/Utils/VersionCheck.php
CRM/Utils/Weight.php
Civi/API/Subscriber/TransactionSubscriber.php
Civi/CiUtil/Arrays.php [new file with mode: 0644]
Civi/CiUtil/Command/AntagonistCommand.php [new file with mode: 0644]
Civi/CiUtil/Command/CompareCommand.php [new file with mode: 0644]
Civi/CiUtil/Command/LsCommand.php [new file with mode: 0644]
Civi/CiUtil/ComparisonPrinter.php [new file with mode: 0644]
Civi/CiUtil/EnvTestRunner.php [new file with mode: 0644]
Civi/CiUtil/PHPUnitParser.php [new file with mode: 0644]
Civi/CiUtil/PHPUnitScanner.php [new file with mode: 0644]
api/v3/ActivityType.php
api/v3/Batch.php
api/v3/Case.php
api/v3/CaseType.php
api/v3/ContributionRecur.php
api/v3/CustomValue.php
api/v3/Dashboard.php
api/v3/Mailing.php
api/v3/MailingEventConfirm.php
api/v3/MailingEventResubscribe.php
api/v3/MailingEventSubscribe.php
api/v3/MailingEventUnsubscribe.php
api/v3/Participant.php
api/v3/Setting.php
api/v3/UFField.php
api/v3/utils.php
css/angular-crmCaseType.css
css/bluemarine.css
css/civicrm.css
css/drupal.css
css/joomla.css
css/print.css
js/Common.js
js/angular-crm-ui.js
js/angular-crmCaseType.js
js/crm.ajax.js
js/jquery/jquery.crmeditable.js
partials/crmCaseType/activitySetDetails.html
partials/crmCaseType/caseTypeDetails.html
partials/crmCaseType/edit.html
partials/crmCaseType/list.html
partials/crmCaseType/timelineTable.html
phpunit.xml.dist [new file with mode: 0644]
settings/Core.setting.php
settings/Developer.setting.php
settings/Directory.setting.php
settings/Mailing.setting.php
settings/Multisite.setting.php
settings/Url.setting.php
sql/GenerateData.php
templates/CRM/ACL/Form/ACL.tpl
templates/CRM/ACL/Page/EntityRole.tpl
templates/CRM/Activity/Form/Activity.tpl
templates/CRM/Activity/Form/Search.tpl
templates/CRM/Activity/Form/Search/Common.tpl
templates/CRM/Activity/Form/Task/FileOnCase.tpl
templates/CRM/Admin/Form/ContactType.tpl
templates/CRM/Admin/Form/Job.tpl
templates/CRM/Admin/Form/LocationType.tpl
templates/CRM/Admin/Form/MailSettings.tpl
templates/CRM/Admin/Form/Mapping.tpl
templates/CRM/Admin/Form/MessageTemplates.tpl
templates/CRM/Admin/Form/OptionGroup.tpl
templates/CRM/Admin/Form/Options.tpl
templates/CRM/Admin/Form/PaymentProcessor.tpl
templates/CRM/Admin/Form/Preferences/Display.tpl
templates/CRM/Admin/Form/RelationshipType.tpl
templates/CRM/Admin/Form/ScheduleReminders.tpl
templates/CRM/Admin/Form/Setting/Mapping.tpl
templates/CRM/Admin/Form/Setting/Smtp.tpl
templates/CRM/Admin/Form/Tag.tpl
templates/CRM/Admin/Page/APIExplorer.tpl
templates/CRM/Admin/Page/Admin.tpl
templates/CRM/Admin/Page/ConfigTaskList.tpl
templates/CRM/Admin/Page/ContactType.tpl
templates/CRM/Admin/Page/Extensions.tpl
templates/CRM/Admin/Page/LabelFormats.tpl
templates/CRM/Admin/Page/LocationType.tpl
templates/CRM/Admin/Page/MailSettings.tpl
templates/CRM/Admin/Page/MessageTemplates.tpl
templates/CRM/Admin/Page/Navigation.tpl
templates/CRM/Admin/Page/Options.tpl
templates/CRM/Admin/Page/PdfFormats.tpl
templates/CRM/Admin/Page/RelationshipType.tpl
templates/CRM/Admin/Page/Tag.tpl
templates/CRM/Batch/Form/Entry.js
templates/CRM/Batch/Form/Entry.tpl
templates/CRM/Block/Add.tpl
templates/CRM/Block/FullTextSearch.tpl
templates/CRM/Block/RecentlyViewed.tpl
templates/CRM/Campaign/Form/Campaign.tpl
templates/CRM/Campaign/Form/Gotv.tpl
templates/CRM/Campaign/Form/Petition.tpl
templates/CRM/Campaign/Form/Petition/Block.tpl
templates/CRM/Campaign/Form/ResultOptions.tpl
templates/CRM/Campaign/Form/Search/Campaign.tpl
templates/CRM/Campaign/Form/Search/Petition.tpl
templates/CRM/Campaign/Form/Search/Survey.tpl
templates/CRM/Campaign/Form/Survey/Main.tpl
templates/CRM/Campaign/Page/SurveyType.tpl
templates/CRM/Case/Form/Activity.tpl
templates/CRM/Case/Form/Activity/LinkCases.tpl
templates/CRM/Case/Form/ActivityChangeStatusJs.tpl
templates/CRM/Case/Form/ActivityTab.tpl
templates/CRM/Case/Form/ActivityToCase.tpl
templates/CRM/Case/Form/Case.tpl
templates/CRM/Case/Form/Selector.tpl
templates/CRM/Case/Page/CustomDataView.tpl
templates/CRM/Contact/Form/Contact.tpl
templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl
templates/CRM/Contact/Form/Edit/CustomData.tpl
templates/CRM/Contact/Form/Edit/Lock.tpl
templates/CRM/Contact/Form/Inline/Address.tpl
templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl
templates/CRM/Contact/Form/Inline/Email.tpl
templates/CRM/Contact/Form/Inline/IM.tpl
templates/CRM/Contact/Form/Inline/OpenID.tpl
templates/CRM/Contact/Form/Inline/Phone.tpl
templates/CRM/Contact/Form/Inline/Website.tpl
templates/CRM/Contact/Form/Merge.tpl
templates/CRM/Contact/Form/Relationship.tpl
templates/CRM/Contact/Form/Search/Criteria/Basic.tpl
templates/CRM/Contact/Form/Search/Criteria/ChangeLog.tpl
templates/CRM/Contact/Form/Search/Criteria/Location.hlp [new file with mode: 0644]
templates/CRM/Contact/Form/Search/Criteria/Location.tpl
templates/CRM/Contact/Form/Search/Intro.tpl
templates/CRM/Contact/Form/ShareAddress.tpl
templates/CRM/Contact/Form/Task.tpl
templates/CRM/Contact/Form/Task/Email.tpl
templates/CRM/Contact/Form/Task/EmailCommon.js
templates/CRM/Contact/Form/Task/PDFLetterCommon.tpl
templates/CRM/Contact/Import/Form/DataSource.tpl
templates/CRM/Contact/Import/Form/MapTable.tpl
templates/CRM/Contact/Page/Dashlet.tpl
templates/CRM/Contact/Page/View/Email.tpl
templates/CRM/Contact/Page/View/GroupContact.tpl
templates/CRM/Contact/Page/View/Note.tpl
templates/CRM/Contact/Page/View/Print.tpl
templates/CRM/Contact/Page/View/Summary.js
templates/CRM/Contact/Page/View/Summary.tpl
templates/CRM/Contribute/Form/AdditionalInfo/Premium.tpl
templates/CRM/Contribute/Form/AdditionalPayment.tpl
templates/CRM/Contribute/Form/Contribution.tpl
templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl
templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl
templates/CRM/Contribute/Form/Contribution/PremiumBlock.tpl
templates/CRM/Contribute/Form/ContributionPage/AddProduct.tpl
templates/CRM/Contribute/Form/ContributionPage/Amount.tpl
templates/CRM/Contribute/Form/ContributionPage/Premium.tpl
templates/CRM/Contribute/Form/ContributionView.tpl
templates/CRM/Contribute/Form/ManagePremiums.tpl
templates/CRM/Contribute/Form/Selector.tpl
templates/CRM/Contribute/Form/SoftCredit.tpl
templates/CRM/Contribute/Page/ContributionRecur.tpl
templates/CRM/Contribute/Page/DashBoard.js
templates/CRM/Contribute/Page/DashBoard.tpl
templates/CRM/Contribute/Page/PaymentInfo.tpl
templates/CRM/Core/BillingBlock.tpl
templates/CRM/Core/I18n/Form.tpl
templates/CRM/Custom/Form/ChangeFieldType.tpl
templates/CRM/Custom/Form/CustomData.tpl
templates/CRM/Custom/Form/DeleteField.tpl
templates/CRM/Custom/Form/Group.tpl
templates/CRM/Custom/Form/MultiValueSearch.js.tpl [new file with mode: 0644]
templates/CRM/Custom/Form/Search.tpl
templates/CRM/Custom/Page/CustomDataView.tpl
templates/CRM/Custom/Page/Field.tpl
templates/CRM/Custom/Page/Group.tpl
templates/CRM/Event/Cart/Form/Checkout/Payment.tpl
templates/CRM/Event/Form/EventFees.tpl
templates/CRM/Event/Form/ManageEvent/EventInfo.tpl
templates/CRM/Event/Form/ManageEvent/Fee.tpl
templates/CRM/Event/Form/ManageEvent/Location.tpl
templates/CRM/Event/Form/ManageEvent/ScheduleReminders.tpl
templates/CRM/Event/Form/Participant.tpl
templates/CRM/Event/Form/ParticipantFeeSelection.tpl
templates/CRM/Event/Form/ParticipantView.tpl
templates/CRM/Event/Form/Registration/AdditionalParticipant.tpl
templates/CRM/Event/Form/Task/Batch.tpl
templates/CRM/Financial/Form/Export.tpl
templates/CRM/Financial/Form/FinancialAccount.tpl
templates/CRM/Financial/Form/FinancialBatch.tpl
templates/CRM/Financial/Form/FinancialType.tpl
templates/CRM/Financial/Form/FinancialTypeAccount.tpl
templates/CRM/Form/attachment.tpl
templates/CRM/Form/validate.tpl
templates/CRM/Grant/Form/Grant.tpl
templates/CRM/Grant/Form/GrantView.tpl
templates/CRM/Grant/Form/Search.tpl
templates/CRM/Group/Form/Search.tpl
templates/CRM/Group/Page/Group.hlp
templates/CRM/Mailing/Form/Count.tpl
templates/CRM/Mailing/Form/InsertTokens.tpl
templates/CRM/Mailing/Form/Schedule.tpl
templates/CRM/Mailing/Form/Search.tpl
templates/CRM/Mailing/Form/Settings.tpl
templates/CRM/Mailing/Page/Event.tpl
templates/CRM/Mailing/Page/Resubscribe.tpl
templates/CRM/Member/Form/Membership.tpl
templates/CRM/Member/Form/MembershipBlock.tpl
templates/CRM/Member/Form/MembershipRenewal.tpl
templates/CRM/Member/Form/MembershipType.tpl
templates/CRM/Member/Form/MembershipView.tpl
templates/CRM/Member/Page/MembershipType.tpl
templates/CRM/Pledge/Form/Payment.tpl
templates/CRM/Pledge/Form/Pledge.tpl
templates/CRM/Pledge/Form/PledgeView.tpl
templates/CRM/Pledge/Form/Selector.tpl
templates/CRM/Pledge/Page/Payment.tpl
templates/CRM/Price/Form/Field.tpl
templates/CRM/Price/Form/LineItem.tpl
templates/CRM/Price/Form/ParticipantCount.tpl
templates/CRM/Price/Page/Field.tpl
templates/CRM/Price/Page/LineItem.tpl
templates/CRM/Price/Page/Option.tpl
templates/CRM/Price/Page/Set.tpl
templates/CRM/Profile/Form/Dynamic.tpl
templates/CRM/Profile/Form/Search.tpl
templates/CRM/Queue/Page/Runner.tpl
templates/CRM/Report/Form/Actions.tpl
templates/CRM/Report/Form/Criteria.tpl
templates/CRM/Report/Form/Event/ParticipantListing.tpl
templates/CRM/Report/Form/Instance.tpl
templates/CRM/Report/Form/Layout/Graph.tpl
templates/CRM/Report/Page/Options.tpl
templates/CRM/SMS/Form/Provider.tpl
templates/CRM/SMS/Form/Schedule.tpl
templates/CRM/SMS/Page/Provider.tpl
templates/CRM/Tag/Form/Tag.tpl
templates/CRM/Tag/Form/Tagtree.hlp [new file with mode: 0644]
templates/CRM/Tag/Form/Tagtree.tpl [new file with mode: 0644]
templates/CRM/UF/Form/Block.tpl
templates/CRM/UF/Form/Field.tpl
templates/CRM/UF/Page/Field.tpl
templates/CRM/UF/Page/Group.tpl
templates/CRM/common/TabHeader.js
templates/CRM/common/TrackingFields.tpl
templates/CRM/common/additionalBlocks.tpl
templates/CRM/common/batchCopy.tpl
templates/CRM/common/dedupe.tpl
templates/CRM/common/enableDisableApi.tpl
templates/CRM/common/jcalendar.tpl
templates/CRM/common/jsortable.tpl
templates/CRM/common/navigation.js.tpl
templates/CRM/common/pager.tpl
templates/CRM/common/paymentBlock.tpl
templates/CRM/common/redirectJS.tpl
templates/CRM/common/stateCountry.tpl
templates/CRM/common/success.tpl
tests/extensions/test.extension.manager.searchtest/main.php
tests/phpunit/CRM/Activity/BAO/ActivityTest.php
tests/phpunit/CRM/Case/BAO/CaseTest.php
tests/phpunit/CRM/Case/BAO/CaseTypeForkTest.php [new file with mode: 0644]
tests/phpunit/CRM/Case/BAO/CaseTypeTest.php
tests/phpunit/CRM/Case/BAO/ForkableCaseType.xml [new file with mode: 0644]
tests/phpunit/CRM/Case/BAO/UnforkableCaseType.xml [new file with mode: 0644]
tests/phpunit/CRM/Contact/BAO/QueryTest.php
tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/1854_pre44_membership_type.sql [new file with mode: 0644]
tests/phpunit/CRM/Contact/Form/Search/Custom/GroupTest.php
tests/phpunit/CRM/Core/BAO/IMTest.php
tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php [deleted file]
tests/phpunit/CRM/Mailing/BAO/QueryTest.php
tests/phpunit/CRM/Member/Form/MembershipTest.php
tests/phpunit/CRM/Utils/DeprecatedUtilsTest.php
tests/phpunit/Civi/CCase/SequenceListenerTest.php
tests/phpunit/CiviTest/CiviCaseTestCase.php
tests/phpunit/CiviTest/CiviSeleniumTestCase.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/CiviTest/bootstrap.php [new file with mode: 0644]
tests/phpunit/EnvTests.php [new file with mode: 0644]
tests/phpunit/HelloTest.php
tests/phpunit/WebTest/Case/ActivityToCaseTest.php
tests/phpunit/WebTest/Case/AddCaseTest.php
tests/phpunit/WebTest/Case/AddCaseTypeTest.php [new file with mode: 0644]
tests/phpunit/WebTest/Case/CaseDashboardTest.php
tests/phpunit/WebTest/Contact/GroupAddTest.php
tests/phpunit/WebTest/Contact/InlineFieldsEditTest.php
tests/phpunit/WebTest/Contact/MergeContactsTest.php
tests/phpunit/WebTest/Contribute/OnBehalfOfOrganization.php
tests/phpunit/WebTest/Event/AddEventTest.php
tests/phpunit/WebTest/Event/AddPricesetTest.php
tests/phpunit/WebTest/Event/PCPAddTest.php
tests/phpunit/WebTest/Event/TellAFriendTest.php
tests/phpunit/WebTest/Import/SavedMappingTest.php
tests/phpunit/WebTest/Member/StandaloneAddTest.php
tests/phpunit/WebTest/Profile/MultiRecordProfileAddTest.php
tests/phpunit/api/v3/ACLPermissionTest.php
tests/phpunit/api/v3/ContactTest.php
tests/phpunit/api/v3/ContributionTest.php
tests/phpunit/api/v3/GroupNestingTest.php
tests/phpunit/api/v3/MailingContactTest.php
tests/phpunit/api/v3/MembershipTest.php
tests/phpunit/api/v3/ParticipantTest.php
tests/phpunit/api/v3/ProfileTest.php
tests/phpunit/api/v3/SyntaxConformanceTest.php
tests/phpunit/api/v3/UFFieldTest.php
tests/phpunit/api/v3/UFJoinTest.php
tests/phpunit/api/v3/UFMatchTest.php
tools/extensions/org.civicrm.search.activity/templates/ActivitySearch.tpl
tools/extensions/org.civicrm.search.multivalue/MultiValue.php
tools/extensions/org.civicrm.sms.clickatell.zip [deleted file]
tools/extensions/org.civicrm.sms.clickatell/clickatell.civix.php [deleted file]
tools/extensions/org.civicrm.sms.clickatell/clickatell.php [deleted file]
tools/extensions/org.civicrm.sms.clickatell/info.xml [deleted file]
tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php [deleted file]
tools/scripts/jmat [new file with mode: 0755]
tools/scripts/phpunit-antagonist [new file with mode: 0755]
tools/scripts/phpunit-compare [new file with mode: 0755]
tools/scripts/phpunit-indiv [new file with mode: 0755]
tools/scripts/phpunit-ls [new file with mode: 0755]
tools/scripts/runTests.sh.txt [deleted file]
xml/schema/ACL/ACL.xml
xml/schema/ACL/Cache.xml
xml/schema/ACL/EntityRole.xml
xml/schema/Activity/Activity.xml
xml/schema/Activity/ActivityAssignment.xml
xml/schema/Batch/Batch.xml
xml/schema/Bridge/OG.xml
xml/schema/Bridge/Role.xml
xml/schema/Campaign/Campaign.xml
xml/schema/Campaign/Survey.xml
xml/schema/Case/Case.xml
xml/schema/Case/CaseType.xml
xml/schema/Contact/ACLContactCache.xml
xml/schema/Contact/Contact.xml
xml/schema/Contact/ContactType.xml
xml/schema/Contact/DashboardContact.xml
xml/schema/Contact/Group.xml
xml/schema/Contact/GroupContact.xml
xml/schema/Contact/GroupContactCache.xml
xml/schema/Contact/GroupNesting.xml
xml/schema/Contact/GroupOrganization.xml
xml/schema/Contact/Household.xml
xml/schema/Contact/Individual.xml
xml/schema/Contact/Organization.xml
xml/schema/Contact/Relationship.xml
xml/schema/Contact/RelationshipType.xml
xml/schema/Contact/SavedSearch.xml
xml/schema/Contact/SubscriptionHistory.xml
xml/schema/Contribute/Contribution.xml
xml/schema/Contribute/ContributionPage.xml
xml/schema/Contribute/ContributionSoft.xml
xml/schema/Contribute/Premium.xml
xml/schema/Contribute/Product.xml
xml/schema/Contribute/Widget.xml
xml/schema/Core/ActionLog.xml
xml/schema/Core/ActionMapping.xml
xml/schema/Core/ActionSchedule.xml
xml/schema/Core/Address.xml
xml/schema/Core/AddressFormat.xml
xml/schema/Core/Cache.xml
xml/schema/Core/Component.xml
xml/schema/Core/Country.xml
xml/schema/Core/County.xml
xml/schema/Core/CustomField.xml
xml/schema/Core/CustomGroup.xml
xml/schema/Core/Dashboard.xml
xml/schema/Core/Domain.xml
xml/schema/Core/Email.xml
xml/schema/Core/EntityFile.xml
xml/schema/Core/EntityTag.xml
xml/schema/Core/Extension.xml
xml/schema/Core/File.xml
xml/schema/Core/IM.xml
xml/schema/Core/Job.xml
xml/schema/Core/JobLog.xml
xml/schema/Core/LocBlock.xml
xml/schema/Core/LocationType.xml
xml/schema/Core/Log.xml
xml/schema/Core/MailSettings.xml
xml/schema/Core/Mapping.xml
xml/schema/Core/MappingField.xml
xml/schema/Core/Menu.xml
xml/schema/Core/MessageTemplate.xml
xml/schema/Core/Navigation.xml
xml/schema/Core/Note.xml
xml/schema/Core/OpenID.xml
xml/schema/Core/OptionGroup.xml
xml/schema/Core/OptionValue.xml
xml/schema/Core/Persistent.xml
xml/schema/Core/Phone.xml
xml/schema/Core/Preferences.xml
xml/schema/Core/PreferencesDate.xml
xml/schema/Core/PrevNextCache.xml
xml/schema/Core/PrintLabel.xml
xml/schema/Core/Setting.xml
xml/schema/Core/StateProvince.xml
xml/schema/Core/Tag.xml
xml/schema/Core/Timezone.xml
xml/schema/Core/UFField.xml
xml/schema/Core/UFGroup.xml
xml/schema/Core/UFJoin.xml
xml/schema/Core/UFMatch.xml
xml/schema/Core/Website.xml
xml/schema/Core/WordReplacement.xml
xml/schema/Core/Worldregion.xml
xml/schema/Event/EventPage.xml
xml/schema/Event/Participant.xml
xml/schema/Event/ParticipantPayment.xml
xml/schema/Event/ParticipantStatusType.xml
xml/schema/Financial/Currency.xml
xml/schema/Financial/FinancialAccount.xml
xml/schema/Financial/FinancialType.xml
xml/schema/Financial/PaymentProcessor.xml
xml/schema/Financial/PaymentProcessorType.xml
xml/schema/Friend/Friend.xml
xml/schema/Mailing/BouncePattern.xml
xml/schema/Mailing/BounceType.xml
xml/schema/Mailing/Component.xml
xml/schema/Mailing/Event/Bounce.xml
xml/schema/Mailing/Event/Confirm.xml
xml/schema/Mailing/Event/Delivered.xml
xml/schema/Mailing/Event/Forward.xml
xml/schema/Mailing/Event/Opened.xml
xml/schema/Mailing/Event/Queue.xml
xml/schema/Mailing/Event/Reply.xml
xml/schema/Mailing/Event/Subscribe.xml
xml/schema/Mailing/Event/TrackableURLOpen.xml
xml/schema/Mailing/Event/Unsubscribe.xml
xml/schema/Mailing/Mailing.xml
xml/schema/Mailing/MailingGroup.xml
xml/schema/Mailing/MailingJob.xml
xml/schema/Mailing/Recipients.xml
xml/schema/Mailing/Spool.xml
xml/schema/Mailing/TrackableURL.xml
xml/schema/Member/Membership.xml
xml/schema/Member/MembershipBlock.xml
xml/schema/Member/MembershipLog.xml
xml/schema/Member/MembershipPayment.xml
xml/schema/Member/MembershipStatus.xml
xml/schema/Member/MembershipType.xml
xml/schema/PCP/PCP.xml
xml/schema/PCP/PCPBlock.xml
xml/schema/Pledge/PledgeBlock.xml
xml/schema/Pledge/PledgePayment.xml
xml/schema/Price/LineItem.xml
xml/schema/Price/PriceField.xml
xml/schema/Price/PriceFieldValue.xml
xml/schema/Price/PriceSet.xml
xml/schema/Price/PriceSetEntity.xml
xml/schema/Queue/QueueItem.xml
xml/schema/Report/ReportInstance.xml
xml/schema/SMS/History.xml
xml/schema/SMS/Provider.xml
xml/schema/Standalone/OpenID/Associations.xml
xml/schema/Standalone/OpenID/Nonce.xml
xml/templates/civicrm_data.tpl
xml/templates/message_templates/contribution_dupalert_html.tpl
xml/templates/message_templates/contribution_dupalert_text.tpl
xml/version.xml

index 2741d755e1db5b53197acd8a89ea23e6c167e587..a787abe90ccdd097d6471a6af76a4ed0a3f81b5f 100644 (file)
@@ -121,6 +121,8 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
   public function buildQuickForm() {
     parent::buildQuickForm();
 
+    $this->setPageTitle(ts('ACL'));
+
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
     }
@@ -311,5 +313,6 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
       CRM_ACL_BAO_ACL::create($params);
     }
   }
+
 }
 
index b88a5468e203dda0ca30cb04ff7ded2634df809c..798ff23ae8ef7f2f7958a50c38f420f727012d2b 100644 (file)
@@ -539,8 +539,8 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
       }
 
       // Fixme: why are we getting the wrong keys from upstream?
-      $defaults['target_contact_id'] = $defaults['target_contact'];
-      $defaults['assignee_contact_id'] = $defaults['assignee_contact'];
+      $defaults['target_contact_id'] = CRM_Utils_Array::value('target_contact', $defaults);
+      $defaults['assignee_contact_id'] = CRM_Utils_Array::value('assignee_contact', $defaults);
 
       // set default tags if exists
       $defaults['tag'] = CRM_Core_BAO_EntityTag::getTag($this->_activityId, 'civicrm_activity');
index db27934f908215d1d438221b03fd3be1c8769801..de2a9135645ea7bd8c92d0c27ad46d51293dd5b8 100644 (file)
@@ -76,6 +76,10 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser {
     );
 
     $fields = array_merge($fields, array(
+      'source_contact_id' => array(
+        'title' => ts('Source Contact'),
+        'headerPattern' => '/Source.Contact?/i',
+      ),
       'activity_label' => array(
         'title' => ts('Activity Type Label'),
         'headerPattern' => '/(activity.)?type label?/i',
index 1e5fa71e7e6c4d7789e493eeedec4f679aba6d3b..555d1b7e86c01409073d10e053eddfea756616d2 100644 (file)
@@ -135,9 +135,6 @@ class CRM_Activity_Page_Tab extends CRM_Core_Page {
     // check logged in url permission
     CRM_Contact_Page_View::checkUserPermission($this);
 
-    // set page title
-    CRM_Contact_Page_View::setTitle($this->_contactId);
-
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
     $this->assign('action', $this->_action);
 
index 6f18f0060728c8970d7252db95614ca942463b5d..0f6a1d407b0faa4089aff54964b7165d683eb518 100644 (file)
@@ -75,7 +75,7 @@ class CRM_Admin_Form extends CRM_Core_Form {
   }
 
   /**
-   * This function sets the default values for the form. MobileProvider that in edit/view mode
+   * This function sets the default values for the form. Note that in edit/view mode
    * the default values are retrieved from the database
    *
    * @access public
@@ -112,7 +112,7 @@ class CRM_Admin_Form extends CRM_Core_Form {
    * @access public
    */
   public function buildQuickForm() {
-    if ($this->_action & CRM_Core_Action::VIEW) {
+    if ($this->_action & CRM_Core_Action::VIEW || $this->_action & CRM_Core_Action::PREVIEW) {
       $this->addButtons(array(
           array(
             'type' => 'cancel',
index 0f900b9296f49e7a0e8d933e6eb3da3861768367..74211e0ea06f9f723406f73e3c2321995e05cc8c 100644 (file)
@@ -47,6 +47,8 @@ class CRM_Admin_Form_ContactType extends CRM_Admin_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Contact Type'));
+
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
     }
@@ -153,5 +155,6 @@ class CRM_Admin_Form_ContactType extends CRM_Admin_Form {
         array(1 => $contactType->label)
       ), ts('Saved'), 'success');
   }
+
 }
 
index 8252d55180789d7915c58c896091f97a5b4eeb14..8e8dcf64f5da2515004abffafbfb1ec825425399 100644 (file)
@@ -46,8 +46,8 @@ class CRM_Admin_Form_LocationType extends CRM_Admin_Form {
    * @access public
    */
   public function buildQuickForm() {
-
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Location Type'));
 
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
@@ -70,7 +70,7 @@ class CRM_Admin_Form_LocationType extends CRM_Admin_Form {
       'variable'
     );
 
-    $this->add('text', 'display_name', ts('Display Name'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_LocationType', 'display_name'));
+    $this->add('text', 'display_name', ts('Display Name'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_LocationType', 'display_name'), TRUE);
     $this->add('text', 'vcard_name', ts('vCard Name'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_LocationType', 'vcard_name'));
 
     $this->add('text', 'description', ts('Description'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_LocationType', 'description'));
@@ -127,4 +127,5 @@ class CRM_Admin_Form_LocationType extends CRM_Admin_Form {
         array(1 => $locationType->name)
       ), ts('Saved'), 'success');
   }
+
 }
index 34b9ae12afabb1270dad40b65c7a159832742c78..f66de121e333ef51367a758b3d6157a51e92f64d 100644 (file)
@@ -47,6 +47,7 @@ class CRM_Admin_Form_MailSettings extends CRM_Admin_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Mail Account'));
 
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
@@ -182,5 +183,6 @@ class CRM_Admin_Form_MailSettings extends CRM_Admin_Form {
       CRM_Core_Session::setStatus("", ts('Changes Not Saved.'), "info");
     }
   }
+
 }
 
index 38b3fcf59209d1cf28c8cb6972fd5eab0b1ff9e9..ae1806af2aa7710ec753152d29b71c1b6f003b2b 100644 (file)
@@ -55,6 +55,8 @@ class CRM_Admin_Form_Mapping extends CRM_Admin_Form {
 
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Field Mapping'));
+
     if ($this->_action == CRM_Core_Action::DELETE) {
       return;
     }
@@ -110,6 +112,6 @@ class CRM_Admin_Form_Mapping extends CRM_Admin_Form {
       CRM_Core_BAO_Mapping::add($params);
     }
   }
-  //end of function
+
 }
 
index a380f055341defd06c3418ee061a5b6487865846..3b5825d07881aa5aaa483d9597538f0aa3904c08 100644 (file)
@@ -150,6 +150,8 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('%1 Option', array(1 => $this->_gLabel)));
+
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
     }
@@ -259,7 +261,7 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form {
       (($this->_action & CRM_Core_Action::ADD) || !$isReserved)
     ) {
       $caseID = CRM_Core_Component::getComponentID('CiviCase');
-      $components = array('' => ts('Contacts OR Cases'), $caseID => ts('Cases Only'));
+      $components = array('' => ts('Contacts AND Cases'), $caseID => ts('Cases Only'));
       $this->add('select',
         'component_id',
         ts('Component'),
@@ -437,4 +439,5 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form {
       CRM_Core_Session::setStatus(ts('The %1 \'%2\' has been saved.', array(1 => $this->_gLabel, 2 => $optionValue->label)), ts('Saved'), 'success');
     }
   }
+
 }
index 995450231da2f69c4ddb3707d855e0050ba42098..c03c8fc82fa9ed898381fd20261687295e31225c 100644 (file)
@@ -47,9 +47,9 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Relationship Type'));
 
     if ($this->_action & CRM_Core_Action::DELETE) {
-
       return;
     }
 
@@ -171,6 +171,6 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form {
       CRM_Core_Session::setStatus(ts('The Relationship Type has been saved.'), ts('Saved'), 'success');
     }
   }
-  //end of function
+
 }
 
index ec318c30030e1b11da2b32978f386c5f2ecad493..4bc635e2715115a1986036ca982f107b8f63b2a1 100644 (file)
@@ -131,9 +131,16 @@ class CRM_Admin_Form_Setting_Component extends CRM_Admin_Form_Setting {
       die("Cannot open $dsn: " . $db->getMessage());
     }
 
+    $domain = new CRM_Core_DAO_Domain();
+    $domain->find(TRUE);
+    $multiLingual = (bool) $domain->locales;
+    $smarty = CRM_Core_Smarty::singleton();
+    $smarty->assign('multilingual', $multiLingual);
+    $smarty->assign('locales', explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales));
+
     if (!$lineMode) {
-      $string = file_get_contents($fileName);
 
+      $string = $smarty->fetch($fileName);
       // change \r\n to fix windows issues
       $string = str_replace("\r\n", "\n", $string);
 
index 8871033a8e4cdfe8144afee3fa378ef60d0b7f2b..6d06f0bfd274a75d1171cc75c366db6c5c8e7c9e 100644 (file)
 class CRM_Admin_Form_Setting_Debugging extends CRM_Admin_Form_Setting {
 
   protected $_settings = array(
-    'debug_enabled' => CRM_Core_BAO_Setting::DIRECTORY_PREFERENCES_NAME,
-    'backtrace' => CRM_Core_BAO_Setting::DIRECTORY_PREFERENCES_NAME,
-    'fatalErrorTemplate' => CRM_Core_BAO_Setting::DIRECTORY_PREFERENCES_NAME,
-    'fatalErrorHandler' => CRM_Core_BAO_Setting::DIRECTORY_PREFERENCES_NAME,
+    'debug_enabled' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
+    'backtrace' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
+    'fatalErrorTemplate' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
+    'fatalErrorHandler' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
   );
   /**
    * Function to build the form
@@ -54,7 +54,7 @@ class CRM_Admin_Form_Setting_Debugging extends CRM_Admin_Form_Setting {
   public function buildQuickForm() {
     CRM_Utils_System::setTitle(ts(' Settings - Debugging and Error Handling '));
     if (CRM_Core_Config::singleton()->userSystem->supports_UF_Logging == '1') {
-      $this->_settings['userFrameworkLogging'] = CRM_Core_BAO_Setting::DIRECTORY_PREFERENCES_NAME;
+      $this->_settings['userFrameworkLogging'] = CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME;
     }
 
     parent::buildQuickForm();
index 5fd5e83a18b12cdfbf3374115caa534b34e0c233..e368e64cacbe489cb64c34f02cc86f93877af62c 100644 (file)
@@ -50,9 +50,9 @@ class CRM_Admin_Form_Setting_Mapping extends CRM_Admin_Form_Setting {
 
     $map = CRM_Core_SelectValues::mapProvider();
     $geo = CRM_Core_SelectValues::geoProvider();
-    $this->addElement('select', 'mapProvider', ts('Mapping Provider'), array('' => '- select -') + $map, array('onChange' => 'showHideMapAPIkey( this.value );'));
+    $this->addElement('select', 'mapProvider', ts('Mapping Provider'), array('' => '- select -') + $map, array('class' => 'crm-select2'));
     $this->add('text', 'mapAPIKey', ts('Map Provider Key'), NULL);
-    $this->addElement('select', 'geoProvider', ts('Geocoding Provider'), array('' => '- select -') + $geo);
+    $this->addElement('select', 'geoProvider', ts('Geocoding Provider'), array('' => '- select -') + $geo, array('class' => 'crm-select2'));
     $this->add('text', 'geoAPIKey', ts('Geo Provider Key'), NULL);
 
     parent::buildQuickForm();
index b3d096db63a78470b7096ab2cb8c338187bfed08..f543c1796282b7b5b5f566c975744a23f970654d 100644 (file)
@@ -63,7 +63,7 @@ class CRM_Admin_Form_Setting_UpdateConfigBackend extends CRM_Admin_Form_Setting
 
     $this->addElement(
       'submit', $this->getButtonName('next', 'cleanup'), 'Cleanup Caches',
-      array('class' => 'form-submit', 'id' => 'cleanup-cache')
+      array('class' => 'crm-form-submit', 'id' => 'cleanup-cache')
     );
 
     $this->add('text', 'newBaseURL', ts('New Base URL'), NULL, TRUE);
index f1812e8db73fe10ece10ce23db12394dcc05d624..5346a4d6c920924f2386c19237bd35e9f4fd7f6b 100644 (file)
@@ -47,12 +47,12 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form {
    * @access public
    */
   public function buildQuickForm() {
+    $this->setPageTitle($this->_isTagSet ? ts('Tag Set') : ts('Tag'));
+
     if ($this->_action == CRM_Core_Action::DELETE) {
       if ($this->_id && $tag = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Tag', $this->_id, 'name', 'parent_id')) {
-        CRM_Core_Session::setStatus(ts("This tag cannot be deleted. You must delete all its child tags ('%1', etc) prior to deleting this tag.", array(1 => $tag)), ts('Sorry'), 'error');
         $url = CRM_Utils_System::url('civicrm/admin/tag', "reset=1");
-        CRM_Utils_System::redirect($url);
-        return TRUE;
+        CRM_Core_Error::statusBounce(ts("This tag cannot be deleted. You must delete all its child tags ('%1', etc) prior to deleting this tag.", array(1 => $tag)), $url);
       }
     }
     else {
@@ -65,7 +65,7 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form {
         $this->_isTagSet = TRUE;
       }
 
-      $allTag = array('' => '- ' . ts('select') . ' -') + CRM_Core_BAO_Tag::getTagsNotInTagset();
+      $allTag = array('' => ts('- select -')) + CRM_Core_BAO_Tag::getTagsNotInTagset();
 
       if ($this->_id) {
         unset($allTag[$this->_id]);
@@ -89,7 +89,7 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form {
       );
 
       //@lobo haven't a clue why the checkbox isn't displayed (it should be checked by default
-      $this->add('checkbox', 'is_selectable', ts("If it's a tag or a category"));
+      $this->add('checkbox', 'is_selectable');
 
       $isReserved = $this->add('checkbox', 'is_reserved', ts('Reserved?'));
 
@@ -159,6 +159,6 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form {
       CRM_Core_Session::setStatus(ts('The tag \'%1\' has been saved.', array(1 => $tag->name)), ts('Saved'), 'success');
     }
   }
-  //end of function
+
 }
 
index 95c1ed9eb37e2f3fd979e9d213db7e10f8ad5a0d..ac9bb3587f82b4db4bcf408ad2255c88ac0a33f1 100644 (file)
@@ -38,6 +38,8 @@
  */
 class CRM_Admin_Page_Mapping extends CRM_Core_Page_Basic {
 
+  public $useLivePageJS = TRUE;
+
   /**
    * The action links that we need to display for the browse screen
    *
index 0147d4cdf1c30f3c7b3b4fd8b461d54eca7d5613..eca1c03461cd25b91c07f970dfaf0f9430b1ee0c 100644 (file)
@@ -475,6 +475,12 @@ class CRM_Badge_BAO_Badge {
     $dao = CRM_Core_DAO::executeQuery($queryString);
     $rows = array();
     while ($dao->fetch()) {
+      if (!empty($dao->country_id)) {
+        $dao->country = CRM_Core_PseudoConstant::country($dao->country_id);
+      }
+      if (!empty($dao->state_province_id)) {
+        $dao->state_province = CRM_Core_PseudoConstant::stateProvince($dao->state_province_id);
+      }
       $rows[$dao->participant_id] = array();
       foreach ($returnProperties as $key => $dontCare) {
         $rows[$dao->participant_id][$key] = isset($dao->$key) ? $dao->$key : NULL;
index 5b4d84124f0ee8f3acb942bdcb844b451f368abf..44563481efc0b51a56559e306b670c71964351c5 100755 (executable)
@@ -366,9 +366,9 @@ civicrm_activity_assignment.record_type_id = $assigneeID ) ";
     $form->add('select', 'contact_type', ts('Contact Type(s)'), $contactTypes, FALSE,
       array('id' => 'contact_type', 'multiple' => 'multiple', 'class' => 'crm-select2')
     );
-    $groups = CRM_Core_PseudoConstant::group();
+    $groups = CRM_Core_PseudoConstant::nestedGroup();
     $form->add('select', 'group', ts('Groups'), $groups, FALSE,
-      array('id' => 'group', 'multiple' => 'multiple', 'class' => 'crm-select2')
+      array('multiple' => 'multiple', 'class' => 'crm-select2')
     );
 
     $showInterviewer = FALSE;
index 2d13edd381b7b5c589f90f8b12e8f425f6b11b2d..de6f7a1b1111b65c614c20900eff3837302ff71b 100644 (file)
@@ -327,8 +327,12 @@ SELECT  survey.id    as id,
         );
       }
     }
-
-    return $activityTypes[$cacheKey];
+    if (!empty($activityTypes[$cacheKey])) {
+      return $activityTypes[$cacheKey];
+    }
+    else {
+      return;
+    }
   }
 
   /**
@@ -1052,11 +1056,13 @@ INNER JOIN  civicrm_survey survey ON ( activity.source_record_id = survey.id )
    *
    * @return array success message
    */
-  public function releaseRespondent($params) {
+  public static function releaseRespondent($params) {
     $activityStatus = CRM_Core_PseudoConstant::activityStatus('name');
     $reserveStatusId = array_search('Scheduled', $activityStatus);
     $surveyActivityTypes = CRM_Campaign_BAO_Survey::getSurveyActivityType();
-    $surveyActivityTypesIds = array_keys($surveyActivityTypes);
+    if (!empty($surveyActivityTypes) && is_array($surveyActivityTypes)) {
+      $surveyActivityTypesIds = array_keys($surveyActivityTypes);
+    }
 
     //retrieve all survey activities related to reserve action.
     $releasedCount = 0;
index 2ea0a12bd9d80c0cd8261673da6d9d0fa447de12..4fbff48b158ffacf128b42f9a071b004b16fdf73 100644 (file)
@@ -136,7 +136,7 @@ class CRM_Campaign_Form_Campaign extends CRM_Core_Form {
    *
    * @access public
    *
-   * @return void
+   * @return array
    */
   function setDefaultValues() {
     $defaults = $this->_values;
@@ -240,25 +240,21 @@ class CRM_Campaign_Form_Campaign extends CRM_Core_Form {
     // add campaign status
     $this->addSelect('status_id');
 
-    // add External Identifire Element
-    $this->add('text', 'external_identifier', ts('External Id'),
+    // add External Identifier Element
+    $this->add('text', 'external_identifier', ts('External ID'),
       CRM_Core_DAO::getAttribute('CRM_Campaign_DAO_Campaign', 'external_identifier'), FALSE
     );
 
     // add Campaign Parent Id
-    $campaigns = CRM_Campaign_BAO_Campaign::getCampaigns(CRM_Utils_Array::value('parent_id', $this->_values),
-      $this->_campaignId
-    );
+    $campaigns = CRM_Campaign_BAO_Campaign::getCampaigns(CRM_Utils_Array::value('parent_id', $this->_values), $this->_campaignId);
     if (!empty($campaigns)) {
-      $this->addElement('select', 'parent_id', ts('Parent Id'),
-        array(
-          '' => ts('- select Parent -')) + $campaigns
+      $this->addElement('select', 'parent_id', ts('Parent ID'),
+        array('' => ts('- select Parent -')) + $campaigns,
+        array('class' => 'crm-select2')
       );
     }
-
+    $groups = CRM_Core_PseudoConstant::nestedGroup();
     //get the campaign groups.
-    $groups = CRM_Core_PseudoConstant::group();
-
     $this->add('select', 'includeGroups',
       ts('Include Group(s)'),
       $groups,
@@ -306,7 +302,7 @@ class CRM_Campaign_Form_Campaign extends CRM_Core_Form {
    * @param $files
    * @param $errors
    *
-   * @return void
+   * @return bool|array
    * @access public
    * @see valid_date
    */
index 87e50870586cb3924b94c5d2df0e11db359fae5a..bdee47493ec140b0322ccafa25c6ea13d0d0e6c6 100644 (file)
@@ -164,12 +164,12 @@ class CRM_Campaign_Form_Task_Reserve extends CRM_Campaign_Form_Task {
     $this->addElement('text', 'ActivityType', ts('Activity Type'));
     $this->addElement('text', 'newGroupName', ts('Name for new group'));
     $this->addElement('text', 'newGroupDesc', ts('Description of new group'));
-    $groups = CRM_Core_PseudoConstant::group();
+    $groups = CRM_Core_PseudoConstant::nestedGroup();
     $hasExistingGroups = FALSE;
     if (is_array($groups) && !empty($groups)) {
       $hasExistingGroups = TRUE;
       $this->addElement('select', 'groups', ts('Add respondent(s) to existing group(s)'),
-        $groups, array('multiple' => "multiple", 'size' => 5)
+        $groups, array('multiple' => "multiple", 'class' => 'crm-select2')
       );
     }
     $this->assign('hasExistingGroups', $hasExistingGroups);
index ff2979ead13003cbdcb40b2193a0936a53e9d17d..6540e200e5654f3d389bd4eca66f83ac22b1a49c 100644 (file)
@@ -70,13 +70,17 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType {
     if (!$nameParam && empty($params['id'])) {
       $params['name'] = CRM_Utils_String::titleToVar($params['title']);
     }
-    if (!empty($params['name']) && !CRM_Case_BAO_CaseType::isValidName($params['name'])) {
-      throw new CRM_Core_Exception("Cannot create caseType with malformed name [{$params['name']}]");
+
+    // Old case-types (pre-4.5) may keep their ucky names, but new case-types must satisfy isValidName()
+    if (empty($params['id']) && !empty($params['name']) && !CRM_Case_BAO_CaseType::isValidName($params['name'])) {
+      throw new CRM_Core_Exception("Cannot create new case-type with malformed name [{$params['name']}]");
     }
 
+    $caseTypeName = (isset($params['name'])) ? $params['name'] : CRM_Core_DAO::getFieldValue('CRM_Case_DAO_CaseType', $params['id'], 'name', 'id', TRUE);
+
     // function to format definition column
     if (isset($params['definition']) && is_array($params['definition'])) {
-      $params['definition'] = self::convertDefinitionToXML($params['name'], $params['definition']);
+      $params['definition'] = self::convertDefinitionToXML($caseTypeName, $params['definition']);
       CRM_Core_ManagedEntities::scheduleReconcilation();
     }
 
@@ -97,6 +101,10 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType {
     $xmlFile = '<?xml version="1.0" encoding="iso-8859-1" ?>' . "\n\n<CaseType>\n";
     $xmlFile .= "<name>{$name}</name>\n";
 
+    if (array_key_exists('forkable', $definition)) {
+      $xmlFile .= "<forkable>" . ((int) $definition['forkable']) . "</forkable>\n";
+    }
+
     if (isset($definition['activityTypes'])) {
       $xmlFile .= "<ActivityTypes>\n";
       foreach ($definition['activityTypes'] as $values) {
@@ -173,6 +181,10 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType {
     // build PHP array based on definition
     $definition = array();
 
+    if (isset($xml->forkable)) {
+      $definition['forkable'] = (int) $xml->forkable;
+    }
+
     // set activity types
     if (isset($xml->ActivityTypes)) {
       $definition['activityTypes'] = array();
@@ -330,4 +342,38 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType {
   static function isValidName($caseType) {
     return preg_match('/^[a-zA-Z0-9_]+$/',  $caseType);
   }
+
+  /**
+   * Determine if the case-type has *both* DB and file-based definitions.
+   *
+   * @param int $caseTypeId
+   * @return bool|null TRUE if there are *both* DB and file-based definitions
+   */
+  static function isForked($caseTypeId) {
+    $caseTypeName = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_CaseType', $caseTypeId, 'name', 'id', TRUE);
+    if ($caseTypeName) {
+      $dbDefinition = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_CaseType', $caseTypeId, 'definition', 'id', TRUE);
+      $fileDefinition = CRM_Case_XMLRepository::singleton()->retrieveFile($caseTypeName);
+      return $fileDefinition && $dbDefinition;
+    }
+    return NULL;
+  }
+
+  /**
+   * Determine if modifications are allowed on the case-type
+   *
+   * @param int $caseTypeId
+   * @return bool TRUE if the definition can be modified
+   */
+  static function isForkable($caseTypeId) {
+    $caseTypeName = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_CaseType', $caseTypeId, 'name', 'id', TRUE);
+    if ($caseTypeName) {
+      // if file-based definition explicitly disables "forkable" option, then don't allow changes to definition
+      $fileDefinition = CRM_Case_XMLRepository::singleton()->retrieveFile($caseTypeName);
+      if ($fileDefinition && isset($fileDefinition->forkable)) {
+        return CRM_Utils_String::strtobool((string)$fileDefinition->forkable);
+      }
+    }
+    return TRUE;
+  }
 }
index 7cfd525f851b9b52f5e8b34cd86f1ffb806ceb52..39830d00dd3b277356ff5857b3303fea6e9e3eee 100644 (file)
@@ -72,12 +72,16 @@ class CRM_Case_Form_ActivityToCase extends CRM_Core_Form {
     $defaults['file_on_case_activity_subject'] = $defaults['subject'];
     $defaults['file_on_case_target_contact_id'] = $defaults['target_contact'];
 
+    // If this contact has an open case, supply it as a default
     $cid = CRM_Utils_Request::retrieve('cid', 'Integer');
     if ($cid) {
       $cases = CRM_Case_BAO_Case::getUnclosedCases(array('contact_id' => $cid), $this->_currentCaseId);
       foreach ($cases as $id => $details) {
         $defaults['file_on_case_unclosed_case_id'] = $id;
-        $value = array('label' => $details['sort_name'] . ' - ' . $details['case_type']);
+        $value = array(
+          'label' => $details['sort_name'] . ' - ' . $details['case_type'],
+          'extra' => array('contact_id' => $cid),
+        );
         $this->updateElementAttr('file_on_case_unclosed_case_id', array('data-value' => json_encode($value)));
         break;
       }
index 48eb90b1f07639b9bdbc3adb44143739d9c2b937..d1dde65e42d48776d7cfd6babef823f13b197dac 100644 (file)
@@ -321,7 +321,7 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
           $this->getButtonName('next', 'merge_case'),
           ts('Merge'),
           array(
-            'class' => 'form-submit-inline hiddenElement',
+            'class' => 'crm-form-submit-inline hiddenElement',
           )
         );
       }
index d62a10cbdbcddc6353a8e3c13837a1e30282b541..ac3342aae48465fe913d2a9f40c7dba8e7f10d16 100644 (file)
@@ -215,8 +215,9 @@ class CRM_Case_Info extends CRM_Core_Component_Info {
       &&
       (!$oldValue || !in_array('CiviCase', $oldValue))
     ) {
+      $pathToCaseSampleTpl =  __DIR__ . '/xml/configuration.sample/';
       $config = CRM_Core_Config::singleton();
-      CRM_Admin_Form_Setting_Component::loadCaseSampleData($config->dsn, $config->sqlDir . 'case_sample.mysql');
+      CRM_Admin_Form_Setting_Component::loadCaseSampleData($config->dsn, $pathToCaseSampleTpl . 'case_sample.mysql.tpl');
       if (!CRM_Case_BAO_Case::createCaseViews()) {
         $msg = ts("Could not create the MySQL views for CiviCase. Your mysql user needs to have the 'CREATE VIEW' permission");
         CRM_Core_Error::fatal($msg);
index 5706c0a9bb30f7e0d852bf97952dabec099f545a..2c83b33a8730a215f6a9dc0a9cf4cd0a81f56bb9 100644 (file)
@@ -81,9 +81,6 @@ class CRM_Case_Page_Tab extends CRM_Core_Page {
       else {
         CRM_Contact_Page_View::checkUserPermission($this);
       }
-
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
     else {
       if ($this->_action & CRM_Core_Action::VIEW) {
index 5193f468c6ea024a317c58006e90ceec38333478..067af0bd5e4c95e7af157fcf41569c6137173cd5 100644 (file)
@@ -84,32 +84,51 @@ class CRM_Case_XMLRepository {
       return simplexml_load_string($definition);
     }
 
-    if (!CRM_Case_BAO_CaseType::isValidName($caseType)) {
-      // perhaps caller provider a the label instead of the name?
-      throw new CRM_Core_Exception("Cannot load caseType with malformed name [$caseType]");
-    }
+    // TODO In 4.6 or 5.0, remove support for weird machine-names
+    //if (!CRM_Case_BAO_CaseType::isValidName($caseType)) {
+    //  // perhaps caller provider a the label instead of the name?
+    //  throw new CRM_Core_Exception("Cannot load caseType with malformed name [$caseType]");
+    //}
 
     if (!CRM_Utils_Array::value($caseType, $this->xml)) {
+      $fileXml = $this->retrieveFile($caseType);
+      if ($fileXml) {
+        $this->xml[$caseType] = $fileXml;
+      } else {
+        return FALSE;
+      }
+    }
+    return $this->xml[$caseType];
+  }
+
+  /**
+   * @param string $caseType
+   * @return SimpleXMLElement|FALSE
+   */
+  public function retrieveFile($caseType) {
+    $fileName = NULL;
+    $fileXml = NULL;
+
+    if (CRM_Case_BAO_CaseType::isValidName($caseType)) {
       // Search for a file based directly on the $caseType name
       $fileName = $this->findXmlFile($caseType);
+    }
 
-      // For backward compatibility, also search for double-mungd file names
-      // TODO In 4.6 or 5.0, remove support for loading double-munged file names
-      if (!$fileName || !file_exists($fileName)) {
-        $fileName = $this->findXmlFile(CRM_Case_XMLProcessor::mungeCaseType($caseType));
-      }
-
-      if (!$fileName || !file_exists($fileName)) {
-        return FALSE;
-      }
+    // For backward compatibility, also search for double-munged file names
+    // TODO In 4.6 or 5.0, remove support for loading double-munged file names
+    if (!$fileName || !file_exists($fileName)) {
+      $fileName = $this->findXmlFile(CRM_Case_XMLProcessor::mungeCaseType($caseType));
+    }
 
+    if ($fileName && file_exists($fileName)) {
       // read xml file
       $dom = new DomDocument();
       $dom->load($fileName);
       $dom->xinclude();
-      $this->xml[$caseType] = simplexml_import_dom($dom);
+      $fileXml = simplexml_import_dom($dom);
     }
-    return $this->xml[$caseType];
+
+    return $fileXml;
   }
 
   /**
diff --git a/CRM/Case/xml/configuration.sample/case_sample.mysql.tpl b/CRM/Case/xml/configuration.sample/case_sample.mysql.tpl
new file mode 100644 (file)
index 0000000..75c1dd5
--- /dev/null
@@ -0,0 +1,94 @@
+-- /**********************************************************************
+-- *
+-- * Configuration Data for CiviCase Component
+-- * For: Sample Case Types - Housing Support and Adult Day Care Referral
+-- *
+-- **********************************************************************/
+
+SELECT @caseCompId := id FROM `civicrm_component` where `name` like 'CiviCase';
+
+-- /*******************************************************
+-- *
+-- * Case Types
+-- *
+-- *******************************************************/
+SELECT @max_wt  :=  COALESCE ( max(weight), 0 ) from civicrm_case_type;
+
+INSERT IGNORE INTO `civicrm_case_type` (  {localize field='title'}`title`{/localize}, `name`, {localize field='description'}`description`{/localize}, `weight`, `is_reserved`, `is_active`) VALUES
+  ({localize}'{ts escape="sql"}Housing Support{/ts}'{/localize}, 'housing_support', {localize}'{ts escape="sql"}Help homeless individuals obtain temporary and long-term housing{/ts}'{/localize}, @max_wt + 1, 0, 1),
+  ({localize}'{ts escape="sql"}Adult Day Care Referral{/ts}'{/localize}, 'adult_day_care_referral', {localize}'{ts escape="sql"}Arranging adult day care for senior individuals{/ts}'{/localize}, @max_wt + 2, 0, 1);
+
+-- /*******************************************************
+-- *
+-- * Case Status - Set names for Open and Closed
+-- *
+-- *******************************************************/
+SELECT @csgId        := max(id) from civicrm_option_group where name = 'case_status';
+{if $multilingual}
+  {foreach from=$locales item=locale}
+    UPDATE civicrm_option_value SET name = 'Open' where option_group_id = @csgId AND label_{$locale} = 'Ongoing';
+    UPDATE civicrm_option_value SET name = 'Closed' where option_group_id = @csgId AND label_{$locale} = 'Resolved';
+  {/foreach}  
+{else}
+  UPDATE civicrm_option_value SET name = 'Open' where option_group_id = @csgId AND label = 'Ongoing';
+  UPDATE civicrm_option_value SET name = 'Closed' where option_group_id = @csgId AND label = 'Resolved';
+{/if}  
+
+-- /*******************************************************
+-- *
+-- * Activity Types
+-- *
+-- *******************************************************/
+SELECT @option_group_id_activity_type        := max(id) from civicrm_option_group where name = 'activity_type';
+
+SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id  = @option_group_id_activity_type;
+
+INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
+(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}Medical evaluation{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'Medical evaluation',  NULL, 0,  0, (SELECT @max_val := @max_val+1),  0, 0, 1, @caseCompId
+ FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value`  WHERE `name` = 'Medical evaluation'));
+
+INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`,  `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
+(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}Mental health evaluation{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'Mental health evaluation',  NULL, 0,  0, (SELECT @max_val := @max_val+1),  0, 0, 1, @caseCompId
+ FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value`  WHERE `name` = 'Mental health evaluation'));
+
+INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`,  `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
+(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}Secure temporary housing{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'Secure temporary housing',  NULL, 0,  0, (SELECT @max_val := @max_val+1),  0, 0, 1, @caseCompId
+ FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value`  WHERE `name` = 'Secure temporary housing'));
+
+INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`,  `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
+(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}Income and benefits stabilization{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'Income and benefits stabilization',  NULL, 0,  0, (SELECT @max_val := @max_val+1),  0, 0, 1, @caseCompId
+ FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value`  WHERE `name` = 'Income and benefits stabilization'));
+
+INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`,  `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
+(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}Long-term housing plan{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'Long-term housing plan',  NULL, 0,  0, (SELECT @max_val := @max_val+1),  0, 0, 1, @caseCompId
+ FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value`  WHERE `name` = 'Long-term housing plan'));
+
+INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`,  `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
+(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}ADC referral{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'ADC referral',  NULL, 0,  0, (SELECT @max_val := @max_val+1),  0, 0, 1, @caseCompId
+ FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value`  WHERE `name` = 'ADC referral'));
+-- /*******************************************************
+-- *
+-- * 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`, `is_active` ) (SELECT 'Homeless Services Coordinator is', 'Homeless Services Coordinator is', 'Homeless Services Coordinator', 'Homeless Services Coordinator',  'Homeless Services Coordinator', 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type`  WHERE `name_a_b` = 'Homeless Services Coordinator is'));
+
+
+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`, `is_active` ) (
+SELECT 'Health Services Coordinator is', 'Health Services Coordinator is', 'Health Services Coordinator', 'Health Services Coordinator',  'Health Services Coordinator', 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type`  WHERE `name_a_b` = 'Health Services Coordinator is'));
+
+
+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`, `is_active` ) (
+SELECT 'Senior Services Coordinator is', 'Senior Services Coordinator is', 'Senior Services Coordinator', 'Senior Services Coordinator', 'Senior Services Coordinator', 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type`  WHERE `name_a_b` = 'Senior Services Coordinator is'));
+
+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`, `is_active` ) (
+SELECT 'Benefits Specialist is', 'Benefits Specialist is', 'Benefits Specialist', 'Benefits Specialist', 'Benefits Specialist', 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type`  WHERE `name_a_b` = 'Benefits Specialist is'));
+
+-- /*******************************************************
+-- *
+-- * Case Resources Group
+-- *
+-- *******************************************************/
+
+INSERT INTO `civicrm_group` (  `name`, {localize field='title'}`title`{/localize}, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `parents`, `children`, `is_hidden` ) (SELECT 'Case_Resources', {localize}'{ts escape="sql"}Case Resources{/ts}'{/localize}, 'Contacts in this group are listed with their phone number and email when viewing case. You also can send copies of case activities to these contacts.', NULL, NULL, 1, 'User and User Admin Only', ' ( `civicrm_group_contact-5`.group_id IN ( 5 ) AND `civicrm_group_contact-5`.status IN ("Added") ) ', '{literal}a:10:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";s:6:"gender";i:1;}{/literal}', '{literal}a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";}{/literal}', '2', NULL, NULL, NULL, 0 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_group`  WHERE `name` = 'Case_Resources'));
index 16b703190d69ec43c4f7208c4c03a3abeb946b5c..2f93f8eb08966a3790e98e4b9cfd793bc7a5ab11 100644 (file)
@@ -3191,7 +3191,7 @@ LEFT JOIN civicrm_address add2 ON ( add1.master_id = add2.id )
    *
    * @param  int     $contactId   contact id.
    *
-   * @return true if present else false.
+   * @return bool true if present else false.
    * @access public
    * @static
    */
index cc484a25271404f88653ae10b3efb7264d67bc7b..75332c0c9f005378d8afa7311ff08f5a25deaa50 100644 (file)
@@ -750,8 +750,8 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
     if (!empty($groups)) {
       foreach ($groups as $id => $value) {
         $groupList[$id]['group_id'] = $value['id'];
+        $groupList[$id]['count'] = $value['count'];
         $groupList[$id]['group_name'] = $value['title'];
-        $groupList[$id]['class'] = implode(' ', $value['class']);
 
         // append parent names if in search mode
         if (empty($params['parent_id']) && !empty($value['parents'])) {
@@ -761,8 +761,10 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
             $title[] = $allGroups[$gId];
           }
           $groupList[$id]['group_name'] .= '<div class="crm-row-parent-name"><em>'.ts('Child of').'</em>: ' . implode(', ', $title) . '</div>';
-          $groupList[$id]['class'] = in_array('disabled', $value['class']) ? 'disabled' : '';
+          $value['class'] = array_diff($value['class'], array('crm-row-parent'));
         }
+        $value['class'][] = 'crm-entity';
+        $groupList[$id]['class'] = $value['id'] . ',' . implode(' ', $value['class']);
 
         $groupList[$id]['group_description'] = CRM_Utils_Array::value('description', $value);
         if (!empty($value['group_type'])) {
@@ -829,12 +831,17 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
     }
 
     $query = "
-        SELECT groups.*, createdBy.sort_name as created_by {$select}
+        SELECT groups.*, createdBy.sort_name as created_by, IF(groups.saved_search_id, COUNT(smart_contacts.id), COUNT(contacts.id)) as `count` {$select}
         FROM  civicrm_group groups
-              LEFT JOIN civicrm_contact createdBy
-                     ON createdBy.id = groups.created_id
-              {$from}
+        LEFT JOIN civicrm_group_contact contacts
+          ON contacts.group_id = groups.id AND contacts.status = 'Added'
+        LEFT JOIN civicrm_group_contact_cache smart_contacts
+          ON smart_contacts.group_id = groups.id
+        LEFT JOIN civicrm_contact createdBy
+          ON createdBy.id = groups.created_id
+        {$from}
         WHERE $whereClause {$where}
+        GROUP BY groups.id
         {$orderBy}
         {$limit}";
 
@@ -910,6 +917,8 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
 
         $values[$object->id]['visibility'] = $visibility[$values[$object->id]['visibility']];
 
+        $values[$object->id]['count'] = $object->count;
+
         if (isset($values[$object->id]['group_type'])) {
           $groupTypes = explode(CRM_Core_DAO::VALUE_SEPARATOR,
             substr($values[$object->id]['group_type'], 1, -1)
index 8ffeb2da1345347975c79d071ba829a444acf491..a88d317325675d0aa44f7623b0036b4d1ed86331 100644 (file)
@@ -190,6 +190,15 @@ AND    g.refresh_date IS NULL
     }
   }
 
+  /**
+   * FIXME: This function should not be needed, because the cache table should not be getting truncated
+   */
+  static function fillIfEmpty() {
+    if (!CRM_Core_DAO::singleValueQuery("SELECT COUNT(id) FROM civicrm_group_contact_cache")) {
+      self::loadAll();
+    }
+  }
+
   /**
    * @param $groupID
    */
index b88a412044238b2c3ac0ace23eae1f5418756853..b5e065df0fa7459126cae5589dd0a9f00ab8562f 100644 (file)
@@ -289,7 +289,7 @@ ACOS(
     if (!isset($proximityAddress['country_id'])) {
       // get it from state if state is present
       if (isset($proximityAddress['state_province_id'])) {
-        $proximityAddress['country_id'] = CRM_Core_PseudoConstant::countryForState($proximityAddress['state_province_id']);
+        $proximityAddress['country_id'] = CRM_Core_PseudoConstant::countryIDForStateID($proximityAddress['state_province_id']);
       }
       elseif (isset($config->defaultContactCountry)) {
         $proximityAddress['country_id'] = $config->defaultContactCountry;
index 681142af2022b9b7e966469d1a6bc5e501849a9f..5dd767f493501086597be0be44a22cfa789b5bab 100644 (file)
@@ -563,6 +563,13 @@ class CRM_Contact_BAO_Query {
         if (!array_key_exists($cfID, $this->_cfIDs)) {
           $this->_cfIDs[$cfID] = array();
         }
+        // Set wildcard value based on "and/or" selection
+        foreach ($this->_params as $key => $param) {
+          if ($param[0] == $value[0] . '_operator') {
+            $value[4] = $param[2] == 'or';
+            break;
+          }
+        }
         $this->_cfIDs[$cfID][] = $value;
       }
 
@@ -3555,13 +3562,13 @@ WHERE  id IN ( $groupIDs )
     list($name, $op, $value, $grouping, $wildcard) = $values;
 
     if (is_array($value)) {
-      $this->_where[$grouping][] = 'civicrm_address.location_type_id IN (' . implode(',', array_keys($value)) . ')';
+      $this->_where[$grouping][] = 'civicrm_address.location_type_id IN (' . implode(',', $value) . ')';
       $this->_tables['civicrm_address'] = 1;
       $this->_whereTables['civicrm_address'] = 1;
 
       $locationType = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
       $names = array();
-      foreach (array_keys($value) as $id) {
+      foreach ($value as $id) {
         $names[] = $locationType[$id];
       }
 
@@ -3790,9 +3797,8 @@ WHERE  id IN ( $groupIDs )
       }
       $stateClause = "civicrm_address.state_province_id $op (" . implode(',', $value) . ')';
 
-      $stateProvince = CRM_Core_PseudoConstant::stateProvince();
       foreach ($value as $id) {
-        $names[] = CRM_Utils_Array::value($id, $stateProvince);
+        $names[] = CRM_Core_PseudoConstant::stateProvince($id, FALSE);
       }
     }
     else {
@@ -3936,24 +3942,24 @@ WHERE  id IN ( $groupIDs )
     }
 
     $toggleValues = $this->getWhereValues('privacy_toggle', $grouping);
-    $compareOP = '!=';
+    $compareOP = '!';
     if ($toggleValues &&
       $toggleValues[2] == 2
     ) {
-      $compareOP = '=';
+      $compareOP = '';
     }
 
     $clauses = array();
     $qill = array();
     foreach ($value as $dontCare => $pOption) {
-      $clauses[] = " ( contact_a.{$pOption} $compareOP 1 ) ";
+      $clauses[] = " ( contact_a.{$pOption} = 1 ) ";
       $field = CRM_Utils_Array::value($pOption, $this->_fields);
       $title = $field ? $field['title'] : $pOption;
-      $qill[] = " $title $compareOP 1 ";
+      $qill[] = " $title = 1 ";
     }
 
-    $this->_where[$grouping][] = '( ' . implode($operator, $clauses) . ' )';
-    $this->_qill[$grouping][] = implode($operator, $qill);
+    $this->_where[$grouping][] = $compareOP . '( ' . implode($operator, $clauses) . ' )';
+    $this->_qill[$grouping][] = $compareOP . '( ' . implode($operator, $qill) . ' )';
   }
 
   /**
index 6fd1a9063fb06cba11f0c8ed486e1917d31e391c..bd654dd4bbcb8855db389bb1093919ae91172d50 100644 (file)
@@ -63,9 +63,7 @@ class CRM_Contact_Form_DedupeFind extends CRM_Admin_Form {
    */
   public function buildQuickForm() {
 
-    $groupList = CRM_Core_PseudoConstant::group();
-    $groupList[''] = ts('- All Contacts -');
-    asort($groupList);
+    $groupList = array('' => ts('- All Contacts -')) + CRM_Core_PseudoConstant::nestedGroup();
 
     $this->add('select', 'group_id', ts('Select Group'), $groupList, FALSE, array('class' => 'crm-select2 huge'));
     $this->addButtons(array(
index e38294250a3d9177dcd3b19f55f5e49c30acbb06..41af922c220062679d0439ad8937daa8f886c33b 100644 (file)
@@ -68,7 +68,7 @@ class CRM_Contact_Form_Edit_Household {
     }
 
     if ( !$inlineEditMode ) {
-      $form->add('text', 'external_identifier', ts('External Id'), $attributes['external_identifier'], FALSE);
+      $form->add('text', 'external_identifier', ts('External ID'), $attributes['external_identifier'], FALSE);
       $form->addRule('external_identifier',
         ts('External ID already exists in Database.'),
         'objectExists',
index 8df832970ca9c33cab91e0d9ab13eb3a7824f4a6..f8a2f2d7ba38b713fec422333728cb130261df56 100644 (file)
@@ -128,7 +128,7 @@ class CRM_Contact_Form_Edit_Individual {
       $form->assign('checkSimilar', $checkSimilar);
 
       //External Identifier Element
-      $form->add('text', 'external_identifier', ts('External Id'),
+      $form->add('text', 'external_identifier', ts('External ID'),
         CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'external_identifier'), FALSE
       );
 
index 57465feaf0fdaefe38bc36bbd823faf7fdbf5634..58e4be19d77654c352cd4843aec862d48a514383 100644 (file)
@@ -77,7 +77,7 @@ class CRM_Contact_Form_Edit_Organization {
     }
 
     if ( !$inlineEditMode ) {
-      $form->add('text', 'external_identifier', ts('External Id'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'external_identifier'), FALSE);
+      $form->add('text', 'external_identifier', ts('External ID'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'external_identifier'), FALSE);
       $form->addRule('external_identifier',
         ts('External ID already exists in Database.'),
         'objectExists',
index 21a4f2f74e6cfd37a14a81367a0dd91db05c3269..8e09b3af29745cdd013cd4469bb6039914e09748 100644 (file)
@@ -165,7 +165,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups {
       // build tag widget
       $parentNames = CRM_Core_BAO_Tag::getTagSet('civicrm_contact');
 
-      CRM_Core_Form_Tag::buildQuickForm($form, $parentNames, 'civicrm_contact', $contactId, TRUE, TRUE);
+      CRM_Core_Form_Tag::buildQuickForm($form, $parentNames, 'civicrm_contact', $contactId, FALSE, TRUE);
     }
     $form->assign('tagGroup', $form->_tagGroup);
   }
index 7339871684ef494c7e373b9fe13ed37a6894a0c0..170727e74df8d1349087f483ca6095699e2f1c71 100644 (file)
@@ -71,6 +71,11 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
     $this->_gid     = $gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this, FALSE);
     $this->_mergeId = CRM_Utils_Request::retrieve('mergeId', 'Positive', $this, FALSE);
 
+    // Sanity check
+    if ($cid == $oid) {
+      CRM_Core_Error::statusBounce(ts('Cannot merge a contact with itself.'));
+    }
+
     if (!CRM_Dedupe_BAO_Rule::validateContacts($cid, $oid)) {
       CRM_Core_Error::statusBounce(ts('The selected pair of contacts are marked as non duplicates. If these records should be merged, you can remove this exception on the <a href=\'%1\'>Dedupe Exceptions</a> page.', array(1 => CRM_Utils_System::url('civicrm/dedupe/exception', 'reset=1'))));
     }
@@ -334,7 +339,10 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
 
     CRM_Dedupe_Merger::moveAllBelongings($this->_cid, $this->_oid, $formValues);
 
-    CRM_Core_Session::setStatus(ts('Contact id %1 has been updated and contact id %2 has been deleted.', array(1 => $this->_cid, 2 => $this->_oid)), ts('Contacts Merged'), 'success');
+    $name = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_cid, 'display_name');
+    $message = '<ul><li>' . ts('%1 has been updated.', array(1 => $name)) . '</li><li>' . ts('Contact ID %1 has been deleted.', array(1 => $this->_oid)) . '</li></ul>';
+    CRM_Core_Session::setStatus($message, ts('Contacts Merged'), 'success');
+
     $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$this->_cid}");
     if (!empty($formValues['_qf_Merge_submit'])) {
       $listParamsURL = "reset=1&action=update&rgid={$this->_rgid}";
index 98286ab061b67e2061fdbf5940c1e350de2c3fb4..7a0083b2f1209c69cbcea8df672b2b5b475c3de5 100644 (file)
@@ -337,7 +337,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
    */
   function buildQuickForm() {
     parent::buildQuickForm();
-    $this->setAttribute('class', 'crm-search-form crm-ajax-selection-form');
+    $this->addClass('crm-ajax-selection-form');
     CRM_Core_Resources::singleton()
       // jsTree is needed for tags popup
       ->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE)
@@ -446,10 +446,14 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
       $this->assign_by_ref('group', $groupValues);
       $this->add('submit', $this->_actionButtonName, ts('Add Contacts to %1', array(1 => $this->_group[$this->_amtgID])),
         array(
-          'class' => 'form-submit',
+          'class' => 'crm-form-submit',
         )
       );
       $this->add('hidden', 'task', CRM_Contact_Task::GROUP_CONTACTS);
+      $selectedRowsRadio = $this->addElement('radio', 'radio_ts', NULL, '', 'ts_sel', array('checked' => 'checked'));
+      $allRowsRadio = $this->addElement('radio', 'radio_ts', NULL, '', 'ts_all');
+      $this->assign('ts_sel_id', $selectedRowsRadio->_attributes['id']);
+      $this->assign('ts_all_id', $allRowsRadio->_attributes['id']);
     }
     else {
       $this->addTaskMenu($tasks);
index e2a88eaded998ac030815779a672b973d8642f03..380d04a2696cb1f24b6df0a52a7de8fc0b65c6ce 100644 (file)
@@ -450,10 +450,14 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search {
       foreach ($fields['values'] as $field => $info) {
         if (!empty($info['options']) || !empty($info['pseudoconstant']) || !empty($info['option_group_id'])) {
           $options[$field] = $entity;
+          // Hack for when search field doesn't match db field - e.g. "country" instead of "country_id"
           if (substr($field, -3) == '_id') {
             $options[substr($field, 0, -3)] = $entity;
           }
         }
+        elseif (!empty($info['data_type']) && in_array($info['data_type'], array('StateProvince', 'Country'))) {
+          $options[$field] = $entity;
+        }
         elseif (in_array(substr($field, 0, 3), array('is_', 'do_')) || CRM_Utils_Array::value('data_type', $info) == 'Boolean') {
           $options[$field] = 'yesno';
           if ($entity != 'contact') {
index 1aee74b7443552576964216f8c03b93821f83747..2513ee646076634f9ef0355ddcfabb009ba0aaf5 100644 (file)
@@ -271,9 +271,10 @@ class CRM_Contact_Form_Search_Criteria {
 
 
   /**
-   * @param $form
+   * @param CRM_Core_Form $form
    */
   static function location(&$form) {
+    $config = CRM_Core_Config::singleton();
     // Build location criteria based on _submitValues if
     // available; otherwise, use $form->_formValues.
     $formValues = $form->_submitValues;
@@ -305,6 +306,7 @@ class CRM_Contact_Form_Search_Criteria {
 
     $parseStreetAddress = CRM_Utils_Array::value('street_address_parsing', $addressOptions, 0);
     $form->assign('parseStreetAddress', $parseStreetAddress);
+    $stateCountryMap = NULL;
     foreach ($elements as $name => $v) {
       list($title, $attributes, $select, $multiSelect) = $v;
 
@@ -324,11 +326,11 @@ class CRM_Contact_Form_Search_Criteria {
       }
 
       if ($select) {
-        $stateCountryMap[] = array(
+        $stateCountryMap = array(array(
           'state_province' => 'state_province',
           'country' => 'country',
           'county' => 'county',
-        );
+        ));
         if ($select == 'stateProvince') {
           if (!empty($formValues['country'])) {
             $selectElements = array('' => ts('- select -')) + CRM_Core_PseudoConstant::stateProvinceForCountry($formValues['country']);
@@ -337,11 +339,11 @@ class CRM_Contact_Form_Search_Criteria {
             //if not setdefault any country
             $selectElements = CRM_Core_PseudoConstant::$select();
           }
-          $element = $form->add('select', $name, $title, $selectElements, FALSE, array('class' => 'crm-select2'));
+          $element = $form->add('select', $name, $title, $selectElements);
         }
         elseif ($select == 'country') {
           $selectElements = array('' => ts('- any -')) + CRM_Core_PseudoConstant::$select();
-          $element = $form->add('select', $name, $title, $selectElements, FALSE, array('class' => 'crm-select2'));
+          $element = $form->add('select', $name, $title, $selectElements);
         }
         elseif ($select == 'county') {
           if ( array_key_exists('state_province', $formValues) && !CRM_Utils_System::isNull($formValues['state_province'])) {
@@ -350,7 +352,7 @@ class CRM_Contact_Form_Search_Criteria {
           else {
             $selectElements = array('' => ts('- any -'));
           }
-          $element = $form->add('select', $name, $title, $selectElements, FALSE, array('class' => 'crm-select2'));
+          $element = $form->add('select', $name, $title, $selectElements);
         }
         else {
           $selectElements = array('' => ts('- any -')) + CRM_Core_PseudoConstant::$select();
@@ -365,34 +367,33 @@ class CRM_Contact_Form_Search_Criteria {
       }
 
       if ($addressOptions['postal_code']) {
-        $form->addElement('text', 'postal_code_low', ts('Range-From'),
-          CRM_Utils_Array::value('postal_code', $attributes)
-        );
-        $form->addElement('text', 'postal_code_high', ts('To'),
-          CRM_Utils_Array::value('postal_code', $attributes)
-        );
+        $attr = array('class' => 'six') + (array) CRM_Utils_Array::value('postal_code', $attributes);
+        $form->addElement('text', 'postal_code_low', NULL, $attr + array('placeholder' => ts('From')));
+        $form->addElement('text', 'postal_code_high', NULL, $attr + array('placeholder' => ts('To')));
       }
     }
 
     CRM_Core_BAO_Address::addStateCountryMap($stateCountryMap);
 
     // extend addresses with proximity search
-    $form->addElement('text', 'prox_distance', ts('Find contacts within'), array('class' => 'six'));
-    $form->addElement('select', 'prox_distance_unit', NULL, array('miles' => ts('Miles'), 'kilos' => ts('Kilometers')));
-
-    // is there another form rule that does decimals besides money ? ...
-    $form->addRule('prox_distance', ts('Please enter positive number as a distance'), 'numeric');
+    if (!empty($config->geocodeMethod)) {
+      $form->addElement('text', 'prox_distance', ts('Find contacts within'), array('class' => 'six'));
+      $form->addElement('select', 'prox_distance_unit', NULL, array(
+        'miles' => ts('Miles'),
+        'kilos' => ts('Kilometers')
+      ));
+      $form->addRule('prox_distance', ts('Please enter positive number as a distance'), 'numeric');
+    }
 
-    $worldRegions = array('' => '') + CRM_Core_PseudoConstant::worldRegion();
     $form->addSelect('world_region', array('entity' => 'address', 'placeholder' => ts('- any -'), 'option_url' => NULL));
 
-    // checkboxes for location type
-    $location_type = array();
+    // select for location type
     $locationType = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
-    foreach ($locationType as $locationTypeID => $locationTypeName) {
-      $location_type[] = $form->createElement('checkbox', $locationTypeID, NULL, $locationTypeName);
-    }
-    $form->addGroup($location_type, 'location_type', ts('Location Types'), '&nbsp;');
+    $form->add('select', 'location_type', ts('Address Location'), $locationType, FALSE, array(
+      'multiple' => TRUE,
+      'class' => 'crm-select2',
+      'placeholder' => ts('Primary'),
+    ));
 
     // custom data extending addresses -
     $extends = array('Address');
index 97ab38508bc9eb3d5dd5d06a60c28fb03bac950c..2261ce29e6e58206bd7c74dc11208753ae71e42e 100644 (file)
@@ -118,15 +118,15 @@ class CRM_Contact_Form_Search_Custom_Basic extends CRM_Contact_Form_Search_Custo
     // this is loaded onto then replace with something like '__' & test
     $separator = CRM_Core_DAO::VALUE_SEPARATOR;
     $contactTypes = array('' => ts('- any contact type -')) + CRM_Contact_BAO_ContactType::getSelectElements(FALSE, TRUE, $separator);
-    $form->add('select', 'contact_type', ts('Find...'), $contactTypes);
+    $form->add('select', 'contact_type', ts('Find...'), $contactTypes, FALSE, array('class' => 'crm-select2 huge'));
 
     // add select for groups
-    $group = array('' => ts('- any group -')) + CRM_Core_PseudoConstant::group();
-    $form->addElement('select', 'group', ts('in'), $group);
+    $group = array('' => ts('- any group -')) + CRM_Core_PseudoConstant::nestedGroup();
+    $form->addElement('select', 'group', ts('in'), $group, array('class' => 'crm-select2 huge'));
 
     // add select for categories
     $tag = array('' => ts('- any tag -')) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_EntityTag', 'tag_id', array('onlyActive' => FALSE));
-    $form->addElement('select', 'tag', ts('Tagged'), $tag);
+    $form->addElement('select', 'tag', ts('Tagged'), $tag, array('class' => 'crm-select2 huge'));
 
     // text for sort_name
     $form->add('text', 'sort_name', ts('Name'));
index 91775a4948214ed404f58b55b2c1b5d48637f3e6..fc698bb68844917c5ca8bce4cca5239e2a43b522 100644 (file)
@@ -45,7 +45,7 @@ class CRM_Contact_Form_Search_Custom_ContribSYBNT implements CRM_Contact_Form_Se
     $this->_permissionedComponent = 'CiviContribute';
 
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Name') => 'display_name',
       ts('Donation Count') => 'donation_count',
       ts('Donation Amount') => 'donation_amount',
index 3cab0ced25ae6e2061d00d780a18b6e79359b137..9c953cf033ae40da436011620bd6d90a8a4cd20a 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Contact_Form_Search_Custom_ContributionAggregate implements CRM_Contac
      */
 
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Name') => 'sort_name',
       ts('Donation Count') => 'donation_count',
       ts('Donation Amount') => 'donation_amount',
index 716b1333fcd864860787ae223fd5fd6d0545ccc6..ec7f5e1632e134c37fa1a07e7e75b42efaf85b11 100644 (file)
@@ -46,7 +46,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
     $this->_excludeGroups = CRM_Utils_Array::value('excludeGroups', $formValues, array());
 
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Contact Type') => 'contact_type',
       ts('Name') => 'sort_name',
       ts('Date Added') => 'date_added',
@@ -60,7 +60,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
     $form->addDate('start_date', ts('Start Date'), FALSE, array('formatType' => 'custom'));
     $form->addDate('end_date', ts('End Date'), FALSE, array('formatType' => 'custom'));
 
-    $groups = CRM_Core_PseudoConstant::group();
+    $groups = CRM_Core_PseudoConstant::nestedGroup();
 
     $select2style = array(
       'multiple' => TRUE,
index ca42ad05a22876c2ca1d0d46a6e9401929c20768..79b5a77b4e674e152ed7abc1ce9742a5a5ff0c16 100644 (file)
@@ -46,7 +46,7 @@ class CRM_Contact_Form_Search_Custom_EmployerListing implements CRM_Contact_Form
      * Define the columns for search result rows
      */
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Individual Name') => 'sort_name',
       ts('Individual State') => 'indState',
       ts('Employer') => 'employer',
index 634f4da0becd214ef99c4e56871da4fafab5ea1f..065e9b2c6cb53767c799070421ee70d106922e66 100644 (file)
@@ -346,7 +346,7 @@ WHERE      t.table_name = 'Activity' AND
    */
   function &columns() {
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Name') => 'sort_name',
     );
 
index 51fd1908f4256da30af73cdb2031a20782497e5b..ae65bd301530d7c28a9f118354a63fab85d4942a 100644 (file)
@@ -51,7 +51,7 @@ class CRM_Contact_Form_Search_Custom_Group
   function __construct(&$formValues) {
     $this->_formValues = $formValues;
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Contact Type') => 'contact_type',
       ts('Name') => 'sort_name',
       ts('Group Name') => 'gname',
@@ -97,7 +97,7 @@ class CRM_Contact_Form_Search_Custom_Group
 
     $this->setTitle(ts('Include / Exclude Search'));
 
-    $groups = CRM_Core_PseudoConstant::group();
+    $groups = CRM_Core_PseudoConstant::nestedGroup();
 
     $tags = CRM_Core_PseudoConstant::get('CRM_Core_DAO_EntityTag', 'tag_id', array('onlyActive' => FALSE));
     if (count($groups) == 0 || count($tags) == 0) {
index caf43231edd249416ed7b2b3e5f9e77eff482b4f..02a3d2985259a7e7b8066803b4ee9445fdb46e25 100644 (file)
@@ -54,7 +54,7 @@ class CRM_Contact_Form_Search_Custom_MultipleValues extends CRM_Contact_Form_Sea
     $this->_tag = CRM_Utils_Array::value('tag', $this->_formValues);
 
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Contact Type') => 'contact_type',
       ts('Name') => 'sort_name',
     );
@@ -108,15 +108,15 @@ class CRM_Contact_Form_Search_Custom_MultipleValues extends CRM_Contact_Form_Sea
     // this is loaded onto then replace with something like '__' & test
     $separator = CRM_Core_DAO::VALUE_SEPARATOR;
     $contactTypes = array('' => ts('- any contact type -')) + CRM_Contact_BAO_ContactType::getSelectElements(FALSE, TRUE, $separator);
-    $form->add('select', 'contact_type', ts('Find...'), $contactTypes);
+    $form->add('select', 'contact_type', ts('Find...'), $contactTypes, array('class' => 'crm-select2 huge'));
 
     // add select for groups
     $group = array('' => ts('- any group -')) + CRM_Core_PseudoConstant::group();
-    $form->addElement('select', 'group', ts('in'), $group);
+    $form->addElement('select', 'group', ts('in'), $group, array('class' => 'crm-select2 huge'));
 
     // add select for tags
     $tag = array('' => ts('- any tag -')) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_EntityTag', 'tag_id', array('onlyActive' => FALSE));
-    $form->addElement('select', 'tag', ts('Tagged'), $tag);
+    $form->addElement('select', 'tag', ts('Tagged'), $tag, array('class' => 'crm-select2 huge'));
 
     if (empty($this->_groupTree)) {
       CRM_Core_Error::statusBounce(ts("Atleast one Custom Group must be present, for Custom Group search."),
index 3bc66a380cf5ddb99f0ef355dc6648a8022a52e3..066a5d4a9e81f4cf55deab1c3b6ddc08a8db7a95 100644 (file)
@@ -40,7 +40,7 @@ class CRM_Contact_Form_Search_Custom_PostalMailing extends CRM_Contact_Form_Sear
     parent::__construct($formValues);
 
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Address') => 'address',
       ts('Contact Type') => 'contact_type',
       ts('Name') => 'sort_name',
@@ -52,8 +52,8 @@ class CRM_Contact_Form_Search_Custom_PostalMailing extends CRM_Contact_Form_Sear
    * @param $form
    */
   function buildForm(&$form) {
-    $groups = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::allGroup();
-    $form->addElement('select', 'group_id', ts('Group'), $groups);
+    $groups = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::nestedGroup(FALSE);
+    $form->addElement('select', 'group_id', ts('Group'), $groups, array('class' => 'crm-select2 huge'));
 
     /**
      * if you are using the standard template, this array tells the template what elements
index f648fb37309b67143830caf2ff3e811cc87c63a5..9fef7ee4924000af5f04a0f812bddf246f0954e3 100644 (file)
@@ -223,7 +223,7 @@ AND    p.entity_id    = e.id
 
   function setColumns() {
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Participant Id') => 'participant_id',
       ts('Name') => 'display_name',
     );
index 6bf658b34e5f5a54985ed88fb81755354d9e0414..c9d1dfcd4d7e245825cbaf2360c583dbfdd847b2 100644 (file)
@@ -136,16 +136,16 @@ class CRM_Contact_Form_Search_Custom_Proximity extends CRM_Contact_Form_Search_C
     else {
       $stateProvince = array('' => ts('- select -')) + CRM_Core_PseudoConstant::stateProvince();
     }
-    $form->addElement('select', 'state_province_id', ts('State/Province'), $stateProvince);
+    $form->add('select', 'state_province_id', ts('State/Province'), $stateProvince, FALSE, array('class' => 'crm-select2 huge'));
 
     $country = array('' => ts('- select -')) + CRM_Core_PseudoConstant::country();
-    $form->add('select', 'country_id', ts('Country'), $country, TRUE);
+    $form->add('select', 'country_id', ts('Country'), $country, TRUE, array('class' => 'crm-select2 huge'));
 
-    $group = array('' => ts('- any group -')) + CRM_Core_PseudoConstant::group();
-    $form->addElement('select', 'group', ts('Group'), $group);
+    $group = array('' => ts('- any group -')) + CRM_Core_PseudoConstant::nestedGroup();
+    $form->addElement('select', 'group', ts('Group'), $group, array('class' => 'crm-select2 huge'));
 
     $tag = array('' => ts('- any tag -')) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_EntityTag', 'tag_id', array('onlyActive' => FALSE));
-    $form->addElement('select', 'tag', ts('Tag'), $tag);
+    $form->addElement('select', 'tag', ts('Tag'), $tag, array('class' => 'crm-select2 huge'));
 
 
     // state country js, CRM-5233
index 5718a7f3c9e133b8488ffa82f066113e28da8e0c..6c01285304260a9ac9f8fa1d706729cacc7f9815 100644 (file)
@@ -43,7 +43,7 @@ class CRM_Contact_Form_Search_Custom_RandomSegment extends CRM_Contact_Form_Sear
     parent::__construct($formValues);
 
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Contact Type') => 'contact_type',
       ts('Name') => 'sort_name',
       ts('Email') => 'email',
@@ -83,7 +83,7 @@ class CRM_Contact_Form_Search_Custom_RandomSegment extends CRM_Contact_Form_Sear
       TRUE
     );
 
-    $groups = CRM_Core_PseudoConstant::group();
+    $groups = CRM_Core_PseudoConstant::nestedGroup();
 
     $select2style = array(
       'multiple' => TRUE,
index f811a58f81a2f8009826f060701770bbe2142a08..cbe50a0085ac5fb3b448a0c31da1171d4e6db6f2 100644 (file)
@@ -49,7 +49,7 @@ class CRM_Contact_Form_Search_Custom_Sample extends CRM_Contact_Form_Search_Cust
     }
 
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Contact Type') => 'contact_type',
       ts('Name') => 'sort_name',
       ts('State') => 'state_province',
index ac6f6bdfc3f02ed043210e320509813cb0a5ebe3..91e09f135595058f1b7f508962b9d9a8ed544acf 100644 (file)
@@ -48,7 +48,7 @@ class CRM_Contact_Form_Search_Custom_TagContributions implements CRM_Contact_For
      * Define the columns for search result rows
      */
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Full Name') => 'sort_name',
       ts('First Name') => 'first_name',
       ts('Last Name') => 'last_name',
index 788dbaa474a28d8101bf04d490e3e9586d7ae83e..b5d580f7e7fa6775f4f0c8febbce2fbeb10b09a8 100644 (file)
@@ -40,7 +40,7 @@ class CRM_Contact_Form_Search_Custom_ZipCodeRange extends CRM_Contact_Form_Searc
     parent::__construct($formValues);
 
     $this->_columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Name') => 'sort_name',
       ts('Email') => 'email',
       ts('Zip') => 'postal_code',
index b9eb35da8ee05a8f880298835933f3b4b3fe92fa..b783d0230d8acdf807110d123cc8f7e84d33d13e 100644 (file)
@@ -332,7 +332,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
    *
    * @access public
    *
-   * @return void
+   * @return array
    */
   function setDefaultValues() {
     $defaults = array();
index dac5896230349f6c849fb3e6988a22f042b78571..cb2aca15c8ea01c799c9eeef23d16426ecf74327 100644 (file)
@@ -125,7 +125,7 @@ class CRM_Contact_Form_Task_AddToGroup extends CRM_Contact_Form_Task {
     }
 
     // add select for groups
-    $group = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::group();
+    $group = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::nestedGroup();
 
     $groupElement = $this->add('select', 'group_id', ts('Select Group'), $group, FALSE, array('class' => 'crm-select2 huge'));
 
@@ -246,6 +246,10 @@ class CRM_Contact_Form_Task_AddToGroup extends CRM_Contact_Form_Task {
     }
     $status = '<ul><li>' . implode('</li><li>', $status) . '</li></ul>';
     CRM_Core_Session::setStatus($status, ts('Added Contact to %1', array(1 => $groupName, 'count' => $added, 'plural' => 'Added Contacts to %1')), 'success', array('expires' => 0));
+
+    if ($this->_context === 'amtg') {
+      CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url('civicrm/group/search', "reset=1&force=1&context=smog&gid=$groupID"));
+    }
   }
   //end of function
 }
index 9f757eaeefe2bbb436187837756d371803e0bffc..2ec983cf4afec92a09fb2b6fc4674c67a95e81b2 100644 (file)
@@ -92,8 +92,8 @@ class CRM_Contact_Form_Task_AddToHousehold extends CRM_Contact_Form_Task {
     $this->assign('searchCount', $searchCount);
     $this->assign('searchDone', $this->get('searchDone'));
     $this->assign('contact_type_display', ts('Household'));
-    $this->addElement('submit', $this->getButtonName('refresh'), ts('Search'), array('class' => 'form-submit'));
-    $this->addElement('submit', $this->getButtonName('cancel'), ts('Cancel'), array('class' => 'form-submit'));
+    $this->addElement('submit', $this->getButtonName('refresh'), ts('Search'), array('class' => 'crm-form-submit'));
+    $this->addElement('submit', $this->getButtonName('cancel'), ts('Cancel'), array('class' => 'crm-form-submit'));
 
     $this->addButtons(array(
         array(
index d9451591e8032b13640c6e9a89e7da67b1534c0a..af9799170000775f8340f72797ab6205afa8b122 100644 (file)
@@ -93,8 +93,8 @@ class CRM_Contact_Form_Task_AddToOrganization extends CRM_Contact_Form_Task {
     $this->assign('searchCount', $searchCount);
     $this->assign('searchDone', $this->get('searchDone'));
     $this->assign('contact_type_display', ts('Organization'));
-    $this->addElement('submit', $this->getButtonName('refresh'), ts('Search'), array('class' => 'form-submit'));
-    $this->addElement('submit', $this->getButtonName('cancel'), ts('Cancel'), array('class' => 'form-submit'));
+    $this->addElement('submit', $this->getButtonName('refresh'), ts('Search'), array('class' => 'crm-form-submit'));
+    $this->addElement('submit', $this->getButtonName('cancel'), ts('Cancel'), array('class' => 'crm-form-submit'));
 
 
     $this->addButtons(array(
index ee546c7343fd4a4c22796618d06628a2f7897069..9746fbf9fb1d0f42633da40ff631cbe804be338f 100644 (file)
@@ -234,7 +234,7 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task {
       foreach ($field as $fieldName => $fieldValue) {
         if ($fieldName == 'external_identifier') {
           if (in_array($fieldValue, $externalIdentifiers)) {
-            $errors["field[$componentId][external_identifier]"] = ts('Duplicate value for External Identifier.');
+            $errors["field[$componentId][external_identifier]"] = ts('Duplicate value for External ID.');
           }
           else {
             $externalIdentifiers[$componentId] = $fieldValue;
index 5826bcf16333789135699efcff2281bfb0c9865c..c920aa6bda32f665ad6f62fc2baec80e5ec8a4b4 100644 (file)
@@ -135,7 +135,7 @@ class CRM_Contact_Form_Task_Label extends CRM_Contact_Form_Task {
     }
 
     //build the returnproperties
-    $returnProperties = array('display_name' => 1, 'contact_type' => 1);
+    $returnProperties = array('display_name' => 1, 'contact_type' => 1, 'prefix_id' => 1);
     $mailingFormat = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
       'mailing_format'
     );
@@ -444,18 +444,28 @@ class CRM_Contact_Form_Task_Label extends CRM_Contact_Form_Task {
       else {
         $name = $rows[$rowID]['display_name'];
       }
+
+      // CRM-15120
+      $formatted = array(
+        'first_name' => $rows[$rowID]['first_name'],
+        'individual_prefix' => $rows[$rowID]['individual_prefix']
+      );
+      $format = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'display_name_format');
+      $firstNameWithPrefix = CRM_Utils_Address::format($formatted, $format, FALSE, FALSE, TRUE);
+      $firstNameWithPrefix = trim($firstNameWithPrefix);
+
       // fill uniqueAddress array with last/first name tree
       if (isset($uniqueAddress[$address])) {
-        $uniqueAddress[$address]['names'][$name][$rows[$rowID]['first_name']]['first_name'] = $rows[$rowID]['first_name'];
-        $uniqueAddress[$address]['names'][$name][$rows[$rowID]['first_name']]['addressee_display'] = $rows[$rowID]['addressee_display'];
+        $uniqueAddress[$address]['names'][$name][$firstNameWithPrefix]['first_name'] = $rows[$rowID]['first_name'];
+        $uniqueAddress[$address]['names'][$name][$firstNameWithPrefix]['addressee_display'] = $rows[$rowID]['addressee_display'];
         // drop unnecessary rows
         unset($rows[$rowID]);
         // this is the first listing at this address
       }
       else {
         $uniqueAddress[$address]['ID'] = $rowID;
-        $uniqueAddress[$address]['names'][$name][$rows[$rowID]['first_name']]['first_name'] = $rows[$rowID]['first_name'];
-        $uniqueAddress[$address]['names'][$name][$rows[$rowID]['first_name']]['addressee_display'] = $rows[$rowID]['addressee_display'];
+        $uniqueAddress[$address]['names'][$name][$firstNameWithPrefix]['first_name'] = $rows[$rowID]['first_name'];
+        $uniqueAddress[$address]['names'][$name][$firstNameWithPrefix]['addressee_display'] = $rows[$rowID]['addressee_display'];
       }
     }
     foreach ($uniqueAddress as $address => $data) {
index 8035110f3eb18c739cd6b1db29b0080eb985076e..8714544bfdb1c58511653ac9c54c128af92414a0 100644 (file)
@@ -120,7 +120,7 @@ class CRM_Contact_Form_Task_PickProfile extends CRM_Contact_Form_Task {
       CRM_Core_Session::setStatus(ts("The contact type selected for Batch Update does not have a corresponding profile. Please set up a profile for %1s and try again.", array(1 => $types)), ts('No Profile Available'), 'error');
       CRM_Utils_System::redirect($this->_userContext);
     }
-    $ufGroupElement = $this->add('select', 'uf_group_id', ts('Select Profile'), array('' => ts('- select profile -')) + $profiles, TRUE);
+    $ufGroupElement = $this->add('select', 'uf_group_id', ts('Select Profile'), array('' => ts('- select profile -')) + $profiles, TRUE, array('class' => 'crm-select2 huge'));
 
     $this->addDefaultButtons(ts('Continue >>'));
   }
index a75b0918ca697528050ebc27bdfc8ee371e199c6..152b5a59a7c5e4c78094836e4267d5915986ca85 100644 (file)
@@ -49,7 +49,7 @@ class CRM_Contact_Form_Task_RemoveFromGroup extends CRM_Contact_Form_Task {
    */
   function buildQuickForm() {
     // add select for groups
-    $group = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::group();
+    $group = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::nestedGroup();
     $groupElement = $this->add('select', 'group_id', ts('Select Group'), $group, TRUE, array('class' => 'crm-select2 huge'));
 
     CRM_Utils_System::setTitle(ts('Remove Contacts from Group'));
index 0c3918fa2113abf5c7e1bb09d91b6b83845645d4..5eb487817e2a00e2b3cc0d545204846c4913bc6f 100644 (file)
@@ -59,9 +59,6 @@ class CRM_Contact_Form_Task_SMS extends CRM_Contact_Form_Task {
     $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
 
     $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE);
-    if ($cid) {
-      CRM_Contact_Page_View::setTitle($cid);
-    }
 
     CRM_Contact_Form_Task_SMSCommon::preProcessProvider($this);
 
index 70fdd82071a49ac9d12d2ec33b2ec65c773cf1d4..1dd11b5c9897c8e19fa3e04ad993b0277c1f5b66 100644 (file)
@@ -69,7 +69,7 @@ class CRM_Contact_Import_Form_Preview extends CRM_Import_Form_Preview {
 
     $this->assign('rowDisplayCount', 2);
 
-    $groups = CRM_Core_PseudoConstant::group();
+    $groups = CRM_Core_PseudoConstant::nestedGroup();
     $this->set('groups', $groups);
 
     $tag = CRM_Core_PseudoConstant::get('CRM_Core_DAO_EntityTag', 'tag_id', array('onlyActive' => FALSE));
@@ -139,7 +139,7 @@ class CRM_Contact_Import_Form_Preview extends CRM_Import_Form_Preview {
     $groups = $this->get('groups');
 
     if (!empty($groups)) {
-      $this->addElement('select', 'groups', ts('Add imported records to existing group(s)'), $groups, array('multiple' => "multiple", 'size' => 5));
+      $this->addElement('select', 'groups', ts('Add imported records to existing group(s)'), $groups, array('multiple' => "multiple", 'class' => 'crm-select2'));
     }
 
     //display new tag
index 3ac73d139926500d5e97b3a07ccbfadd6e650fb3..0bfc66655d8b63fb2612662a25cda9a0f81e771c 100644 (file)
@@ -380,7 +380,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser {
       /* If it's a dupe,external Identifier  */
 
       if ($externalDupe = CRM_Utils_Array::value($externalID, $this->_allExternalIdentifiers)) {
-        $errorMessage = ts('External Identifier conflicts with record %1', array(1 => $externalDupe));
+        $errorMessage = ts('External ID conflicts with record %1', array(1 => $externalDupe));
         array_unshift($values, $errorMessage);
         $importRecordParams = array(
           $statusFieldName => 'ERROR',
@@ -487,7 +487,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser {
 
       if ($internalCid = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $params['external_identifier'], 'id', 'external_identifier')) {
         if ($internalCid != CRM_Utils_Array::value('id', $params)) {
-          $errorMessage = ts('External Identifier already exists in database.');
+          $errorMessage = ts('External ID already exists in Database.');
           array_unshift($values, $errorMessage);
           $importRecordParams = array(
             $statusFieldName => 'ERROR',
index 9e27fc6b8bf996d382a1eb13099ebcf21b075fe1..a8ff5d513d1a527e36b7e105980dd4ff9d994465 100644 (file)
@@ -60,11 +60,7 @@ class CRM_Contact_Page_Inline_ContactName extends CRM_Core_Page {
     $this->assign('title', $title);
 
     // Check if this is default domain contact CRM-10482
-    if (CRM_Contact_BAO_Contact::checkDomainContact($contactId)) {
-      $this->assign('domainContact', TRUE);
-    } else {
-      $this->assign('domainContact', FALSE);
-    }
+    $this->assign('domainContact', CRM_Contact_BAO_Contact::checkDomainContact($contactId));
 
     // check logged in user permission
     CRM_Contact_Page_View::checkUserPermission($this, $contactId);
index 2406084a6aac24137afc31b5c1eaaf072b930a7e..07a89e82779eca4606b8624af3e85bc83511d808 100644 (file)
@@ -128,9 +128,12 @@ class CRM_Contact_Page_View_CustomData extends CRM_Core_Page {
         'style'
       );
 
-      if ($displayStyle === 'Tab with table' && $this->_multiRecordDisplay != 'single') {
+      if ($this->_multiRecordDisplay != 'single') {
         $id = "custom_{$this->_groupId}";
         $this->ajaxResponse['tabCount'] = CRM_Contact_BAO_Contact::getCountComponent($id, $this->_contactId, $groupTree[$this->_groupId]['table_name']);
+      }
+
+      if ($displayStyle === 'Tab with table' && $this->_multiRecordDisplay != 'single') {
         $ctype = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact',
           $this->_contactId,
           'contact_type'
index 6ab9c26692af863654cb14e9eeab6fe2e6251f8c..8a9e8ca44f026cd36c6b993e6442c14ac18953e1 100644 (file)
@@ -208,9 +208,6 @@ class CRM_Contact_Page_View_Note extends CRM_Core_Page {
     // check logged in url permission
     CRM_Contact_Page_View::checkUserPermission($this);
 
-    // set page title
-    CRM_Contact_Page_View::setTitle($this->_contactId);
-
     $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId);
     CRM_Utils_System::setTitle(ts('Notes for') . ' ' . $displayName);
 
index 3738957ff30e63e5afd54fa9831fc46260110db2..944a373f1332cacb7d9d297e3ca9c9a9048a1171 100644 (file)
@@ -198,9 +198,6 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
     // check logged in url permission
     CRM_Contact_Page_View::checkUserPermission($this);
 
-    // set page title
-    CRM_Contact_Page_View::setTitle($this->_contactId);
-
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
     $this->assign('action', $this->_action);
   }
index 9db5155104e80a06e68a799335384076752ac3ad..e4efbcfa0fb1170c82e307494a409b07b8034fa8 100644 (file)
@@ -394,6 +394,7 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
         'title' => $group['title'],
         'weight' => $weight,
         'count' => CRM_Contact_BAO_Contact::getCountComponent($id, $this->_contactId, $group['table_name']),
+        'hideCount' => !$group['is_multiple'],
         'class' => 'livePage'
       );
       $weight += 10;
index 7c9b3b6beca0955939143bffc2b8ba1670e94c49..7d78e694598f1c8c1010caa56d71d38afd90a365 100644 (file)
@@ -358,7 +358,7 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se
     }
 
     if ($output == CRM_Core_Selector_Controller::EXPORT) {
-      $csvHeaders = array(ts('Contact Id'), ts('Contact Type'));
+      $csvHeaders = array(ts('Contact ID'), ts('Contact Type'));
       foreach ($this->getColHeads($action, $output) as $column) {
         if (array_key_exists('name', $column)) {
           $csvHeaders[] = $column['name'];
index 4128630dbe6bc30c86ed96beea8879a51ba9c218..6a9307f64619c48454c399773a3c5c4c0f77b8db 100644 (file)
@@ -149,7 +149,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution {
 
     // contribution status is missing, choose Completed as default status
     // do this for create mode only
-    if (empty($ids['contribution']) && empty($params['contribution_status_id'])) {
+    if (!$contributionID && empty($params['contribution_status_id'])) {
       $params['contribution_status_id'] = CRM_Core_OptionGroup::getValue('contribution_status', 'Completed', 'name');
     }
     $setPrevContribution = TRUE;
index 3a2e828003a19c4d8fdef1771638dffdc556bc8f..c9a1feca184b1250ee888c7af579b9bd83d7e2ee 100644 (file)
@@ -361,22 +361,6 @@ SELECT r.payment_processor_id
     return $params;
   }
 
-  /**
-   * update the is_active flag in the db
-   *
-   * @param int      $id        id of the database record
-   * @param boolean  $is_active value we want to set the is_active field
-   *
-   * @return Object             DAO object on success, null otherwise
-   * @static
-   */
-  static function setIsActive($id, $is_active) {
-    if (!$is_active) {
-      return self::cancelRecurContribution($id, CRM_Core_DAO::$_nullObject);
-    }
-    return FALSE;
-  }
-
   /**
    * @param $entityID
    * @param string $entity
@@ -477,4 +461,3 @@ INNER JOIN civicrm_contribution       con ON ( con.id = mp.contribution_id )
     }
   }
 }
-
index d2596921d2dfc54818ab936a7e89fe4b89ddce7d..d0c1767333dcd8e55500d5c91785f14749e31d25 100644 (file)
  */
 
 /**
- * This class generates form components generic to Mobile provider
+ * This class generates form components generic to Contribution admin
  *
  */
-class CRM_Contribute_Form extends CRM_Core_Form {
+class CRM_Contribute_Form extends CRM_Admin_Form {
 
   /**
-   * The id of the object being edited / created
-   *
-   * @var int
-   */
-  protected $_id;
-
-  /**
-   * The name of the BAO object for this form
-   *
-   * @var string
-   */
-  protected $_BAOName;
-
-  function preProcess() {
-    $this->_id = $this->get('id');
-    $this->_BAOName = $this->get('BAOName');
-  }
-
-  /**
-   * This function sets the default values for the form. MobileProvider that in edit/view mode
+   * This function sets the default values for the form. Note that in edit/view mode
    * the default values are retrieved from the database
    *
    * @access public
    *
-   * @return void
+   * @return array
    */
   function setDefaultValues() {
     $defaults = array();
-    $params = array();
 
     if (isset($this->_id)) {
       $params = array('id' => $this->_id);
@@ -101,40 +81,5 @@ class CRM_Contribute_Form extends CRM_Core_Form {
     return $defaults;
   }
 
-  /**
-   * Function to actually build the form
-   *
-   * @return void
-   * @access public
-   */
-  public function buildQuickForm() {
-    $this->addButtons(array(
-        array(
-          'type' => 'next',
-          'name' => ts('Save'),
-          'isDefault' => TRUE,
-        ),
-        array(
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ),
-      )
-    );
-
-    if ($this->_action & CRM_Core_Action::DELETE) {
-      $this->addButtons(array(
-          array(
-            'type' => 'next',
-            'name' => ts('Delete'),
-            'isDefault' => TRUE,
-          ),
-          array(
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ),
-        )
-      );
-    }
-  }
 }
 
index 04f9fdcf28770680c7655c0f38c7577cc0ff4313..cdb100897494545b140f7522b60c4447bab43a1d 100644 (file)
@@ -150,12 +150,9 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract
     $this->assign('paymentType', $this->_paymentType);
     $this->assign('paymentAmt', abs($paymentAmt));
 
-    $this->_paymentProcessor = array('billing_mode' => 1);
+    $this->setPageTitle($this->_refund ? ts('Refund') : ts('Payment'));
 
-    $title = ($this->_refund) ? "Refund for {$this->_contributorDisplayName}" : "Payment from {$this->_contributorDisplayName}";
-    if ($title) {
-      CRM_Utils_System::setTitle(ts('%1', array(1 => $title)));
-    }
+    $this->_paymentProcessor = array('billing_mode' => 1);
   }
 
   /**
@@ -299,7 +296,7 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract
     );
 
     $this->add('text', 'check_number', ts('Check Number'), $attributes['financial_trxn_check_number']);
-    $trxnId = $this->add('text', 'trxn_id', ts('Transaction ID'), $attributes['trxn_id']);
+    $this->add('text', 'trxn_id', ts('Transaction ID'), array('class' => 'twelve') + $attributes['trxn_id']);
 
     //add receipt for offline contribution
     $this->addElement('checkbox', 'is_email_receipt', ts('Send Receipt?'));
index 8399f4f07a668edbb56e6b5b8900806e59a5f98b..28a22f59b74768a826eaec7e5bd1cf4a9f54835f 100644 (file)
@@ -331,16 +331,11 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     $this->assign('lineItem', empty($this->_lineItems) ? FALSE : $this->_lineItems);
 
     // Set title
-    if ($this->_contactID) {
-      $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactID);
-
-      // Check if this is default domain contact CRM-10482
-      if (CRM_Contact_BAO_Contact::checkDomainContact($this->_contactID)) {
-        $displayName .= ' (' . ts('default organization') . ')';
-      }
-
-      // omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
-      CRM_Utils_System::setTitle(ts('Contribution from') . ' ' . $displayName);
+    if ($this->_mode) {
+      $this->setPageTitle($this->_ppID ? ts('Credit Card Pledge Payment') : ts('Credit Card Contribution'));
+    }
+    else {
+      $this->setPageTitle($this->_ppID ? ts('Pledge Payment') : ts('Contribution'));
     }
 
     if ($this->_id) {
@@ -687,7 +682,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     $this->assign('entityID', $this->_id);
 
     if ($this->_context == 'standalone') {
-      $this->addEntityRef('contact_id', ts('Contact'), array('create' => TRUE), TRUE);
+      $this->addEntityRef('contact_id', ts('Contact'), array('create' => TRUE, 'api' => array('extra' => array('email'))), TRUE);
     }
 
     $attributes = CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Contribution');
@@ -707,7 +702,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
       );
     }
 
-    $trxnId = $this->add('text', 'trxn_id', ts('Transaction ID'), $attributes['trxn_id']);
+    $trxnId = $this->add('text', 'trxn_id', ts('Transaction ID'), array('class' => 'twelve') + $attributes['trxn_id']);
 
     //add receipt for offline contribution
     $this->addElement('checkbox', 'is_email_receipt', ts('Send Receipt?'));
@@ -983,23 +978,9 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
 
     $softErrors = CRM_Contribute_Form_SoftCredit::formRule($fields, $errors, $self);
 
-    // If we have a net amount or fee amount that is NOT set to 0.00, then ensure
-    // that the net_amount + the fee_amount is equal to the total amount.
-    $total_amount = NULL;
-    if(!empty($fields['total_amount']) && $fields['total_amount'] != '0.00') {
-      $total_amount = $fields['total_amount'];
-    }
-    $fee_amount = NULL;
-    if(!empty($fields['fee_amount']) && $fields['fee_amount'] != '0.00') {
-      $fee_amount = $fields['fee_amount'];
-    }
-    $net_amount = NULL;
-    if(!empty($fields['net_amount']) && $fields['net_amount'] != '0.00') {
-      $net_amount = $fields['net_amount'];
-    }
-    if ($total_amount && ($net_amount || $fee_amount)) {
-      $sum = CRM_Utils_Rule::cleanMoney($net_amount) + CRM_Utils_Rule::cleanMoney($fee_amount);
-      if (CRM_Utils_Rule::cleanMoney($total_amount) != $sum) {
+    if (!empty($fields['total_amount']) && (!empty($fields['net_amount']) || !empty($fields['fee_amount']))) {
+      $sum = CRM_Utils_Rule::cleanMoney($fields['net_amount']) + CRM_Utils_Rule::cleanMoney($fields['fee_amount']);
+      if (CRM_Utils_Rule::cleanMoney($fields['total_amount']) != $sum) {
         $errors['total_amount'] = ts('The sum of fee amount and net amount must be equal to total amount');
       }
     }
index 7514b08dffb9a814f4e3a4b6e1b06ffbeff99b4d..4066df081017aace8902101073cf3131cc710b38 100644 (file)
@@ -551,7 +551,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
       $this->add('image',
         $this->_checkoutButtonName,
         $this->_paymentProcessor['url_button'],
-        array('class' => 'form-submit')
+        array('class' => 'crm-form-submit')
       );
 
       $this->addButtons(array(
@@ -1601,7 +1601,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
 
       // CRM-6243 says to pick the first org even if more than one match
       if (count($dupeIDs) >= 1) {
-        $behalfOrganization['contact_id'] = $dupeIDs[0];
+        $behalfOrganization['contact_id'] = $orgID = $dupeIDs[0];
         // don't allow name edit
         unset($behalfOrganization['organization_name']);
       }
index 0787a131b656d05b855bcc95741f975694d51c69..4c9c34bbdf75361b42d20322bf8eed2dc7d56393 100644 (file)
@@ -93,36 +93,15 @@ class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form {
    * @access public
    */
   public function buildQuickForm() {
-    //parent::buildQuickForm( );
+    parent::buildQuickForm( );
+    $this->setPageTitle(ts('Premium Product'));
 
     if ($this->_action & CRM_Core_Action::PREVIEW) {
       CRM_Contribute_BAO_Premium::buildPremiumPreviewBlock($this, $this->_id);
-
-      $this->addButtons(array(
-          array(
-            'type' => 'next',
-            'name' => ts('Done with Preview'),
-            'isDefault' => TRUE,
-          ),
-        )
-      );
-
       return;
     }
 
     if ($this->_action & CRM_Core_Action::DELETE) {
-      $this->addButtons(array(
-          array(
-            'type' => 'next',
-            'name' => ts('Delete'),
-            'isDefault' => TRUE,
-          ),
-          array(
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ),
-        )
-      );
       return;
     }
 
@@ -210,19 +189,6 @@ class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form {
 
     $this->addFormRule(array('CRM_Contribute_Form_ManagePremiums', 'formRule'));
 
-    $this->addButtons(array(
-        array(
-          'type' => 'upload',
-          'name' => ts('Save'),
-          'isDefault' => TRUE,
-        ),
-        array(
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ),
-      )
-    );
-
     $this->assign('productId', $this->_id);
   }
 
@@ -420,5 +386,6 @@ class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form {
     $config = CRM_Core_Config::singleton();
     return $config->imageUploadURL.basename($newFilename);
   }
+
 }
 
index 5e18535aeea385410d08505ad3e4a4baa8e3fcc3..5a8a86f08f0e273868ba12d1d8e39b903a3df0ad 100644 (file)
@@ -191,7 +191,7 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
       )
     );
 
-    $this->_group = CRM_Core_PseudoConstant::group();
+    $this->_group = CRM_Core_PseudoConstant::nestedGroup();
 
     // multiselect for groups
     if ($this->_group) {
index f7664ff8758a6edd6d0cca7605aae87ef3f892ea..fbf8c3d9b2677e2ac38cfedcdd76bc85ff5bee33 100644 (file)
@@ -200,7 +200,7 @@ class CRM_Contribute_Import_Form_MapField extends CRM_Import_Form_MapField {
     $fieldsArray = CRM_Dedupe_BAO_Rule::dedupeRuleFields($ruleParams);
 
     $softCreditFields['contact_id'] = ts('Contact ID');
-    $softCreditFields['external_identifier'] = ts('External Identifier');
+    $softCreditFields['external_identifier'] = ts('External ID');
     $softCreditFields['email'] = ts('Email');
 
     $sel2['soft_credit'] = $softCreditFields;
index c9056a964f3d872c8bcb634f3f19baa818067ae7..be2c84832fe95d9730794e506157737dafccc610 100644 (file)
@@ -81,9 +81,6 @@ class CRM_Contribute_Page_ContributionRecur extends CRM_Core_Page {
     // check logged in url permission
     CRM_Contact_Page_View::checkUserPermission($this);
 
-    // set page title
-    CRM_Contact_Page_View::setTitle($this->_contactId);
-
     $this->assign('action', $this->_action);
 
     if ($this->_permission == CRM_Core_Permission::EDIT && !CRM_Core_Permission::check('edit contributions')) {
index 94d7adf2acf612fb63ab1d70d22df2bdd1e4db0a..c63ae358cf635297480b17a805e054fccfa4311d 100644 (file)
@@ -259,9 +259,6 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page {
 
       // check logged in url permission
       CRM_Contact_Page_View::checkUserPermission($this);
-
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
     $this->assign('action', $this->_action);
 
index a7e18e3ac02bf388c5c65c95d063197b1044211a..7d52be6219a4495b1c1c96803dd8184052655b9d 100644 (file)
@@ -659,7 +659,7 @@ ORDER BY civicrm_address.is_primary DESC, civicrm_address.location_type_id DESC,
    * @param $stateCountryMap
    * @param null $defaults
    */
-  static function addStateCountryMap(&$stateCountryMap, $defaults = NULL) {
+  static function addStateCountryMap($stateCountryMap, $defaults = NULL) {
     // first fix the statecountry map if needed
     if (empty($stateCountryMap)) {
       return;
index 3336e02f20179c74ac6c1fee1f4cfc7a996154a8..4c90b62952c9d0fde46c5c47bb25a743739d6de6 100644 (file)
@@ -285,9 +285,10 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
     // make sure all values are present in the object for further processing
     $customField->find(TRUE);
 
+    $triggerRebuild = CRM_Utils_Array::value('triggerRebuild', $params, TRUE);
     //create/drop the index when we toggle the is_searchable flag
     if (!empty($params['id'])) {
-      self::createField($customField, 'modify', $indexExist);
+      self::createField($customField, 'modify', $indexExist, $triggerRebuild);
     }
     else {
       if (!isset($origParams['column_name'])) {
@@ -299,7 +300,8 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
       // make sure all values are present in the object
       $customField->find(TRUE);
 
-      self::createField($customField, 'add');
+      $indexExist = FALSE;
+      self::createField($customField, 'add', $indexExist, $triggerRebuild);
     }
 
     // complete transaction
@@ -726,7 +728,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
    * @param CRM_Core_Form $qf form object (reference)
    * @param string $elementName name of the custom field
    * @param $fieldId
-   * @param boolean $inactiveNeeded
+   * @param boolean $inactiveNeeded -deprecated
    * @param bool $useRequired
    * @param boolean $search true if used for search else false
    * @param string $label label for custom field
@@ -744,6 +746,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
     $label          = NULL
   ) {
     $field = self::getFieldObject($fieldId);
+    $widget = $field->html_type;
 
     // Custom field HTML should indicate group+field name
     $groupName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $field->custom_group_id);
@@ -752,29 +755,44 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
     $field->attributes .= $dataCrmCustomAttr;
 
     // Fixed for Issue CRM-2183
-    if ($field->html_type == 'TextArea' && $search) {
-      $field->html_type = 'Text';
+    if ($widget == 'TextArea' && $search) {
+      $widget = 'Text';
+    }
+
+    if ($widget == 'Select State/Province' || $widget == 'Select Country') {
+      $qf->_stateCountryMap[$widget == 'Select Country' ? 'country' : 'state_province'][] = $elementName;
     }
 
     $placeholder = $search ? ts('- any -') : ($useRequired ? ts('- select -') : ts('- none -'));
 
     // FIXME: Why are select state/country separate widget types?
-    if (in_array($field->html_type, array('Select', 'Multi-Select', 'Select State/Province', 'Multi-Select State/Province', 'Select Country', 'Multi-Select Country'))) {
+    $isSelect = (in_array($widget, array('Select', 'Multi-Select', 'Select State/Province', 'Multi-Select State/Province', 'Select Country', 'Multi-Select Country', 'AdvMulti-Select', 'CheckBox', 'Radio')));
+
+    if ($isSelect) {
+      $options = CRM_Utils_Array::value('values', civicrm_api3('contact', 'getoptions', array('field' => "custom_$fieldId", 'context' => $search ? 'search' : 'create'), array()));
+
+      // Consolidate widget types to simplify the below switch statement
+      if ($search || ($widget !== 'AdvMulti-Select' && strpos($widget, 'Select') !== FALSE)) {
+        $widget = 'Select';
+      }
       $selectAttributes = array(
         'data-crm-custom' => $dataCrmCustomVal,
         'class' => 'crm-select2',
       );
-      if (strpos($field->html_type, 'Multi') === 0) {
+      // Search field is always multi-select
+      if ($search || strpos($field->html_type, 'Multi') !== FALSE) {
+        $selectAttributes['class'] .= ' huge';
         $selectAttributes['multiple'] = 'multiple';
+        $selectAttributes['placeholder'] = $placeholder;
+      }
+      // Add data for popup link. Normally this is handled by CRM_Core_Form->addSelect
+      if ($field->option_group_id && !$search && $widget == 'Select' && CRM_Core_Permission::check('administer CiviCRM')) {
+        $selectAttributes += array(
+          'data-api-entity' => 'contact', // FIXME: This works because the getoptions api isn't picky about custom fields, but it's WRONG
+          'data-api-field' => 'custom_' . $field->id,
+          'data-option-edit-path' => 'civicrm/admin/options/' . CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $field->option_group_id),
+        );
       }
-    }
-    // Add data so popup link. Normally this is handled by CRM_Core_Form->addSelect
-    if ($field->option_group_id && !$search && in_array($field->html_type, array('Select', 'Multi-Select')) && CRM_Core_Permission::check('administer CiviCRM')) {
-      $selectAttributes += array(
-        'data-api-entity' => 'contact', // FIXME: This works because the getoptions api isn't picky about custom fields, but it's WRONG
-        'data-api-field' => 'custom_' . $field->id,
-        'data-option-edit-path' => 'civicrm/admin/options/' . CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $field->option_group_id),
-      );
     }
 
     if (!isset($label)) {
@@ -785,14 +803,15 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
      * at some point in time we might want to split the below into small functions
      **/
 
-    switch ($field->html_type) {
+    switch ($widget) {
       case 'Text':
+      case 'Link':
         if ($field->is_search_range && $search) {
           $qf->add('text', $elementName . '_from', $label . ' ' . ts('From'), $field->attributes);
           $qf->add('text', $elementName . '_to', ts('To'), $field->attributes);
         }
         else {
-          $element = &$qf->add(strtolower($field->html_type), $elementName, $label,
+          $element = &$qf->add('text', $elementName, $label,
             $field->attributes,
             $useRequired && !$search
           );
@@ -816,7 +835,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
         if ($field->text_length) {
           $attributes .= ' maxlength=' . $field->text_length;
         }
-        $element = &$qf->add(strtolower($field->html_type),
+        $element = &$qf->add('textarea',
           $elementName,
           $label,
           $attributes,
@@ -861,20 +880,10 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
 
       case 'Radio':
         $choice = array();
-        if ($field->data_type != 'Boolean') {
-          $customOption = CRM_Core_BAO_CustomOption::valuesByID($field->id,
-            $field->option_group_id
-          );
-          foreach ($customOption as $v => $l) {
-            $choice[] = $qf->createElement('radio', NULL, '', $l, (string)$v, $field->attributes);
-          }
-          $group = $qf->addGroup($choice, $elementName, $label);
-        }
-        else {
-          $choice[] = $qf->createElement('radio', NULL, '', ts('Yes'), '1', $field->attributes);
-          $choice[] = $qf->createElement('radio', NULL, '', ts('No'), '0', $field->attributes);
-          $group = $qf->addGroup($choice, $elementName, $label);
+        foreach ($options as $v => $l) {
+          $choice[] = $qf->createElement('radio', NULL, '', $l, (string)$v, $field->attributes);
         }
+        $group = $qf->addGroup($choice, $elementName, $label);
         if ($useRequired && !$search) {
           $qf->addRule($elementName, ts('%1 is a required field.', array(1 => $label)), 'required');
         }
@@ -883,34 +892,30 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
         }
         break;
 
+      // For all select elements
       case 'Select':
-        $selectOption = CRM_Core_BAO_CustomOption::valuesByID($field->id,
-          $field->option_group_id
-        );
-
-        $qf->add('select', $elementName, $label,
-          array('' => $placeholder) + $selectOption,
-          $useRequired && !$search,
-          $selectAttributes
-        );
-        break;
+        if (empty($selectAttributes['multiple'])) {
+          $options = array('' => $placeholder) + $options;
+        }
+        $qf->add('select', $elementName, $label, $options, $useRequired && !$search, $selectAttributes);
 
-      //added for select multiple
+        // Add and/or option for fields that store multiple values
+        if ($search && self::isSerialized($field)) {
 
-      case 'AdvMulti-Select':
-        $selectOption = CRM_Core_BAO_CustomOption::valuesByID($field->id,
-          $field->option_group_id
-        );
-        if ($search &&
-          count($selectOption) > 1
-        ) {
-          $selectOption['CiviCRM_OP_OR'] = ts('Select to match ANY; unselect to match ALL');
+          $operators = array(
+            $qf->createElement('radio', NULL, '', ts('Any'), 'or', array('title' => ts('Results may contain any of the selected options'))),
+            $qf->createElement('radio', NULL, '', ts('All'), 'and', array('title' => ts('Results must have all of the selected options'))),
+          );
+          $qf->addGroup($operators, $elementName . '_operator');
+          $qf->setDefaults(array($elementName . '_operator' => 'or'));
         }
+        break;
 
+      case 'AdvMulti-Select':
         $include =& $qf->addElement(
           'advmultiselect',
           $elementName,
-          $label, $selectOption,
+          $label, $options,
           array(
             'size' => 5,
             'style' => '',
@@ -927,35 +932,11 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
         }
         break;
 
-      case 'Multi-Select':
-        $selectOption = CRM_Core_BAO_CustomOption::valuesByID($field->id,
-          $field->option_group_id
-        );
-        if ($search &&
-          count($selectOption) > 1
-        ) {
-          $selectOption['CiviCRM_OP_OR'] = ts('Select to match ANY; unselect to match ALL');
-        }
-        $qf->addElement('select', $elementName, $label, $selectOption, $selectAttributes);
-
-        if ($useRequired && !$search) {
-          $qf->addRule($elementName, ts('%1 is a required field.', array(1 => $label)), 'required');
-        }
-        break;
-
       case 'CheckBox':
-        $customOption = CRM_Core_BAO_CustomOption::valuesByID($field->id,
-          $field->option_group_id
-        );
         $check = array();
-        foreach ($customOption as $v => $l) {
+        foreach ($options as $v => $l) {
           $check[] = &$qf->addElement('advcheckbox', $v, NULL, $l, array('data-crm-custom' => $dataCrmCustomVal));
         }
-        if ($search &&
-          count($check) > 1
-        ) {
-          $check[] = &$qf->addElement('advcheckbox', 'CiviCRM_OP_OR', NULL, ts('Check to match ANY; uncheck to match ALL'), array('data-crm-custom' => $dataCrmCustomVal));
-        }
         $qf->addGroup($check, $elementName, $label);
         if ($useRequired && !$search) {
           $qf->addRule($elementName, ts('%1 is a required field.', array(1 => $label)), 'required');
@@ -977,45 +958,6 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
         $qf->addUploadElement($elementName);
         break;
 
-      case 'Select State/Province':
-        //Add State
-        $stateOption = array('' => $placeholder) + CRM_Core_PseudoConstant::stateProvince();
-        $qf->add('select', $elementName, $label, $stateOption,
-          $useRequired && !$search,
-          $selectAttributes
-        );
-        $qf->_stateCountryMap['state_province'][] = $elementName;
-        break;
-
-      case 'Multi-Select State/Province':
-        //Add Multi-select State/Province
-        $stateOption = CRM_Core_PseudoConstant::stateProvince();
-
-        $qf->addElement('select', $elementName, $label, $stateOption, $selectAttributes);
-        if ($useRequired && !$search) {
-          $qf->addRule($elementName, ts('%1 is a required field.', array(1 => $label)), 'required');
-        }
-        break;
-
-      case 'Select Country':
-        //Add Country
-        $countryOption = array('' => $placeholder) + CRM_Core_PseudoConstant::country();
-        $qf->add('select', $elementName, $label, $countryOption,
-          $useRequired && !$search,
-          $selectAttributes
-        );
-        $qf->_stateCountryMap['country'][] = $elementName;
-        break;
-
-      case 'Multi-Select Country':
-        //Add Country
-        $countryOption = CRM_Core_PseudoConstant::country();
-        $qf->addElement('select', $elementName, $label, $countryOption, $selectAttributes);
-        if ($useRequired && !$search) {
-          $qf->addRule($elementName, ts('%1 is a required field.', array(1 => $label)), 'required');
-        }
-        break;
-
       case 'RichTextEditor':
         $attributes = array('rows' => $field->note_rows, 'cols' => $field->note_columns, 'data-crm-custom' => $dataCrmCustomVal);
         if ($field->text_length) {
@@ -1056,6 +998,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
           $attributes += array(
             'entity' => 'option_value',
             'placeholder' => $placeholder,
+            'multiple' => $search,
             'api' => array(
               'params' => array('option_group_id' => $field->option_group_id),
             ),
@@ -1074,7 +1017,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
           $qf->addRule($elementName . '_from', ts('%1 From must be an integer (whole number).', array(1 => $label)), 'integer');
           $qf->addRule($elementName . '_to', ts('%1 To must be an integer (whole number).', array(1 => $label)), 'integer');
         }
-        else {
+        elseif ($widget == 'Text') {
           $qf->addRule($elementName, ts('%1 must be an integer (whole number).', array(1 => $label)), 'integer');
         }
         break;
@@ -1084,7 +1027,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
           $qf->addRule($elementName . '_from', ts('%1 From must be a number (with or without decimal point).', array(1 => $label)), 'numeric');
           $qf->addRule($elementName . '_to', ts('%1 To must be a number (with or without decimal point).', array(1 => $label)), 'numeric');
         }
-        else {
+        elseif ($widget == 'Text') {
           $qf->addRule($elementName, ts('%1 must be a number (with or without decimal point).', array(1 => $label)), 'numeric');
         }
         break;
@@ -1094,23 +1037,15 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
           $qf->addRule($elementName . '_from', ts('%1 From must in proper money format. (decimal point/comma/space is allowed).', array(1 => $label)), 'money');
           $qf->addRule($elementName . '_to', ts('%1 To must in proper money format. (decimal point/comma/space is allowed).', array(1 => $label)), 'money');
         }
-        else {
+        elseif ($widget == 'Text') {
           $qf->addRule($elementName, ts('%1 must be in proper money format. (decimal point/comma/space is allowed).', array(1 => $label)), 'money');
         }
         break;
 
       case 'Link':
-        $qf->add(
-          'text',
-          $elementName,
-          $label,
-          array(
-            'onfocus' => "if (!this.value) {  this.value='http://';} else return false",
-            'onblur' => "if ( this.value == 'http://') {  this.value='';} else return false",
-            'data-crm-custom' => $dataCrmCustomVal,
-          ),
-          $useRequired && !$search
-        );
+        $element->setAttribute('onfocus', "if (!this.value) {this.value='http://';}");
+        $element->setAttribute('onblur', "if (this.value == 'http://') {this.value='';}");
+        $element->setAttribute('class', "url");
         $qf->addRule($elementName, ts('Enter a valid Website.'), 'wikiURL');
         break;
     }
@@ -1270,10 +1205,6 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
         $v = array();
         $p = array();
         foreach ($checkedData as $key => $val) {
-          if ($key === 'CiviCRM_OP_OR') {
-            continue;
-          }
-
           if ($html_type == 'CheckBox') {
             if ($val) {
               $p[] = $key;
@@ -2552,5 +2483,17 @@ WHERE cf.id = %1 AND cg.is_multiple = 1";
 
     return $isMultipleWithGid;
   }
+
+  /**
+   * Does this field store a serialized string?
+   * @param CRM_Core_DAO_CustomField|array $field
+   * @return bool
+   */
+  static function isSerialized($field) {
+    // Fields retrieved via api are an array, or from the dao are an object. We'll accept either.
+    $field = (array) $field;
+    // FIXME: Currently the only way to know if data is serialized is by looking at the html_type. It would be cleaner to decouple this.
+    return ($field['html_type'] == 'CheckBox' || strpos($field['html_type'], 'Multi') !== FALSE);
+  }
 }
 
index 060dd7dd1f37e64c00112efac997e0ea1f9b6a63..8cc623a92f1acb7d099852b4121083821e80625f 100644 (file)
@@ -1037,6 +1037,7 @@ ORDER BY civicrm_custom_group.weight,
       $group['query']      = "reset=1&gid={$customGroupDAO->id}&cid={$cidToken}";
       $group['extra']      = array('gid' => $customGroupDAO->id);
       $group['table_name'] = $customGroupDAO->table_name;
+      $group['is_multiple'] = $customGroupDAO->is_multiple;
       $groups[]            = $group;
     }
 
@@ -1238,7 +1239,6 @@ ORDER BY civicrm_custom_group.weight,
       if (!isset($group['fields'])) {
         continue;
       }
-      $groupId = CRM_Utils_Array::value('id', $group);
       foreach ($group['fields'] as $field) {
         if (CRM_Utils_Array::value('element_value', $field) !== NULL) {
           $value = $field['element_value'];
@@ -1255,7 +1255,6 @@ ORDER BY civicrm_custom_group.weight,
           continue;
         }
 
-        $fieldId = $field['id'];
         if (!empty($field['element_name'])) {
           $elementName = $field['element_name'];
         }
index 6a36b4468d27f5dc7005b070070ea236d1ceb1b2..8ca162022e06eefdfc34576835a797f4a35be9db 100644 (file)
@@ -347,101 +347,82 @@ SELECT label, value
       foreach ($values as $tuple) {
         list($name, $op, $value, $grouping, $wildcard) = $tuple;
 
-        // fix $value here to escape sql injection attacks
         $field = $this->_fields[$id];
-        $qillValue = CRM_Core_BAO_CustomField::getDisplayValue($value, $id, $this->_options);
 
+        $fieldName = "{$field['table_name']}.{$field['column_name']}";
+
+        // Autocomplete comes back as a string not an array
+        if ($field['data_type'] == 'String' && $field['html_type'] == 'Autocomplete-Select' && $op == '=') {
+          $value = explode(',', $value);
+        }
+
+        // Handle multi-select search for any data type
+        if (is_array($value) && !$field['is_search_range']) {
+          $isSerialized = CRM_Core_BAO_CustomField::isSerialized($field);
+          $wildcard = $isSerialized ? $wildcard : TRUE;
+          $options = CRM_Utils_Array::value('values', civicrm_api3('contact', 'getoptions', array('field' => $name, 'context' => 'search'), array()));
+          $qillValue = '';
+          $sqlOP = $wildcard ? ' OR ' : ' AND ';
+          $sqlValue = array();
+          foreach ($value as $num => &$v) {
+            $sep = count($value) > (1 + $num) ? ', ' : (' ' . ($wildcard ? ts('OR') : ts('AND')) . ' ');
+            $qillValue .= ($num ? $sep : '') . $options[$v];
+            $v = CRM_Core_DAO::escapeString($v);
+            if ($isSerialized) {
+              $sqlValue[] = "( $fieldName like '%" . CRM_Core_DAO::VALUE_SEPARATOR . $v . CRM_Core_DAO::VALUE_SEPARATOR . "%' ) ";
+            }
+            else {
+              $v = "'$v'";
+            }
+          }
+          if (!$isSerialized) {
+            $sqlValue = array("$fieldName IN (" . implode(',', $value) . ")");
+          }
+          $this->_where[$grouping][] = ' ( ' . implode($sqlOP, $sqlValue) . ' ) ';
+          $this->_qill[$grouping][] = "$field[label] $op $qillValue";
+          continue;
+        }
+
+        // fix $value here to escape sql injection attacks
         if (!is_array($value)) {
           $value = CRM_Core_DAO::escapeString(trim($value));
         }
 
-        $fieldName = "{$field['table_name']}.{$field['column_name']}";
+        $qillValue = CRM_Core_BAO_CustomField::getDisplayValue($value, $id, $this->_options);
+
         switch ($field['data_type']) {
           case 'String':
             $sql = "$fieldName";
-            // if we are coming in from listings,
-            // for checkboxes the value is already in the right format and is NOT an array
-            if (is_array($value)) {
-
-              //ignoring $op value for checkbox and multi select
-              $sqlValue   = array();
-              $sqlOP      = ' AND ';
-              $sqlOPlabel = ts('match ALL');
-              if ($field['html_type'] == 'CheckBox') {
-                foreach ($value as $k => $v) {
-                  if ($v) {
-                    if ($k == 'CiviCRM_OP_OR') {
-                      $sqlOP = ' OR ';
-                      $sqlOPlabel = ts('match ANY');
-                      continue;
-                    }
-
-                    $sqlValue[] = "( $sql like '%" . CRM_Core_DAO::VALUE_SEPARATOR . $k . CRM_Core_DAO::VALUE_SEPARATOR . "%' ) ";
-                  }
-                }
-                //if user check only 'CiviCRM_OP_OR' check box
-                //of custom checkbox field, then ignore this field.
-                if (!empty($sqlValue)) {
-                  $this->_where[$grouping][] = ' ( ' . implode($sqlOP, $sqlValue) . ' ) ';
-                  $this->_qill[$grouping][] = "{$field['label']} $op $qillValue ( $sqlOPlabel )";
-                }
-                // for multi select
-              }
-              else {
-                foreach ($value as $k => $v) {
-                  if ($v == 'CiviCRM_OP_OR') {
-                    $sqlOP = ' OR ';
-                    $sqlOPlabel = ts('match ANY');
-                    continue;
-                  }
-                  $v = CRM_Core_DAO::escapeString($v);
-                  $sqlValue[] = "( $sql like '%" . CRM_Core_DAO::VALUE_SEPARATOR . $v . CRM_Core_DAO::VALUE_SEPARATOR . "%' ) ";
-                }
-                //if user select only 'CiviCRM_OP_OR' value
-                //of custom multi select field, then ignore this field.
-                if (!empty($sqlValue)) {
-                  $this->_where[$grouping][] = ' ( ' . implode($sqlOP, $sqlValue) . ' ) ';
-                  $this->_qill[$grouping][] = "$field[label] $op $qillValue ( $sqlOPlabel )";
-                }
-              }
+
+            if ($field['is_search_range'] && is_array($value)) {
+              $this->searchRange($field['id'],
+                $field['label'],
+                $field['data_type'],
+                $fieldName,
+                $value,
+                $grouping
+              );
             }
             else {
-              if ($field['is_search_range'] && is_array($value)) {
-                $this->searchRange($field['id'],
-                  $field['label'],
-                  $field['data_type'],
-                  $fieldName,
-                  $value,
-                  $grouping
-                );
-              }
-              else {
-                if (in_array($field['html_type'], array('Select', 'Radio', 'Autocomplete-Select'))) {
-                  $wildcard = FALSE;
-                  $val = CRM_Utils_Type::escape($value, 'String');
-                }
-                else {
-                  $val = CRM_Utils_Type::escape($strtolower(trim($value)), 'String');
-                }
-
-                if ($wildcard) {
-                  $val = $strtolower(CRM_Core_DAO::escapeString($val));
-                  $val = "%$val%";
-                  $op  = 'LIKE';
-                }
-
-                //FIX for custom data query fired against no value(NULL/NOT NULL)
-                $this->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($sql, $op, $val, $field['data_type']);
-                $this->_qill[$grouping][] = "$field[label] $op $qillValue";
+              $val = CRM_Utils_Type::escape($strtolower(trim($value)), 'String');
+
+              if ($wildcard) {
+                $val = $strtolower(CRM_Core_DAO::escapeString($val));
+                $val = "%$val%";
+                $op  = 'LIKE';
               }
+
+              //FIX for custom data query fired against no value(NULL/NOT NULL)
+              $this->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($sql, $op, $val, $field['data_type']);
+              $this->_qill[$grouping][] = "$field[label] $op $qillValue";
             }
-            continue;
+            break;
 
           case 'ContactReference':
             $label = $value ? CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $value, 'sort_name') : '';
             $this->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($fieldName, $op, $value, 'String');
             $this->_qill[$grouping][] = $field['label'] . " $op $label";
-            continue;
+            break;
 
           case 'Int':
             if ($field['is_search_range'] && is_array($value)) {
@@ -451,7 +432,7 @@ SELECT label, value
               $this->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($fieldName, $op, $value, 'Integer');
               $this->_qill[$grouping][] = $field['label'] . " $op $value";
             }
-            continue;
+            break;
 
           case 'Boolean':
             if (strtolower($value) == 'yes' || strtolower($value) == strtolower(ts('Yes'))) {
@@ -464,12 +445,12 @@ SELECT label, value
             $this->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($fieldName, $op, $value, 'Integer');
             $value = $value ? ts('Yes') : ts('No');
             $this->_qill[$grouping][] = $field['label'] . " {$op} {$value}";
-            continue;
+            break;
 
           case 'Link':
             $this->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($fieldName, $op, $value, 'String');
             $this->_qill[$grouping][] = $field['label'] . " $op $value";
-            continue;
+            break;
 
           case 'Float':
             if ($field['is_search_range'] && is_array($value)) {
@@ -479,7 +460,7 @@ SELECT label, value
               $this->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($fieldName, $op, $value, 'Float');
               $this->_qill[$grouping][] = $field['label'] . " {$op} {$value}";
             }
-            continue;
+            break;
 
           case 'Money':
             if ($field['is_search_range'] && is_array($value)) {
@@ -495,12 +476,12 @@ SELECT label, value
               $this->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($fieldName, $op, $value, 'Float');
               $this->_qill[$grouping][] = $field['label'] . " {$op} {$value}";
             }
-            continue;
+            break;
 
           case 'Memo':
             $this->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($fieldName, $op, $value, 'String');
             $this->_qill[$grouping][] = "$field[label] $op $value";
-            continue;
+            break;
 
           case 'Date':
             $fromValue = CRM_Utils_Array::value('from', $value);
@@ -544,34 +525,13 @@ SELECT label, value
                 $this->_qill[$grouping][] = $field['label'] . ' <= ' . CRM_Utils_Date::customFormat($toDate);
               }
             }
-            continue;
+            break;
 
           case 'StateProvince':
           case 'Country':
-            if (!is_array($value)) {
-              $this->_where[$grouping][] = "$fieldName {$op} " . CRM_Utils_Type::escape($value, 'Int');
-              $this->_qill[$grouping][] = $field['label'] . " {$op} {$qillValue}";
-            }
-            else {
-              $sqlOP = ' AND ';
-              $sqlOPlabel = ts('match ALL');
-              foreach ($value as $k => $v) {
-                if ($v == 'CiviCRM_OP_OR') {
-                  $sqlOP = ' OR ';
-                  $sqlOPlabel = ts('match ANY');
-                  continue;
-                }
-                $sqlValue[] = "( $fieldName like '%" . CRM_Core_DAO::VALUE_SEPARATOR . $v . CRM_Core_DAO::VALUE_SEPARATOR . "%' ) ";
-              }
-
-              //if user select only 'CiviCRM_OP_OR' value
-              //of custom multi select field, then ignore this field.
-              if (!empty($sqlValue)) {
-                $this->_where[$grouping][] = " ( " . implode($sqlOP, $sqlValue) . " ) ";
-                $this->_qill[$grouping][] = "$field[label] $op $qillValue ( $sqlOPlabel )";
-              }
-            }
-            continue;
+            $this->_where[$grouping][] = "$fieldName {$op} " . CRM_Utils_Type::escape($value, 'Int');
+            $this->_qill[$grouping][] = $field['label'] . " {$op} {$qillValue}";
+            break;
 
           case 'File':
             if ( $op == 'IS NULL' || $op == 'IS NOT NULL' || $op == 'IS EMPTY' || $op == 'IS NOT EMPTY' ) {
@@ -586,7 +546,7 @@ SELECT label, value
               $this->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($fieldName, $op);
               $this->_qill[$grouping][] = $field['label'] . " {$op} ";
             }
-            continue;
+            break;
         }
       }
     }
index 3e7befb412af77e8183f67d5548c30e8f9da3dc4..de6b98c8f00cf3b55356c2b3cf91766847dffcef 100644 (file)
  * Class contains Contact dashboard related functions
  */
 class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard {
+  /**
+   * function to add Dashboard
+   *
+   * @param array $params values
+   *
+   * @access public
+   * @static
+   *
+   * @return object
+   */
+  static function create($params) {
+    $hook = empty($params['id']) ? 'create' : 'edit';
+    CRM_Utils_Hook::pre($hook, 'Dashboard', CRM_Utils_Array::value('id', $params), $params);
+    $dao = self::addDashlet($params);
+    CRM_Utils_Hook::post($hook, 'Dashboard', $dao->id, $dao);
+    return $dao;
+  }
 
   /**
    * Get the list of dashlets enabled by admin
@@ -385,7 +402,7 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard {
    */
   static function addDashlet(&$params) {
 
-    // special case to handle duplicate entires for report instances
+    // special case to handle duplicate entries for report instances
     $dashboardID = CRM_Utils_Array::value('id', $params);
 
     if (!empty($params['instanceURL'])) {
@@ -407,6 +424,9 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard {
         $dashlet->url = CRM_Utils_Array::value('url', $params);
         $dashlet->find(TRUE);
       }
+      if (empty($params['domain_id'])) {
+        $dashlet->domain_id = CRM_Core_Config::domainID();
+      }
     }
     else {
       $dashlet->id = $dashboardID;
@@ -416,9 +436,6 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard {
       $params['permission'] = implode(',', $params['permission']);
     }
     $dashlet->copyValues($params);
-
-    $dashlet->domain_id = CRM_Core_Config::domainID();
-
     $dashlet->save();
 
     // now we need to make dashlet entries for each contact
index 667a94c2f46ae7f853149370b0f5e11710d070be..2e27bdacc2598f13115041ecc3f43a4961572e7a 100644 (file)
@@ -463,8 +463,7 @@ ORDER BY  modified_date desc";
    * @return array Nested associative array beginning with direct children of given note.
    * @static
    */
-  private static function buildNoteTree($parentId, $maxDepth = 0, $snippet = FALSE, &$tree = array(
-    ), $depth = 0) {
+  private static function buildNoteTree($parentId, $maxDepth = 0, $snippet = FALSE, &$tree = array(), $depth = 0) {
     if ($maxDepth && $depth > $maxDepth) {
       return false;
     }
@@ -492,7 +491,7 @@ ORDER BY  modified_date desc";
 
         // paper icon view for attachments part
         $paperIconAttachmentInfo = CRM_Core_BAO_File::paperIconAttachment('civicrm_note', $note->id);
-        $tree[$note->id]['attachment'] = implode('', $paperIconAttachmentInfo);
+        $tree[$note->id]['attachment'] = $paperIconAttachmentInfo ? implode('', $paperIconAttachmentInfo) : '';
 
         if ($snippet) {
           $tree[$note->id]['note'] = nl2br($tree[$note->id]['note']);
index 98d88b0b2b9d92cda1f35897e7e5331cda6b6821..45ecdf2ff5d5df55a572db73d3ccbb166075521a 100644 (file)
@@ -49,6 +49,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
   CONST
     ADDRESS_STANDARDIZATION_PREFERENCES_NAME = 'Address Standardization Preferences',
     CAMPAIGN_PREFERENCES_NAME = 'Campaign Preferences',
+    DEVELOPER_PREFERENCES_NAME = 'Developer Preferences',
     DIRECTORY_PREFERENCES_NAME = 'Directory Preferences',
     EVENT_PREFERENCES_NAME = 'Event Preferences',
     MAILING_PREFERENCES_NAME = 'Mailing Preferences',
index 2aa097f503290c6ceed37efaa1069bfccf616315..1b8e840aa22da624b8e0b0454e927a5cd4035582 100644 (file)
@@ -79,11 +79,12 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag {
   }
 
   /**
+   * Build a nested array from hierarchical tags. Supports infinite levels of nesting.
    * @param null $usedFor
    * @param bool $excludeHidden
    */
   function buildTree($usedFor = NULL, $excludeHidden = FALSE) {
-    $sql = "SELECT civicrm_tag.id, civicrm_tag.parent_id,civicrm_tag.name FROM civicrm_tag ";
+    $sql = "SELECT id, parent_id, name, description FROM civicrm_tag";
 
     $whereClause = array();
     if ($usedFor) {
@@ -101,42 +102,22 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag {
 
     $dao = CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
 
-    $orphan = array();
+    $refs = array();
     while ($dao->fetch()) {
+      $thisref = &$refs[$dao->id];
+
+      $thisref['parent_id'] = $dao->parent_id;
+      $thisref['name'] = $dao->name;
+      $thisref['description'] = $dao->description;
+
       if (!$dao->parent_id) {
-        $this->tree[$dao->id]['name'] = $dao->name;
+        $this->tree[$dao->id] = &$thisref;
       }
       else {
-        if (array_key_exists($dao->parent_id, $this->tree)) {
-          $parent = &$this->tree[$dao->parent_id];
-          if (!isset($this->tree[$dao->parent_id]['children'])) {
-            $this->tree[$dao->parent_id]['children'] = array();
-          }
-        }
-        else {
-          //3rd level tag
-          if (!array_key_exists($dao->parent_id, $orphan)) {
-            $orphan[$dao->parent_id] = array('children' => array());
-          }
-          $parent = &$orphan[$dao->parent_id];
-        }
-        $parent['children'][$dao->id] = array('name' => $dao->name);
+        $refs[$dao->parent_id]['children'][$dao->id] = &$thisref;
       }
     }
-    if (sizeof($orphan)) {
-      //hang the 3rd level lists at the right place
-      foreach ($this->tree as & $level1) {
-        if (!isset($level1['children'])) {
-          continue;
-        }
 
-        foreach ($level1['children'] as $key => & $level2) {
-          if (array_key_exists($key, $orphan)) {
-            $level2['children'] = $orphan[$key]['children'];
-          }
-        }
-      }
-    }
   }
 
   /**
index 22bcf67496e8eb391b6e511bbab9877a32afa023..6c1189caca553b07b67a23b0c2ccecc80bea3d86 100644 (file)
@@ -803,13 +803,15 @@ SELECT  id
    * @param array $profileAddressFields array of profile fields that relate to address fields
    * @param array $profileFilter filter to apply to profile fields - expected usage is to only fill based on
    * the bottom profile per CRM-13726
+   *
+   * @return bool Can the address block be hidden safe in the knowledge all fields are elsewhere collected (see CRM-15118)
    */
   static function assignAddressField($key, &$profileAddressFields, $profileFilter) {
     $billing_id = CRM_Core_BAO_LocationType::getBilling();
     list($prefixName, $index) = CRM_Utils_System::explode('-', $key, 2);
 
     $profileFields = civicrm_api3('uf_field', 'get', array_merge($profileFilter,
-      array('is_active' => 1, 'return' => 'field_name', 'options' => array(
+      array('is_active' => 1, 'return' => 'field_name, is_required', 'options' => array(
         'limit' => 0,
       ))
     ));
@@ -825,12 +827,17 @@ SELECT  id
       'postal_code',
       'country'
     );
+    $requiredBillingFields = array_diff($validBillingFields, array('middle_name','supplemental_address_1'));
     $validProfileFields = array();
+    $requiredProfileFields = array();
 
     foreach ($profileFields['values'] as $field) {
       if(in_array($field['field_name'], $validBillingFields)) {
         $validProfileFields[] = $field['field_name'];
       }
+      if ($field['is_required']) {
+        $requiredProfileFields[] = $field['field_name'];
+      }
     }
 
     if (!in_array($prefixName, $validProfileFields) ) {
@@ -852,6 +859,9 @@ SELECT  id
     ) {
       $profileAddressFields[$prefixName] = $index;
     }
+    
+    $potentiallyMissingRequiredFields = array_diff($requiredBillingFields, $requiredProfileFields);    
+    CRM_Core_Resources::singleton()->addSetting(array('billing' => array('billingProfileIsHideable' => empty($potentiallyMissingRequiredFields))));
   }
 
   /**
index 84edaa919cf2325f449e09c745d8f6e1c5389ca8..478501d45242a61871a81626f371f97d63a248c6 100644 (file)
@@ -1854,8 +1854,7 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
     elseif (substr($fieldName, 0, 6) === 'county') {
       if ($addressOptions['county']) {
         $form->add('select', $name, $title,
-          array(
-            '' => ts('(choose state first)')), $required
+          array('' => ts('Choose state first')), $required
         );
       }
     }
@@ -2318,6 +2317,9 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
               }
             }
           }
+          elseif ($name == 'contact_sub_type') {
+            $defaults[$fldName] = explode(CRM_Core_DAO::VALUE_SEPARATOR, trim($details[$name], CRM_Core_DAO::VALUE_SEPARATOR));
+          }
           elseif ($name == 'world_region') {
             $defaults[$fldName] = $details['worldregion_id'];
           }
index c5c49a6a4ffee83ceb4c1c77f71f46e4e326768a..62f484dcac43977961ba46ecb140596268996997 100644 (file)
@@ -240,8 +240,12 @@ class CRM_Core_Component {
    */
   static function getComponentID($componentName) {
     $info = self::_info();
-
-    return $info[$componentName]->componentID;
+    if (!empty($info[$componentName])) {
+      return $info[$componentName]->componentID;
+    }
+    else {
+      return;
+    }
   }
 
   /**
index f26ce82e2454c8c57c75b9bdeccf001fcd214b4c..3fa2bed56f1a640b2257c7c50bba12b56185ace6 100644 (file)
@@ -170,6 +170,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
       $this->_name = $name;
     }
     else {
+      // CRM-15153 - FIXME this name translates to a DOM id and is not always unique!
       $this->_name = CRM_Utils_String::getClassName(CRM_Utils_System::getClassName($this));
     }
 
@@ -187,6 +188,8 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
     if (!isset(self::$_template)) {
       self::$_template = CRM_Core_Smarty::singleton();
     }
+    // Workaround for CRM-15153 - give each form a reasonably unique css class
+    $this->addClass(CRM_Utils_System::getClassName($this));
 
     $this->assign('snippet', CRM_Utils_Array::value('snippet', $_GET));
   }
@@ -194,6 +197,15 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
   static function generateID() {
   }
 
+  /**
+   * Add one or more css classes to the form
+   * @param $className
+   */
+  public function addClass($className) {
+    $classes = $this->getAttribute('class');
+    $this->setAttribute('class', ($classes ? "$classes " : '') . $className);
+  }
+
   /**
    * register all the standard rules that most forms potentially use
    *
@@ -471,10 +483,10 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
       $js = CRM_Utils_Array::value('js', $button);
       $isDefault = CRM_Utils_Array::value('isDefault', $button, FALSE);
       if ($isDefault) {
-        $attrs = array('class' => 'form-submit default');
+        $attrs = array('class' => 'crm-form-submit default');
       }
       else {
-        $attrs = array('class' => 'form-submit');
+        $attrs = array('class' => 'crm-form-submit');
       }
 
       if ($js) {
@@ -637,6 +649,8 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
     $this->accept($renderer);
     $content = $renderer->toArray();
     $content['formName'] = $this->getName();
+    // CRM-15153
+    $content['formClass'] = CRM_Utils_System::getClassName($this);
     return $content;
   }
 
@@ -1674,5 +1688,27 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
   function allowAjaxSubmit() {
     $this->removeAttribute('data-no-ajax-submit');
   }
+
+  /**
+   * Sets page title based on entity and action
+   * @param string $entityLabel
+   */
+  function setPageTitle($entityLabel) {
+    switch ($this->_action) {
+      case CRM_Core_Action::ADD:
+        CRM_Utils_System::setTitle(ts('New %1', array(1 => $entityLabel)));
+        break;
+      case CRM_Core_Action::UPDATE:
+        CRM_Utils_System::setTitle(ts('Edit %1', array(1 => $entityLabel)));
+        break;
+      case CRM_Core_Action::VIEW:
+      case CRM_Core_Action::PREVIEW:
+        CRM_Utils_System::setTitle(ts('View %1', array(1 => $entityLabel)));
+        break;
+      case CRM_Core_Action::DELETE:
+        CRM_Utils_System::setTitle(ts('Delete %1', array(1 => $entityLabel)));
+        break;
+    }
+  }
 }
 
index 4f298d8c293d7886611829b3791715023ca8a2df..2acc04af1dc431edfb18b0869ebacb9247da792b 100644 (file)
@@ -99,7 +99,7 @@ class CRM_Core_Form_Search extends CRM_Core_Form {
       ),
     ));
 
-    $this->setAttribute('class', 'crm-search-form');
+    $this->addClass('crm-search-form');
   }
 
   /**
index 117c53075da296e475ee5b86217c46d4014741f0..597c3beae0cdee3d291af0745ce064395ebef023 100644 (file)
@@ -153,31 +153,12 @@ class CRM_Core_Form_Tag {
     // are deleted we will have to set $params[tagset id] = '' which is done by above logic
     foreach ($params as $parentId => $value) {
       $newTagIds = array();
-      $realTagIds = array();
+      $tagIds = array();
 
       if ($value) {
-        $tagsIDs = explode(',', $value);
-        foreach ($tagsIDs as $tagId) {
-          if (!is_numeric($tagId)) {
-            // check if user has selected existing tag or is creating new tag
-            // this is done to allow numeric tags etc.
-            $tagValue = explode(':::', $tagId);
-
-            if (isset($tagValue[1]) && $tagValue[1] == 'value') {
-              $tagParams = array(
-                'name' => $tagValue[0],
-                'parent_id' => $parentId,
-              );
-              $tagObject = CRM_Core_BAO_Tag::add($tagParams, CRM_Core_DAO::$_nullArray);
-              $tagId = $tagObject->id;
-            }
-          }
-
-          $realTagIds[] = $tagId;
-          if ($form && $form->_action != CRM_Core_Action::UPDATE) {
-            $newTagIds[] = $tagId;
-          }
-          elseif (!array_key_exists($tagId, $existingTags)) {
+        $tagIds = explode(',', $value);
+        foreach ($tagIds as $tagId) {
+          if ($form && $form->_action != CRM_Core_Action::UPDATE || !array_key_exists($tagId, $existingTags)) {
             $newTagIds[] = $tagId;
           }
         }
@@ -189,8 +170,8 @@ class CRM_Core_Form_Tag {
                     WHERE civicrm_tag.id=civicrm_entity_tag.tag_id
                       AND civicrm_entity_tag.entity_table='{$entityTable}'
                       AND entity_id={$entityId} AND parent_id={$parentId}";
-      if (!empty($realTagIds)) {
-        $deleteSQL .= " AND tag_id NOT IN (" . implode(', ', $realTagIds) . ");";
+      if (!empty($tagIds)) {
+        $deleteSQL .= " AND tag_id NOT IN (" . implode(', ', $tagIds) . ");";
       }
 
       CRM_Core_DAO::executeQuery($deleteSQL);
index 3782674a2a9baa141cf8f094e1fdfb13d94e7391..1527af263aa509c0d4f5969bf17cba06f1008f82 100644 (file)
@@ -203,43 +203,62 @@ class CRM_Core_Page_AJAX_Location {
     if (empty($_GET['_value'])) {
       CRM_Utils_System::civiExit();
     }
+    $countries = (array) $_GET['_value'];
+    $elements = array();
+    $list = &$elements;
+    foreach ($countries as $val) {
+      $result = CRM_Core_PseudoConstant::stateProvinceForCountry($val);
 
-    $result = CRM_Core_PseudoConstant::stateProvinceForCountry($_GET['_value']);
-
-    $elements = array(array(
-      'name' => $result ? ts('- select a state -') : ts('- N/A -'),
-      'value' => '',
-    ));
-    foreach ($result as $id => $name) {
-      $elements[] = array(
-        'name' => $name,
-        'value' => $id,
-      );
+      // Option-groups for multiple countries
+      if ($result && count($countries) > 1) {
+        $elements[] = array(
+          'name' => CRM_Core_PseudoConstant::country($val, FALSE),
+          'children' => array(),
+        );
+        $list = &$elements[count($elements)-1]['children'];
+      }
+      foreach ($result as $id => $name) {
+        $list[] = array(
+          'name' => $name,
+          'value' => $id,
+        );
+      }
     }
-
-    echo json_encode($elements);
+    $placeholder = array(array('value' => '', 'name' => $elements ? ts('- select -') : ts('- N/A -')));
+    echo json_encode(array_merge($placeholder, $elements));
     CRM_Utils_System::civiExit();
   }
 
   static function jqCounty() {
+    $elements = array();
     if (!isset($_GET['_value']) || CRM_Utils_System::isNull($_GET['_value'])) {
       $elements = array(
-        array('name' => ts('(choose state first)'), 'value' => '')
+        array('name' => ts('Choose state first'), 'value' => '')
       );
     }
     else {
-      $result = CRM_Core_PseudoConstant::countyForState($_GET['_value']);
+      $states = (array) $_GET['_value'];
+      $list = &$elements;
+      foreach ($states as $val) {
+        $result = CRM_Core_PseudoConstant::countyForState($val);
 
-      $elements = array(array(
-        'name' => $result ? ts('- select -') : ts('- N/A -'),
-        'value' => '',
-      ));
-      foreach ($result as $id => $name) {
-        $elements[] = array(
-          'name' => $name,
-          'value' => $id,
-        );
+        // Option-groups for multiple countries
+        if ($result && count($states) > 1) {
+          $elements[] = array(
+            'name' => CRM_Core_PseudoConstant::stateProvince($val, FALSE),
+            'children' => array(),
+          );
+          $list = &$elements[count($elements)-1]['children'];
+        }
+        foreach ($result as $id => $name) {
+          $list[] = array(
+            'name' => $name,
+            'value' => $id,
+          );
+        }
       }
+      $placeholder = array(array('value' => '', 'name' => $elements ? ts('- select -') : ts('- N/A -')));
+      $elements = array_merge($placeholder, $elements);
     }
 
     echo json_encode($elements);
index ae6077954fa5626a7b4b913186df8a0f6825b9da..93c43e7fe2c94822f1bc3c955e53aa9af9eda68f 100644 (file)
@@ -223,8 +223,6 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN {
     $input['subscription_id'] = self::retrieve('x_subscription_id', 'Integer');
     $input['response_code'] = self::retrieve('x_response_code', 'Integer');
     $input['MD5_Hash'] = self::retrieve('x_MD5_Hash', 'String', FALSE, '');
-    $input['fee_amount'] = self::retrieve('x_fee_amount', 'Money', FALSE, NULL);
-    $input['net_amount'] = self::retrieve('x_net_amount', 'Money', FALSE, NULL);
     $input['response_reason_code'] = self::retrieve('x_response_reason_code', 'String', FALSE);
     $input['response_reason_text'] = self::retrieve('x_response_reason_text', 'String', FALSE);
     $input['subscription_paynum'] = self::retrieve('x_subscription_paynum', 'Integer', FALSE, 0);
index e54150e77d244ab4ad990816afa0625b73afd962..5805062c3ee74562095c191c11a7faf2d3f1236e 100644 (file)
@@ -289,7 +289,7 @@ class CRM_Core_Payment_Form {
       $form->add('image',
         $form->_expressButtonName,
         $form->_paymentProcessor['url_button'],
-        array('class' => 'form-submit')
+        array('class' => 'crm-form-submit')
       );
     }
   }
@@ -352,7 +352,7 @@ class CRM_Core_Payment_Form {
       $form->add('image',
         $form->_expressButtonName,
         $form->_paymentProcessor['url_button'],
-        array('class' => 'form-submit')
+        array('class' => 'crm-form-submit')
       );
     }
   }
index c7aa357a6684526a9d59ec3e3c02770e43d520bc..69e4be356d91e424f71792df7212a17c2c08bd0e 100644 (file)
@@ -987,8 +987,6 @@ WHERE  id = %1";
   }
 
   /**
-   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
-   *
    * Get all permissioned groups from database
    *
    * The static array group is returned, and if it's
@@ -998,7 +996,7 @@ WHERE  id = %1";
    * Note: any database errors will be trapped by the DAO.
    *
    * @param string $groupType type of group(Access/Mailing)
-   * @param bool|\boolen $excludeHidden exclude hidden groups.
+   * @param bool $excludeHidden exclude hidden groups.
    *
    * @access public
    * @static
@@ -1009,6 +1007,18 @@ WHERE  id = %1";
     return CRM_Core_Permission::group($groupType, $excludeHidden);
   }
 
+  /**
+   * Fetch groups in a nested format suitable for use in select form element
+   * @param bool $checkPermissions
+   * @param string|null $groupType
+   * @param bool $excludeHidden
+   * @return array
+   */
+  public static function nestedGroup($checkPermissions = TRUE, $groupType = NULL, $excludeHidden = TRUE) {
+    $groups = $checkPermissions ? self::group($groupType, $excludeHidden) : self::allGroup($groupType, $excludeHidden);
+    return CRM_Contact_BAO_Group::getGroupsHierarchy($groups, NULL, '&nbsp;&nbsp;', TRUE);
+  }
+
   /**
    * Get all permissioned groups from database
    *
index d18a8d0dc6fbaa759a20751bb05e5ab26075d12e..7ecf54039e8f2b9cddccba33333991151b4d244c 100644 (file)
@@ -47,9 +47,6 @@
  * @access public
  */
 function smarty_modifier_crmReplace($string, $attribute, $value) {
-  static $endOfElement = '/>';
-
-  // if we know what attribute we need to replace
   // we need to search and replace the string: $attribute=XXX or $attribute="XXX"
   // with $attribute=\"$value\"
   $pattern = '/' . $attribute . '="([^"]+?)"/';
index 49543efc04a57b1f03c3fd2dd6043bbdd2b5defe..cd7c6dc75d288d2b2ece596a436a61b53e7aebcf 100644 (file)
@@ -69,9 +69,8 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form {
     CRM_Core_BAO_CustomField::retrieve($params, $defaults);
 
     $this->_title = CRM_Utils_Array::value('label', $defaults);
-    $this->assign('title', $this->_title);
 
-    CRM_Utils_System::setTitle(ts('Confirm Custom Field Delete'));
+    CRM_Utils_System::setTitle(ts('Delete %1', array(1 => $this->_title)));
   }
 
   /**
index 4c368c8ae29f618785747b62877640ee49f5cae9..cce4f2b9584106e1278dab62d982cbf0e96f383f 100644 (file)
@@ -280,7 +280,7 @@ class CRM_Custom_Form_Field extends CRM_Core_Form {
   public function buildQuickForm() {
     if ($this->_gid) {
       $this->_title = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $this->_gid, 'title');
-      CRM_Utils_System::setTitle($this->_title . ' - ' . ($this->_id ? ts('Edit Field') : ts('Add Field')));
+      CRM_Utils_System::setTitle($this->_title . ' - ' . ($this->_id ? ts('Edit Field') : ts('New Field')));
       $this->assign('gid', $this->_gid);
     }
 
index 912ad98c87e4399b07e51a750f28ce0c15b47da9..5dba257bf961ea85ed1fcd1fd7e9904fc59559c7 100644 (file)
@@ -499,7 +499,9 @@ class CRM_Custom_Form_Group extends CRM_Core_Form {
       CRM_Core_Session::setStatus(ts('Your custom field set \'%1 \' has been saved.', array(1 => $group->title)), ts('Saved'), 'success');
     }
     else {
-      $url = CRM_Utils_System::url('civicrm/admin/custom/group/field/add', 'reset=1&action=add&gid=' . $group->id);
+      // Jump directly to adding a field if popups are disabled
+      $action = CRM_Core_Resources::singleton()->ajaxPopupsEnabled ? '' : '/add';
+      $url = CRM_Utils_System::url("civicrm/admin/custom/group/field$action", 'reset=1&gid=' . $group->id . '&action=' . ($action ? 'add' : 'browse'));
       CRM_Core_Session::setStatus(ts("Your custom field set '%1' has been added. You can add custom fields now.",
           array(1 => $group->title)
         ), ts('Saved'), 'success');
index 2e8af3d9f529027f18e11004611e2d199cd3e7f1..f509ff60906f17d61844bbb55ed38c9fa6c681c3 100644 (file)
@@ -235,7 +235,7 @@ class CRM_Custom_Form_Option extends CRM_Core_Form {
         $this->addElement('button',
           'done',
           ts('Done'),
-          array('onclick' => "location.href='$url'", 'class' => 'form-submit')
+          array('onclick' => "location.href='$url'", 'class' => 'crm-form-submit')
         );
       }
     }
index 6d77dec760e6d351bc500024535bdc246c3636b2..84507d68085838228f4008628cb4070091792833 100644 (file)
@@ -103,6 +103,7 @@ class CRM_Custom_Page_Field extends CRM_Core_Page {
         CRM_Core_Action::EXPORT => array(
           'name' => ts('Move'),
           'url' => 'civicrm/admin/custom/group/field/move',
+          'class' => 'small-popup',
           'qs' => 'reset=1&fid=%%id%%',
           'title' => ts('Move Custom Field'),
         ),
@@ -275,7 +276,9 @@ class CRM_Custom_Page_Field extends CRM_Core_Page {
       $groupTitle = CRM_Core_BAO_CustomGroup::getTitle($this->_gid);
       $this->assign('gid', $this->_gid);
       $this->assign('groupTitle', $groupTitle);
-      CRM_Utils_System::setTitle(ts('%1 - Custom Fields', array(1 => $groupTitle)));
+      if ($action & CRM_Core_Action::BROWSE) {
+        CRM_Utils_System::setTitle(ts('%1 - Custom Fields', array(1 => $groupTitle)));
+      }
     }
 
     // assign vars to templates
index 8a2fbc5bcb7f0679721db74afbdf96e3f39a414b..71c35c65449a98ec5647a551184090bd5308f118 100644 (file)
@@ -760,9 +760,19 @@ GROUP BY  participant.event_id
           'name' => 'participant_role',
         ));
 
+      //CRM-13595 add event id to participant export
+      $eventid = array(
+        'event_id' => array('title' => 'Event ID',
+          'name' => 'event_id',
+        ));
+      $eventtitle = array(
+        'event_title' => array('title' => 'Event Title',
+          'name' => 'event_title',
+        ));
+
       $discountFields  = CRM_Core_DAO_Discount::export();
 
-      $fields = array_merge($participantFields, $participantStatus, $participantRole, $noteField, $discountFields);
+      $fields = array_merge($participantFields, $participantStatus, $participantRole, $eventid, $eventtitle, $noteField, $discountFields);
 
       // add custom data
       $fields = array_merge($fields, CRM_Core_BAO_CustomField::getFieldsForImport('Participant'));
@@ -969,10 +979,9 @@ WHERE  civicrm_participant.id = {$participantId}
     if ((substr($eventLevel, 0, 1) == CRM_Core_DAO::VALUE_SEPARATOR) &&
       (substr($eventLevel, -1, 1) == CRM_Core_DAO::VALUE_SEPARATOR)
     ) {
-      $eventLevel = implode(', ', explode(CRM_Core_DAO::VALUE_SEPARATOR,
-          substr($eventLevel, 1, -1)
-        ));
-      if ($pos = strrpos($eventLevel, '(multiple participants)', 0)) {
+      $eventLevel = implode(', ', explode(CRM_Core_DAO::VALUE_SEPARATOR, substr($eventLevel, 1, -1)));
+      $pos = strrpos($eventLevel, '(multiple participants)', 0);
+      if ($pos) {
         $eventLevel = substr_replace($eventLevel, "", $pos - 3, 1);
       }
     }
@@ -1465,8 +1474,8 @@ UPDATE  civicrm_participant
     ) {
       return $mailSent;
     }
-
-    if ($toEmail = CRM_Utils_Array::value('email', $contactDetails)) {
+    $toEmail = CRM_Utils_Array::value('email', $contactDetails);
+    if ($toEmail) {
 
       $contactId = $participantValues['contact_id'];
       $participantName = $contactDetails['display_name'];
@@ -1475,7 +1484,8 @@ UPDATE  civicrm_participant
       $checksumValue = NULL;
       if ($mailType == 'Confirm' && !$participantValues['registered_by_id']) {
         $checksumLife = 'inf';
-        if ($endDate = CRM_Utils_Array::value('end_date', $eventDetails)) {
+        $endDate = CRM_Utils_Array::value('end_date', $eventDetails);
+        if ($endDate) {
           $checksumLife = (CRM_Utils_Date::unixTime($endDate) - time()) / (60 * 60);
         }
         $checksumValue = CRM_Contact_BAO_Contact_Utils::generateChecksum($contactId, NULL, $checksumLife);
index 599150ec9991eb80e3b4c0ed41b89b45326a3dca..930bfd1e622c52ab7c028d60e16971a2230658fe 100644 (file)
@@ -119,7 +119,7 @@ class CRM_Event_BAO_ParticipantStatusType extends CRM_Event_DAO_ParticipantStatu
    *
    * @return array
    */
-  public function process($params) {
+  public static function process($params) {
 
     $returnMessages = array();
 
index 9bd4ccc0d525f9eec52b595309fdb353974cf6d6..6270d7f3abd692f7a77415a7cca30a8191b6723e 100644 (file)
@@ -387,7 +387,7 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent {
     }
     $_showHide->addToTemplate();
     $this->addElement('submit', $this->getButtonName('submit'), ts('Add Discount Set to Fee Table'),
-      array('class' => 'form-submit cancel')
+      array('class' => 'crm-form-submit cancel')
     );
 
     $this->buildAmountLabel();
index 690bee73e507c77ccccaa9083c2acd088537e870..f0c468883436db48a5d69280f25a8d02584e4672 100755 (executable)
@@ -199,8 +199,9 @@ class CRM_Event_Form_ManageEvent_ScheduleReminders extends CRM_Event_Form_Manage
 
     $this->addEntityRef('recipient_manual_id', ts('Manual Recipients'), array('multiple' => true));
 
+    $groups = CRM_Contact_BAO_Group::getGroupsHierarchy(CRM_Core_PseudoConstant::staticGroup(), NULL, '&nbsp;&nbsp;', TRUE);
     $this->add('select', 'group_id', ts('Group'),
-      CRM_Core_PseudoConstant::staticGroup(), FALSE, array('class' => 'crm-select2 huge')
+      $groups, FALSE, array('class' => 'crm-select2 huge')
     );
 
     CRM_Mailing_BAO_Mailing::commonCompose($this);
index dd18b804a6e97002aa09cf7ceae27a862e9232ca..70eb802b4388c4020a30625482b4eebdeed2ca01 100644 (file)
@@ -218,8 +218,10 @@ class CRM_Event_Form_Participant extends CRM_Contact_Form_Task {
     if ($this->_contactId) {
       $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId);
       $this->assign('displayName', $displayName);
-      // omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
-      CRM_Utils_System::setTitle(ts('Event Registration for') .  ' ' . $displayName);
+      $this->setPageTitle(ts('Event Registration for %1', array(1 => $displayName)));
+    }
+    else {
+      $this->setPageTitle(ts('Event Registration'));
     }
 
     // check the current path, if search based, then dont get participantID
index 4472c465d5eeb90341e91c831b0371a3ba9182fa..8c0360b43a71a7c5fd5b6b1a735e4b5c1161689a 100644 (file)
@@ -323,7 +323,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
       $this->add('image',
         $this->_checkoutButtonName,
         $this->_paymentProcessor['url_button'],
-        array('class' => 'form-submit')
+        array('class' => 'crm-form-submit')
       );
 
       $this->addButtons(array(
index d627202322a54aa7294e6ffe8e478e7a2dd405c9..43f78d1066924a58ef6485fc530d2629a2d713b0 100644 (file)
@@ -339,7 +339,7 @@ class CRM_Event_Import_Form_MapField extends CRM_Import_Form_MapField {
             }
             else {
               $errors['_qf_default'] .= ts('Missing required contact matching fields.') . " $fieldMessage " . ts('(Sum of all weights should be greater than or equal to threshold: %1).', array(
-                1 => $threshold)) . ' ' . ts('Or Provide Contact Id or External Identifier.') . '<br />';
+                1 => $threshold)) . ' ' . ts('Or Provide Contact ID or External ID.') . '<br />';
             }
           }
           elseif (!in_array('event_title', $importKeys)) {
index 9d971eba4460b9fcc985bf0b0bfb7330ae4ddc74..8a8ab7bb7aa49dfc5aa115a3445608db02d90d8f 100644 (file)
@@ -135,9 +135,6 @@ class CRM_Event_Page_Tab extends CRM_Core_Page {
 
       // check logged in url permission
       CRM_Contact_Page_View::checkUserPermission($this);
-
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
 
     $this->assign('action', $this->_action);
index d2d56fa09c5dbcff7afcc764c6db2089dbe6e653..2be77db09cd6253d89cfb207e870dc7095d89ddd 100644 (file)
@@ -222,8 +222,9 @@ class CRM_Export_BAO_Export {
         }
         else {
           //hack to fix component fields
+          //revert mix of event_id and title
           if ($fieldName == 'event_id') {
-            $returnProperties['event_title'] = 1;
+            $returnProperties['event_id'] = 1;
           }
           else if (
             $exportMode == CRM_Export_Form_Select::EVENT_EXPORT &&
index 03dcb9912808eb9ce2e0e8630696b1600f4ab60a..e5a88fe3baa50e04726bd08a5fa16ca1ca0ac277 100644 (file)
@@ -302,7 +302,8 @@ FROM   {$this->_componentTable}
       $this->addGroup($postalMailing, 'postal_mailing_export', ts('Postal Mailing Export'), '<br/>');
 
       $this->addElement('select', 'additional_group', ts('Additional Group for Export'),
-        array('' => ts('- select group -')) + CRM_Core_PseudoConstant::group()
+        array('' => ts('- select group -')) + CRM_Core_PseudoConstant::nestedGroup(),
+        array('class' => 'crm-select2 huge')
       );
     }
 
index 907f4b34987afcf2aa93c3fd3216da4e6f382b08..71cd443bcc877cb04dd27735b63e1853f33c12e1 100644 (file)
@@ -101,7 +101,7 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form {
       )
     );
 
-    $this->_group = CRM_Core_PseudoConstant::group();
+    $this->_group = CRM_Core_PseudoConstant::nestedGroup();
 
     // multiselect for groups
     if ($this->_group) {
@@ -126,7 +126,7 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form {
 
     $this->add('submit','rSubmit', ts('Go'),
       array(
-        'class' => 'form-submit',
+        'class' => 'crm-form-submit',
         'id' => 'GoRemove',
       ));
 
@@ -149,7 +149,7 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form {
 
     $this->add('submit','submit', ts('Go'),
       array(
-        'class' => 'form-submit',
+        'class' => 'crm-form-submit',
         'id' => 'Go',
       ));
     $this->applyFilter('__ALL__', 'trim');
index dd6318ba5eb5596762de90668a0bbaf91b709666..beb88f647089ed989edb534fdc94a058f65c5299 100644 (file)
@@ -68,12 +68,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
         $this->_isARFlag = TRUE;
         if ($this->_action & CRM_Core_Action::DELETE) {
           $msg = ts("The selected financial account cannot be deleted because at least one Accounts Receivable type account is required (to ensure that accounting transactions are in balance).");
-          if (CRM_Utils_Array::value('snippet', $_REQUEST) == 'json') {
-            CRM_Core_Page_AJAX::returnJsonResponse($msg);
-          }
-          CRM_Core_Session::setStatus($msg, '', 'error');
-          CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/financial/financialAccount',
-            "reset=1&action=browse"));
+          CRM_Core_Error::statusBounce($msg);
         }
       }
     }
@@ -87,6 +82,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
    */
   public function buildQuickForm( ) {
     parent::buildQuickForm( );
+    $this->setPageTitle(ts('Financial Account'));
 
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
@@ -116,7 +112,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
     $financialAccountType = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialAccount', 'financial_account_type_id');
     if (!empty($financialAccountType)) {
       $element = $this->add('select', 'financial_account_type_id', ts('Financial Account Type'),
-        array('' => '- select -') + $financialAccountType, TRUE);
+        array('' => '- select -') + $financialAccountType, TRUE, array('class' => 'crm-select2 huge'));
       if ($this->_isARFlag) {
         $element->freeze();
         $elementAccounting->freeze();
@@ -216,4 +212,5 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
       CRM_Core_Session::setStatus(ts('The Financial Account \'%1\' has been saved.', array(1 => $contributionType->name)));
     }
   }
+
 }
index 4bed5d72f63ffeed25fe1d1c72fa4496b94e7d61..4b4846c0336da9d165e4ddc3501f9d224845f8a8 100644 (file)
@@ -90,6 +90,8 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Financial Batch'));
+
     if (isset( $this->_id)) {
       $this->_title = CRM_Core_DAO::getFieldValue('CRM_Batch_DAO_Batch', $this->_id, 'title');
       CRM_Utils_System::setTitle($this->_title .' - '.ts( 'Accounting Batch'));
@@ -315,6 +317,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
       CRM_Core_Error::statusBounce(ts('You dont have permission to %1 this batch'), array(1 => $actionName));
     }
   }
+
 }
 
 
index 1a780db3d658b32e82404d75f29afa1015735997..7d75bfefe6e4ba54a2c6867bf2b37b01534a70e2 100644 (file)
@@ -48,11 +48,11 @@ class CRM_Financial_Form_FinancialType extends CRM_Contribute_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->setPageTitle(ts('Financial Type'));
 
     $this->_id = CRM_Utils_Request::retrieve('id' , 'Positive', $this);
     if ($this->_id) {
       $this->_title = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $this->_id, 'name');
-      CRM_Utils_System::setTitle($this->_title . ' - ' . ts( 'Financial Type'));
     }
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
@@ -129,4 +129,5 @@ class CRM_Financial_Form_FinancialType extends CRM_Contribute_Form {
       $session->replaceUserContext($url);
     }
   }
+
 }
index 90859f444f470b7fd1b5340fb6e5828e5ea1536b..3caa7da42852e7ab48b5a7886c0d2ca884038bb9 100644 (file)
@@ -127,24 +127,13 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form {
    * @access public
    */
   public function buildQuickForm() {
+    parent::buildQuickForm();
+    $this->setPageTitle(ts('Financial Type Account'));
+
     if ($this->_action & CRM_Core_Action::DELETE) {
-      $this->addButtons(array(
-        array(
-          'type' => 'next',
-          'name' => ts('Delete Financial Account Type'),
-          'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
-          'isDefault' => TRUE
-        ),
-        array(
-          'type' => 'cancel',
-          'name' => ts('Cancel'))
-        )
-      );
       return;
     }
 
-    parent::buildQuickForm();
-
     if (isset($this->_id)) {
       $params = array('id' => $this->_id);
       CRM_Financial_BAO_FinancialTypeAccount::retrieve($params, $defaults);
@@ -358,6 +347,7 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form {
         "reset=1&action=browse&aid={$this->_aid}"));
     }
   }
+
 }
 
 
index 2cdbcb08f20fd6aaa26698afd78ee34fe9f3951e..557713df2e306717f6a7bd642a58c2125f6cf8a7 100644 (file)
@@ -103,7 +103,7 @@ class CRM_Financial_Form_Search extends CRM_Core_Form {
 
     $this->add('submit','submit', ts('Go'),
       array(
-        'class' => 'form-submit',
+        'class' => 'crm-form-submit',
         'id' => 'Go',
       ));
 
index eac98fec4af4929e4e833e26a12e908b8617a19d..1c8c6a90d2750c6d00d5e77184d2d92b53bc78c0 100644 (file)
@@ -90,6 +90,8 @@ class CRM_Grant_Form_Grant extends CRM_Core_Form {
       CRM_Core_Error::fatal(ts('You do not have permission to access this page'));
     }
 
+    $this->setPageTitle(ts('Grant'));
+
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
     }
@@ -123,7 +125,6 @@ class CRM_Grant_Form_Grant extends CRM_Core_Form {
       return CRM_Custom_Form_CustomData::setDefaultValues($this);
     }
 
-    $defaults = array();
     $defaults = parent::setDefaultValues();
 
     if ($this->_action & CRM_Core_Action::DELETE) {
index 859343647aadb5edbf100c8d26328a6093815f72..1b0fc3b7972533b819e95c79517376e65880a00d 100644 (file)
@@ -117,6 +117,8 @@ class CRM_Grant_Form_GrantView extends CRM_Core_Form {
     CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree);
 
     $this->assign('id', $this->_id);
+
+    $this->setPageTitle(ts('Grant'));
   }
 
   /**
index 2cbfa3b42863ffe800aa628d8a696032f09c33d4..9be73990f1dca1130a9f72ad7aa0a6a5938b8a2a 100644 (file)
@@ -169,7 +169,7 @@ class CRM_Grant_Form_Search extends CRM_Core_Form_Search {
    */
   function buildQuickForm() {
     parent::buildQuickForm();
-    $this->addElement('text', 'sort_name', ts('Name or Email'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'sort_name'));
+    $this->addElement('text', 'sort_name', ts('Name or Email'), array('class' => 'twenty') + CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'sort_name'));
 
     CRM_Grant_BAO_Query::buildSearchForm($this);
 
index fa3a9801656e518294d61f86aa2de22061eaf164..cf89402c08a807060c636c500887f75fe586241b 100644 (file)
@@ -157,7 +157,7 @@ class CRM_Grant_Form_Task extends CRM_Core_Form {
    * @return void
    * @access public
    */
-  function addDefaultButtons($title, $nextType = 'next', $backType = 'back') {
+  function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
     $this->addButtons(array(
         array(
           'type' => $nextType,
index 03518b187fd6e5990227fc088e44e261b6c70ed4..0094dcdc170eedd5e7eb13df39049138e090d3b7 100644 (file)
@@ -122,9 +122,6 @@ class CRM_Grant_Page_Tab extends CRM_Contact_Page_View {
 
       // check logged in url permission
       CRM_Contact_Page_View::checkUserPermission($this);
-
-      // set page title
-      CRM_Utils_System::setTitle(ts('Grant by') .  ' ' . $displayName);
     }
     $this->assign('action', $this->_action);
 
index 70112e1daf9700ded04d1064db2a5755cd129de7..d481ac9483006c42da9c586895842e83532d8ec8 100644 (file)
@@ -209,13 +209,10 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co
       );
 
       if ($cid) {
-        $deleteExtra = ts('Are you sure you want to delete this grant?');
-
         $delLink = array(
           CRM_Core_Action::DELETE => array('name' => ts('Delete'),
             'url' => 'civicrm/contact/view/grant',
             'qs' => 'action=delete&reset=1&cid=%%cid%%&id=%%id%%&selectedChild=grant' . $extraParams,
-            'extra' => 'onclick = "if (confirm(\'' . $deleteExtra . '\') ) this.href+=\'&amp;confirmed=1\'; else return false;"',
             'title' => ts('Delete Grant'),
           ),
         );
@@ -224,7 +221,6 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co
     }
     return self::$_links;
   }
-  //end of function
 
   /**
    * getter for array of the parameters required for creating pager.
index 1ae0f5a672fd33b2505c63e4ddbf524600367ff9..cffa28a9ef9248aebb7ee4f6f408c33c03bd8293 100644 (file)
@@ -42,7 +42,7 @@ class CRM_Group_Page_AJAX {
     if (isset($params['parent_id'])) {
       // requesting child groups for a given parent
       $params['page'] = 1;
-      $params['rp']   = 25;
+      $params['rp']   = 0;
       $groups = CRM_Contact_BAO_Group::getGroupListSelector($params);
 
       echo json_encode($groups);
@@ -50,7 +50,7 @@ class CRM_Group_Page_AJAX {
     }
     else {
       $sortMapper = array(
-        0 => 'groups.title', 1 => 'groups.id', 2 => 'createdBy.sort_name', 3 => '',
+        0 => 'groups.title', 1 => 'count', 2 => 'createdBy.sort_name', 3 => '',
         4 => 'groups.group_type', 5 => 'groups.visibility',
       );
 
@@ -84,7 +84,7 @@ class CRM_Group_Page_AJAX {
 
       $iFilteredTotal = $iTotal = $params['total'];
       $selectorElements = array(
-        'group_name', 'group_id', 'created_by', 'group_description',
+        'group_name', 'count', 'created_by', 'group_description',
         'group_type', 'visibility', 'org_info', 'links', 'class',
       );
 
index bb74bcf460818f5d6556c7502015fd19c0cdd7b6..c0d6ef5ae732047ca4f54549477a59d3f0d5ec06 100644 (file)
@@ -145,6 +145,14 @@ class CRM_Group_Page_Group extends CRM_Core_Page_Basic {
     }
     $this->assign('showOrgInfo', $showOrgInfo);
 
+    // Refresh smart group cache
+    if (!empty($_GET['update_smart_groups'])) {
+      CRM_Contact_BAO_GroupContactCache::loadAll();
+    }
+    else {
+      CRM_Contact_BAO_GroupContactCache::fillIfEmpty();
+    }
+
     $this->search();
   }
 
index e0621be85dc7e9cd123941e975861cb84a38ba31..4fd9df591065d71ddf80d82eeecf5386853d0990 100644 (file)
@@ -214,7 +214,7 @@ class CRM_Mailing_Form_Group extends CRM_Contact_Form_Task {
     $this->addElement('checkbox', 'dedupe_email', ts('Remove duplicate emails?'));
 
     //get the mailing groups.
-    $groups = CRM_Core_PseudoConstant::group('Mailing');
+    $groups = CRM_Core_PseudoConstant::nestedGroup('Mailing');
     if ($hiddenMailingGroup) {
       $groups[$hiddenMailingGroup] =
         CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Group', $hiddenMailingGroup, 'title');
@@ -235,7 +235,7 @@ class CRM_Mailing_Form_Group extends CRM_Contact_Form_Task {
       $this->add('select', 'baseGroup',
         ts('Unsubscription Group'),
         array(
-          '' => ts('- select -')) + $staticGroups,
+          '' => ts('- select -')) + CRM_Contact_BAO_Group::getGroupsHierarchy($staticGroups, NULL, '&nbsp;&nbsp;', TRUE),
         TRUE,
         array('class' => 'crm-select2 huge')
       );
index c7f2ce5a0cfc9723a28a4b868e5218dc6b0f29a1..aecfa53beee6a3717f7741deb3a5c08491503288 100644 (file)
@@ -44,7 +44,7 @@ class CRM_Mailing_MailStore {
    * @throws Exception
    * @return object        mail store implementation for processing CiviMail-bound emails
    */
-  function getStore($name = NULL) {
+  public static function getStore($name = NULL) {
     $dao               = new CRM_Core_DAO_MailSettings;
     $dao->domain_id    = CRM_Core_Config::domainID();
     $name ? $dao->name = $name : $dao->is_default = 1;
index f68cc0f0710bcfaf100499fb9f81591037ac0bb1..d130a77bc98085d199ad2d6a06ad938d9b5345c5 100644 (file)
@@ -89,24 +89,29 @@ class CRM_Member_BAO_MembershipType extends CRM_Member_DAO_MembershipType {
    * function to add the membership types
    *
    * @param array $params reference array contains the values submitted by the form
-   * @param array $ids    reference array contains the id
+   * @param array $ids array contains the id (deprecated)
    *
    * @access public
    * @static
    *
    * @return object
    */
-  static function add(&$params, &$ids) {
-    $params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE);
+  static function add(&$params, $ids = array()) {
+    $id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('membershipType', $ids));
+    if (!$id) {
+      if (!isset($params['is_active'])) {
+        // do we need this?
+        $params['is_active'] = FALSE;
+      }
+      if (!isset($params['domain_id'])) {
+        $params['domain_id'] = CRM_Core_Config::domainID();
+      }
+    }
 
     // action is taken depending upon the mode
     $membershipType = new CRM_Member_DAO_MembershipType();
-
     $membershipType->copyValues($params);
-
-    $membershipType->domain_id = CRM_Core_Config::domainID();
-
-    $membershipType->id = CRM_Utils_Array::value('membershipType', $ids);
+    $membershipType->id = $id;
 
     // $previousID is the old organization id for membership type i.e 'member_of_contact_id'. This is used when an oganization is changed.
     $previousID = NULL;
@@ -118,8 +123,8 @@ class CRM_Member_BAO_MembershipType extends CRM_Member_DAO_MembershipType {
 
     self::createMembershipPriceField($params, $ids, $previousID, $membershipType->id);
     // update all price field value for quick config when membership type is set CRM-11718
-    if (!empty($ids['membershipType'])) {
-      self::updateAllPriceFieldValue($ids['membershipType'], $params);
+    if ($id) {
+      self::updateAllPriceFieldValue($id, $params);
     }
 
     return $membershipType;
index 488e47d722d8380360c93333871189ed296266f8..ddb045de2cdd52135f01e1d3e4d1abd43ccea2c9 100644 (file)
@@ -121,7 +121,7 @@ class CRM_Member_Form_Membership extends CRM_Member_Form {
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
     $this->_contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
     $this->_processors = array();
-    CRM_Core_Resources::singleton()->addSetting(array('ids' => array('contact' => $this->_contactID)));
+    $this->assign('contactID', $this->_contactID);
 
     // check for edit permission
     if (!CRM_Core_Permission::checkActionPermission('CiviMember', $this->_action)) {
@@ -269,18 +269,8 @@ class CRM_Member_Form_Membership extends CRM_Member_Form {
     $this->assign('onlinePendingContributionId', $this->_onlinePendingContributionId);
     $this->_fromEmails = CRM_Core_BAO_Email::getFromEmail();
 
-    // Set title
-    if ($this->_contactID) {
-      $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactID);
-
-      // Check if this is default domain contact CRM-10482
-      if (CRM_Contact_BAO_Contact::checkDomainContact($this->_contactID)) {
-        $displayName .= ' (' . ts('default organization') . ')';
-      }
+    $this->setPageTitle(ts('Membership'));
 
-      // omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
-      CRM_Utils_System::setTitle(ts('Membership for') . ' ' . $displayName);
-    }
     parent::preProcess();
   }
 
index 64a8ae2905ddc101d859b0b12a592ddfe0f1d623..e0de74e80c3a56c54506d530a6e6754d56ba4064 100644 (file)
@@ -197,6 +197,9 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form {
     }
 
     $this->_fromEmails = CRM_Core_BAO_Email::getFromEmail();
+
+    CRM_Utils_System::setTitle(ts('Renew Membership'));
+
     parent::preProcess();
   }
 
@@ -788,14 +791,6 @@ WHERE   id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )';
       CRM_Member_BAO_Membership::recordMembershipContribution(array_merge($formValues, array('membership_id' => $renewMembership->id)));
     }
 
-    if (!empty($formValues['send_receipt'])) {
-      CRM_Core_DAO::setFieldValue('CRM_Member_DAO_MembershipType',
-        $formValues['membership_type_id'][1],
-        'receipt_text_renewal',
-        $formValues['receipt_text_renewal']
-      );
-    }
-
     $receiptSend = FALSE;
     if (!empty($formValues['send_receipt'])) {
       $receiptSend = TRUE;
index 17e0b726e03650c3bc5b5c44dff8136357db3754..4cca8ce15d5ac581b042d85d5b363af5a6d55696 100644 (file)
@@ -53,6 +53,8 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form {
     $session = CRM_Core_Session::singleton();
     $url = CRM_Utils_System::url('civicrm/admin/member/membershipType', 'reset=1');
     $session->pushUserContext($url);
+
+    $this->setPageTitle(ts('Membership Type'));
   }
 
   /**
index 72e7d2b293918bf69919665a9be739a00072427e..e451396b501b13aab127a895840dcf2fa97b2073 100644 (file)
@@ -297,9 +297,6 @@ class CRM_Member_Page_Tab extends CRM_Core_Page {
 
       // check logged in url permission
       CRM_Contact_Page_View::checkUserPermission($this);
-
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
 
     $this->assign('action', $this->_action);
index eec3f9f32160f574a6ffdc5addf4835d9536d21e..79f23507ad671100afaf3d49aa1bee5ae2df0d39 100644 (file)
@@ -83,11 +83,7 @@ class CRM_Note_Form_Note extends CRM_Core_Form {
     if ($this->_id && CRM_Core_BAO_Note::getNotePrivacyHidden($this->_id)) {
       CRM_Core_Error::statusBounce(ts('You do not have access to this note.'));
     }
-
-    // set title to "Note - " + Contact Name
-    $displayName = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_entityId, 'display_name');
-    $pageTitle = 'Note - ' . $displayName;
-    $this->assign('pageTitle', $pageTitle);
+    $this->setPageTitle($this->_parentId ? ts('Comment') : ts('Note'));
   }
 
   /**
index c491621b9a8bf89bd0097d7a23f6bced2db19e1d..83b8f2336e04927417d510ed417e8eaa01bb38f6 100644 (file)
@@ -60,6 +60,8 @@ class CRM_Pledge_Form_Payment extends CRM_Core_Form {
     }
 
     $this->_id = CRM_Utils_Request::retrieve('ppId', 'Positive', $this);
+
+    CRM_Utils_System::setTitle(ts('Edit Scheduled Pledge Payment'));
   }
 
   /**
index a847c6556c2a614eb84db4321a78c6bfd71f5431..bce71ce4d2df00b09e2b8641de8e959d3f17d850 100644 (file)
@@ -105,14 +105,10 @@ class CRM_Pledge_Form_Pledge extends CRM_Core_Form {
         $this->userEmail
       ) = CRM_Contact_BAO_Contact_Location::getEmailDetails($this->_contactID);
       $this->assign('displayName', $this->userDisplayName);
-
-      // set title to "Pledge - "+Contact Name
-      $displayName = $this->userDisplayName;
-      $pageTitle = ts('Pledge by'). ' ' . $displayName;
-      $this->assign('pageTitle', $pageTitle);
-      CRM_Utils_System::setTitle($pageTitle);
     }
 
+    $this->setPageTitle(ts('Pledge'));
+
     //build custom data
     CRM_Custom_Form_CustomData::preProcess($this, NULL, NULL, 1, 'Pledge', $this->_id);
     $this->_values = array();
@@ -247,7 +243,7 @@ class CRM_Pledge_Form_Pledge extends CRM_Core_Form {
     }
 
     if ($this->_context == 'standalone') {
-      $this->addEntityRef('contact_id', ts('Contact'), array('create' => TRUE), TRUE);
+      $this->addEntityRef('contact_id', ts('Contact'), array('create' => TRUE, 'api' => array('extra' => array('email'))), TRUE);
     }
 
     $showAdditionalInfo = FALSE;
index 6d5ab08dc20fcbb688869e69a07b68b32d66e4b4..56e7462e47c7da008fb4979229e4946daf20ac9c 100644 (file)
@@ -53,8 +53,6 @@ class CRM_Pledge_Page_Payment extends CRM_Core_Page {
 
     if ($this->_action & CRM_Core_Action::UPDATE) {
       $this->edit();
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
     else {
       $pledgeId = CRM_Utils_Request::retrieve('pledgeId', 'Positive', $this);
index 15b9f2f8ff6dc1ed8dc60618aa0f66de787c47a5..0aaa6291f5afe696d1628c7b8ad8d85f0f564e81 100644 (file)
@@ -48,6 +48,7 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page {
     $controller->reset();
     $controller->set('cid', $this->_contactId);
     $controller->set('context', 'pledge');
+    $controller->set('limit', '25');
     $controller->process();
     $controller->run();
 
@@ -112,9 +113,6 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page {
 
       // check logged in url permission
       CRM_Contact_Page_View::checkUserPermission($this);
-
-      // set page title
-      CRM_Contact_Page_View::setTitle($this->_contactId);
     }
 
     $this->assign('action', $this->_action);
index 9fd91973a47b986c65c5342274ff6692af4185c1..1c1aaf0327b7697418fdbaa3da893297b7d81032 100644 (file)
@@ -438,7 +438,7 @@ class CRM_Pledge_Selector_Search extends CRM_Core_Selector_Base {
 
       if (!$this->_single) {
         $pre = array(
-          array('desc' => ts('Contact Id')),
+          array('desc' => ts('Contact ID')),
           array(
             'name' => ts('Name'),
             'sort' => 'sort_name',
index 54be353b083f8263f6a200c85396a1d1ac9707c0..e0ec35e89f0e69d64c480275ad02ffb1ea63e037 100644 (file)
@@ -86,9 +86,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
     $this->_sid = CRM_Utils_Request::retrieve('sid', 'Positive', $this, FALSE, NULL, 'REQUEST');
     $this->_fid = CRM_Utils_Request::retrieve('fid', 'Positive', $this, FALSE, NULL, 'REQUEST');
     $url        = CRM_Utils_System::url('civicrm/admin/price/field', "reset=1&action=browse&sid={$this->_sid}");
-    $breadCrumb = array(array('title' => ts('Price Set Fields'),
-        'url' => $url,
-      ));
+    $breadCrumb = array(array('title' => ts('Price Set Fields'), 'url' => $url));
 
     $this->_extendComponentId = array();
     $extendComponentId = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_sid, 'extends', 'id');
@@ -97,6 +95,8 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
     }
 
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
+
+    $this->setPageTitle(ts('Price Field'));
   }
 
   /**
index 084a02d270e5badbcb451eea12e0ae8ed4111733..7c4fc525420bea6ae5ac8ea03bed77042b6ea53e 100644 (file)
@@ -287,7 +287,9 @@ class CRM_Price_Form_Set extends CRM_Core_Form {
       CRM_Core_Session::setStatus(ts('The Set \'%1\' has been saved.', array(1 => $set->title)), ts('Saved'), 'success');
     }
     else {
-      $url = CRM_Utils_System::url('civicrm/admin/price/field', 'reset=1&action=add&sid=' . $set->id);
+      // Jump directly to adding a field if popups are disabled
+      $action = CRM_Core_Resources::singleton()->ajaxPopupsEnabled ? 'browse' : 'add';
+      $url = CRM_Utils_System::url('civicrm/admin/price/field', array('reset' => 1, 'action' => $action, 'sid' => $set->id));
       CRM_Core_Session::setStatus(ts("Your Set '%1' has been added. You can add fields to this set now.",
           array(1 => $set->title)
         ), ts('Saved'), 'success');
index 81e2d1908959951517426e17c8b04b9a5b965e4a..08e34b3f621fb6d9bc713071d1254ac605d11ed7 100644 (file)
@@ -78,8 +78,6 @@ class CRM_Price_Page_Field extends CRM_Core_Page {
    * @access public
    */ function &actionLinks() {
     if (!isset(self::$_actionLinks)) {
-      // helper variable for nicer formatting
-      $deleteExtra = ts('Are you sure you want to delete this price field?');
       self::$_actionLinks = array(
         CRM_Core_Action::UPDATE => array(
           'name' => ts('Edit Price Field'),
@@ -108,7 +106,6 @@ class CRM_Price_Page_Field extends CRM_Core_Page {
           'url' => 'civicrm/admin/price/field',
           'qs' => 'action=delete&reset=1&sid=%%sid%%&fid=%%fid%%',
           'title' => ts('Delete Price'),
-          'extra' => 'onclick = "return confirm(\'' . $deleteExtra . '\');"',
         ),
       );
     }
index a505ec9b22eb6839b07e3d017fa9cd3da199d571..1cdfb5fae8aa42399764ff9f37579182084881e9 100644 (file)
@@ -158,12 +158,8 @@ class CRM_Profile_Page_Listings extends CRM_Core_Page {
 
     foreach ($this->_fields as $name => $field) {
       if ((substr($name, 0, 6) == 'custom') && !empty($field['is_search_range'])) {
-        $from = CRM_Utils_Request::retrieve($name . '_from', 'String',
-          $this, FALSE, NULL, 'REQUEST'
-        );
-        $to = CRM_Utils_Request::retrieve($name . '_to', 'String',
-          $this, FALSE, NULL, 'REQUEST'
-        );
+        $from = CRM_Utils_Request::retrieve($name . '_from', 'String', $this);
+        $to = CRM_Utils_Request::retrieve($name . '_to', 'String', $this);
         $value = array();
         if ($from && $to) {
           $value['from'] = $from;
@@ -248,6 +244,10 @@ class CRM_Profile_Page_Listings extends CRM_Core_Page {
         if (!is_array($value)) {
           $value = trim($value);
         }
+        $operator = CRM_Utils_Request::retrieve($name . '_operator', 'String', $this);
+        if ($operator) {
+          $this->_params[$name . '_operator'] = $operator;
+        }
         $this->_params[$name] = $this->_fields[$name]['value'] = $value;
       }
     }
index 2e3e558a109c9cdcac15f80648b46d2646ae4244..493925d3f0bc5d8784e1331bb9cb43b8514fa25c 100644 (file)
@@ -446,7 +446,7 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR
    *
    * @return int   the total number of rows for this action
    */
-  function &getRows($action, $offset, $rowCount, $sort, $output = NULL) {
+  function &getRows($action, $offset, $rowCount, $sort, $output = NULL, $extraWhereClause = NULL) {
 
     $multipleFields = array('url');
     //$sort object processing for location fields
@@ -479,6 +479,11 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR
     }
 
     $additionalWhereClause = 'contact_a.is_deleted = 0';
+
+    if ($extraWhereClause) {
+      $additionalWhereClause .= " AND {$extraWhereClause}";
+    }
+
     $returnQuery = NULL;
     if ($this->_multiRecordTableName) {
       $returnQuery = TRUE;
index 55b36f3a4b8f312d25a35453238cbe5444b2a85a..ff147eec67fca62d6548b21a0b57428f548ee218 100644 (file)
@@ -54,8 +54,7 @@ class CRM_Report_BAO_ReportInstance extends CRM_Report_DAO_ReportInstance {
       return NULL;
     }
 
-    $config = CRM_Core_Config::singleton();
-    $params['domain_id'] = CRM_Core_Config::domainID();
+    $instanceID = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('instance_id', $params));
 
     // convert roles array to string
     if (isset($params['grouprole']) && is_array($params['grouprole'])) {
@@ -68,13 +67,9 @@ class CRM_Report_BAO_ReportInstance extends CRM_Report_DAO_ReportInstance {
       );
     }
 
-    if (!isset($params['id'])) {
+    if (!$instanceID) {
       $params['is_reserved'] = CRM_Utils_Array::value('is_reserved', $params, FALSE);
-    }
-
-    $instanceID = CRM_Utils_Array::value('id', $params);
-    if (!empty($params['instance_id'])) {
-      $instanceID = CRM_Utils_Array::value('instance_id', $params);
+      $params['domain_id'] = CRM_Utils_Array::value('domain_id', $params, CRM_Core_Config::domainID());
     }
 
     if ($instanceID) {
@@ -87,7 +82,7 @@ class CRM_Report_BAO_ReportInstance extends CRM_Report_DAO_ReportInstance {
     $instance = new CRM_Report_DAO_ReportInstance();
     $instance->copyValues($params);
 
-    if ($config->userFramework == 'Joomla') {
+    if (CRM_Core_Config::singleton()->userFramework == 'Joomla') {
       $instance->permission = 'null';
     }
 
@@ -191,7 +186,7 @@ class CRM_Report_BAO_ReportInstance extends CRM_Report_DAO_ReportInstance {
       if (empty($params['id']) && empty($params['instance_id']) && !empty($navigationParams['id'])) {
         unset($navigationParams['id']);
       }
-      $navigationParams['url'] = "civicrm/report/instance/{$instance->id}&reset=1";
+      $navigationParams['url'] = "civicrm/report/instance/{$instance->id}?reset=1";
       $navigation = CRM_Core_BAO_Navigation::add($navigationParams);
 
       if (!empty($navigationParams['is_active'])) {
@@ -218,6 +213,7 @@ class CRM_Report_BAO_ReportInstance extends CRM_Report_DAO_ReportInstance {
       if (CRM_Utils_Array::value('row_count', $params)) {
         $limitResult = '&rowCount=' . $params['row_count'];
       }
+      $dashletParams['name'] = "report/{$instance->id}";
       $dashletParams['url'] = "civicrm/report/instance/{$instance->id}?reset=1&section={$section}&snippet=5{$chart}&context=dashlet" . $limitResult;
       $dashletParams['fullscreen_url'] = "civicrm/report/instance/{$instance->id}?reset=1&section={$section}&snippet=5{$chart}&context=dashletFullscreen" . $limitResult;
       $dashletParams['instanceURL'] = "civicrm/report/instance/{$instance->id}";
index 85ae9302c7020aa01205edce05890aa26dc9e437..00e2a540247541491056cea63459e1433f03d77f 100644 (file)
@@ -921,13 +921,12 @@ class CRM_Report_Form extends CRM_Core_Form {
               if (count($operations) <= 1) {
                 $element->freeze();
               }
-              $select = $this->addElement('select', "{$fieldName}_value", NULL,
-                        $field['options'], array(
-                          'size' => 4,
-                          'style' => 'min-width:250px',
-                        )
-              );
-              $select->setMultiple(TRUE);
+              $this->addElement('select', "{$fieldName}_value", NULL, $field['options'], array(
+                'style' => 'min-width:250px',
+                'class' => 'crm-select2',
+                'multiple' => TRUE,
+                'placeholder' => ts('- select -'),
+              ));
             }
             break;
 
@@ -1108,13 +1107,13 @@ class CRM_Report_Form extends CRM_Core_Form {
 
     if (CRM_Core_Permission::check('administer Reports') && $this->_add2groupSupported) {
       $this->addElement('select', 'groups', ts('Group'),
-        array('' => ts('- select group -')) + CRM_Core_PseudoConstant::staticGroup()
+        array('' => ts('Add Contacts to Group')) + CRM_Core_PseudoConstant::nestedGroup(),
+        array('class' => 'crm-select2 crm-action-menu action-icon-plus huge')
       );
       $this->assign('group', TRUE);
     }
 
-    $label = ts('Add These Contacts to Group');
-    $this->addElement('submit', $this->_groupButtonName, $label, array('onclick' => 'return checkGroup();'));
+    $this->addElement('submit', $this->_groupButtonName, '', array('style' => 'display: none;'));
 
     $this->addChartOptions();
     $this->addButtons(array(
@@ -1283,7 +1282,7 @@ class CRM_Report_Form extends CRM_Core_Form {
         'title' => ts('Group'),
         'operatorType' => CRM_Report_Form::OP_MULTISELECT,
         'group' => TRUE,
-        'options' => CRM_Core_PseudoConstant::group(),
+        'options' => CRM_Core_PseudoConstant::nestedGroup(),
       ),
     );
     if (empty($this->_columns['civicrm_group']['dao'])) {
@@ -3484,18 +3483,18 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a
           array('title' => ts('Postal Code Suffix'),
             'default' => CRM_Utils_Array::value('postal_code_suffix', $defaults, FALSE),
           ),
-          'county_id' =>
-          array('title' => ts('County'),
-            'default' => CRM_Utils_Array::value('county_id', $defaults, FALSE),
-          ),
+          'country_id' =>
+            array('title' => ts('Country'),
+              'default' => CRM_Utils_Array::value('country_id', $defaults, FALSE),
+            ),
           'state_province_id' =>
           array('title' => ts('State/Province'),
             'default' => CRM_Utils_Array::value('state_province_id', $defaults, FALSE),
           ),
-          'country_id' =>
-          array('title' => ts('Country'),
-            'default' => CRM_Utils_Array::value('country_id', $defaults, FALSE),
-          ),
+          'county_id' =>
+            array('title' => ts('County'),
+              'default' => CRM_Utils_Array::value('county_id', $defaults, FALSE),
+            ),
         ),
         'grouping' => 'location-fields',
       ),
@@ -3519,32 +3518,32 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a
                 'operator' => 'like',
                 'name' => 'city',
         ),
-        'county_id' => array(
-          'name' => 'county_id',
-          'title' => ts('County'),
+        'country_id' => array(
+          'name' => 'country_id',
+          'title' => ts('Country'),
           'type' => CRM_Utils_Type::T_INT,
           'operatorType' =>
-          CRM_Report_Form::OP_MULTISELECT,
+            CRM_Report_Form::OP_MULTISELECT,
           'options' =>
-          CRM_Core_PseudoConstant::county(),
+            CRM_Core_PseudoConstant::country(),
         ),
         'state_province_id' => array(
           'name' => 'state_province_id',
           'title' => ts('State/Province'),
           'type' => CRM_Utils_Type::T_INT,
           'operatorType' =>
-          CRM_Report_Form::OP_MULTISELECT,
+            CRM_Report_Form::OP_MULTISELECT,
           'options' =>
-          CRM_Core_PseudoConstant::stateProvince(),
+            CRM_Core_PseudoConstant::stateProvince(),
         ),
-        'country_id' => array(
-          'name' => 'country_id',
-          'title' => ts('Country'),
+        'county_id' => array(
+          'name' => 'county_id',
+          'title' => ts('County'),
           'type' => CRM_Utils_Type::T_INT,
           'operatorType' =>
           CRM_Report_Form::OP_MULTISELECT,
           'options' =>
-          CRM_Core_PseudoConstant::country(),
+          CRM_Core_PseudoConstant::county(),
         ),
       );
     }
index a24a64451448c5e5b0710d253a55cfed9705600f..15da828f56b7f8ff7bd5f964b7be0238e3b54cbf 100644 (file)
@@ -189,24 +189,9 @@ class CRM_Report_Form_Case_Demographics extends CRM_Report_Form {
           ),
         ),
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_Group',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     );
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
 
     $open_case_val = CRM_Core_OptionGroup::getValue('activity_type', 'Open Case', 'name');
index c36a1c58c878d63f1e66d21d44a6c6537e232dc0..87917f3b13adc6d159b8183a0bdeab0c840cc530 100644 (file)
@@ -356,22 +356,6 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form {
           ),
         'grouping' => 'activity-fields',
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_Group',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
       'civicrm_phone' =>
       array(
         'dao' => 'CRM_Core_DAO_Phone',
@@ -386,7 +370,7 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form {
         'grouping' => 'contact-fields',
       ),
     );
-
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     parent::__construct();
   }
index e915ee403613fbc4f2a6ada1d5cdee5ee5cbf735..1eaa69214543420a43dc3c35fee8dd1b9fd495f2 100644 (file)
@@ -287,24 +287,9 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form {
         ),
         'grouping' => 'contact-fields',
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_Group',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     );
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     parent::__construct();
   }
index e8bc442e93e861eb5b386d697c1aa5e8ed186efc..44d2611616904ffdfe59e12efedad6bb328dd977 100644 (file)
@@ -196,24 +196,9 @@ class CRM_Report_Form_Contact_Summary extends CRM_Report_Form {
         ),
         'grouping' => 'contact-fields',
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_Group',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     );
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     parent::__construct();
   }
index 4070d5b3d73d8d3d119cf05f4f7b725381d3dc8c..d1e7961e0a987c2562c1fedb1ced2a575c3cdb0d 100644 (file)
@@ -278,24 +278,9 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form {
           array('title' => ts('Amount')),
         ),
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_Group',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     );
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     parent::__construct();
   }
index 0d9d2bae802cf93c93632773b8a3c3873c5122fc..6042bda56899e4f60810f65af06fe6eaaf5c09f1 100644 (file)
@@ -266,23 +266,6 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form {
           ),
         ),
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_GroupContact',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-            'type' => CRM_Utils_Type::T_INT,
-          ),
-        ),
-      ),
       'civicrm_contribution_ordinality' =>
       array(
         'dao' => 'CRM_Contribute_DAO_Contribution',
@@ -324,6 +307,7 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form {
       ),
     ) + $this->addAddressFields(FALSE);
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
 
     // Don't show Batch display column and filter unless batches are being used
index 9dc0b0ce8cd6c2f53f5cd31773b15b746ed8c4fb..37a0e4e63e8db2158b8aa6610c13421de5a29812 100644 (file)
@@ -231,23 +231,6 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
           ),
         ),
       ),
-    ) + array(
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_GroupContact',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     );
 
     $this->_columns['civicrm_contribution']['fields']['civicrm_upto_' . $this->_yearStatisticsFrom] = array('title' => ts('Up To %1 Donation', array(1 => $this->_yearStatisticsFrom)),
@@ -272,6 +255,7 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
       'is_statistics' => TRUE,
     );
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     parent::__construct();
   }
index ccd06d2b2dcddcb101572416d81e901a8160c5b1..874deb19f216e747aed3f5ee84bb5cb3b32b5dae 100644 (file)
@@ -180,22 +180,6 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
           ),
         ),
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_GroupContact',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     );
 
     // If we have a campaign, build out the relevant elements
@@ -210,6 +194,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
       );
     }
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     parent::__construct();
   }
index 35bec198ba4fef2d252ff159c92d56403a4c0d52..ab2b2b7d912517ffb170efa8385262dde64934e1 100644 (file)
@@ -243,24 +243,9 @@ contribution_civireport2.total_amount_sum as contribution2_total_amount_sum',
         ),
         'group_bys' => array('contribution_source' => NULL),
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_GroupContact',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     );
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
 
     parent::__construct();
index e2982572ca6063b06145df0912451bcd2e2ed214..afff9e4154acfc0ba547bf55a4fd5de3ef2607dc 100644 (file)
@@ -241,22 +241,6 @@ class CRM_Report_Form_Contribute_SoftCredit extends CRM_Report_Form {
         ),
         'grouping' => 'softcredit-fields',
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_GroupContact',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Soft Credit Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     );
 
     // If we have a campaign, build out the relevant elements
@@ -271,6 +255,7 @@ class CRM_Report_Form_Contribute_SoftCredit extends CRM_Report_Form {
       );
     }
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
 
     $this->_currencyColumn = 'civicrm_contribution_currency';
index f0412b4e2db2b39fcced988fb50cb4893a963834..ef4023d85a6a7fdd1937e18aa7d1bcc46ed03653 100644 (file)
@@ -264,27 +264,9 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form {
           ),
         ),
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_GroupContact',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-            'type' => CRM_Utils_Type::T_INT,
-          ),
-        ),
-      ),
     ) + $this->addAddressFields();
 
     // If we have a campaign, build out the relevant elements
-    $this->_tagFilter = TRUE;
     if ($campaignEnabled && !empty($this->activeCampaigns)) {
       $this->_columns['civicrm_contribution']['fields']['campaign_id'] = array(
         'title' => 'Campaign',
@@ -297,6 +279,8 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form {
       $this->_columns['civicrm_contribution']['group_bys']['campaign_id'] = array('title' => ts('Campaign'));
     }
 
+    $this->_tagFilter = TRUE;
+    $this->_groupFilter = TRUE;
     $this->_currencyColumn = 'civicrm_contribution_currency';
     parent::__construct();
   }
index 928aee0d3277b5430cf9128678c2d576ef1fc8a1..fcb778f592f6fc8cb19187ab5469d85b13f84f91 100644 (file)
@@ -176,22 +176,6 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
           ),
         ),
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_GroupContact',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     );
 
     // If we have a campaign, build out the relevant elements
@@ -206,6 +190,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
       );
     }
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     parent::__construct();
   }
index 8ac82085469035ba71df8f53ca02b27f7a940b22..25297045f1ac476566f6e312972481bde8ec3757 100644 (file)
@@ -166,24 +166,9 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form {
         ),
         'grouping' => 'phone-fields',
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_GroupContact',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     );
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     $this->_currencyColumn = 'civicrm_contribution_currency';
     parent::__construct();
index 0f6323c053d6fd7eb41c3fa656541440d250a291..b22e4d8726feaf9c5cd681e231108588f067b73f 100644 (file)
@@ -187,7 +187,6 @@ class CRM_Report_Form_Event_Income extends CRM_Report_Form_Event {
         $roleRows[$roleDAO->event_id][$participantRole[$roleId]]['total'] += $roleDAO->participant;
         $roleRows[$roleDAO->event_id][$participantRole[$roleId]]['amount'] += $roleDAO->amount;
       }
-      $roleRows[$roleDAO->event_id][$participantRole[$roleId]]['amount'] = CRM_Utils_Money::format($roleRows[$roleDAO->event_id][$participantRole[$roleId]]['amount'], $currency[$roleDAO->event_id]);
     }
 
     foreach ($roleRows as $eventId => $roleInfo) {
@@ -195,6 +194,9 @@ class CRM_Report_Form_Event_Income extends CRM_Report_Form_Event {
         if (isset($roleInfo[$roleName])) {
           $roleRows[$eventId][$roleName]['round'] = round(($roleRows[$eventId][$roleName]['total'] / $count[$eventId]) * 100, 2);
         }
+        if (!empty($roleRows[$eventId][$roleName])) {
+          $roleRows[$eventId][$roleName]['amount'] = CRM_Utils_Money::format($roleRows[$eventId][$roleName]['amount'], $currency[$eventId]);
+        }
       }
     }
 
index eb1840c446ba8519dc36d6dc25220aaa2b242fa6..554a742671a0c5993eb8ee072f4ebcbc0282c130 100644 (file)
@@ -459,7 +459,8 @@ GROUP BY  cv.label
       }
     }
     //add blank column at the end
-    if ($blankcols = CRM_Utils_Array::value('blank_column_end', $this->_params)) {
+    $blankcols = CRM_Utils_Array::value('blank_column_end', $this->_params);
+    if ($blankcols) {
       for ($i = 1; $i <= $blankcols; $i++) {
         $select[] = " '' as blankColumnEnd_{$i}";
         $this->_columnHeaders["blank_{$i}"]['title'] = "_ _ _ _";
@@ -601,6 +602,26 @@ GROUP BY  cv.label
     $this->endPostProcess($rows);
   }
 
+  /**
+   * @param $rows
+   * @param $entryFound
+   * @param $row
+   * @param $rowId
+   * @param $rowNum
+   * @param $types
+   */
+  private function _initBasicRow(&$rows, &$entryFound, $row, $rowId, $rowNum, $types){
+    if (!array_key_exists($rowId, $row)) {
+      return FALSE;
+    }
+
+    $value = $row[$rowId];
+    if ($value) {
+      $rows[$rowNum][$rowId] = $types[$value];
+    }
+    $entryFound = TRUE;
+  }
+
   /**
    * @param $rows
    */
@@ -619,11 +640,12 @@ GROUP BY  cv.label
       // make count columns point to detail report
       // convert display name to links
       if (array_key_exists('civicrm_participant_event_id', $row)) {
-        if ($value = $row['civicrm_participant_event_id']) {
-          $rows[$rowNum]['civicrm_participant_event_id'] = CRM_Event_PseudoConstant::event($value, FALSE);
+        $eventId = $row['civicrm_participant_event_id'];
+        if ($eventId) {
+          $rows[$rowNum]['civicrm_participant_event_id'] = CRM_Event_PseudoConstant::event($eventId, FALSE);
 
           $url = CRM_Report_Utils_Report::getNextUrl('event/income',
-                 'reset=1&force=1&id_op=in&id_value=' . $value,
+                 'reset=1&force=1&id_op=in&id_value=' . $eventId,
                  $this->_absoluteUrl, $this->_id, $this->_drilldownReport
           );
           $rows[$rowNum]['civicrm_participant_event_id_link'] = $url;
@@ -633,48 +655,47 @@ GROUP BY  cv.label
       }
 
       // handle event type id
-      if (array_key_exists('civicrm_event_event_type_id', $row)) {
-        if ($value = $row['civicrm_event_event_type_id']) {
-          $rows[$rowNum]['civicrm_event_event_type_id'] = $eventType[$value];
-        }
-        $entryFound = TRUE;
-      }
+      $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_event_event_type_id', $rowNum, $eventType);
 
       // handle participant status id
       if (array_key_exists('civicrm_participant_status_id', $row)) {
-        if ($value = $row['civicrm_participant_status_id']) {
-          $rows[$rowNum]['civicrm_participant_status_id'] = CRM_Event_PseudoConstant::participantStatus($value, FALSE, 'label');
+        $statusId = $row['civicrm_participant_status_id'];
+        if ($statusId) {
+          $rows[$rowNum]['civicrm_participant_status_id'] = CRM_Event_PseudoConstant::participantStatus($statusId, FALSE, 'label');
         }
         $entryFound = TRUE;
       }
 
       // handle participant role id
       if (array_key_exists('civicrm_participant_role_id', $row)) {
-        if ($value = $row['civicrm_participant_role_id']) {
-          $roles = explode(CRM_Core_DAO::VALUE_SEPARATOR, $value);
-          $value = array();
+        $roleId = $row['civicrm_participant_role_id'];
+        if ($roleId) {
+          $roles = explode(CRM_Core_DAO::VALUE_SEPARATOR, $roleId);
+          $roleId = array();
           foreach ($roles as $role) {
-            $value[$role] = CRM_Event_PseudoConstant::participantRole($role, FALSE);
+            $roleId[$role] = CRM_Event_PseudoConstant::participantRole($role, FALSE);
           }
-          $rows[$rowNum]['civicrm_participant_role_id'] = implode(', ', $value);
+          $rows[$rowNum]['civicrm_participant_role_id'] = implode(', ', $roleId);
         }
         $entryFound = TRUE;
       }
 
       // Handel value seperator in Fee Level
       if (array_key_exists('civicrm_participant_participant_fee_level', $row)) {
-        if ($value = $row['civicrm_participant_participant_fee_level']) {
-          CRM_Event_BAO_Participant::fixEventLevel($value);
-          $rows[$rowNum]['civicrm_participant_participant_fee_level'] = $value;
+        $feeLevel = $row['civicrm_participant_participant_fee_level'];
+        if ($feeLevel) {
+          CRM_Event_BAO_Participant::fixEventLevel($feeLevel);
+          $rows[$rowNum]['civicrm_participant_participant_fee_level'] = $feeLevel;
         }
         $entryFound = TRUE;
       }
 
       // Convert display name to link
-      if (($displayName = CRM_Utils_Array::value('civicrm_contact_sort_name_linked', $row)) &&
-        ($cid = CRM_Utils_Array::value('civicrm_contact_id', $row)) &&
-        ($id = CRM_Utils_Array::value('civicrm_participant_participant_record', $row))
-      ) {
+      $displayName = CRM_Utils_Array::value('civicrm_contact_sort_name_linked', $row);
+      $cid = CRM_Utils_Array::value('civicrm_contact_id', $row);
+      $id = CRM_Utils_Array::value('civicrm_participant_participant_record', $row);
+
+      if ($displayName && $cid && $id) {
         $url = CRM_Report_Utils_Report::getNextUrl('contact/detail',
                "reset=1&force=1&id_op=eq&id_value=$cid",
                $this->_absoluteUrl, $this->_id, $this->_drilldownReport
@@ -696,26 +717,29 @@ GROUP BY  cv.label
 
       // Handle country id
       if (array_key_exists('civicrm_address_country_id', $row)) {
-        if ($value = $row['civicrm_address_country_id']) {
-          $rows[$rowNum]['civicrm_address_country_id'] = CRM_Core_PseudoConstant::country($value, TRUE);
+        $countryId = $row['civicrm_address_country_id'];
+        if ($countryId) {
+          $rows[$rowNum]['civicrm_address_country_id'] = CRM_Core_PseudoConstant::country($countryId, TRUE);
         }
         $entryFound = TRUE;
-      }
+       }
 
       // Handle state/province id
       if (array_key_exists('civicrm_address_state_province_id', $row)) {
-        if ($value = $row['civicrm_address_state_province_id']) {
-          $rows[$rowNum]['civicrm_address_state_province_id'] = CRM_Core_PseudoConstant::stateProvince($value, TRUE);
+        $provinceId = $row['civicrm_address_state_province_id'];
+        if ($provinceId) {
+          $rows[$rowNum]['civicrm_address_state_province_id'] = CRM_Core_PseudoConstant::stateProvince($provinceId, TRUE);
         }
         $entryFound = TRUE;
       }
 
       // Handle employer id
       if (array_key_exists('civicrm_contact_employer_id', $row)) {
-        if ($value = $row['civicrm_contact_employer_id']) {
-          $rows[$rowNum]['civicrm_contact_employer_id'] = CRM_Contact_BAO_Contact::displayName($value);
+       $employerId = $row['civicrm_contact_employer_id'];
+        if ($employerId) {
+          $rows[$rowNum]['civicrm_contact_employer_id'] = CRM_Contact_BAO_Contact::displayName($employerId);
           $url = CRM_Utils_System::url('civicrm/contact/view',
-                 'reset=1&cid=' . $value, $this->_absoluteUrl
+                 'reset=1&cid=' . $employerId, $this->_absoluteUrl
           );
           $rows[$rowNum]['civicrm_contact_employer_id_link'] = $url;
           $rows[$rowNum]['civicrm_contact_employer_id_hover'] = ts('View Contact Summary for this Contact.');
@@ -723,48 +747,25 @@ GROUP BY  cv.label
       }
 
       // Convert campaign_id to campaign title
-      if (array_key_exists('civicrm_participant_campaign_id', $row)) {
-        if ($value = $row['civicrm_participant_campaign_id']) {
-          $rows[$rowNum]['civicrm_participant_campaign_id'] = $this->activeCampaigns[$value];
-          $entryFound = TRUE;
-        }
-      }
+      $this->_initBasicRow($rows, $entryFound, 'civicrm_participant_campaign_id', $this->activeCampaigns, $row, $rowNum);
 
       // handle contribution status
-      if (array_key_exists('civicrm_contribution_contribution_status_id', $row)) {
-        if ($value = $row['civicrm_contribution_contribution_status_id']) {
-          $rows[$rowNum]['civicrm_contribution_contribution_status_id'] = $contributionStatus[$value];
-        }
-        $entryFound = TRUE;
-      }
+      $this->_initBasicRow($rows, $entryFound, 'civicrm_contribution_contribution_status_id', $contributionStatus, $row, $rowNum);
 
       // handle payment instrument
-      if (array_key_exists('civicrm_contribution_payment_instrument_id', $row)) {
-        if ($value = $row['civicrm_contribution_payment_instrument_id']) {
-          $rows[$rowNum]['civicrm_contribution_payment_instrument_id'] = $paymentInstruments[$value];
-        }
-        $entryFound = TRUE;
-      }
+      $this->_initBasicRow($rows, $entryFound, 'civicrm_contribution_payment_instrument_id', $paymentInstruments, $row, $rowNum);
 
       // handle financial type
-      if (array_key_exists('civicrm_contribution_financial_type_id', $row)) {
-        if ($value = $row['civicrm_contribution_financial_type_id']) {
-          $rows[$rowNum]['civicrm_contribution_financial_type_id'] = $financialTypes[$value];
-        }
-        $entryFound = TRUE;
-      }
+      $this->_initBasicRow($rows, $entryFound, 'civicrm_contribution_financial_type_id', $financialTypes, $row, $rowNum);
 
-      if (array_key_exists('civicrm_contact_gender_id', $row)) {
-        if ($value = $row['civicrm_contact_gender_id']) {
-          $rows[$rowNum]['civicrm_contact_gender_id'] = $genders[$value];
-        }
-        $entryFound = TRUE;
-      }
+      // handle gender id
+      $this->_initBasicRow($rows, $entryFound, 'civicrm_contact_gender_id', $genders, $row, $rowNum);
 
       // display birthday in the configured custom format
       if (array_key_exists('civicrm_contact_birth_date', $row)) {
-        if ($value = $row['civicrm_contact_birth_date']) {
-          $rows[$rowNum]['civicrm_contact_birth_date'] = CRM_Utils_Date::customFormat($row['civicrm_contact_birth_date'], '%Y%m%d');
+        $birthDate = $row['civicrm_contact_birth_date'];
+        if ($birthDate) {
+          $rows[$rowNum]['civicrm_contact_birth_date'] = CRM_Utils_Date::customFormat($birthDate, '%Y%m%d');
         }
         $entryFound = TRUE;
       }
index 830606b70a9ed1a2d056e67f429737caad4c41ae..47d9603f9c0bd1118afcea2356449205fdb09b90 100644 (file)
@@ -197,20 +197,7 @@ class CRM_Report_Form_Mailing_Bounce extends CRM_Report_Form {
       'grouping' => 'contact-fields',
     );
 
-    $this->_columns['civicrm_group'] = array(
-      'dao' => 'CRM_Contact_DAO_Group',
-      'alias' => 'cgroup',
-      'filters' => array(
-        'gid' => array(
-          'name' => 'group_id',
-          'title' => ts('Group'),
-          'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-          'group' => TRUE,
-          'options' => CRM_Core_PseudoConstant::group(),
-        ),
-      ),
-    );
-
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     parent::__construct();
   }
index 1c8e2c95779e1ebdd0f97c029d2069dc350fce67..9fdda34531b7fb63b5e480ec8ef74090984c7fb8 100644 (file)
@@ -160,20 +160,7 @@ class CRM_Report_Form_Mailing_Clicks extends CRM_Report_Form {
       'grouping' => 'mailing-fields',
     );
 
-    $this->_columns['civicrm_group'] = array(
-      'dao' => 'CRM_Contact_DAO_Group',
-      'alias' => 'cgroup',
-      'filters' => array(
-        'gid' => array(
-          'name' => 'group_id',
-          'title' => ts('Group'),
-          'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-          'group' => TRUE,
-          'options' => CRM_Core_PseudoConstant::group(),
-        ),
-      ),
-    );
-
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     parent::__construct();
   }
index 735f23aebd41caf782f86f6620b721734d9c571f..8a182c971e36360b9e2f689f5eea6f9f2eb922ec 100644 (file)
@@ -263,21 +263,8 @@ class CRM_Report_Form_Mailing_Detail extends CRM_Report_Form {
       'grouping' => 'contact-fields',
     );
 
-    $this->_columns['civicrm_group'] = array(
-      'dao' => 'CRM_Contact_DAO_Group',
-      'alias' => 'cgroup',
-      'filters' =>
-      array(
-        'gid' =>
-        array(
-          'name' => 'group_id',
-          'title' => ts('Group'),
-          'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-          'group' => TRUE,
-          'options' => CRM_Core_PseudoConstant::group(),
-        ),
-      ),
-    );
+    $this->_groupFilter = TRUE;
+    $this->_tagFilter = TRUE;
 
     parent::__construct();
   }
index f5286a0c5a4f968996ebd409a9a66d01a87223c0..4a7b94df8190880db80bd3a0f52abdc56f636f2c 100644 (file)
@@ -151,20 +151,7 @@ class CRM_Report_Form_Mailing_Opened extends CRM_Report_Form {
       'grouping' => 'contact-fields',
     );
 
-    $this->_columns['civicrm_group'] = array(
-      'dao' => 'CRM_Contact_DAO_Group',
-      'alias' => 'cgroup',
-      'filters' => array(
-        'gid' => array(
-          'name' => 'group_id',
-          'title' => ts('Group'),
-          'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-          'group' => TRUE,
-          'options' => CRM_Core_PseudoConstant::group(),
-        ),
-      ),
-    );
-
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     parent::__construct();
   }
index eb132f89269ee3e895ef22f62dd6839cde4a86b0..98b128af6c6ca155273650340b4ec1ab73ce6726 100644 (file)
@@ -258,22 +258,6 @@ class CRM_Report_Form_Member_ContributionDetail extends CRM_Report_Form {
           ),
         ),
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_GroupContact',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
       'civicrm_contribution_ordinality' =>
       array(
         'dao' => 'CRM_Contribute_DAO_Contribution',
@@ -381,6 +365,7 @@ class CRM_Report_Form_Member_ContributionDetail extends CRM_Report_Form {
       ),
     ) + $this->addAddressFields(FALSE);
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
 
     // Don't show Batch display column and filter unless batches are being used
index b7ea5c05926e197d57328df066060039dbf9e379..e1ee639de19e48591065c38882586f1bfcc10046 100644 (file)
@@ -355,15 +355,10 @@ class CRM_Report_Form_Member_Detail extends CRM_Report_Form {
     //used when contribution field is selected
     if ($this->_contribField) {
       $this->_from .= "
-              LEFT JOIN (
-                  SELECT cc.*, cmp.membership_id as membership_id
-                  FROM civicrm_membership_payment cmp
-                    JOIN civicrm_contribution cc
-                      ON cc.id = cmp.contribution_id
-                  ORDER BY cc.receive_date DESC
-                  ) {$this->_aliases['civicrm_contribution']}
-                ON {$this->_aliases['civicrm_membership']}.id =
-                  {$this->_aliases['civicrm_contribution']}.membership_id\n";
+             LEFT JOIN civicrm_membership_payment cmp
+                 ON {$this->_aliases['civicrm_membership']}.id = cmp.membership_id
+             LEFT JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']}
+                 ON cmp.contribution_id={$this->_aliases['civicrm_contribution']}.id\n";
     }
   }
 
index 1b4a8067a6c19d1ec3e80e8e8b6448d216c364dd..3c6cc56b7fb123d33615e662d8ef38764a9ee7b1 100644 (file)
@@ -194,22 +194,6 @@ class CRM_Report_Form_Member_Lapse extends CRM_Report_Form {
         array('email' => NULL),
         'grouping' => 'contact-fields',
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_GroupContact',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts('Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     );
 
     // If we have a campaign, build out the relevant elements
@@ -224,6 +208,7 @@ class CRM_Report_Form_Member_Lapse extends CRM_Report_Form {
       );
     }
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     parent::__construct();
   }
index cae2305b56921475e668abf8768fa6d52e2c8284..60216bd389207889c7796ec528630bcc5e1d3318 100644 (file)
@@ -195,22 +195,6 @@ class CRM_Report_Form_Pledge_Detail extends CRM_Report_Form {
 
         ),
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_Group',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts(' Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      )
     )
     + $this->getAddressColumns(array('group_by' => FALSE))
     + $this->getPhoneColumns();
@@ -229,6 +213,7 @@ class CRM_Report_Form_Pledge_Detail extends CRM_Report_Form {
 
     }
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     $this->_currencyColumn = 'civicrm_pledge_currency';
     parent::__construct();
index d0782a70492db61ea51a5859ec02b59add46179d..35fcc785cf25804e11414318e6d64c9382ca306f 100644 (file)
@@ -190,24 +190,9 @@ class CRM_Report_Form_Pledge_Summary extends CRM_Report_Form {
             ),
         ),
       ),
-      'civicrm_group' =>
-      array(
-        'dao' => 'CRM_Contact_DAO_Group',
-        'alias' => 'cgroup',
-        'filters' =>
-        array(
-          'gid' =>
-          array(
-            'name' => 'group_id',
-            'title' => ts(' Group'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'group' => TRUE,
-            'options' => CRM_Core_PseudoConstant::group(),
-          ),
-        ),
-      ),
     ) + $this->addAddressFields();
 
+    $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
     $this->_currencyColumn = 'civicrm_pledge_currency';
     parent::__construct();
index 6270e4fe31e05b82a88214e623b746d06becdd00..ca4ac6d06cb6afaf20ca3ee923e3f6fffc5c2e1c 100644 (file)
@@ -121,7 +121,7 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
     );
 
     //get the mailing groups.
-    $groups = CRM_Core_PseudoConstant::group('Mailing');
+    $groups = CRM_Core_PseudoConstant::nestedGroup('Mailing');
 
     //get the sms mailing list
     $mailings = CRM_Mailing_PseudoConstant::completed('sms');
index b6dd2230cac6b93ea3af957f62f6af37cba9f52f..753039b1593da4b5d6a96a5ffc66917c3f68fd73 100644 (file)
@@ -43,7 +43,7 @@ class CRM_SMS_Form_Provider extends CRM_Core_Form {
 
     $this->_id = $this->get('id');
 
-    CRM_Utils_System::setTitle(ts('Manage - SMS Providers'));
+    $this->setPageTitle(ts('SMS Provider'));
 
     if ($this->_id) {
       $refreshURL = CRM_Utils_System::url('civicrm/admin/sms/provider',
@@ -70,42 +70,29 @@ class CRM_SMS_Form_Provider extends CRM_Core_Form {
   public function buildQuickForm() {
     parent::buildQuickForm();
 
+    $this->addButtons(array(
+        array(
+          'type' => 'next',
+          'name' => $this->_action & CRM_Core_Action::DELETE ? ts('Delete') : ts('Save'),
+          'isDefault' => TRUE,
+        ),
+        array(
+          'type' => 'cancel',
+          'name' => ts('Cancel'),
+        ),
+      )
+    );
+
     if ($this->_action & CRM_Core_Action::DELETE) {
-      $this->addButtons(array(
-          array(
-            'type' => 'next',
-            'name' => ts('Delete'),
-            'isDefault' => TRUE,
-          ),
-          array(
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ),
-        )
-      );
       return;
     }
-    else {
-      $this->addButtons(array(
-          array(
-            'type' => 'next',
-            'name' => ts('Save'),
-            'isDefault' => TRUE,
-          ),
-          array(
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ),
-        )
-      );
-    }
 
     $attributes = CRM_Core_DAO::getAttribute('CRM_SMS_DAO_Provider');
 
     $providerNames = CRM_Core_OptionGroup::values('sms_provider_name', FALSE, FALSE, FALSE, NULL, 'label');
     $apiTypes = CRM_Core_OptionGroup::values('sms_api_type', FALSE, FALSE, FALSE, NULL, 'label');
 
-    $this->add('select', 'name', ts('Name'), array('' => '- select -') + $providerNames, TRUE, array('onchange' => "reload(true)"));
+    $this->add('select', 'name', ts('Name'), array('' => '- select -') + $providerNames, TRUE);
 
     $this->add('text', 'title', ts('Title'),
       $attributes['title'], TRUE
index 61a2360faab121b174ef695cfb7e8042d69e9584..97a936c763ff711f29f985e3f2220decdbd090d2 100644 (file)
@@ -106,7 +106,8 @@ class CRM_UF_Form_Field extends CRM_Core_Form {
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
     if ($this->_gid) {
       $this->_title = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $this->_gid, 'title');
-      CRM_Utils_System::setTitle($this->_title . ' - ' . ts('CiviCRM Profile Fields'));
+
+      $this->setPageTitle(ts('Profile Field'));
 
       $url = CRM_Utils_System::url('civicrm/admin/uf/group/field',
         "reset=1&action=browse&gid={$this->_gid}"
index ed56a0c26ae67d44603017986df94f8ea81c57a1..d30758b3440aa52b53fac95901d3ab88cd1e4e87 100644 (file)
@@ -368,7 +368,9 @@ class CRM_UF_Form_Group extends CRM_Core_Form {
         CRM_Core_Session::setStatus(ts("Your CiviCRM Profile '%1' has been saved.", array(1 => $ufGroup->title)), ts('Profile Saved'), 'success');
       }
       else {
-        $url = CRM_Utils_System::url('civicrm/admin/uf/group/field/add', 'reset=1&action=add&gid=' . $ufGroup->id);
+        // Jump directly to adding a field if popups are disabled
+        $action = CRM_Core_Resources::singleton()->ajaxPopupsEnabled ? '' : '/add';
+        $url = CRM_Utils_System::url("civicrm/admin/uf/group/field$action", 'reset=1&gid=' . $ufGroup->id . '&action=' . ($action ? 'add' : 'browse'));
         CRM_Core_Session::setStatus(ts('Your CiviCRM Profile \'%1\' has been added. You can add fields to this profile now.',
             array(1 => $ufGroup->title)
           ), ts('Profile Added'), 'success');
index 80c53decdf91765c21544cfb454881ec48ef5af8..7b97164c1fd66593db3f5b92188b5b5e136e77e7 100644 (file)
@@ -47,7 +47,7 @@ Duplicate Matching Rules for your site.{/ts}</p>
      </tr>
      <tr>
       <td {$labelStyle}>
-       {ts}Organization Contact Id{/ts}
+       {ts}Organization Contact ID{/ts}
       </td>
       <td {$valueStyle}>
        {$onBehalfID}
index 16cb47dfe86201bd33c9aa3dc5a481ffa445dafb..41af7bc178108915b5497a74457d3b29b4d9a586 100644 (file)
@@ -4,7 +4,7 @@ Duplicate Matching Rules for your site.{/ts}
 
 {ts}Organization Name{/ts}: {$onBehalfName}
 {ts}Organization Email{/ts}: {$onBehalfEmail}
-{ts}Organization Contact Id{/ts}: {$onBehalfID}
+{ts}Organization Contact ID{/ts}: {$onBehalfID}
 
 {ts}If you think this may be a duplicate contact which should be merged with an existing record -
 Go to "CiviCRM >> Administer CiviCRM >> Find and Merge Duplicate Contacts". Use the strict
index f94304adf9abc35975d83c07ce89f25c2d819e95..8851ca61abd0d2853a61b3a36935a4a0d25d17a8 100644 (file)
@@ -47,7 +47,7 @@ Duplicate Matching Rules for your site.{/ts}</p>
      </tr>
      <tr>
       <td {$labelStyle}>
-       {ts}Organization Contact Id{/ts}
+       {ts}Organization Contact ID{/ts}
       </td>
       <td {$valueStyle}>
        {$onBehalfID}
index 774863dcedf8d7ac8b287aa6f9fcc77a80b72aab..c5ac3109c4ffd355059850e8f15486e8762f9329 100644 (file)
@@ -47,7 +47,7 @@ Duplicate Matching Rules for your site.{/ts}</p>
      </tr>
      <tr>
       <td {$labelStyle}>
-       {ts}Organization Contact Id{/ts}
+       {ts}Organization Contact ID{/ts}
       </td>
       <td {$valueStyle}>
        {$onBehalfID}
index f1784809078f08136078eb532a022446e915ef53..217c0536a1610606287e204e1d85b1811037b72b 100644 (file)
@@ -4,7 +4,7 @@ Duplicate Matching Rules for your site.{/ts}
 
 {ts}Organization Name{/ts}: {$onBehalfName}
 {ts}Organization Email{/ts}: {$onBehalfEmail}
-{ts}Organization Contact Id{/ts}: {$onBehalfID}
+{ts}Organization Contact ID{/ts}: {$onBehalfID}
 
 {ts}If you think this may be a duplicate contact which should be merged with an existing record -
 Go to "Contacts >> Find and Merge Duplicate Contacts". Use the strict
diff --git a/CRM/Upgrade/Incremental/sql/4.5.beta6.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.5.beta6.mysql.tpl
new file mode 100644 (file)
index 0000000..6d58233
--- /dev/null
@@ -0,0 +1 @@
+{* file to handle db changes in 4.5.beta6 during upgrade *}
diff --git a/CRM/Upgrade/Incremental/sql/4.5.beta7.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.5.beta7.mysql.tpl
new file mode 100644 (file)
index 0000000..16e8767
--- /dev/null
@@ -0,0 +1,2 @@
+{* file to handle db changes in 4.5.beta7 during upgrade *}
+UPDATE civicrm_contribution SET net_amount = total_amount - fee_amount WHERE net_amount = 0 OR net_amount IS NULL; 
diff --git a/CRM/Upgrade/Incremental/sql/4.5.beta8.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.5.beta8.mysql.tpl
new file mode 100644 (file)
index 0000000..de6aaf3
--- /dev/null
@@ -0,0 +1,18 @@
+{* file to handle db changes in 4.5.beta8 during upgrade *}
+
+-- CRM-15143 Add Postal Code to contact reference and quick search options
+SELECT @option_group_id_cao := max(id) from civicrm_option_group where name = 'contact_autocomplete_options';
+SELECT @option_val_id_cao_wt := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @option_group_id_cao;
+SELECT @option_val_id_cao_val := MAX(ROUND(value)) FROM civicrm_option_value WHERE option_group_id = @option_group_id_cao;
+INSERT INTO
+`civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`)
+VALUES
+(@option_group_id_cao, {localize}'{ts escape="sql"}Postal Code{/ts}'{/localize}, @option_val_id_cao_val+1, 'postal_code', NULL, 0, NULL, @option_val_id_cao_wt+1, 0, 1, 1, NULL, NULL);
+
+SELECT @option_group_id_cro := max(id) from civicrm_option_group where name = 'contact_reference_options';
+SELECT @option_val_id_cro_wt := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @option_group_id_cro;
+SELECT @option_val_id_cro_val := MAX(ROUND(value)) FROM civicrm_option_value WHERE option_group_id = @option_group_id_cro;
+INSERT INTO
+`civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`)
+VALUES
+(@option_group_id_cro, {localize}'{ts escape="sql"}Postal Code{/ts}'{/localize}, @option_val_id_cro_val+1, 'postal_code', NULL, 0, NULL, @option_val_id_cro_wt+1, 0, 1, 1, NULL, NULL);
index 413896c991100cb9a0629f39be039dc574692e28..9c289492ef3cdbaf92e16be75b5c4b071bd020ee 100644 (file)
@@ -93,6 +93,7 @@ SELECT @max_wt     := max(weight) from civicrm_option_value where option_group_i
 INSERT INTO civicrm_option_value
   (option_group_id,                {localize field='label'}label{/localize}, {localize field='description'}description{/localize}, value,                           name,               weight,                        filter, component_id)
 VALUES
-    (@option_group_id_activity_type, {localize}'Change Custom Data'{/localize},{localize}''{/localize}, (SELECT @max_val := @max_val+1), 'Change Custom Data', (SELECT @max_wt := @max_wt+1), 0, @caseCompId);
+    (@option_group_id_activity_type, {localize}'{ts escape="sql"}Change Custom Data{/ts}'{/localize},{localize}''{/localize}, (SELECT @max_val := @max_val+1), 'Change Custom Data', (SELECT @max_wt := @max_wt+1), 0, @caseCompId);
 
 ------------------------------------------------------------------------------
+More details on the wiki: http://wiki.civicrm.org/confluence/display/CRMDOC/Internationalisation+for+Developers#InternationalisationforDevelopers-Localisedfieldsschemachanges
\ No newline at end of file
index fbf3ab29dea8f98b55a5542a006ccd28fdd5a2c9..4022813d907cc2ecfcc3b92332a6bd131a7af2c9 100644 (file)
@@ -142,7 +142,7 @@ class CRM_Upgrade_Page_Upgrade extends CRM_Core_Page {
     }
     // end of hack
 
-    $postUpgradeMessage = ts('CiviCRM upgrade was successful.');
+    $postUpgradeMessage = ts('Congratulations! Your upgrade was successful! (... wasn\'t that easy!)');
 
     // lets drop all the triggers here
     CRM_Core_DAO::dropTriggers();
index 9ec53a73ad9a08fc77ba6051b7b346a40cc2e8fe..4ec6275a363a9e75ca8b2c090152e23eb71a5a17 100644 (file)
@@ -415,7 +415,9 @@ function _civicrm_api3_deprecated_formatted_param($params, &$values, $create = F
               $contact->external_identifier = $externalId;
               $errorMsg = NULL;
               if (!$contact->find(TRUE)) {
-                $errorMsg = $contactId ? ts("Soft Credit ContactID - $contactId doesn't exist. Row was skipped.") : ts("Provided Soft Credit External Identifier - $externalIddoesn't exist. Row was skipped.");
+                $field = $contactId ? ts('Contact ID') : ts('External ID');
+                $errorMsg = ts("Soft Credit %1 - %2 doesn't exist. Row was skipped.",
+                  array(1 => $field, 2 => $contactId ? $contactId : $externalId));
               }
 
               if ($errorMsg) {
index 32819fcc1d9774daea253976c7636211c6ce3d7b..82a18ccc0ce60048c3d76a2c97472511a6fd2b7e 100644 (file)
@@ -527,8 +527,9 @@ HTACCESS;
    * @return string
    */
   static function absoluteDirectory($directory) {
-    // Do nothing on windows - config will need to specify absolute path
-    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+    // check if directory is already absolute, if so return immediately
+    // Note: Windows PHP accepts any mix of "/" or "\", so "C:\htdocs" or "C:/htdocs" would be a valid absolute path
+    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && preg_match(';^[a-zA-Z]:[/\\\\];', $directory)) {
       return $directory;
     }
 
@@ -713,7 +714,9 @@ HTACCESS;
   static function dynamicResourcePath($fileName = NULL) {
     $config = CRM_Core_Config::singleton();
     // FIXME: Use self::baseFilePath once url issue has been resolved
-    $path = self::addTrailingSlash(str_replace('/persist/contribute', '', $config->imageUploadDir)) . 'dynamic';
+    // Windows PHP accepts any mix of "/" or "\"; simpler if we only deal with one of those
+    $imageUploadDir = str_replace('\\', '/', $config->imageUploadDir);
+    $path = self::addTrailingSlash(str_replace('/persist/contribute', '', $imageUploadDir)) . 'dynamic';
     if ($fileName !== NULL) {
       $path .= "/$fileName";
     }
@@ -728,7 +731,7 @@ HTACCESS;
   static function dynamicResourceUrl($fileName) {
     $config = CRM_Core_Config::singleton();
     // FIXME: Need a better way of getting the url of the baseFilePath
-    return self::addTrailingSlash(str_replace('/persist/contribute', '', $config->imageUploadURL)) . 'dynamic/' . $fileName;
+    return self::addTrailingSlash(str_replace('/persist/contribute', '', $config->imageUploadURL), '/') . 'dynamic/' . $fileName;
   }
 
   /**
index 99b4a3ba2ad1bad7d7e19f063ab83db60a1cd045..efe2b49c40bdd70e5f974b2d011054f83ae1a41f 100644 (file)
@@ -157,7 +157,7 @@ class CRM_Utils_Geocode_Yahoo {
       $values['geo_code_1'] = $ret['latitude'];
       $values['geo_code_2'] = $ret['longitude'];
 
-      if ($ret['postal']) {
+      if (!empty($ret['postal'])) {
         $current_pc = CRM_Utils_Array::value('postal_code', $values);
         $skip_postal = FALSE;
 
index 1561ff3dee839b70a962dc278ec1e751ee080294..4103689263e1a41691e909d802ebeab843e3ba26 100644 (file)
@@ -97,7 +97,25 @@ class CRM_Utils_Hook_DrupalBase extends CRM_Utils_Hook {
         $this->requireCiviModules($this->civiModules);
       }
 
-      $this->allModules = array_merge((array)$this->drupalModules, (array)$this->civiModules);
+      // CRM-12370
+      // we should add civicrm's module's just after main civicrm drupal module
+      // Note: Assume that drupalModules and civiModules may each be array() or NULL
+      if ($this->drupalModules !== NULL) {
+        foreach ($this->drupalModules as $moduleName) {
+          $this->allModules[$moduleName] = $moduleName;
+          if ($moduleName == 'civicrm') {
+            if (!empty($this->civiModules)) {
+              foreach ($this->civiModules as $civiModuleName) {
+                $this->allModules[$civiModuleName] = $civiModuleName;
+              }
+            }
+          }
+        }
+      }
+      else {
+        $this->allModules = (array) $this->civiModules;
+      }
+
       if ($this->drupalModules !== NULL && $this->civiModules !== NULL) {
         // both CRM and CMS have bootstrapped, so this is the final list
         $this->isBuilt = TRUE;
index 3148c536058f9e9538ae72670abd21aef5991d1c..dc88f47559b7b8f58b972092bc9dd4f52e2007b2 100644 (file)
@@ -217,7 +217,7 @@ class CRM_Utils_HttpClient {
    * @return bool
    */
   public function isRedirectSupported() {
-    return (ini_get('open_basedir') == '') && (ini_get('safe_mode') == 'Off' || ini_get('safe_mode') === FALSE);
+    return (ini_get('open_basedir') == '') && (ini_get('safe_mode') == 'Off' || ini_get('safe_mode') == '' || ini_get('safe_mode') === FALSE);
   }
 
 }
index cc92c5b397dfbe389327cb3f3cc8d503e492ed25..9615cccdcca9f94a5893c51d96d9aa11c0ea0527 100644 (file)
@@ -281,13 +281,9 @@ class CRM_Utils_Pager extends Pager_Sliding {
     if ($this->isFirstPage()) {
       return '';
     }
-
     $href = $this->makeURL(self::PAGE_ID, 1);
-    return sprintf('<a class="crm-pager-link" href="%s" title="%s">%s</a>',
-      $href,
-      str_replace('%d', 1, $this->_altFirst),
-      $this->_firstPagePre . $this->_firstPageText . $this->_firstPagePost
-    ) . $this->_spacesBefore . $this->_spacesAfter;
+    return $this->formatLink($href, str_replace('%d', 1, $this->_altFirst), $this->_firstPagePre . $this->_firstPageText . $this->_firstPagePost) .
+      $this->_spacesBefore . $this->_spacesAfter;
   }
 
   /**
@@ -297,13 +293,8 @@ class CRM_Utils_Pager extends Pager_Sliding {
     if ($this->isLastPage()) {
       return '';
     }
-
     $href = $this->makeURL(self::PAGE_ID, $this->_totalPages);
-    return sprintf('<a class="crm-pager-link" href="%s" title="%s">%s</a>',
-      $href,
-      str_replace('%d', $this->_totalPages, $this->_altLast),
-      $this->_lastPagePre . $this->_lastPageText . $this->_lastPagePost
-    );
+    return $this->formatLink($href, str_replace('%d', $this->_totalPages, $this->_altLast), $this->_lastPagePre . $this->_lastPageText . $this->_lastPagePost);
   }
 
   /**
@@ -312,10 +303,7 @@ class CRM_Utils_Pager extends Pager_Sliding {
   function getBackPageLink() {
     if ($this->_currentPage > 1) {
       $href = $this->makeURL(self::PAGE_ID, $this->getPreviousPageID());
-      return sprintf('<a class="crm-pager-link" href="%s" title="%s">%s</a>',
-        $href,
-        $this->_altPrev, $this->_prevImg
-      ) . $this->_spacesBefore . $this->_spacesAfter;
+      return $this->formatLink($href, $this->_altPrev, $this->_prevImg) . $this->_spacesBefore . $this->_spacesAfter;
     }
     return '';
   }
@@ -326,10 +314,9 @@ class CRM_Utils_Pager extends Pager_Sliding {
   function getNextPageLink() {
     if ($this->_currentPage < $this->_totalPages) {
       $href = $this->makeURL(self::PAGE_ID, $this->getNextPageID());
-      return $this->_spacesAfter . sprintf('<a class="crm-pager-link" href="%s" title="%s">%s</a>',
-        $href,
-        $this->_altNext, $this->_nextImg
-      ) . $this->_spacesBefore . $this->_spacesAfter;
+      return $this->_spacesAfter .
+        $this->formatLink($href, $this->_altNext, $this->_nextImg) .
+        $this->_spacesBefore . $this->_spacesAfter;
     }
     return '';
   }
@@ -338,12 +325,23 @@ class CRM_Utils_Pager extends Pager_Sliding {
    * Build a url for pager links
    */
   function makeURL($key, $value) {
-    $href = CRM_Utils_System::makeURL($key);
+    $href = CRM_Utils_System::makeURL($key, TRUE);
     // CRM-12212 Remove alpha sort param
     if (strpos($href, '&amp;sortByCharacter=')) {
       $href = preg_replace('#(.*)\&amp;sortByCharacter=[^&]*(.*)#', '\1\2', $href);
     }
     return $href . $value;
   }
+
+  /**
+   * Output the html pager link
+   * @param string $href
+   * @param string $title
+   * @param string $image
+   * @return string
+   */
+  private function formatLink($href, $title, $image) {
+    return sprintf('<a class="crm-pager-link action-item crm-hover-button" href="%s" title="%s">%s</a>', $href, $title, $image);
+  }
 }
 
index 14121ae1cb8c707aa882dff89b10c3a7182a60fa..cf9c9399b51a06b9f01fe07bfbf5391864b713e6 100644 (file)
@@ -165,7 +165,8 @@ class CRM_Utils_VersionCheck {
    */
   public function newerVersion() {
     if ($this->latestVersion) {
-      if (version_compare($this->localVersion, $this->latestVersion) < 0) {
+      if ((version_compare($this->localVersion, $this->latestVersion) < 0)
+        && CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'versionAlert', NULL, TRUE)) {
         return $this->latestVersion;
       }
     }
index df1f36efd3f227005739575a9947f5df5921aaf0..28822142d0ed49490925d908706f43d27d6cd483 100644 (file)
@@ -379,14 +379,14 @@ class CRM_Utils_Weight {
       $nextID = $ids[$i + 1];
 
       $links = array();
-      $url = "{$baseURL}&src=$id";
+      $url = "{$baseURL}&amp;src=$id";
 
       if ($prevID != 0) {
         $alt = ts('Move to top');
-        $links[] = "<a class=\"crm-weight-arrow\" href=\"{$url}&dst={$firstID}&dir=first\"><img src=\"{$imageURL}/first.gif\" title=\"$alt\" alt=\"$alt\" class=\"order-icon\"></a>";
+        $links[] = "<a class=\"crm-weight-arrow\" href=\"{$url}&amp;dst={$firstID}&amp;dir=first\"><img src=\"{$imageURL}/first.gif\" title=\"$alt\" alt=\"$alt\" class=\"order-icon\"></a>";
 
         $alt = ts('Move up one row');
-        $links[] = "<a class=\"crm-weight-arrow\" href=\"{$url}&dst={$prevID}&dir=swap\"><img src=\"{$imageURL}/up.gif\" title=\"$alt\" alt=\"$alt\" class=\"order-icon\"></a>";
+        $links[] = "<a class=\"crm-weight-arrow\" href=\"{$url}&amp;dst={$prevID}&amp;dir=swap\"><img src=\"{$imageURL}/up.gif\" title=\"$alt\" alt=\"$alt\" class=\"order-icon\"></a>";
       }
       else {
         $links[] = "<img src=\"{$imageURL}/spacer.gif\" class=\"order-icon\">";
@@ -395,10 +395,10 @@ class CRM_Utils_Weight {
 
       if ($nextID != 0) {
         $alt = ts('Move down one row');
-        $links[] = "<a class=\"crm-weight-arrow\" href=\"{$url}&dst={$nextID}&dir=swap\"><img src=\"{$imageURL}/down.gif\" title=\"$alt\" alt=\"$alt\" class=\"order-icon\"></a>";
+        $links[] = "<a class=\"crm-weight-arrow\" href=\"{$url}&amp;dst={$nextID}&amp;dir=swap\"><img src=\"{$imageURL}/down.gif\" title=\"$alt\" alt=\"$alt\" class=\"order-icon\"></a>";
 
         $alt = ts('Move to bottom');
-        $links[] = "<a class=\"crm-weight-arrow\" href=\"{$url}&dst={$lastID}&dir=last\"><img src=\"{$imageURL}/last.gif\" title=\"$alt\" alt=\"$alt\" class=\"order-icon\"></a>";
+        $links[] = "<a class=\"crm-weight-arrow\" href=\"{$url}&amp;dst={$lastID}&amp;dir=last\"><img src=\"{$imageURL}/last.gif\" title=\"$alt\" alt=\"$alt\" class=\"order-icon\"></a>";
       }
       else {
         $links[] = "<img src=\"{$imageURL}/spacer.gif\" class=\"order-icon\">";
index 72005bf43ad5cfe930f26dfe07c3ffd09af98a1f..2dd33da51452434235d39d5c7bc230cf3c1fd198 100644 (file)
@@ -81,7 +81,12 @@ class TransactionSubscriber implements EventSubscriberInterface {
    */
   function onApiRespond(\Civi\API\Event\RespondEvent $event) {
     $apiRequest = $event->getApiRequest();
-    unset($this->transactions[$apiRequest['id']]);
+    if (isset($this->transactions[$apiRequest['id']])) {
+      if (civicrm_error($event->getResponse())) {
+        $this->transactions[$apiRequest['id']]->rollback();
+      }
+      unset($this->transactions[$apiRequest['id']]);
+    }
   }
 
   /**
diff --git a/Civi/CiUtil/Arrays.php b/Civi/CiUtil/Arrays.php
new file mode 100644 (file)
index 0000000..359ad4c
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+namespace Civi\CiUtil;
+
+class Arrays {
+  static function collect($arr, $col) {
+    $r = array();
+    foreach ($arr as $k => $item) {
+      $r[$k] = $item[$col];
+    }
+    return $r;
+  }
+}
\ No newline at end of file
diff --git a/Civi/CiUtil/Command/AntagonistCommand.php b/Civi/CiUtil/Command/AntagonistCommand.php
new file mode 100644 (file)
index 0000000..9a71959
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+namespace Civi\CiUtil\Command;
+
+class AntagonistCommand {
+  static function main($argv) {
+    if (count($argv) != 3) {
+      print "usage: {$argv[0]} <TargetTest::testFunc> </path/to/suite>\n";
+      exit(1);
+    }
+    list ($program, $target, $suite) = $argv;
+
+    $candidateTests = \Civi\CiUtil\PHPUnitScanner::findTestsByPath(array($suite));
+//    $candidateTests = array(
+//      array('class' => 'CRM_Core_RegionTest', 'method' => 'testBlank'),
+//      array('class' => 'CRM_Core_RegionTest', 'method' => 'testDefault'),
+//      array('class' => 'CRM_Core_RegionTest', 'method' => 'testOverride'),
+//      array('class' => 'CRM_Core_RegionTest', 'method' => 'testAllTypes'),
+//    );
+    $antagonist = self::findAntagonist($target, $candidateTests);
+    if ($antagonist) {
+      print_r(array('found an antagonist' => $antagonist));
+    }
+    else {
+      print_r(array('found no antagonists'));
+    }
+  }
+
+  /**
+   * @param string $target e.g. "MyTest::testFoo"
+   * @param array $candidateTests list of strings (e.g. "MyTest::testFoo")
+   * @return array|null array contains keys:
+   *  - antagonist: array
+   *    - file: string
+   *    - class: string
+   *    - method: string
+   *  - expectedResults: array
+   *  - actualResults: array
+   */
+  static function findAntagonist($target, $candidateTests) {
+    //$phpUnit = new \Civi\CiUtil\EnvTestRunner('./scripts/phpunit', 'EnvTests');
+    $phpUnit = new \Civi\CiUtil\EnvTestRunner('phpunit', 'tests/phpunit/EnvTests.php');
+    $expectedResults = $phpUnit->run(array($target));
+    print_r(array('$expectedResults' => $expectedResults));
+
+    foreach ($candidateTests as $candidateTest) {
+      $candidateTestName = $candidateTest['class'] . '::' . $candidateTest['method'];
+      if ($candidateTestName == $target) {
+        continue;
+      }
+      $actualResults = $phpUnit->run(array(
+        $candidateTestName,
+        $target,
+      ));
+      print_r(array('$actualResults' => $actualResults));
+      foreach ($expectedResults as $testName => $expectedResult) {
+        if ($actualResults[$testName] != $expectedResult) {
+          return array(
+            'antagonist' => $candidateTest,
+            'expectedResults' => $expectedResults,
+            'actualResults' => $actualResults,
+          );
+        }
+      }
+    }
+    return NULL;
+  }
+}
\ No newline at end of file
diff --git a/Civi/CiUtil/Command/CompareCommand.php b/Civi/CiUtil/Command/CompareCommand.php
new file mode 100644 (file)
index 0000000..494e909
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+namespace Civi\CiUtil\Command;
+
+class CompareCommand {
+  static function main($argv) {
+    if (empty($argv[1])) {
+      echo "summary: Compares the output of different test runs\n";
+      echo "usage: phpunit-compare <json-file1> [<json-file2>...]\n";
+      exit(1);
+    }
+
+
+    $suites = array(); // array('file' => string, 'results' => array)
+    for ($i = 1; $i < count($argv); $i++) {
+      $suites[$i] = array(
+        'file' => $argv[$i],
+        'results' => \Civi\CiUtil\PHPUnitParser::parseJsonResults(file_get_contents($argv[$i]))
+      );
+    }
+
+    $tests = array(); // array(string $name)
+    foreach ($suites as $suiteName => $suite) {
+      $tests = array_unique(array_merge(
+        $tests,
+        array_keys($suite['results'])
+      ));
+    }
+    sort($tests);
+
+    $printer = new \Civi\CiUtil\ComparisonPrinter(\Civi\CiUtil\Arrays::collect($suites, 'file'));
+    foreach ($tests as $test) {
+      $values = array();
+      foreach ($suites as $suiteName => $suite) {
+        $values[] = isset($suite['results'][$test]) ? $suite['results'][$test] : 'MISSING';
+      }
+
+      if (count(array_unique($values)) > 1) {
+        $printer->printRow($test, $values);
+      }
+    }
+  }
+}
diff --git a/Civi/CiUtil/Command/LsCommand.php b/Civi/CiUtil/Command/LsCommand.php
new file mode 100644 (file)
index 0000000..b4af978
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+namespace Civi\CiUtil\Command;
+
+class LsCommand {
+  static function main($argv) {
+    $paths = $argv;
+    array_shift($paths);
+    foreach (\Civi\CiUtil\PHPUnitScanner::findTestsByPath($paths) as $test) {
+      printf("%s %s %s\n", $test['file'], $test['class'], $test['method']);
+    }
+  }
+}
\ No newline at end of file
diff --git a/Civi/CiUtil/ComparisonPrinter.php b/Civi/CiUtil/ComparisonPrinter.php
new file mode 100644 (file)
index 0000000..60f5f2c
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+namespace Civi\CiUtil;
+
+class ComparisonPrinter {
+  var $headers;
+  var $hasHeader = FALSE;
+
+  function __construct($headers) {
+    $this->headers = $headers;
+  }
+
+  function printHeader() {
+    if ($this->hasHeader) {
+      return;
+    }
+
+    ## LEGEND
+    print "LEGEND\n";
+    $i = 1;
+    foreach ($this->headers as $header) {
+      printf("% 2d: %s\n", $i, $header);
+      $i++;
+    }
+    print "\n";
+
+    ## HEADER
+    printf("%-90s ", 'TEST NAME');
+    $i = 1;
+    foreach ($this->headers as $header) {
+      printf("%-10d ", $i);
+      $i++;
+    }
+    print "\n";
+
+    $this->hasHeader = TRUE;
+  }
+
+  function printRow($test, $values) {
+    $this->printHeader();
+    printf("%-90s ", $test);
+    foreach ($values as $value) {
+      printf("%-10s ", $value);
+    }
+    print "\n";
+  }
+}
\ No newline at end of file
diff --git a/Civi/CiUtil/EnvTestRunner.php b/Civi/CiUtil/EnvTestRunner.php
new file mode 100644 (file)
index 0000000..d16bd84
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+namespace Civi\CiUtil;
+
+/**
+ * Parse phpunit result files
+ */
+class EnvTestRunner {
+  protected $phpunit;
+  protected $envTestSuite;
+
+  function __construct($phpunit = "phpunit", $envTestSuite = 'EnvTests') {
+    $this->phpunit = $phpunit;
+    $this->envTestSuite = $envTestSuite;
+  }
+
+  /**
+   * @param array $tests
+   * @return array (string $testName => string $status)
+   */
+  public function run($tests) {
+    $envTests = implode(' ', $tests);
+    $jsonFile = tempnam(sys_get_temp_dir(), 'phpunit-json-');
+    unlink($jsonFile);
+    $command = "env PHPUNIT_TESTS=\"$envTests\" {$this->phpunit} --log-json $jsonFile {$this->envTestSuite}";
+    echo "Running [$command]\n";
+    system($command);
+    $results = PHPUnitParser::parseJsonResults(file_get_contents($jsonFile));
+    unlink($jsonFile);
+    return $results;
+  }
+}
\ No newline at end of file
diff --git a/Civi/CiUtil/PHPUnitParser.php b/Civi/CiUtil/PHPUnitParser.php
new file mode 100644 (file)
index 0000000..bc28048
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+namespace Civi\CiUtil;
+
+/**
+ * Parse phpunit result files
+ */
+class PHPUnitParser {
+  /**
+   * @param string $content phpunit streaming JSON
+   * @return array(string "$class::$func" => $status)
+   */
+  protected static function parseJsonStream($content) {
+    $content = '['
+      . strtr($content, array("}{" => "},{"))
+      . ']';
+    return json_decode($content, TRUE);
+  }
+
+  /**
+   * @param string $content json stream
+   * @return array (string $testName => string $status)
+   */
+  public static function parseJsonResults($content) {
+    $records = self::parseJsonStream($content);
+    $results = array();
+    foreach ($records as $r) {
+      if ($r['event'] == 'test') {
+        $results[$r['test']] = $r['status'];
+      }
+    }
+    return $results;
+  }
+
+}
\ No newline at end of file
diff --git a/Civi/CiUtil/PHPUnitScanner.php b/Civi/CiUtil/PHPUnitScanner.php
new file mode 100644 (file)
index 0000000..b09de45
--- /dev/null
@@ -0,0 +1,91 @@
+<?php
+namespace Civi\CiUtil;
+use Symfony\Component\Finder\Finder;
+
+/**
+ * Search for PHPUnit test cases
+ */
+class PHPUnitScanner {
+  /**
+   * @return array<string> class names
+   */
+  static function _findTestClasses($path) {
+//    print_r(array(
+//      'loading' => $path,
+//      get_included_files()
+//    ));
+
+    $origClasses = get_declared_classes();
+    require_once $path;
+    $newClasses = get_declared_classes();
+
+    return preg_grep('/Test$/', array_diff(
+      $newClasses,
+      $origClasses
+    ));
+  }
+
+  /**
+   * @return array (string $file => string $class)
+   */
+  static function findTestClasses($paths) {
+    $testClasses = array();
+    $finder = new Finder();
+
+    foreach ($paths as $path) {
+      if (is_dir($path)) {
+        foreach ($finder->files()->in($paths)->name('*Test.php') as $file) {
+          $testClass = self::_findTestClasses((string) $file);
+          if (count($testClass) == 1) {
+            $testClasses[(string) $file] = array_shift($testClass);
+          }
+          elseif (count($testClass) > 1) {
+            throw new \Exception("Too many classes in $file");
+          }
+          else {
+            throw new \Exception("Too few classes in $file");
+          }
+        }
+      }
+      elseif (is_file($path)) {
+        $testClass = self::_findTestClasses($path);
+        if (count($testClass) == 1) {
+          $testClasses[$path] = array_shift($testClass);
+        }
+        elseif (count($testClass) > 1) {
+          throw new \Exception("Too many classes in $path");
+        }
+        else {
+          throw new \Exception("Too few classes in $path");
+        }
+      }
+    }
+
+    return $testClasses;
+  }
+
+  /**
+   * @param array $testClasses
+   * @return array each element is an array with keys:
+   *   - file: string
+   *   - class: string
+   *   - method: string
+   */
+  static function findTestsByPath($paths) {
+    $r = array();
+    $testClasses = self::findTestClasses($paths);
+    foreach ($testClasses as $testFile => $testClass) {
+      $clazz = new \ReflectionClass($testClass);
+      foreach ($clazz->getMethods() as $method) {
+        if (preg_match('/^test/', $method->name)) {
+          $r[] = array(
+            'file' => $testFile,
+            'class' => $testClass,
+            'method' => $method->name
+          );
+        }
+      }
+    }
+    return $r;
+  }
+}
\ No newline at end of file
index e70ce15d0d982c72e3afad00f07808925991c623..8a9328777e90b59af795bb6ad8e564b56cfeada8 100644 (file)
@@ -91,7 +91,9 @@ function civicrm_api3_activity_type_create($params) {
  */
 function _civicrm_api3_activity_type_create_spec(&$params) {
   $params['label']['api.required'] = 1;
+  $params['label']['title'] = 'Label';
   $params['weight']['api.required'] = 1;
+  $params['weight']['title'] = 'Weight';
 }
 
 /**
index 93af82e0cc0eb8e02a91f12d3e22fa01116e6791..a04c2a2f8bbf981685f0ee0f60ad71679c8fce2b 100644 (file)
@@ -61,6 +61,7 @@ function _civicrm_api3_batch_create_spec(&$params) {
   // it is actually required)
   $params['entity_table']['api.default'] = "civicrm_batch";
   $params['entity_table']['type'] = CRM_Utils_Type::T_STRING;
+  $params['entity_table']['title'] = 'Batch Entity Table - remove?';
 
   $params['modified_date']['api.default'] = "now";
   $params['status_id']['api.required'] = 1;
index 6cde101596e743010ebb58562a2b6e3b8ba9bdb3..a19d0f7d0920d4ebbb122d8607f72323fd0ec368 100644 (file)
@@ -149,6 +149,7 @@ function _civicrm_api3_case_create_spec(&$params) {
   $params['status_id']['api.default'] = 1;
   $params['creator_id']['api.default'] = 'user_contact_id';
   $params['creator_id']['type'] = CRM_Utils_Type::T_INT;
+  $params['creator_id']['title'] = 'Case Created By';
   $params['start_date']['api.default'] = 'now';
   $params['medium_id'] = array(
     'name' => 'medium_id',
index d046c5a20cf4f5245a8f979c591cec84dd4bea26..654f20ce1a715ed371672124fbedd9f3a6d1acea 100644 (file)
  */
 function civicrm_api3_case_type_create($params) {
   civicrm_api3_verify_mandatory($params, _civicrm_api3_get_DAO(__FUNCTION__));
+  unset($params['is_forkable']); // computed property
+  unset($params['is_forked']); // computed property
 
   if (!array_key_exists('is_active', $params) && empty($params['id'])) {
     $params['is_active'] = TRUE;
   }
-  return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'CaseType');
-
+  if (!empty($params['id']) // this is an existing case-type
+    && !CRM_Case_BAO_CaseType::isForked($params['id']) // which is not yet forked
+    && !CRM_Case_BAO_CaseType::isForkable($params['id']) // for which new forks are prohibited
+  ) {
+    unset($params['definition']);
+  }
+  $result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'CaseType');
+  return _civicrm_api3_case_type_get_formatResult($result);
 }
 
 /**
@@ -83,12 +91,15 @@ function civicrm_api3_case_type_get($params) {
  */
 function _civicrm_api3_case_type_get_formatResult(&$result) {
   foreach ($result['values'] as $key => $caseType) {
-    $xml = CRM_Case_XMLRepository::singleton()->retrieve($caseType['name']);
+    $caseTypeName = (isset($caseType['name'])) ? $caseType['name'] : CRM_Core_DAO::getFieldValue('CRM_Case_DAO_CaseType', $caseType['id'], 'name', 'id', TRUE);
+    $xml = CRM_Case_XMLRepository::singleton()->retrieve($caseTypeName);
     if ($xml) {
       $result['values'][$key]['definition'] = CRM_Case_BAO_CaseType::convertXmlToDefinition($xml);
     } else {
       $result['values'][$key]['definition'] = array();
     }
+    $result['values'][$key]['is_forkable'] = CRM_Case_BAO_CaseType::isForkable($result['values'][$key]['id']);
+    $result['values'][$key]['is_forked'] = CRM_Case_BAO_CaseType::isForked($result['values'][$key]['id']);
   }
   return $result;
 }
index 3eda5882eea522eb02323e42119629364cab3bfb..29be2811e5c0cce979c84bb3175ae448f140f2bf 100644 (file)
@@ -76,6 +76,19 @@ function civicrm_api3_contribution_recur_get($params) {
   return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
 }
 
+/**
+ * Cancel a recurring contribution of existing contribution_recur.id
+ *
+ * @param array    $params (reference) array containing id of the recurring contribution
+ *
+ * @return boolean  returns true is successfully cancelled
+ */
+
+function civicrm_api3_contribution_recur_cancel($params) {
+  civicrm_api3_verify_one_mandatory($params, NULL, array('id'));
+  return CRM_Contribute_BAO_ContributionRecur::cancelRecurContribution($params['id'], CRM_Core_DAO::$_nullObject) ? civicrm_api3_create_success() : civicrm_api3_create_error(ts('Error while cancelling recurring contribution'));
+}
+
 /**
  * delete an existing contribution_recur
  *
@@ -93,4 +106,3 @@ function civicrm_api3_contribution_recur_get($params) {
 function civicrm_api3_contribution_recur_delete($params) {
   return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
 }
-
index 1ae1f8e14f2fa269eb0d7cd3d9e7309dab1c0a34..a2d46c8ff484f433c4786c69faa8733a04b62063 100644 (file)
@@ -121,6 +121,7 @@ function civicrm_api3_custom_value_create($params) {
  */
 function _civicrm_api3_custom_value_create_spec(&$params) {
   $params['entity_id']['api.required'] = 1;
+  $params['entity_id']['title'] = 'Entity ID';
 }
 
 /**
index e17325e0750bcf40b0a694b947ae9bcc962226e3..c4b111e9daf50840b26297812afb3f7cb4d6e17a 100644 (file)
 /**
  * Creates or updates an Dashlet.
  *
- * @param array  $params       Associative array of property name/value
+ * @param array  $params array of property name/value
  *                             pairs for the Dashlet.
  *
  * @return array Array containing 'is_error' to denote success or failure and details of the created activity
  *
  */
 function civicrm_api3_dashboard_create($params) {
-  if (empty($params['id'])) {
-    civicrm_api3_verify_one_mandatory($params,
-      NULL,
-      array(
-        'name',
-        'label',
-        'url',
-        'fullscreen_url',
-      )
-    );
-  }
-  // create dashboard element
-  $dashboardBAO = CRM_Core_BAO_Dashboard::addDashlet($params);
-  if (isset($dashboardBAO->id)) {
-    _civicrm_api3_object_to_array($dashboardBAO, $dashboardArray[$dashboardBAO->id]);
-    return civicrm_api3_create_success($dashboardArray, $params, 'dashboard', 'create', $dashboardBAO);
-  }
+  civicrm_api3_verify_one_mandatory($params, NULL, array(
+      'name',
+      'label',
+      'url',
+      'fullscreen_url',
+    )
+  );
+  return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'Dashboard');
 }
 
 /**
index 116a4b021c9701ff74e554fe6d8adc905e494deb..c24c6d6a8e552ae0b5450974f9f220cebba5da23 100644 (file)
@@ -66,6 +66,7 @@ function _civicrm_api3_mailing_create_spec(&$params) {
   // making required for simplicity
   $params['created_id']['api.required'] = 1;
   $params['api.mailing_job.create']['api.default'] = 1;
+  $params['api.mailing_job.create']['title'] = 'Schedule Mailing?';
 }
 
 /**
index c1b64a4d7c82d9133306a469b5f61e2be0d6c1f2..2c05777910627c1e6a2cc449e7e6de8e8562781f 100644 (file)
@@ -70,7 +70,10 @@ function civicrm_api3_mailing_event_confirm_create($params) {
  */
 function _civicrm_api3_mailing_event_confirm_create_spec(&$params) {
   $params['contact_id']['api.required'] = 1;
+  $params['contact_id']['title'] = 'Contact ID';
   $params['subscribe_id']['api.required'] = 1;
+  $params['subscribe_id']['title'] = 'Subscribe Event ID';
   $params['hash']['api.required'] = 1;
+  $params['hash']['title'] = 'Hash';
 }
 
index 530f78294d9f77cd268fb5e797b04c699922abe7..8410c3c63700917a3e1536f5e3525a4656928688 100644 (file)
@@ -74,7 +74,10 @@ function civicrm_api3_mailing_event_resubscribe_create($params) {
  */
 function _civicrm_api3_mailing_event_resubscribe_create_spec(&$params) {
   $params['event_queue_id']['api.required'] = 1;
+  $params['event_queue_id']['title'] = 'Event Queue ID';
   $params['job_id']['api.required'] = 1;
+  $params['job_id']['title'] = 'Job ID';
   $params['hash']['api.required'] = 1;
+  $params['hash']['title'] = 'Hash';
 }
 
index b312d7820d7df293d47e574b9bbe7618ac08a92d..57d2661a09669c2a4544d761f3e65a3e40fb7415 100644 (file)
@@ -86,6 +86,8 @@ function civicrm_api3_mailing_event_subscribe_create($params) {
  */
 function _civicrm_api3_mailing_event_subscribe_create_spec(&$params) {
   $params['email']['api.required'] = 1;
+  $params['email']['title'] = 'Unsubscribe Email';
   $params['group_id']['api.required'] = 1;
+  $params['group_id']['title'] = 'Unsubscribe From Group';
 }
 
index cab953ebda9bf2d7c234e111636cab39825c2ce7..d6cd367482a2006058704163f5bd1bbd19a9c2b4 100644 (file)
@@ -81,7 +81,10 @@ function civicrm_api3_mailing_event_unsubscribe_create($params) {
  */
 function _civicrm_api3_mailing_event_unsubscribe_create_spec(&$params) {
   $params['job_id']['api.required'] = 1;
+  $params['job_id']['title'] = 'Mailing Job ID';
   $params['hash']['api.required'] = 1;
+  $params['hash']['title'] = 'Mailing Hash';
   $params['event_queue_id']['api.required'] = 1;
+  $params['event_queue_id']['title'] = 'Mailing Queue ID';
 }
 
index a746e8a00e999523fac43a04dcbe942d3600a264..21c5efd16394d39decde7454992d9d2cae4c4a48 100644 (file)
@@ -81,31 +81,58 @@ function civicrm_api3_participant_create($params) {
  * Create a default participant line item
  */
 function _civicrm_api3_participant_createlineitem(&$params, $participant){
-  $sql = "
-SELECT      ps.id AS setID, pf.id AS priceFieldID, pfv.id AS priceFieldValueID
-FROM  civicrm_price_set_entity cpse
-LEFT JOIN civicrm_price_set ps ON cpse.price_set_id = ps.id AND cpse.entity_id = {$params['event_id']} AND cpse.entity_table = 'civicrm_event'
-LEFT JOIN   civicrm_price_field pf ON pf.`price_set_id` = ps.id
-LEFT JOIN   civicrm_price_field_value pfv ON pfv.price_field_id = pf.id and pfv.label = '{$params['fee_level']}'
-where ps.id is not null
-";
-
-  $dao = CRM_Core_DAO::executeQuery($sql);
-  if ($dao->fetch()) {
-    $amount = CRM_Utils_Array::value('fee_amount', $params, 0);
-    $lineItemparams = array(
-      'price_field_id' => $dao->priceFieldID,
-      'price_field_value_id' => $dao->priceFieldValueID,
-      'entity_table' => 'civicrm_participant',
-      'entity_id' => $participant->id,
-      'label' => $params['fee_level'],
-      'qty' => 1,
-      'participant_count' => 0,
-      'unit_price' => $amount,
-      'line_total' => $amount,
-      'version' => 3,
+  // it is possible that a fee level contains information about multiple
+  // price field values.
+
+  $priceFieldValueDetails = CRM_Utils_Array::explodePadded(
+    $params["fee_level"]);
+
+  foreach($priceFieldValueDetails as $detail) {
+    if (preg_match('/- ([0-9]+)$/', $detail, $matches)) {
+      // it is possible that a price field value is payd for multiple times.
+      // (FIXME: if the price field value ends in minus followed by whitespace
+      // and a number, things will go wrong.)
+
+      $qty = $matches[1];
+      preg_match('/^(.*) - [0-9]+$/', $detail, $matches);
+      $label = $matches[1];
+    }
+    else {
+      $label = $detail;
+      $qty = 1;
+    }
+
+    $sql = "
+      SELECT      ps.id AS setID, pf.id AS priceFieldID, pfv.id AS priceFieldValueID, pfv.amount AS amount
+      FROM  civicrm_price_set_entity cpse
+      LEFT JOIN civicrm_price_set ps ON cpse.price_set_id = ps.id AND cpse.entity_id = %1 AND cpse.entity_table = 'civicrm_event'
+      LEFT JOIN   civicrm_price_field pf ON pf.`price_set_id` = ps.id
+      LEFT JOIN   civicrm_price_field_value pfv ON pfv.price_field_id = pf.id
+      where ps.id is not null and pfv.label = %2
+    ";
+
+    $qParams = array(
+      1 => array($params['event_id'], 'Integer'),
+      2 => array($label, 'String'),
     );
-    civicrm_api('line_item', 'create', $lineItemparams);
+
+    $dao = CRM_Core_DAO::executeQuery($sql, $qParams);
+    if ($dao->fetch()) {
+      $lineItemparams = array(
+        'price_field_id' => $dao->priceFieldID,
+        'price_field_value_id' => $dao->priceFieldValueID,
+        'entity_table' => 'civicrm_participant',
+        'entity_id' => $participant->id,
+        'label' => $label,
+        'qty' => $qty,
+        'participant_count' => 0,
+        'unit_price' => $dao->amount,
+        'line_total' => $qty*$dao->amount,
+        'version' => 3,
+      );
+      civicrm_api('line_item', 'create', $lineItemparams);
+    }
+
   }
 }
 
index 9f71c5ab362f479b25a2acb220e1736857d7739c..125fb18fb7b6bba532e35406aea8f8b56b41b1b9 100644 (file)
@@ -44,6 +44,7 @@ function civicrm_api3_setting_getfields($params) {
         'type' => CRM_Utils_Type::T_STRING),
       'group' => array('title' => 'name of setting field',
         'api.required' => 0,
+        'title' => 'Setting Group',
         'description' => 'Settings Group. This is required if the setting is not stored in config',
         'type' => CRM_Utils_Type::T_STRING)
       );
@@ -113,9 +114,10 @@ function civicrm_api3_setting_getdefaults(&$params){
  */
 function _civicrm_api3_setting_getdefaults_spec(&$params) {
   $params['domain_id'] = array(
-      'api.default' => 'current_domain',
-      'description' => 'Defaults may differ by domain - if you do not pass in a domain id this will default to the current domain
-       an array or "all" are acceptable values for multiple domains'
+    'api.default' => 'current_domain',
+    'description' => 'Defaults may differ by domain - if you do not pass in a domain id this will default to the current domain
+      an array or "all" are acceptable values for multiple domains',
+    'title' => 'Setting Domain',
   );
 }
 
@@ -150,7 +152,8 @@ function _civicrm_api3_setting_revert_spec(&$params) {
   $params['domain_id'] = array(
     'api.default' => 'current_domain',
     'description' => 'Defaults may differ by domain - if you do not pass in a domain id this will default to the current domain
-       an array or "all" are acceptable values for multiple domains'
+      an array or "all" are acceptable values for multiple domains',
+    'title' => 'Setting Domain',
   );
 }
 
@@ -182,9 +185,10 @@ function _civicrm_api3_setting_fill_spec(&$params) {
   $params['name'] = array('title' => 'Setting Name belongs to');
   $params['component_id'] = array('title' => 'id of relevant component');
   $params['domain_id'] = array(
-      'api.default' => 'current_domain',
-      'description' => 'Defaults may differ by domain - if you do not pass in a domain id this will default to the current domain
-       an array or "all" are acceptable values for multiple domains'
+    'api.default' => 'current_domain',
+    'title' => 'Setting Domain',
+    'description' => 'Defaults may differ by domain - if you do not pass in a domain id this will default to the current domain
+      an array or "all" are acceptable values for multiple domains'
   );
 }
 
@@ -213,10 +217,12 @@ function civicrm_api3_setting_create($params) {
 function _civicrm_api3_setting_create_spec(&$params) {
   $params['domain_id'] = array(
     'api.default' => 'current_domain',
+    'title' => 'Setting Domain',
     'description' => 'if you do not pass in a domain id this will default to the current domain
       an array or "all" are acceptable values for multiple domains'
    );
    $params['group'] = array(
+     'title' => 'Setting Group',
      'description' => 'if you know the group defining it will make the api more efficient'
    )
   ;
@@ -244,11 +250,13 @@ function civicrm_api3_setting_get($params) {
  */
 function _civicrm_api3_setting_get_spec(&$params) {
   $params['domain_id'] = array(
-      'api.default' => 'current_domain',
-      'description' => 'if you do not pass in a domain id this will default to the current domain'
+    'api.default' => 'current_domain',
+    'title' => 'Setting Domain',
+    'description' => 'if you do not pass in a domain id this will default to the current domain'
   );
   $params['group'] = array(
-      'description' => 'if you know the group defining it will make the api more efficient'
+    'title' => 'Setting Group',
+    'description' => 'if you know the group defining it will make the api more efficient'
   )
   ;
 }
@@ -303,7 +311,8 @@ function _civicrm_api3_setting_getvalue_spec(&$params) {
       'title' => 'Contact Id',
   );
   $params['domain_id'] = array(
-      'description' => 'if you do not pass in a domain id this will default to the current domain'
+    'title' => 'Setting Domain',
+    'description' => 'if you do not pass in a domain id this will default to the current domain'
   );
 }
 
index 2e9cf6794462ad5eacaa7191717a023bd4cafc5e..d0beca46fabbe0537581edf48f4d0d47c2ec8461 100644 (file)
@@ -123,6 +123,7 @@ function _civicrm_api3_uf_field_create_spec(&$params) {
     'api.default' => TRUE,
   );
   $params['created_id']['api.default'] = 'user_contact_id';
+  $params['created_id']['title']  = 'Created By';
   $params['is_active']['api.default'] = TRUE;
 }
 
index 3fb9699444568f795502c324bd11f4cb4696ecae..3bf88b7769a2ff4e55d842d8c57d2714e0b935ff 100644 (file)
@@ -519,7 +519,8 @@ function _civicrm_api3_get_query_object($params, $mode, $entity) {
 
   $newParams = CRM_Contact_BAO_Query::convertFormValues($inputParams);
   $query = new CRM_Contact_BAO_Query($newParams, $returnProperties, NULL,
-    FALSE, FALSE, $mode
+    FALSE, FALSE, $mode,
+    empty($params['check_permissions'])
   );
   list($select, $from, $where, $having) = $query->query();
 
index 3bac19f5f441b1cc444ec18873f3bd281cc60b30..b6035ebfed74f25bb04c97e8cb2006d1cc233575 100644 (file)
@@ -31,4 +31,8 @@
 
 .crmCaseType table td select {
     width: 10em;
+}
+
+tr.forked {
+    font-weight: bold;
 }
\ No newline at end of file
index 4f6e637d6c8afea475937c7b2c7636437f2ffaa0..95b9cde6cac6f485c65b39bbc255edd6e4f6ed30 100644 (file)
@@ -112,7 +112,7 @@ table {
   font-weight: bold;
   color: #9cf;
 }
-#search .form-text, #search .form-submit {
+#search .form-text, #search .crm-form-submit {
   border: 1px solid #369;
   font-size: 1.1em;
 }
@@ -122,7 +122,7 @@ table {
   padding: 0 0.5em 0 0.5em;
   margin: 0 0 0.5em 0;
 }
-#search .form-submit {
+#search .crm-form-submit {
   height: 1.5em;
 }
 #mission {
index 6de905d1690047877269d566cb89a62c3951b2a2..7531e81f421fe76119c20d5b367bec85903edf5e 100644 (file)
@@ -5,6 +5,10 @@
  * Other civi blocks outside the main container also have the class crm-container (but not the id)
  * All styles should start with .crm-container unless they are specific to the main div only
  */
+.crm-container input,
+#civicrm-menu input {
+  box-sizing: content-box;
+}
 
 div.crm-container label {
   font-weight: normal;
@@ -49,6 +53,10 @@ div.crm-container fieldset label{
   font-size: 13px;
 }
 
+.crm-container tr {
+  background: none transparent;
+}
+
 .crm-container table.criteria-group {
   margin-bottom: .1em;
 }
@@ -105,11 +113,6 @@ div.crm-container fieldset label{
   border-top: none;
 }
 
-.crm-container tr {
-  font-size: .95em;
-  background: none !important;
-}
-
 .crm-container td {
   padding: 4px;
   vertical-align: top;
@@ -122,25 +125,11 @@ div.crm-container fieldset label{
   border-collapse: collapse;
 }
 
-.crm-container .crm-row-selected {
-  margin: 0px;
-  padding: 3px 0px 3px 0px;
-  clear: none;
-  background-color: #FFFFCC !important;
-}
-
 .crm-container .crm-row-child {
   margin: 0px;
   padding: 3px 0px 3px 0px;
   clear: none;
-  background-color: #F1F8EB !important;
-}
-
-.crm-container .row-highlighted {
-  margin: 0px;
-  padding: 3px 0px 3px 0px;
-  clear: none;
-  background-color: #FFFFCC;
+  background-color: #F1F8EB;
 }
 
 /*
@@ -346,11 +335,19 @@ input.crm-form-entityref {
   background-image: linear-gradient(top, #eee 1%, #fff 15%);
 }
 
-.crm-container .form-submit {
+.crm-container input.crm-form-text[disabled],
+.crm-container input.crm-form-text[readonly] {
+  background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #ddd), color-stop(15%, #f2f2f2));
+  background-image: -webkit-linear-gradient(top, #ddd 1%, #f2f2f2 15%);
+  background-image: -moz-linear-gradient(top, #ddd 1%, #f2f2f2 15%);
+  background-image: linear-gradient(top, #ddd 1%, #f2f2f2 15%);
+}
+
+.crm-container .crm-form-submit {
   margin: .25em 0.5em 0.25em 0;
 }
 
-.crm-container .form-submit-inline {
+.crm-container .crm-form-submit-inline {
   margin: 0em 0.5em 0.25em 0em;
 }
 
@@ -421,6 +418,7 @@ input.crm-form-entityref {
 }
 
 .crm-container .crm-section,
+.crm-container div.crm-field-wrapper,
 .crm-container-snippet .crm-section {
   margin-bottom: 1em;
 }
@@ -1342,11 +1340,11 @@ input.crm-form-entityref {
 
 #crm-container input.submit-link {
   color: #285286;
-  background-color: transparent;
+  background: none transparent;
   border: none;
   cursor: pointer;
-  cursor: hand;
   margin: 0em -0.5em 0em -0.5em;
+  text-shadow: none;
 }
 
 .crm-container .underline-effect {
@@ -1642,10 +1640,6 @@ editor specific classes
   cursor: pointer;
 }
 
-#crm-container table.nestedActivitySelector tr a {
-  color: #0066CC;
-}
-
 #crm-container #activities-selector tr:hover td,
 #crm-container #activities-selector tr:hover td.sorted,
 #crm-container #activities-selector tr.trOver td.sorted,
@@ -1724,8 +1718,9 @@ editor specific classes
   display: inline-block;
   white-space: nowrap;
   border: 1px solid transparent;
+  border-radius: 4px;
   text-decoration: none;
-  font-size: .8em;
+  font-size: .9em;
   color: #000;
   padding: 1px 2px 1px 0;
   opacity: .7;
@@ -1735,6 +1730,7 @@ editor specific classes
   font-size: .95em;
   padding: 3px 5px;
   opacity: 1;
+  color: #2786c2;
 }
 .crm-container .btn-slide .action-item {
   white-space: normal;
@@ -1753,7 +1749,6 @@ editor specific classes
   filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#cccccc', endColorstr = '#eeeeee', GradientType = 0);
   background-image: linear-gradient(top, #eee 0%, #ccc 100%);
   border: 1px solid #AAAAAA;
-  border-radius: 4px;
   opacity: 1;
   color: #2786C2;
 }
@@ -1776,11 +1771,7 @@ editor specific classes
   background-color: #2F2F2E;
 }
 
-.crm-container .panel li a {
-  color: #DFDFDF;
-}
-
-.crm-container .panel li a:hover,
+.crm-container .btn-slide .panel li a:hover,
 .crm-container .crm-participant-list-inner li a:hover,
 .crm-container .crm-event-links-list-inner li a:hover,
 .crm-container .crm-contribpage-links-list-inner li a:hover {
@@ -1845,11 +1836,12 @@ editor specific classes
   z-index: 1;
 }
 
-.crm-container .panel li a {
+.crm-container .btn-slide .panel li a {
   text-decoration: none;
   padding: 4px;
   display: block;
   cursor: pointer;
+  color: #DFDFDF;
 }
 
 /*class for CMS user name check used in profile*/
@@ -2128,11 +2120,6 @@ div.grippie {
   padding-top: 5px;
 }
 
-#crm-container a.crm-link-action {
-  cursor: pointer;
-  cursor: hand;
-}
-
 #crm-container span.crm-custom-greeting {
   font-size: 9px;
 }
@@ -2379,27 +2366,27 @@ div.grippie {
 .crm-container a.crm-invoiceButton:visited,
 .crm-container a.button:link,
 .crm-container a.button:visited,
-.crm-container input.form-submit,
+.crm-container input.crm-form-submit,
 .crm-container .crm-button,
 #crm-container input[type=button],
-#crm-container input.form-submit-inline,
+#crm-container input.crm-form-submit-inline,
 #crm-container .crm-button {
   text-shadow: 0 1px 0 black;
   background: #70716B url(../i/crm-button-bg.gif) repeat-x top left;
   color: #FFF;
   font-size: 13px;
   font-weight: normal;
-  margin-right: 6px;
+  margin: 0 6px 0 0;
   padding: 2px 6px;
   text-decoration: none;
   cursor: pointer;
   border: 1px solid #3e3e3e;
 }
 
-.crm-container input.form-submit[disabled],
+.crm-container input.crm-form-submit[disabled],
 .crm-container .crm-button[disabled],
 #crm-container input[type=button][disabled],
-#crm-container input.form-submit-inline[disabled],
+#crm-container input.crm-form-submit-inline[disabled],
 #crm-container .crm-button[disabled] {
     color: #999;
 }
@@ -2409,18 +2396,18 @@ div.grippie {
   padding: 1px;
 }
 
-.crm-container input.form-submit,
+.crm-container input.crm-form-submit,
 #crm-container input[type=button],
-#crm-container input.form-submit-inline {
+#crm-container input.crm-form-submit-inline {
   padding: 2px 6px;
 }
 
 .crm-container .crm-button input[type=button],
-.crm-container .crm-button input.form-submit,
-.crm-container .crm-button input.form-submit-inline,
+.crm-container .crm-button input.crm-form-submit,
+.crm-container .crm-button input.crm-form-submit-inline,
 #crm-container .crm-button input[type=button],
-#crm-container .crm-button input.form-submit,
-#crm-container .crm-button input.form-submit-inline {
+#crm-container .crm-button input.crm-form-submit,
+#crm-container .crm-button input.crm-form-submit-inline {
   padding: 2px 4px;
   margin: 0px;
   background: none;
@@ -2966,6 +2953,7 @@ div.grippie {
   opacity: .7;
   position: relative;
   top: 2px;
+  padding: 0;
 }
 
 div.crm-accordion-header a.helpicon {
@@ -3020,8 +3008,10 @@ div a.helpicon:focus {
 }
 #crm-container .crm-tooltip table,
 #crm-container .crm-tooltip table tr td {
+  background-color: #2f2f2e;
   border: none;
   color: #FFF;
+  word-wrap: break-word;
 }
 .crm-container .crm-tooltip .crm-summary-group {
   width: 700px;
@@ -3058,6 +3048,16 @@ div a.helpicon:focus {
   margin-left: 41%;
 }
 
+#crm-container .crm-tooltip table .crm-summary-col-1,
+.crm-container .crm-tooltip table .crm-summary-col-1 {
+  width: 350px;
+}
+
+#crm-container .crm-tooltip table .crm-summary-col-1 div,
+.crm-container .crm-tooltip table .crm-summary-col-1 div {
+  width: auto;
+}
+
 /* Class for tokens and helpicon */
 .crm-container .helpIcon {
   float: right;
@@ -3066,7 +3066,6 @@ div a.helpicon:focus {
   margin-right: 45px;
 }
 
-#crm-container ul.token-input-list-facebook, ul.token-input-list-facebook li.leaf,
 #crm-container ul li {
   list-style-image: none;
 }
@@ -3089,7 +3088,7 @@ div a.helpicon:focus {
 }
 
 /* Override Drupal .2em margin-bottom on forms (we don't want to give up that space) */
-div#crm-container form {
+div.crm-container form {
   margin-bottom: 0em;
 }
 
@@ -3258,51 +3257,7 @@ div#crm-container form {
 }
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * DataTables row classes
- */
-.crm-container table.display tr.odd.gradeA {
-  background-color: #ddffdd;
-}
-
-.crm-container table.display tr.even.gradeA {
-  background-color: #eeffee;
-}
-
-.crm-container table.display tr.odd.gradeC {
-  background-color: #ddddff;
-}
-
-.crm-container table.display tr.even.gradeC {
-  background-color: #eeeeff;
-}
-
-.crm-container table.display tr.odd.gradeX {
-  background-color: #ffdddd;
-}
-
-.crm-container table.display tr.even.gradeX {
-  background-color: #ffeeee;
-}
-
-.crm-container table.display tr.odd.gradeU {
-  background-color: #ddd;
-}
-
-.crm-container table.display tr.even.gradeU {
-  background-color: #eee;
-}
-
-
-.crm-container tr.odd {
-  background-color: #E2E4FF;
-}
-
-.crm-container tr.even {
-  background-color: white;
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Misc
+ * Datatables misc
  */
 .crm-container .dataTables_scroll {
   clear: both;
@@ -3333,73 +3288,6 @@ div#crm-container form {
   color: #444;
 }
 
-.crm-container tfoot input.search_init {
-  color: #999;
-}
-
-.crm-container td.group {
-  background-color: #d1cfd0;
-  border-bottom: 2px solid #A19B9E;
-  border-top: 2px solid #A19B9E;
-}
-
-.crm-container td.details {
-  background-color: #d1cfd0;
-  border: 2px solid #A19B9E;
-}
-
-
-.crm-container .example_alt_pagination div.dataTables_info {
-  width: 40%;
-}
-
-.crm-container .paging_full_numbers {
-  width: 400px;
-  height: 22px;
-  line-height: 22px;
-}
-
-.crm-container .paging_full_numbers a:active {
-  outline: none
-}
-
-.crm-container .paging_full_numbers a:hover {
-  text-decoration: none;
-}
-
-.crm-container .paging_full_numbers a.paginate_button,
-.crm-container .paging_full_numbers a.paginate_active {
-  border: 1px solid #aaa;
-  -webkit-border-radius: 5px;
-  -moz-border-radius: 5px;
-  padding: 2px 5px;
-  margin: 0 3px;
-  cursor: pointer;
-  *cursor: hand;
-  color: #333 !important;
-}
-
-.crm-container .paging_full_numbers a.paginate_button {
-  background-color: #ddd;
-}
-
-.crm-container .paging_full_numbers a.paginate_button:hover {
-  background-color: #ccc;
-  text-decoration: none !important;
-}
-
-.crm-container .paging_full_numbers a.paginate_active {
-  background-color: #99B3FF;
-}
-
-.crm-container table.display tr.even.row_selected td {
-  background-color: #B0BED9;
-}
-
-.crm-container table.display tr.odd.row_selected td {
-  background-color: #9FAFD1;
-}
-
 /*  DataTables fixes */
 .crm-container .crm-datatable-pager-top {
   padding-top: 5px;
@@ -3567,22 +3455,22 @@ tbody.scrollContent tr.alternateRow {
   text-decoration: none !important;
 }
 
-#crm-container table.selector td {
+.crm-container table.selector td {
   border-right: 1px dotted #DDDDDD;
 }
-#crm-container #customFields div.contact_panel td {
+.crm-container #customFields div.contact_panel td {
   border-bottom: 1px solid #FFFFFF;
   padding: 4px;
   vertical-align: top;
 }
 
-#crm-container div.contact_panel td,
+.crm-container div.contact_panel td,
 .crm-container table.crm-info-panel td {
   background-color: #f4f4ed;
 }
 
-#crm-container div.contact_panel td.label,
-#crm-container #customFields div.contact_panel td.label,
+.crm-container div.contact_panel td.label,
+.crm-container #customFields div.contact_panel td.label,
 .crm-container table.crm-info-panel td.label {
   background-color: #fafafa;
   width: 120px;
@@ -3593,21 +3481,21 @@ tbody.scrollContent tr.alternateRow {
   width: 150px;
 }
 
-#crm-container .form-layout td.label,
-#crm-container .form-layout-compressed td.label {
+.crm-container .form-layout td.label,
+.crm-container .form-layout-compressed td.label {
   width: 150px;
   text-align: right;
   color: #7a7a60;
 }
 
-#crm-container .form-layout td.label,
-#crm-container form table.report .label,
-#crm-container form table label,
-#crm-container form table.report label {
+.crm-container .form-layout td.label,
+.crm-container form table.report .label,
+.crm-container form table label,
+.crm-container form table.report label {
   color: #3e3e3e;
 }
 
-#crm-container div.contact_panel td.grouplabel {
+.crm-container div.contact_panel td.grouplabel {
   border-bottom: 2px solid #D7D7D0 !important;
 }
 
@@ -3655,9 +3543,9 @@ tbody.scrollContent tr.alternateRow {
 .crm-container a.crm-invoiceButton,
 .crm-container a.crm-invoiceButton:link,
 .crm-container a.button:link,
-.crm-container input.form-submit,
+.crm-container input.crm-form-submit,
 .crm-container input[type=button],
-.crm-container input.form-submit-inline {
+.crm-container input.crm-form-submit-inline {
   -moz-border-radius: 3px;
   -webkit-border-radius: 3px;
   -khtml-border-radius: 3px;
@@ -3755,8 +3643,8 @@ div.m ul#civicrm-menu,
 .crm-select2 {
   width: 15em;
 }
-.crm-container .select2-container {
-  min-width: 6em !important;
+.crm-container div.select2-container {
+  min-width: 6em;
   font-size: 11px;
 }
 /* Add arrow icon to multi-selects */
@@ -3868,6 +3756,10 @@ div.m ul#civicrm-menu,
 .crm-container .crm-action-menu.action-icon-clipboard .select2-default span.select2-chosen:before {
   background-position: -160px -128px;
 }
+/* Restore this property otherwise our css overrides it */
+.select2-search input {
+  box-sizing: border-box;
+}
 
 /* Special styling for specific form buttons */
 #crm-container span.crm-button_qf_Main_upload input,
@@ -3877,7 +3769,7 @@ div.m ul#civicrm-menu,
 }
 
 /* Match font size on 'Continue' button on event participant form (no specific class) */
-#crm-container .crm-event-additionalparticipant-form-block span.crm-button input.form-submit.default {
+#crm-container .crm-event-additionalparticipant-form-block span.crm-button input.crm-form-submit.default {
   font-size: 1.2em;
 }
 
@@ -3947,9 +3839,17 @@ div.m ul#civicrm-menu,
 }
 
 /* table row highlightng */
-.crm-container table.row-highlight tr:hover {
-  background-color: #FFFFCC !important;
+.crm-container table.row-highlight tr:hover,
+.crm-container .crm-row-selected {
+  background-color: #FFFFCC;
 }
+.crm-container table.row-highlight tr.even-row:hover,
+.crm-container table.row-highlight tr.even:hover,
+.crm-container .even-row.crm-row-selected,
+.crm-container .even.crm-row-selected {
+  background-color: #fffdb2;
+}
+
 #crm-container .civicrm-drupal-wysiwyg .collapsed {
   background: transparent;
   padding-left: 0px;
@@ -3996,31 +3896,22 @@ div.m ul#civicrm-menu,
 }
 
 /* classes related to batch entry operation */
-.crm-container span.batch-edit {
+.crm-container span.batch-edit,
+.crm-container span.batch-valid,
+.crm-container span.batch-invalid {
   padding: 2px 9px 2px 3px;
   margin: 2px 2px 3px 2px;
   cursor: pointer;
-  cursor: hand;
   background-position: -66px -114px;
   background-image: url("../i/icons/jquery-ui-3E3E3E.gif");
 }
 
 .crm-container span.batch-valid {
-  padding: 2px 9px 2px 3px;
-  margin: 2px 2px 3px 2px;
-  cursor: pointer;
-  cursor: hand;
   background-position: -322px -143px;
-  background-image: url("../i/icons/jquery-ui-3E3E3E.gif");
 }
 
 .crm-container span.batch-invalid {
-  padding: 2px 9px 2px 3px;
-  margin: 2px 2px 3px 2px;
-  cursor: pointer;
-  cursor: hand;
   background-position: -258px -143px;
-  background-image: url("../i/icons/jquery-ui-3E3E3E.gif");
 }
 
 .crm-container #Entry ul#errorList {
index 30ff7289cf0c6a078cc9e0fa76891538a8466875..dd91ccc3b7a32e500a9408e83e9c878b66c5431b 100644 (file)
@@ -98,7 +98,7 @@ br.clear {
 .container-inline div {
   display: inline;
 }
-.container-inline .form-submit {
+.container-inline .crm-form-submit {
   margin: 0;
 }
 .error {
@@ -151,7 +151,7 @@ tr.light .form-item, tr.dark .form-item {
 .form-item label.option {
   font-weight: normal;
 }
-.form-submit {
+.crm-form-submit {
   margin: 0.5em 0;
 }
 .marker, .form-required {
index 1fcd1d201cf547cc8e3a9a7458e77111baa5184e..f899db0b7b70aa6b4dd5fa236bd5769f2be1094d 100644 (file)
@@ -166,7 +166,7 @@ br.clear {
 .container-inline div {
   display: inline;
 }
-.container-inline .form-submit {
+.container-inline .crm-form-submit {
   margin: 0;
 }
 .item-list .icon {
@@ -221,7 +221,7 @@ tr.light .form-item, tr.dark .form-item {
 .form-item label.option {
   font-weight: normal;
 }
-.form-submit {
+.crm-form-submit {
   margin: 0.5em 0;
 }
 .marker, .form-required {
@@ -289,7 +289,7 @@ tr.light .form-item, tr.dark .form-item {
   font-weight: bold;
   color: #9cf;
 }
-#search .form-text, #search .form-submit {
+#search .form-text, #search .crm-form-submit {
   border: 1px solid #369;
   font-size: 1.1em;
 }
@@ -299,7 +299,7 @@ tr.light .form-item, tr.dark .form-item {
   padding: 0 0.5em 0 0.5em;
   margin: 0 0 0.5em 0;
 }
-#search .form-submit {
+#search .crm-form-submit {
   height: 1.5em;
 }
 #main {
index eeb01a4f34fee08e3144187d34efcf7ef8e7804e..8a8b2d3248ef044a47347194c5b632e6e9415283 100644 (file)
@@ -1,7 +1,7 @@
 /* CiviCRM Print Media Stylesheet */
 
 /* Hide any buttons or other form items when printing*/
-#crm-container .buttons, #crm-container .crm-submit-buttons, #crm-container .crm-actions-ribbon, #crm-container .form-submit {
+#crm-container .buttons, #crm-container .crm-submit-buttons, #crm-container .crm-actions-ribbon, #crm-container .crm-form-submit {
      display: none;
 }
 
index 9d7961abefab6ec59df7201266e59a7ed84c58b1..9d4496d72480d41e206d90bb5ab9a509df638d2c 100644 (file)
@@ -207,7 +207,7 @@ CRM.strings = CRM.strings || {};
 
   // Workaround for https://github.com/ivaynberg/select2/issues/1246
   $.ui.dialog.prototype._allowInteraction = function(e) {
-    return !!$(e.target).closest('.ui-dialog, .ui-datepicker, .select2-drop').length;
+    return !!$(e.target).closest('.ui-dialog, .ui-datepicker, .select2-drop, .cke_dialog').length;
   };
 
   /**
@@ -251,38 +251,6 @@ CRM.strings = CRM.strings || {};
     return isDirty;
   };
 
-   /**
-   * Wrapper for toggle function which is deprecated in from jQuery 1.8;
-   * @param fn1,fn2 handlers
-   */
-
-  $.fn.toggleClick = function( fn1, fn2 ) {
-    // Don't mess with animation or css toggles
-    if ( !$.isFunction( fn1 ) || !$.isFunction( fn2 ) ) {
-      return;
-    }
-    // migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");
-    // Save reference to arguments for access in closure
-    var args = arguments,
-    guid = fn1.guid || $.guid++,
-    i = 0,
-    toggler = function( event ) {
-      // Figure out which function to execute
-      var lastToggle = ( $._data( this, "lastToggle" + fn1.guid ) || 0 ) % i;
-      $._data( this, "lastToggle" + fn1.guid, lastToggle + 1 );
-      // Make sure that clicks stop
-      event.preventDefault();
-      // and execute the function
-      return args[ lastToggle ].apply( this, arguments ) || false;
-    };
-    // link all the functions, so any of them can unbind this click handler
-    toggler.guid = guid;
-    while ( i < args.length ) {
-      args[ i++ ].guid = guid;
-    }
-    return this.click( toggler );
-  };
-
   /**
    * Wrapper for select2 initialization function; supplies defaults
    * @param options object
@@ -516,6 +484,9 @@ CRM.strings = CRM.strings || {};
           }
         })
         .find('input.select-row:checked').parents('tr').addClass('crm-row-selected');
+      if ($("input:radio[name=radio_ts]").size() == 1) {
+        $("input:radio[name=radio_ts]").prop("checked", true);
+      }
       $('.crm-select2:not(.select2-offscreen, .select2-container)', e.target).crmSelect2();
       $('.crm-form-entityref:not(.select2-offscreen, .select2-container)', e.target).crmEntityRef();
       // Cache Form Input initial values
@@ -773,7 +744,7 @@ CRM.strings = CRM.strings || {};
    */
   CRM.confirm = function (options) {
     var dialog, settings = {
-      title: ts('Confirm Action'),
+      title: ts('Confirm'),
       message: ts('Are you sure you want to continue?'),
       width: 'auto',
       modal: true,
index 211a2aa861cae06cbb12ed5c9961ce44d8253b0e..c4def7015c34d11c3f581d7f1ba974c654d1e2cf 100644 (file)
             })
           };
         },
+        'revert': function (options) {
+          return {
+            message: ts('Are you sure you want to revert this?'),
+            options: {no: ts('Cancel'), yes: ts('Revert')},
+            width: 300,
+            title: ts('Revert %1?', {
+              1: options.obj.title || options.obj.label || options.obj.name || ts('the record')
+            })
+          };
+        },
         'delete': function (options) {
           return {
             message: ts('Are you sure you want to delete this?'),
index 8f579356b1ea7bde5d2e85f080814a62b97918c9..ea2ca50d48740ca70393d3534a642bf7b76ba7be 100644 (file)
     weight: "1",
     definition: {
       activityTypes: [
-        {name: 'Open Case', max_instances: 1 }
+        {name: 'Open Case', max_instances: 1},
+        {name: 'Email'},
+        {name: 'Follow up'},
+        {name: 'Meeting'},
+        {name: 'Phone Call'}
       ],
       activitySets: [
         {
     $scope.activityTypes = apiCalls.actTypes.values;
     $scope.activityTypeNames = _.pluck(apiCalls.actTypes.values, 'name');
     $scope.relationshipTypeNames = _.pluck(apiCalls.relTypes.values, CRM.crmCaseType.REL_TYPE_CNAME); // CRM_Case_XMLProcessor::REL_TYPE_CNAME
-    $scope.locks = {caseTypeName: true};
+    $scope.locks = {caseTypeName: true, activitySetName: true};
 
     $scope.workflows = {
       'timeline': 'Timeline',
       }
     };
 
+    $scope.isForkable = function() {
+      return !$scope.caseType.id || $scope.caseType.is_forkable
+    };
+
     $scope.isNewActivitySetAllowed = function(workflow) {
       switch (workflow) {
         case 'timeline':
       }
     };
 
+    $scope.isActivityRemovable = function(activitySet, activity) {
+      if (activitySet.name == 'standard_timeline' && activity.name == 'Open Case') {
+        return false;
+      } else {
+        return true;
+      }
+    };
+
+    $scope.isValidName = function(name) {
+      return !name || name.match(/^[a-zA-Z0-9_]+$/);
+    };
+
     $scope.getWorkflowName = function(activitySet) {
       var result = 'Unknown';
       _.each($scope.workflows, function(value, key) {
     };
     $scope.$watch('locks.caseTypeName', updateCaseTypeName);
     $scope.$watch('caseType.title', updateCaseTypeName);
+
+    if (!$scope.isForkable()) {
+      CRM.alert(ts('The CiviCase XML file for this case-type prohibits editing the definition.'));
+    }
   });
 
   crmCaseType.controller('CaseTypeListCtrl', function($scope, crmApi, caseTypes) {
           }
         });
     };
+    $scope.revertCaseType = function (caseType) {
+      caseType.definition = 'null';
+      caseType.is_forked = '0';
+      crmApi('CaseType', 'create', caseType, true)
+        .then(function (data) {
+          if (data.is_error) {
+            caseType.is_forked = '1'; // restore
+            $scope.$digest();
+          }
+        });
+    };
   });
 
 })(angular, CRM.$, CRM._);
\ No newline at end of file
index 417e62296b6f9867e72cdee82d8d677e49622845..961c18621506da6623b3bb52c5852028b5e9e309 100644 (file)
         settings.dialog.height = parseInt($(window).height() * (parseFloat(settings.dialog.height)/100), 10);
       }
       $('<div id="'+ settings.target.substring(1) +'"><div class="crm-loading-element">' + ts('Loading') + '...</div></div>').dialog(settings.dialog);
-      $(settings.target).on('dialogclose', function() {
-        if ($(this).attr('data-unsaved-changes') !== 'true') {
-          $(this).crmSnippet('destroy').dialog('destroy').remove();
-        }
-      });
-    }
-    if (settings.dialog && !settings.dialog.title) {
-      $(settings.target).on('crmLoad', function(e, data) {
-        if (e.target === $(settings.target)[0] && data && data.title) {
-          $(this).dialog('option', 'title', data.title);
-        }
-      });
+      $(settings.target)
+        .on('dialogclose', function() {
+          if ($(this).attr('data-unsaved-changes') !== 'true') {
+            $(this).crmSnippet('destroy').dialog('destroy').remove();
+          }
+        })
+        .on('crmLoad', function(e, data) {
+          // Set title
+          if (e.target === $(settings.target)[0] && data && !settings.dialog.title && data.title) {
+            $(this).dialog('option', 'title', data.title);
+          }
+          // Adjust height to fit content (small delay to allow elements to render)
+          window.setTimeout(function() {
+            var currentHeight = $(settings.target).parent().height(),
+              padding = currentHeight - $(settings.target).height(),
+              newHeight = $(settings.target).prop('scrollHeight') + padding,
+              menuHeight = $('#civicrm-menu').height(),
+              maxHeight = $(window).height() - menuHeight;
+            newHeight = newHeight > maxHeight ? maxHeight : newHeight;
+            if (newHeight > (currentHeight + 15)) {
+              $(settings.target).dialog('option', {
+                position: {my: 'center', at: 'center center+' + (menuHeight / 2), of: window},
+                height: newHeight
+              });
+            }
+          }, 500);
+        });
     }
     $(settings.target).crmSnippet(settings).crmSnippet('refresh');
     return $(settings.target);
   };
   CRM.loadForm = function(url, options) {
-    var settings = {
+    var formErrors = [], settings = {
       crmForm: {
         ajaxForm: {},
         autoClose: true,
             response.url = data.url;
             $el.html(response.content).trigger('crmLoad', response).trigger('crmFormLoad', response);
             if (response.status === 'form_error') {
+              formErrors = [];
               $el.trigger('crmFormError', response);
               $.each(response.errors || [], function(formElement, msg) {
-                $('[name="'+formElement+'"]', $el).crmError(msg);
+                formErrors.push($('[name="'+formElement+'"]', $el).crmError(msg));
               });
             }
           }
           }
         },
         beforeSubmit: function(submission) {
+          $.each(formErrors, function() {
+            this && this.close && this.close();
+          });
           $el.crmSnippet('option', 'block') && $el.block();
           $el.trigger('crmFormSubmit', submission);
         }
           return false;
         });
       }
-      // Alow a button to prevent ajax submit
+      // Allow a button to prevent ajax submit
       $('input[data-no-ajax-submit=true]').click(function() {
         $(this).closest('form').ajaxFormUnbind();
       });
     return widget;
   };
   /**
-   * Handler for jQuery click event e.g. $('a').click(CRM.popup)
+   * Handler for jQuery click event e.g. $('a').click(CRM.popup);
    */
   CRM.popup = function(e) {
     var $el = $(this).first(),
   };
   /**
    * An event callback for CRM.popup or a standalone function to refresh the content around a given element
-   * @param e event|selector
+   * @param e {event|selector}
    */
   CRM.refreshParent = function(e) {
     // Use e.target if input smells like an event, otherwise assume it's a jQuery selector
     var $el = (e.stopPropagation && e.target) ? $(e.target) : $(e),
       $table = $el.closest('.dataTable');
     // Call native refresh method on ajax datatables
-    if ($table && $.fn.DataTable.fnIsDataTable($table[0]) && $table.dataTable().fnSettings().sAjaxSource) {
+    if ($table.length && $.fn.DataTable.fnIsDataTable($table[0]) && $table.dataTable().fnSettings().sAjaxSource) {
       // Refresh ALL datatables - needed for contact relationship tab
       $.each($.fn.dataTable.fnTables(), function() {
         $(this).dataTable().fnSettings().sAjaxSource && $(this).unblock().dataTable().fnDraw();
index b581ec4adc641e58fe311aae56441cfeb7e28d4f..bb86b2f65a5e6deb7f5bf68349ede18d74a78d80 100644 (file)
       el = this[0],
       ret = {},
       $row = this.first().closest('.crm-entity');
-    ret.entity = $row.data('entity') || $row[0].id.split('-')[0];
-    ret.id = $row.data('id') || $row[0].id.split('-')[1];
+      ret.entity = $row.data('entity') || $row[0].id.split('-')[0];
+      ret.id = $row.data('id') || $row[0].id.split('-')[1];
+      ret.action = $row.data('action') || 'setvalue';
+
     if (!ret.entity || !ret.id) {
       return false;
     }
@@ -41,7 +43,7 @@
           field: info.field,
           value: checked ? 1 : 0
         };
-        CRM.api(info.entity, 'setvalue', params, {
+        CRM.api(info.entity, info.action, params, {
           context: this,
           error: function(data) {
             editableSettings.error.call(this, info.entity, info.field, checked, data);
         var
           info = $i.crmEditableEntity(),
           params = {},
-          action = $i.data('action') || 'setvalue';
+          action = $i.data('action') || info.action;
         if (!info.field) {
           return false;
         }
index bc8287fd0036a5a588f9364e78da67dcf824bfc1..4b4be9bd3a6b42379ea3ff741c1a1a251455fcb9 100644 (file)
@@ -13,7 +13,9 @@ Required vars: activitySet
   <tr>
     <td class="label">Name</td>
     <td>
-      <input type="text" name="name" ng-model="activitySet.name"/><!-- FIXME lock -->
+      <input type="text" name="name" ng-model="activitySet.name" ng-disabled="locks.activitySetName" />
+      <a crm-ui-lock binding="locks.activitySetName"></a>
+
     </td>
   </tr>
   <tr>
index 8e84a394523c854e168b7318313d686a299a2330..3a24b86ee88380e9abdb557cb3844efb07fbdc92 100644 (file)
@@ -34,12 +34,14 @@ The original form used table layout; don't know if we have an alternative, CSS-b
         name="caseTypeName"
         ng-model="caseType.name"
         ng-disabled="locks.caseTypeName"
-        ng-pattern="/^[a-zA-Z0-9_]+$/"
         required
         class="big crm-form-text"/>
 
       <a crm-ui-lock binding="locks.caseTypeName"></a>
 
+      <div ng-show="!isValidName(caseType.name)">
+        <em>WARNING: The case type name includes deprecated characters.</em>
+      </div>
       <div ng-show="caseType.id && !locks.caseTypeName">
         <em>WARNING: If any external files or programs reference the old "Name", then they must be updated manually.</em>
       </div>
index 8fed0ebed48746d3c72b960e6ea35ef4e196ce1d..a841b88123da995b7356db4bcedffb832343fa8a 100644 (file)
@@ -15,18 +15,19 @@ Required vars: caseType
 
   <div ng-include="partialUrl('caseTypeDetails.html')"></div>
 
-  <h2>Roles</h2>
+  <h2 ng-show="isForkable()">Roles</h2>
 
-  <div ng-include="partialUrl('rolesTable.html')"></div>
+  <div ng-show="isForkable()" ng-include="partialUrl('rolesTable.html')"></div>
 
-  <h2>Activities</h2>
+  <h2 ng-show="isForkable()">Activities</h2>
 
-  <div class="crmCaseType-acttab" ui-jq="tabs" ui-options="{show: true, hide: true}">
+  <div ng-show="isForkable()" class="crmCaseType-acttab" ui-jq="tabs" ui-options="{show: true, hide: true}">
     <ul>
       <li><a href="#acttab-actType">Activity Types</a></li>
       <li ng-repeat="activitySet in caseType.definition.activitySets">
         <a href="#acttab-{{$index}}">{{ activitySet.label }}</a>
         <span class="ui-icon ui-icon-trash" title="Remove"
+          ng-hide="activitySet.name == 'standard_timeline'"
           ng-click="removeItem(caseType.definition.activitySets, activitySet)">Remove</span>
         <!-- Weird spacing:
         <a class="crm-hover-button" ng-click="removeItem(caseType.definition.activitySets, activitySet)">
index 4305201020154dbd72eb7c948908430cb9cd4b90..1f3bf76a7ca1c4009e4a9cda6f15851c6e3f2270 100644 (file)
@@ -21,7 +21,7 @@ Required vars: caseTypes
       class="crm-entity"
       ng-class-even="'even-row even'"
       ng-class-odd="'odd-row odd'"
-      ng-class="{disabled: 0==caseType.is_active}">
+      ng-class="{disabled: 0==caseType.is_active, forked: 1==caseType.is_forked}">
     <td>{{caseType.title}}</td>
     <td>{{caseType.name}}</td>
     <td>{{caseType.description}}</td>
@@ -46,6 +46,13 @@ Required vars: caseTypes
                 Disable
               </a>
             </li>
+            <li ng-show="caseType.is_forked">
+              <a class="action-item crm-hover-button"
+                 crm-confirm="{type: 'revert', obj: caseType}"
+                 on-yes="revertCaseType(caseType)">
+                Revert
+              </a>
+            </li>
             <li>
               <a class="action-item crm-hover-button"
                  crm-confirm="{type: 'delete', obj: caseType}"
index 460f730576fbcd95288284bf2712b7a90cc76aad..824629527f4376f44899d0fee2ca4f8540dfcac0 100644 (file)
@@ -45,7 +45,7 @@ Required vars: activitySet
       <input
         class="number"
         type="text"
-        ng-pattern="/^[0-9]*$/"
+        ng-pattern="/^-?[0-9]*$/"
         ng-model="activity.reference_offset"
         ng-hide="activity.name == 'Open Case'"
         ng-required="activity.name != 'Open Case'"
@@ -63,7 +63,9 @@ Required vars: activitySet
       </select>
     </td>
     <td>
-      <a class="crm-hover-button" ng-click="removeItem(activitySet.activityTypes, activity)">
+      <a class="crm-hover-button"
+         ng-show="isActivityRemovable(activitySet, activity)"
+         ng-click="removeItem(activitySet.activityTypes, activity)">
         <span class="icon delete-icon" title="Remove"></span>
       </a>
     </td>
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644 (file)
index 0000000..fb7ae22
--- /dev/null
@@ -0,0 +1,27 @@
+<phpunit backupGlobals="false"
+         backupStaticAttributes="false"
+         colors="true"
+         convertErrorsToExceptions="true"
+         convertNoticesToExceptions="true"
+         convertWarningsToExceptions="true"
+         processIsolation="false"
+         stopOnFailure="false"
+         syntaxCheck="false"
+         beStrictAboutTestsThatDoNotTestAnything="false"
+         bootstrap="tests/phpunit/CiviTest/bootstrap.php"
+>
+  <testsuites>
+    <testsuite name="CiviCRM Test Suite">
+      <directory>./tests/phpunit/</directory>
+    </testsuite>
+  </testsuites>
+
+  <filter>
+    <whitelist>
+      <directory suffix=".php">./CRM</directory>
+      <directory suffix=".php">./Civi</directory>
+      <directory suffix=".php">./api</directory>
+    </whitelist>
+  </filter>
+</phpunit>
+
index c73562d8ebe31896f081e0f61bc40d33cab2613e..40f12dcda88a62c3f86fe4e92d7f0f93e034cd26 100644 (file)
@@ -171,7 +171,7 @@ return array (
     'html_type' => 'Text',
     'default' => '{contact.last_name}{, }{contact.first_name}',
     'add' => '4.1',
-    'title' => null,
+    'title' => 'Sort Name Format',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
@@ -185,7 +185,7 @@ return array (
     'html_type' => 'Text',
     'default' => null,
     'add' => '4.1',
-    'title' => null,
+    'title' => 'Wysiwig Editor',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
@@ -199,7 +199,7 @@ return array (
     'html_type' => 'Text',
     'default' => null,
     'add' => '4.1',
-    'title' => null,
+    'title' => 'Ajax Check Similar',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
@@ -213,7 +213,7 @@ return array (
     'quick_form_type' => 'YesNo',
     'default' => 1,
     'add' => '4.5',
-    'title' => null,
+    'title' => 'Ajax Popups Enabled',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
@@ -275,7 +275,7 @@ return array (
     ),
     'default' => '\ 11\ 12\ 13\ 14\ 15\ 16\ 17\ 1',
     'add' => '4.1',
-    'title' => null,
+    'title' => 'Contact Reference Options',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
@@ -616,7 +616,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl
     'quick_form_type' => 'YesNo',
     'default' => 1,
     'add' => '4.3',
-    'title' => '',
+    'title' => 'Verify SSL?',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => 'If disabled, backend HTTPS services will allow unverified, insecure connections',
index 4d1dc8751b4a8eb6912d2097cea8cb251f78a740..0062ae5108d6db1368143eb9d1184368df189584 100644 (file)
@@ -105,7 +105,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
-    'default' => 'null',
+    'default' => null,
     'add' => '4.3',
     'title' => 'Fatal Error Handler',
     'is_domain' => 1,
index f0ba60e6e0fdc69f1aaba8b15f3ef4404155c73a..f8a011b48559d9546b9209b77707e27d8fd53964 100644 (file)
@@ -46,11 +46,11 @@ return array(
     'default' => null,
     'add' => '4.1',
     'prefetch' => 1,
-    'title' => null,
+    'title' => 'Upload Directory',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
-    'help_text' => 'If set, new contacts that are created when signing a petition are assigned a tag of this name.',
+    'help_text' => '',
   ),
   'imageUploadDir' => array(
     'group_name' => 'Directory Preferences',
@@ -61,7 +61,7 @@ return array(
     'default' => null,
     'add' => '4.1',
     'prefetch' => 1,
-    'title' => null,
+    'title' => 'Image Directory',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
@@ -76,7 +76,7 @@ return array(
     'default' => null,
     'add' => '4.1',
     'prefetch' => 1,
-    'title' => null,
+    'title' => 'Custom Files Upload Directory',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
@@ -91,7 +91,7 @@ return array(
     'default' => null,
     'add' => '4.1',
     'prefetch' => 1,
-    'title' => null,
+    'title' => 'Custom Template Directory',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
@@ -106,7 +106,7 @@ return array(
     'default' => null,
     'add' => '4.1',
     'prefetch' => 1,
-    'title' => null,
+    'title' => 'Custom PHP Path',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
@@ -121,7 +121,7 @@ return array(
     'default' => null,
     'add' => '4.1',
     'prefetch' => 1,
-    'title' => null,
+    'title' => 'Extensions Directory',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
index f9101468a7bb56148910b44bc69aae147d4625c4..18f98c89672ade6368af693a6ffcc8db47e83ded 100644 (file)
@@ -74,7 +74,7 @@ return array(
     'html_type' => 'checkbox',
     'default' => 0,
     'add' => '4.1',
-    'title' => null,
+    'title' => 'Use CiviMail Workflow',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => 'When CiviMail is enabled, users who "subscribe" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.',
@@ -88,7 +88,7 @@ return array(
     'html_type' => 'checkbox',
     'default' => 0,
     'add' => '4.1',
-    'title' => null,
+    'title' => 'Lock Mails Server-Wide for Mail Sending',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
@@ -102,7 +102,7 @@ return array(
     'html_type' => 'checkbox',
     'default' => 0,
     'add' => '4.1',
-    'title' => null,
+    'title' => 'Mailing Backend',
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => null,
@@ -178,4 +178,4 @@ return array(
     'description' => 'If enabled, a randomized hash key will be used to reference the mailing URL in the mailing.viewUrl token, instead of the mailing ID',
     'help_text' => null,
   ),
-);
\ No newline at end of file
+);
index aed49914d7d96fcf72117100ada84a4491f45b41..a071a9ac51d19725fc8fc483fe36af08444b957a 100644 (file)
@@ -41,6 +41,7 @@ return array(
     'group_name' => 'Multi Site Preferences',
     'group' => 'multisite',
     'name' => 'is_enabled',
+    'title' => 'Multisite Is enabled',
     'type' => 'Integer',
     'default' => null,
     'add' => '4.1',
@@ -53,6 +54,7 @@ return array(
     'group_name' => 'Multi Site Preferences',
     'group' => 'multisite',
     'name' => 'domain_group_id',
+    'title' => 'Multisite Domain Group',
     'type' => 'Integer',
     'default' => null,
     'add' => '4.1',
@@ -65,6 +67,7 @@ return array(
     'group_name' => 'Multi Site Preferences',
     'group' => 'multisite',
     'name' => 'event_price_set_domain_id',
+    'title' => 'Domain Event Price Set',
     'type' => 'Integer',
     'default' => null,
     'add' => '4.1',
@@ -78,6 +81,7 @@ return array(
     'group' => 'multisite',
     'name' => 'uniq_email_per_site',
     'type' => 'Integer',
+    'title' => 'Unique Email per Domain?',
     'default' => null,
     'add' => '4.1',
     'is_domain' => 1,
index 82e4f1e7a9103f159da76e8bed382dcd528b1cc5..f2484ff18909804f946bd36bc2acf09403e0db9b 100644 (file)
@@ -40,6 +40,7 @@ return array (
     'group' => 'url',
     'group_name' => 'URL Preferences',
     'name' => 'userFrameworkResourceURL',
+    'title' => 'Script and CSS Resources URL',
     'type' => 'String',
     'default' => null,
     'add' => '4.1',
@@ -53,6 +54,7 @@ return array (
   'imageUploadURL' => array(
     'group' => 'url',
     'group_name' => 'URL Preferences',
+    'title' => 'Image URL Prefix',
     'name' => 'imageUploadURL',
     'type' => 'String',
     'default' => null,
@@ -68,6 +70,7 @@ return array (
     'group' => 'url',
     'group_name' => 'URL Preferences',
     'name' => 'customCSSURL',
+    'title' => 'Custom CSS',
     'type' => 'String',
     'default' => null,
     'add' => '4.1',
index cc499fef6ec7e5bff51fe3ade3a7383337b37abe..1a26a496000b07b8070b6cd4fb5c7b7b5d7b8aec 100644 (file)
@@ -1857,7 +1857,7 @@ WHERE cefa.account_relationship = 1";
         'status_id' => 1,
         'trxn_id' => $result->trxn_id,
         'contribution_id' => $result->contribution_id,
-        'to_financial_account_id' => $result->payment_instrument_id ? $financialAccountId[$result->payment_instrument_id] : $defaultFinancialAccount,
+        'to_financial_account_id' => empty($financialAccountId[$result->payment_instrument_id]) ? $defaultFinancialAccount : $financialAccountId[$result->payment_instrument_id],
         'payment_instrument_id' => $result->payment_instrument_id,
         'check_number' => $result->check_number
       );
index b6608bf978f8a8d9cf3736d2e0c05cb50b6ddb14..ad10a2d2f1553b6345c74206ec4fe57f9e142a0b 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing ACL  *}
-<h3>{if $action eq 1}{ts}New ACL{/ts}{elseif $action eq 2}{ts}Edit ACL{/ts}{else}{ts}Delete ACL{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-acl-form-block">
 {if $action eq 8}
   <div class="messages status no-popup">
index 86240282b11c7018ba7e0c68a081705d30514fde..5bfafb04fe2065720699f526a16e47a6d584a3c4 100644 (file)
         </thead>
         <tbody>
         {foreach from=$rows item=row}
-      <tr id="acl_role-{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-acl_entity_role crm-entity {if NOT $row.is_active} disabled{/if}">
-          <td class="crm-acl_entity_role-acl_role">{$row.acl_role}</td>
-          <td class="crm-acl_entity_role-entity">{$row.entity}</td>
-          <td class="crm-acl_entity_role-is_active" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
-          <td>{$row.action|replace:'xx':$row.id}</td>
-            </tr>
+          <tr id="acl_role-{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-acl_entity_role crm-entity {if NOT $row.is_active} disabled{/if}">
+            <td class="crm-acl_entity_role-acl_role">{$row.acl_role}</td>
+            <td class="crm-acl_entity_role-entity">{$row.entity}</td>
+            <td class="crm-acl_entity_role-is_active" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
+            <td>{$row.action|replace:'xx':$row.id}</td>
+          </tr>
         {/foreach}
         </tbody>
     </table>
index 4436b894e9f878abd9700602f4ad2c678635b264..62bb3afe51f2de569e7edc0f0859ebec97b81314 100644 (file)
       {literal}
         <script type="text/javascript">
           CRM.$(function($) {
-            cj('.crm-accordion-body').each( function() {
+            $('.crm-accordion-body').each( function() {
               //open tab if form rule throws error
-              if ( cj(this).children( ).find('span.crm-error').text( ).length > 0 ) {
-                cj(this).parent('.collapsed').crmAccordionToggle();
+              if ( $(this).children( ).find('span.crm-error').text( ).length > 0 ) {
+                $(this).parent('.collapsed').crmAccordionToggle();
               }
             });
             $('#swap_target_assignee').click(function() {
index 5a458693f425e797202fea68d631c48a70952aa1..fee095679f9f5508a0ff0982b917fad58711604b 100644 (file)
 {literal}
   <script type="text/javascript">
     CRM.$(function($) {
-      var roleId = cj('input[name=activity_role]:checked', '#Search').val();
+      var $form = $('form.{/literal}{$form.formClass}{literal}'),
+        roleId = $('input[name=activity_role]:checked', $form).val();
       if (roleId) {
-        cj('.description .option-' + roleId).show();
+        $('.description .option-' + roleId).show();
       }
 
+      $('[name=activity_role]:input').change(function() {
+        $('.description .contact-name-option').hide();
+        if ($(this).is(':checked')) {
+          $('.description .option-' + $(this).val()).show();
+        }
+      }).change();
     });
 
-    cj('[name=activity_role]:input').change(function () {
-      cj('.description .contact-name-option').hide();
-      if (cj(this).is(':checked')) {
-        cj('.description .option-' + cj(this).val()).show();
-      }
-    }).change();
 
   </script>
 {/literal}
index d775f68390b177b8f150439f6e6c635dbcd11c86..a2e32dcc685353867a11481f4e4ccb0f60da23d9 100644 (file)
@@ -148,17 +148,17 @@ campaignContext="componentSearch" campaignTrClass='' campaignTdClass=''}
   CRM.$(function($) {
     //Searchable activity custom fields which extend ALL activity types are always displayed in the form
     //hence hide remaining activity custom data
-    cj('#activityCustom').children( ).each( function( ) {
-      cj('#'+cj(this).attr('id')+' div').each( function( ) {
-        if (cj(this).children( ).attr('id')) {
-          var activityCustomdataGroup = cj(this).attr('id');  //div id
-          var fieldsetId = cj(this).children( ).attr('id');  // fieldset id
+    $('#activityCustom').children( ).each( function( ) {
+      $('#'+$(this).attr('id')+' div').each( function( ) {
+        if ($(this).children( ).attr('id')) {
+          var activityCustomdataGroup = $(this).attr('id');  //div id
+          var fieldsetId = $(this).children( ).attr('id');  // fieldset id
           var splitFieldsetId = fieldsetId.split("\ 1");
           var splitFieldsetLength = splitFieldsetId.length;  //length of fieldset
           var show = 0;
           //setdefault activity custom data group if corresponding activity type is checked
-          cj('#Activity div').each(function( ) {
-            var checkboxId = cj(this).children().attr('id');  //activity type element name
+          $('#Activity div').each(function( ) {
+            var checkboxId = $(this).children().attr('id');  //activity type element name
             if (document.getElementById( checkboxId ).checked ) {
               var element = checkboxId.split('[');
               var splitElement = element[1].split(']');  // get activity type id
@@ -173,16 +173,12 @@ campaignContext="componentSearch" campaignTrClass='' campaignTdClass=''}
             }
           });
           if (show < 1) {
-            cj('#'+activityCustomdataGroup).hide( );
+            $('#'+activityCustomdataGroup).hide( );
           }
         }
       });
     });
   });
-</script>
-
-
-<script type="text/javascript">
 
   function showCustomData(chkbox) {
   if (document.getElementById(chkbox).checked) {
index 6049c453bc3440b2476540bdd4ae97465ed9f08a..ae3ae07e55f987f40b4b4554502568b5725e5ef8 100644 (file)
@@ -46,7 +46,7 @@
 {literal}
 <script type="text/javascript">
 CRM.$(function($) {
-  var $form = $("#{/literal}{$form.formName}{literal}");
+  var $form = $("form.{/literal}{$form.formClass}{literal}");
   $('input[name=unclosed_case_id]', $form).crmSelect2({
     placeholder: {/literal}'{ts escape="js"}- select case -{/ts}'{literal},
     minimumInputLength: 1,
index cce3627d6c94ad1e44b5e9df76963a0d92bab1cb..660de87b81f297a3fde1180c176279510a66c2e4 100644 (file)
@@ -25,7 +25,6 @@
 *}
 {* this template is used for adding/editing Contact Type  *}
 
-<h3>{if $action eq 1}{ts}New Contact Type{/ts}{elseif $action eq 2}{ts}Edit Contact Type{/ts}{else}{ts}Delete Contact Type{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-contact-type-form-block">
 {if $action eq 8}
   <div class="messages status no-popup">
@@ -53,8 +52,8 @@
            {/if}
    </tr>
    <tr class="crm-contact-type-form-block-image_URL">
-      <td class="label">{$form.image_URL.label}</td>
-      <td>{$form.image_URL.html|crmAddClass:'huge40'}{help id="id-image_URL"}</td>
+      <td class="label">{$form.image_URL.label} {help id="id-image_URL"}</td>
+      <td>{$form.image_URL.html|crmAddClass:'huge40'}</td>
    </tr>
    <tr class="crm-contact-type-form-block-description">
      <td class="label">{$form.description.label}
index 5be58410d532c7238cdf3471b9d08fba95edd0e7..6faa276abd0f3af219433ddb74a0cb06dc731f11 100644 (file)
         <div class="description">{ts}Put in the API method name. You need to enter pieces of full API function name as described in the documentation.{/ts}</div>
 <script>
 {literal}
+CRM.$(function($) {
   function assembleName( ) {
 
     // dunno yet
     var apiName = "";
 
     // building prefix
-    if( cj('#api_action').val() == '' ) {
-      cj('#fname').html( "<em>API name will start appearing here as you type in fields below.</em>" );
+    if( $('#api_action').val() == '' ) {
+      $('#fname').html( "<em>API name will start appearing here as you type in fields below.</em>" );
       return;
     }
 
-    apiPrefix = 'api'
+    var apiPrefix = 'api'
 
     // building entity
-    var apiEntity = cj('#api_entity').val().replace( /([A-Z])/g, function($1) {
-                                                   return $1.toLowerCase();
-                                                   });
+    var apiEntity = $('#api_entity').val().replace( /([A-Z])/g, function($1) {
+      return $1.toLowerCase();
+    });
     // building action
-    var apiAction = cj('#api_action').val().replace(/(\_[a-z])/g, function($1) {return $1.toUpperCase().replace('_','');});
+    var apiAction = $('#api_action').val().replace(/(\_[a-z])/g, function($1) {return $1.toUpperCase().replace('_','');});
     apiName = apiPrefix + '.' + apiEntity + '.' + apiAction;
-    cj('#fname').text( apiName );
+    $('#fname').text( apiName );
   }
 
   // bind to different events to build API name live
-  cj(document).ready( function() { assembleName() } );
-  cj('#api_entity').change( function() { assembleName() } );
-  cj('#api_action').keyup( function() { assembleName() } );
+  $('#api_entity').change(assembleName)
+  $('#api_action').change(assembleName).keyup(assembleName);
+  assembleName();
+});
 
 {/literal}
 </script>
index 945a8df2ee86167347d4df54ac1cd7a449bdef4b..d02a3e89a72debb74b33bb92ce97211071f9f10b 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing location type  *}
-<h3>{if $action eq 1}{ts}New Location Type{/ts}{elseif $action eq 2}{ts}Edit Location Type{/ts}{else}{ts}Delete Location Type{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-location-type-form-block">
 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
 {if $action eq 8}
index 7ed52a897aece54fc311fd257891a08fd4235536..67e9adbbeadb2de182f6e470c6509a82e27c31e2 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing email settings.  *}
-<h3>{if $action eq 1}{ts}New Email Settings{/ts}{elseif $action eq 2}{ts}Edit Email Settings{/ts}{else}{ts}Delete Email Settings{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-mail-settings-form-block">
 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
 {if $action eq 8}
index 6ebb1243d47f6d16dfb4a58821a506be4bc10f71..746fc728025c447010cf6d2b6f78ba4195ee27c2 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing a saved mapping *}
-<h3>{if $action eq 1}{ts}New Tag{/ts}{elseif $action eq 2}{ts}Edit Mapping{/ts}{else}{ts}Delete Mapping{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-mapping-form-block">
     {if $action eq 1 or $action eq 2 }
       <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
index 6fdcb7b0dae05d3949cde13c92eda8c236877dd6..267a4616f77f3514a65a66dd46e2ccd42c319d2e 100644 (file)
@@ -70,6 +70,7 @@
                 <input class="crm-token-selector big" data-field="msg_text" />
                 {help id="id-token-text" tplFile=$tplFile file="CRM/Contact/Form/Task/Email.hlp"}
               </div>
+              <div class="clear"></div>
                 <div class='text'>
                     {$form.msg_text.html|crmAddClass:huge}
                     <div class="description">{ts}Text formatted message.{/ts} {ts 1=$tokenDocsRepeated}Tokens may be included (%1).{/ts}</div>
@@ -88,7 +89,7 @@
              {help id="id-token-html" tplFile=$tplFile isAdmin=$isAdmin editor=$editor file="CRM/Contact/Form/Task/Email.hlp"}
            </div>
                 <div class="clear"></div>
-                <div class='html'>
+                <div class='html resizable-textarea'>
                     {$form.msg_html.html}
                     <div class="description">{ts}You may optionally create an HTML formatted version of this message. It will be sent to contacts whose Email Format preference is 'HTML' or 'Both'.{/ts} {ts 1=$tokenDocsRepeated}Tokens may be included (%1).{/ts}</div>
                 </div>
index 9e456e4e72b64b0325d372dca7d57356de5713c5..6da427ffd1a8ed8c7de745bf37e47bb28291a542 100644 (file)
@@ -23,7 +23,6 @@
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-{* this template is used for adding/editing/deleting activity type  *}
 <h3>{if $action eq 1}{ts}New Option Group{/ts}{elseif $action eq 2}{ts}Edit Option Group{/ts}{else}{ts}Delete Option Group{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-admin-optiongroup-form-block">
   <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
index 27afc010600b23a7579362182f247f848b5c2205..b08273239ae9ddcdbde7ad2323fbe5e089825795 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing options *}
-<h3>{if $action eq 1}{ts 1=$gLabel}New %1 Option{/ts}{elseif $action eq 8}{ts 1=$gLabel}Delete %1 Option{/ts}{else}{ts 1=$gLabel}Edit %1 Option{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-admin-options-form-block">
 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
   {if $action eq 8}
index 73644c381b0afc84b3d5742c3692c495820be57b..88aa6b62b3f631e7d6b3c00bad69658385e2882c 100644 (file)
 </div>
 
 {if $action eq 1  or $action eq 2}
-<script type="text/javascript" >
-{literal}
+  <script type="text/javascript">
+  {literal}
     function reload(refresh) {
-        var paymentProcessorType = document.getElementById("payment_processor_type_id");
-        var url = {/literal}"{$refreshURL}"{literal}
-        var post = url + "&pp=" + paymentProcessorType.value;
-        if( refresh ) {
-            window.location= post;
-        }
+      var paymentProcessorType = cj("#payment_processor_type_id");
+      var url = {/literal}"{$refreshURL}"{literal} + "&pp=" + paymentProcessorType.val();
+      paymentProcessorType.closest('form').attr('data-warn-changes', 'false');
+      window.location.href = url;
     }
-{/literal}
-    </script>
+  {/literal}
+  </script>
 
 {/if}
index ea856466676a7ef428e77d4d2435edd7f424d93a..b3c4d51f8efb1089b3f4762fa34c5f18a14b5f20 100644 (file)
         <td class="label">{$form.wysiwyg_input_format.label}</td>
         <td>
           {$form.wysiwyg_input_format.html}{literal}
-            <script type="text/javascript">cj(document).ready(function () {
-                if (cj('#editor_id').val() == 4) {
-                  cj('#crm-preferences-display-form-block-wysiwyg_input_format').show();
+            <script type="text/javascript">
+              CRM.$(function($) {
+                if ($('#editor_id').val() == 4) {
+                  $('#crm-preferences-display-form-block-wysiwyg_input_format').show();
                 }
-              });</script>
+              });
+            </script>
           {/literal}
           <br/>
           <span class="description">
   {literal}
     <script type="text/javascript">
       CRM.$(function($) {
-        cj("#contactEditBlocks").sortable({
-          placeholder: 'ui-state-highlight',
-          update: getSorting
-        });
-        cj("#contactEditOptions").sortable({
-          placeholder: 'ui-state-highlight',
-          update: getSorting
-        });
-      });
-
-      function getSorting(e, ui) {
-        var params = new Array();
-        var y = 0;
-        var items = cj("#contactEditBlocks li");
-        if (items.length > 0) {
-          for (var y = 0; y < items.length; y++) {
-            var idState = items[y].id.split('-');
-            params[y + 1] = idState[1];
+        function getSorting(e, ui) {
+          var params = [];
+          var y = 0;
+          var items = $("#contactEditBlocks li");
+          if (items.length > 0) {
+            for (var y = 0; y < items.length; y++) {
+              var idState = items[y].id.split('-');
+              params[y + 1] = idState[1];
+            }
           }
-        }
 
-        items = cj("#contactEditOptions li");
-        if (items.length > 0) {
-          for (var x = 0; x < items.length; x++) {
-            var idState = items[x].id.split('-');
-            params[x + y + 1] = idState[1];
+          items = $("#contactEditOptions li");
+          if (items.length > 0) {
+            for (var x = 0; x < items.length; x++) {
+              var idState = items[x].id.split('-');
+              params[x + y + 1] = idState[1];
+            }
           }
+          $('#contact_edit_preferences').val(params.toString());
         }
-        cj('#contact_edit_preferences').val(params.toString());
-      }
-      cj(document).ready(function() {
+
         var invoicesKey = '{/literal}{$invoicesKey}{literal}';
         var invoicing = '{/literal}{$invoicing}{literal}';
         if (!invoicing) {
-          cj('#user_dashboard_options_' + invoicesKey).attr("disabled", true);
+          $('#user_dashboard_options_' + invoicesKey).attr("disabled", true);
         }
-        cj("#invoice_help").insertAfter("label[for='user_dashboard_options_" + invoicesKey + "']");
+        $("#invoice_help").insertAfter("label[for='user_dashboard_options_" + invoicesKey + "']");
+        
+        $("#contactEditBlocks, #contactEditOptions").sortable({
+          placeholder: 'ui-state-highlight',
+          update: getSorting
+        });
       });
     </script>
   {/literal}
index 3c4f97b19c743c6938f22badc36bc228a397728a..fc83e30fb245a2f589a24beef54fa08919a9ee4d 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing relationship types  *}
-<h3>{if $action eq 1}{ts}New Relationship Type{/ts}{elseif $action eq 2}{ts}Edit Relationship Type{/ts}{elseif $action eq 8}{ts}Delete Relationship Type{/ts}{else}{ts}View Relationship Type{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-relationship-type-form-block">
       <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
   {if $action eq 8}
index 1dfe67dfc1fd5da7561e3a6b2ad82c27a921f478..fb8cbae96f560d6983663612204a9d7def300f8f 100644 (file)
     var entityMapping = eval({/literal}{$entityMapping}{literal});
     var recipientMapping = eval({/literal}{$recipientMapping}{literal});
 
-    cj('#absolute_date_display').change( function() {
-        if(cj('#absolute_date_display').val()) {
-            cj('#relativeDate').hide();
-            cj('#relativeDateRepeat').hide();
-            cj('#repeatFields').hide();
-        } else {
-            cj('#relativeDate').show();
-            cj('#relativeDateRepeat').show();
-        }
-    });
 
     CRM.$(function($) {
-        if (cj('#absolute_date_display').val()) {
-            cj('#relativeDate').hide();
-            cj('#relativeDateRepeat').hide();
-            cj('#repeatFields').hide();
-         }
+      $('#absolute_date_display').change(function() {
+        if($('#absolute_date_display').val()) {
+          $('#relativeDate').hide();
+          $('#relativeDateRepeat').hide();
+          $('#repeatFields').hide();
+        } else {
+          $('#relativeDate').show();
+          $('#relativeDateRepeat').show();
+        }
+      });
+      
+      if ($('#absolute_date_display').val()) {
+        $('#relativeDate, #relativeDateRepeat, #repeatFields').hide();
+      }
 
-         cj('#entity_0').change( function( ) {
-              buildSelect("start_action_date");
+      $('#entity_0').change( function( ) {
+        buildSelect("start_action_date");
         buildSelect("end_date");
         buildSelect1("recipient");
-         });
-     });
+        showHideLimitTo();
+      });
 
-  CRM.$(function($) {
-    loadMsgBox();
-    cj('#mode').change(function () {
       loadMsgBox();
-    });
+      $('#mode').change(loadMsgBox);
 
-    showHideLimitTo();
-    cj('#entity_0').change(function () {
       showHideLimitTo();
+
+      if ($('#is_recipient_listing').val()) {
+        $('#recipientList').show();
+      }
+      else {
+        $('#recipientList').hide();
+      }
+      $('#recipient').change(populateRecipient);
     });
-  });
 
   function loadMsgBox() {
     if (cj('#mode').val() == 'Email' || cj('#mode').val() == 0){
     }
   }
 
-  CRM.$(function($) {
-    if (cj('#is_recipient_listing').val()) {
-      cj('#recipientList').show();
-    }
-    else {
-      cj('#recipientList').hide();
-    }
-    cj('#recipient').change(function () {
-      populateRecipient();
-    });
-  });
-
   function populateRecipient( ) {
     var recipient = cj("#recipient option:selected").val();
     var entity = cj("#entity_0 option:selected").val();
index bdb6e786c1e76abbe5d113a38eb27ac3c4be675c..126af32277cff02a092f2f5458bba38f92bd19c2 100644 (file)
 {literal}
 <script type="text/javascript">
 CRM.$(function($) {
-  showHideMapAPIkey( cj('#mapProvider').val( ) );
-});
-function showHideMapAPIkey( mapProvider ) {
-  if ( mapProvider && ( mapProvider == 'OpenStreetMaps' ) ) {
-    cj('#Mapping tr.crm-map-form-block-mapAPIKey').hide( );
-  } else {
-    cj('#Mapping tr.crm-map-form-block-mapAPIKey').show( );
+  var $form = $('form.{/literal}{$form.formClass}{literal}');
+  function showHideMapAPIkey() {
+    var mapProvider = $(this).val();
+    if ( !mapProvider || ( mapProvider === 'OpenStreetMaps' ) ) {
+      $('tr.crm-map-form-block-mapAPIKey', $form).hide( );
+    } else {
+      $('tr.crm-map-form-block-mapAPIKey', $form).show( );
+    }
   }
-}
+  $('#mapProvider').each(showHideMapAPIkey).change(showHideMapAPIkey);
+});
 </script>
 {/literal}
index bf3d06c09b761a5d7f102860e21ec2f814f2e51f..db97144c8cfe9f6ff6e2fdee42a229e0a9e5133a 100644 (file)
 {literal}
 <script type="text/javascript">
     CRM.$(function($) {
-      var mailSetting = cj("input[name='outBound_option']:checked").val( );
+      var mailSetting = $("input[name='outBound_option']:checked").val( );
 
       var archiveWarning = "{/literal}{ts escape='js'}WARNING: You are switching from a testing mode (Redirect to Database) to a live mode. Check Mailings > Archived Mailings, and delete any test mailings that are not in Completed status prior to running the mailing cron job for the first time. This will ensure that test mailings are not actually sent out.{/ts}{literal}"
 
-        showHideMailOptions( cj("input[name='outBound_option']:checked").val( ) ) ;
+        showHideMailOptions( $("input[name='outBound_option']:checked").val( ) ) ;
 
         function showHideMailOptions( value ) {
             switch( value ) {
               case "0":
-                cj("#bySMTP").show( );
-                cj("#bySendmail").hide( );
-                cj("#_qf_Smtp_refresh_test").show( );
+                $("#bySMTP").show( );
+                $("#bySendmail").hide( );
+                $("#_qf_Smtp_refresh_test").show( );
                 if (mailSetting == '5') {
                   alert(archiveWarning);
                 }
               break;
               case "1":
-                cj("#bySMTP").hide( );
-                cj("#bySendmail").show( );
-                cj("#_qf_Smtp_refresh_test").show( );
+                $("#bySMTP").hide( );
+                $("#bySendmail").show( );
+                $("#_qf_Smtp_refresh_test").show( );
                 if (mailSetting == '5') {
                   alert(archiveWarning);
                 }
               break;
               case "3":
-                cj('.mailoption').hide();
-                cj("#_qf_Smtp_refresh_test").show( );
+                $('.mailoption').hide();
+                $("#_qf_Smtp_refresh_test").show( );
                 if (mailSetting == '5') {
                   alert(archiveWarning);
                 }
               break;
               default:
-                cj("#bySMTP").hide( );
-                cj("#bySendmail").hide( );
-                cj("#_qf_Smtp_refresh_test").hide( );
+                $("#bySMTP").hide( );
+                $("#bySendmail").hide( );
+                $("#_qf_Smtp_refresh_test").hide( );
             }
         }
 
-        cj("input[name='outBound_option']").click( function( ) {
-            showHideMailOptions( cj(this).val( ) );
+        $("input[name='outBound_option']").click( function( ) {
+            showHideMailOptions( $(this).val( ) );
         });
     });
 
index 301dbb517556400495ec1e521df7f71bf15b3c81..242138abea66b7164641fae98e4d823e55ba6ac6 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing a tag (admin)  *}
-<h3>{if $action eq 1}{ts}New Tag {if $isTagSet}Set{/if}{/ts}{elseif $action eq 2}{ts}Edit Tag {if $isTagSet}Set{/if}{/ts}{else}{ts}Delete Tag {if $isTagSet}Set{/if}{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-tag-form-block">
     {if $action eq 1 or $action eq 2 }
     <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
index 5b387b0d963942a7e838a43d679a1e3f0bdf2630..6331f5e2eeba306c03da8bfb2dd093826934d33f 100644 (file)
       <tr><td>Javascript</td><td><pre class="prettyprint linenums" id="api-json" title='javascript syntax'></pre></td></tr>
     </table>
   </div>
-  <input type="submit" value="{ts}Execute{/ts}" class="form-submit"/>
+  <input type="submit" value="{ts}Execute{/ts}" class="crm-form-submit"/>
 <pre id="api-result" class="linenums">
 {ts}The result of api calls are displayed in this area.{/ts}
 </pre>
index 035f61d7663cb8718da7a0a2960e25eb4227b9fb..40d2004d09682b88423ff379291dde8274594eec 100644 (file)
@@ -28,7 +28,7 @@
     <div class="messages status no-popup">
       <table>
         <tr><td class="tasklist">
-          {ts 1='http://civicrm.org/civicrm/profile/create?reset=1&gid=15'}Have you registered this site at CiviCRM.org? If not, please help strengthen the CiviCRM ecosystem by taking a few minutes to <a href="%1" target="_blank">fill out the site registration form</a>. The information collected will help us prioritize improvements, target our communications and build the community. If you have a technical role for this site, be sure to check "Keep in Touch" to receive technical updates (a low volume mailing list).{/ts}</td>
+          {ts 1='https://civicrm.org/register-site'}Have you registered this site at CiviCRM.org? If not, please help strengthen the CiviCRM ecosystem by taking a few minutes to <a href="%1" target="_blank">fill out the site registration form</a>. The information collected will help us prioritize improvements, target our communications and build the community. If you have a technical role for this site, be sure to check "Keep in Touch" to receive technical updates (a low volume mailing list).{/ts}</td>
         </tr>
       </table>
     </div>
index 062ca00f350dcfdc2897d3081f65b73d2c8ebbc3..2998137e2333e87022988e7d1e2cdb5665fbbcec 100644 (file)
@@ -32,7 +32,7 @@
 
 <table class="selector">
     <tr class="columnheader">
-        <td colspan="2">{ts}Site Configuration{/ts}</td>
+        <td colspan="2">{ts}Site Configuration and Registration{/ts}</td>
     </tr>
     <tr class="even">
         <td class="tasklist nowrap"><a href="{crmURL p="civicrm/admin/setting/localization" q="reset=1&civicrmDestination=`$destination`"}" title="{$linkTitle}">{ts}Localization{/ts}</a></td>
         {/ts}</a></td>
         <td>{ts}Enable the required CiviCRM components.(CiviContribute, CiviEvent etc.){/ts}</td>
     </tr>
+    <tr class="even">
+        <td class="tasklist nowrap"><a href="https://civicrm.org/register-site" title="{ts}Register your site at CiviCRM.org. Opens in a new window.{/ts}" target="_blank">{ts}Register your site{/ts}</a></td>
+        <td>{ts}Register your site, join the community, and help CiviCRM remain a leading CRM for organizations worldwide.{/ts}</td>
+    </tr>
 
     <tr class="columnheader">
         <td colspan="2">{ts}Viewing and Editing Contacts{/ts}</td>
index 6a6d707c45464686caaa9a63201ada29bd3c421f..eae3fe1dec3b77aa5e5d9f48bcd4f5fa58215820 100644 (file)
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-<div id="help">
-    {ts}CiviCRM comes with 3 basic (built-in) contact types: Individual, Household, and Organization. You can create additional contact types based on these types to further differentiate contacts (for example you might create Student, Parent, Staff, and /or Volunteer types from the basic Individual type...).{/ts} {help id="id-contactSubtype-intro"}
-</div>
-
 {if $action eq 1 or $action eq 2 or $action eq 8}
    {include file="CRM/Admin/Form/ContactType.tpl"}
 {else}
 
+  <div id="help">
+    {ts}CiviCRM comes with 3 basic (built-in) contact types: Individual, Household, and Organization. You can create additional contact types based on these types to further differentiate contacts (for example you might create Student, Parent, Staff, and /or Volunteer types from the basic Individual type...).{/ts} {help id="id-contactSubtype-intro"}
+  </div>
 {if $rows}
 <div>
     {strip}
     {/foreach}
     </table>
     {/strip}
-    {if $action ne 1 and $action ne 2}
-    <div class="action-link">
-  <a href="{crmURL q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div>{ts}Add Contact Type{/ts}</span></a>
-    </div>
-    {/if}
-</div>
-{else}
+  </div>
+  {else}
     <div class="messages status no-popup">
-          <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
-        {capture assign=crmURL}{crmURL p='civicrm/admin/ContactType' q="action=add&reset=1"}{/capture}
-        {ts 1=$crmURL}There are currently no Contact Types entered. You can <a href='%1'>add one</a>.{/ts}
+      <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+      {ts}None found.{/ts}
     </div>
-{/if}
+  {/if}
+  <div class="action-link">
+    <a href="{crmURL q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div>{ts}Add Contact Type{/ts}</span></a>
+  </div>
 {/if}
index bf7021136a40edf6388956f471466a1ed6e0b054..9f307940bc82fa3b8c99976cda65b69726df049b 100644 (file)
@@ -85,8 +85,8 @@
     {literal}
     <script type="text/javascript">
       CRM.$(function($) {
-          cj('.collapsed').click( function( ) {
-              var currentObj = cj( this );
+          $('.collapsed').click( function( ) {
+              var currentObj = $( this );
               if ( currentObj.hasClass( 'expanded') ) {
                   currentObj.removeClass( 'expanded' );
                   currentObj.parent( ).parent( ).next( ).hide( );
     {literal}
 
     CRM.$(function($) {
-      var tabIndex = cj('#tab_' + selectedTab).prevAll().length;
-      cj("#mainTabContainer").tabs({active: tabIndex});
-      cj(".crm-tab-button").addClass("ui-corner-bottom");
+      var tabIndex = $('#tab_' + selectedTab).prevAll().length;
+      $("#mainTabContainer").tabs({active: tabIndex});
+      $(".crm-tab-button").addClass("ui-corner-bottom");
     });
     {/literal}
     </script>
     {literal}
     <script type="text/javascript">
     CRM.$(function($) {
-      cj('.crm-extensions-refresh').click(function(event){
+      $('.crm-extensions-refresh').click(function(event){
         event.stopPropagation();
         CRM.alert('', '{/literal}{ts escape="js"}Refreshing...{/ts}{literal}', 'crm-msg-loading', {expires: 0});
         CRM.api('Extension', 'refresh', {}, {
index 218f5c271ba5a963cf6c259f92b29d37ae3930f6..f300210fe5657ee7e7217a31af7564268724b83c 100644 (file)
   {if $rows}
     <div id="ltype">
       {strip}
-        {include file="CRM/common/jsortable.tpl"}
-        <table id="labelFormats" class="display">
+        <table id="labelFormats" class="row-highlight">
           <thead>
           <tr class="columnheader">
-            <th class="sortable">{ts}Name{/ts}</th>
-            <th class="sortable">{ts}Used for{/ts}</th>
-            <th class="sortable">{ts}Grouping{/ts}</th>
+            <th>{ts}Name{/ts}</th>
+            <th>{ts}Used for{/ts}</th>
+            <th>{ts}Order{/ts}</th>
+            <th>{ts}Grouping{/ts}</th>
             <th>{ts}Default?{/ts}</th>
             <th>{ts}Reserved?{/ts}</th>
-            <th id="order" class="sortable">{ts}Order{/ts}</th>
-            <th class="hiddenElement"></th>
             <th></th>
           </tr>
           </thead>
             <tr id="row_{$row.id}" class="crm-labelFormat {cycle values="odd-row,even-row"} {$row.class}">
               <td class="crm-labelFormat-name">{$row.label}</td>
               <td class="crm-labelFormat-name">{$row.groupName}</td>
+              <td class="crm-labelFormat-order nowrap">{$row.weight}</td>
               <td class="crm-labelFormat-description">{$row.grouping}</td>
               <td class="crm-labelFormat-is_default">{if $row.is_default eq 1}<img
                 src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}"/>{/if}&nbsp;</td>
               <td class="crm-labelFormat-is_reserved">{if $row.is_reserved eq 1}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
                 &nbsp;</td>
-              <td class="crm-labelFormat-order nowrap">{$row.order}</td>
-              <td class="order hiddenElement">{$row.weight}</td>
               <td>{$row.action|replace:'xx':$row.id}</td>
             </tr>
           {/foreach}
index 747f4a72119b1396fa46dc4d5d0aff3d5590693e..7a07c54b14852289f2332defc24b77931daadc39 100644 (file)
@@ -30,8 +30,8 @@
     {ts}Location types provide convenient labels to differentiate contacts' location(s). Administrators may define as many additional types as appropriate for your constituents (examples might be Main Office, School, Vacation Home...).{/ts}
   </div>
 
-{if $rows}
-<div id="ltype">
+  {if $rows}
+  <div id="ltype">
     {strip}
   {* handle enable/disable actions*}
    {include file="CRM/common/enableDisableApi.tpl"}
     </thead>
     {foreach from=$rows item=row}
     <tr id="location_type-{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-entity {if NOT $row.is_active} disabled{/if}">
-        <td class="crm-locationType-name">{$row.name}</td>
-        <td class="crm-locationType-display_name">{$row.display_name}</td>
-        <td class="crm-locationType-vcard_name">{$row.vcard_name}</td>
-        <td class="crm-locationType-description">{$row.description}</td>
-        <td id="row_{$row.id}_status" class="crm-locationType-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
-        <td class="crm-locationType-is_default" >{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}&nbsp;</td>
+        <td class="crmf-name">{$row.name}</td>
+        <td class="crmf-display_name crm-editable">{$row.display_name}</td>
+        <td class="crmf-vcard_name">{$row.vcard_name}</td>
+        <td class="crmf-description crm-editable">{$row.description}</td>
+        <td id="row_{$row.id}_status" class="crmf-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
+        <td class="crmf-is_default" >{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}&nbsp;</td>
         <td>{$row.action|replace:'xx':$row.id}</td>
     </tr>
     {/foreach}
     </table>
     {/strip}
-
-    {if $action ne 1 and $action ne 2}
-    <div class="action-link">
-  <a href="{crmURL q="action=add&reset=1"}" id="newLocationType" class="button"><span>&raquo; {ts}New Location Type{/ts}</span></a>
-    </div>
-    {/if}
-</div>
-{else}
+  </div>
+  {else}
     <div class="messages status no-popup">
-          <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
-        {capture assign=crmURL}{crmURL p='civicrm/admin/locationType' q="action=add&reset=1"}{/capture}
-        {ts 1=$crmURL}There are no Location Types entered for this Contact. You can <a href='%1'>add one</a>.{/ts}
+        <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+        {ts}None found.{/ts}
     </div>
-{/if}
+  {/if}
+  <div class="action-link">
+    <a href="{crmURL q="action=add&reset=1"}" id="newLocationType" class="button"><span><div class="icon add-icon"></div>{ts}Add Location Type{/ts}</span></a>
+  </div>
 {/if}
index 38f05ca10731947a465f05c5beac3dc6e23347dd..ba0111f4bdf98e56efc7b65698531ec5a003398d 100644 (file)
       </table>
     {/strip}
 
-    {if $action ne 1 and $action ne 2}
-      <div class="action-link">
-        <a href="{crmURL q="action=add&reset=1"}" id="newMailSettings" class="button"><span><div class="icon add-icon"></div>{ts}Add Mail Account{/ts}</span></a>
-      </div>
-    {/if}
   </div>
 </div>
 {else}
     <div class="messages status no-popup">
-        <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
-        {capture assign=crmURL}{crmURL p='civicrm/admin/mailSettings' q="action=add&reset=1"}{/capture}
-        {ts 1=$crmURL}There are no Mail Settings present. You can <a href='%1'>add one</a>.{/ts}
+      <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+      {ts}None found.{/ts}
     </div>
 {/if}
+  <div class="action-link">
+    <a href="{crmURL q="action=add&reset=1"}" id="newMailSettings" class="button"><span><div class="icon add-icon"></div>{ts}Add Mail Account{/ts}</span></a>
+  </div>
 {/if}
index 23ea5bde5de0df86af08c2207b49980b5c253a4a..a779df5dfa955b2dd03cbc35c298a623887ed393 100644 (file)
     {if $selectedChild}selectedTab = '{$selectedChild}';{/if}
     {literal}
       CRM.$(function($) {
-        var tabIndex = cj('#tab_' + selectedTab).prevAll().length
-        cj("#mainTabContainer").tabs( {active: tabIndex} );
+        var tabIndex = $('#tab_' + selectedTab).prevAll().length
+        $("#mainTabContainer").tabs( {active: tabIndex} );
       });
     {/literal}
   </script>
index a058ff84b25fb2b586d2718c6d2a0a34b7727d6f..3fce13160c01f1d6cb35736a20db22546c38d6f4 100644 (file)
     }
   </style>
   <script type="text/javascript">
-  CRM.$(function($) {
-    cj("#navigation-tree").jstree({
-    plugins : [ "themes", "json_data", "dnd","ui", "crrm","contextmenu" ],
-    json_data  : {
-      ajax:{
-        dataType : "json",
-        url : {/literal}"{crmURL p='civicrm/ajax/menu' h=0 q='key='}{crmKey name='civicrm/ajax/menu'}"{literal}
-      },
-      progressive_render: true
-    },
-    themes: {
-      "theme": 'classic',
-      "dots": true,
-      "icons": false,
-      "url": CRM.config.resourceBase + 'packages/jquery/plugins/jstree/themes/classic/style.css'
-    },
-    rules : {
-      droppable : [ "tree-drop" ],
-      multiple : true,
-      deletable : "all",
-      draggable : "all"
-    },
-    crrm  :  {
-      move: {
-        check_move: function(m) {
-          var homeMenuId = {/literal}"{$homeMenuId}"{literal};
-          if ( cj( m.r[0] ).attr('id').replace("node_","") == homeMenuId ||
-            cj( m.o[0] ).attr('id').replace("node_","") == homeMenuId ) {
-            return false;
-          } else {
-            return true;
+    CRM.$(function($) {
+      $("#navigation-tree").jstree({
+        plugins: [ "themes", "json_data", "dnd","ui", "crrm","contextmenu" ],
+        json_data: {
+          ajax:{
+            dataType: "json",
+            url: {/literal}"{crmURL p='civicrm/ajax/menu' h=0 q='key='}{crmKey name='civicrm/ajax/menu'}"{literal}
+          },
+          progressive_render: true
+        },
+        themes: {
+          "theme": 'classic',
+          "dots": true,
+          "icons": false,
+          "url": CRM.config.resourceBase + 'packages/jquery/plugins/jstree/themes/classic/style.css'
+        },
+        rules: {
+          droppable: [ "tree-drop" ],
+          multiple: true,
+          deletable: "all",
+          draggable: "all"
+        },
+        crrm: {
+          move: {
+            check_move: function(m) {
+              var homeMenuId = {/literal}"{$homeMenuId}"{literal};
+              if ( $( m.r[0] ).attr('id').replace("node_","") == homeMenuId ||
+                $( m.o[0] ).attr('id').replace("node_","") == homeMenuId ) {
+                return false;
+              } else {
+                return true;
+              }
+            }
           }
-        }
-      }
-    },
-    contextmenu : {
-      items: {
-        create : false,
-          ccp : {
-            label   : "{/literal}{ts escape='js'}Edit{/ts}{literal}",
-            visible : function (node, obj) { if(node.length != 1) return false;
-              return obj.check("renameable", node); },
-            action  : function (node, obj) {
-              var nid = cj(node).prop('id');
-              var nodeID = nid.substr( 5 );
-              var editURL = {/literal}"{crmURL p='civicrm/admin/menu' h=0 q='action=update&reset=1&id='}"{literal} + nodeID;
-              CRM.loadForm(editURL).on('crmFormSuccess', function() {
-                cj("#navigation-tree").jstree('refresh');
-                cj("#reset-menu").show( );
-              });
-            },
-            submenu : false
+        },
+        contextmenu: {
+          items: {
+            create: false,
+            ccp: {
+              label : "{/literal}{ts escape='js'}Edit{/ts}{literal}",
+              visible: function (node, obj) { if(node.length != 1) return false;
+                return obj.check("renameable", node); },
+              action: function (node, obj) {
+                var nid = $(node).prop('id');
+                var nodeID = nid.substr( 5 );
+                var editURL = {/literal}"{crmURL p='civicrm/admin/menu' h=0 q='action=update&reset=1&id='}"{literal} + nodeID;
+                CRM.loadForm(editURL).on('crmFormSuccess', function() {
+                  $("#navigation-tree").jstree('refresh');
+                  $("#reset-menu").show( );
+                });
+              },
+              submenu: false
+            }
           }
-      }
-    }
-
-    }).bind("rename.jstree", function ( e,node ) {
-      var nodeID  = node.rslt.obj.attr('id').replace("node_","");
-      var newName = node.rslt.new_name;
-      var postURL = {/literal}"{crmURL p='civicrm/ajax/menutree' h=0 q='key='}{crmKey name='civicrm/ajax/menutree'}"{literal};
-      cj.get( postURL + '&type=rename&id=' + nodeID + '&data=' + newName,
-        function (data) {
-          cj("#reset-menu").show( );
         }
-      );
-
-    }).bind("remove.jstree", function ( e,node ) {
-      var menuName  = node.rslt.obj.find('a').first( ).text( );
-      var nodeID  = node.rslt.obj.attr('id').replace("node_","");
 
-      // don't allow deleting of home
-      var homeMenuId = {/literal}"{$homeMenuId}"{literal};
-      if ( nodeID == homeMenuId ) {
-        var cannotDeleteMsg = {/literal}"{ts escape='js'}You cannot delete this menu item:{/ts}" + " "{literal} + menuName;
-        CRM.alert( cannotDeleteMsg, {/literal}"{ts escape='js'}Cannot Delete{/ts}"{literal} );
-        cj("#navigation-tree").jstree('refresh');
-        return false;
-      }
-      var deleteMsg = {/literal}"{ts escape='js'}Are you sure you want to delete this menu item:{/ts}" + " "{literal} + menuName + {/literal}" ? {ts}This action can not be undone.{/ts}"{literal};
-      var isDelete  = confirm( deleteMsg );
-      if ( isDelete ) {
+      }).bind("rename.jstree", function ( e,node ) {
+        var nodeID  = node.rslt.obj.attr('id').replace("node_","");
+        var newName = node.rslt.new_name;
         var postURL = {/literal}"{crmURL p='civicrm/ajax/menutree' h=0 q='key='}{crmKey name='civicrm/ajax/menutree'}"{literal};
-        cj.get( postURL + '&type=delete&id=' + nodeID,
+        $.get( postURL + '&type=rename&id=' + nodeID + '&data=' + newName,
           function (data) {
-            cj("#reset-menu").show( );
+            $("#reset-menu").show( );
           }
         );
-      } else {
-        cj("#navigation-tree").jstree('refresh');
-      }
 
-    }).bind("move_node.jstree", function ( e,node ) {
-      node.rslt.o.each(function (i) {
-      var nodeID = node.rslt.o.attr('id').replace("node_","");
-      var refID  = node.rslt.np.attr('id').replace("node_","");
-      if (isNaN( refID ) ){ refID =''; }
-      var ps = node.rslt.cp+i;
-      var postURL = {/literal}"{crmURL p='civicrm/ajax/menutree' h=0 q='key='}{crmKey name='civicrm/ajax/menutree'}"{literal};
-        cj.get( postURL + '&type=move&id=' +  nodeID + '&ref_id=' + refID + '&ps='+ps,
-          function (data) {
-            cj("#reset-menu").show( );
-          });
+      }).bind("remove.jstree", function( e,node ) {
+        var menuName  = node.rslt.obj.find('a').first( ).text( );
+        var nodeID  = node.rslt.obj.attr('id').replace("node_","");
+
+        // don't allow deleting of home
+        var homeMenuId = {/literal}"{$homeMenuId}"{literal};
+        if ( nodeID == homeMenuId ) {
+          var cannotDeleteMsg = {/literal}"{ts escape='js'}You cannot delete this menu item:{/ts}" + " "{literal} + menuName;
+          CRM.alert( cannotDeleteMsg, {/literal}"{ts escape='js'}Cannot Delete{/ts}"{literal} );
+          $("#navigation-tree").jstree('refresh');
+          return false;
+        }
+        var deleteMsg = {/literal}"{ts escape='js'}Are you sure you want to delete this menu item:{/ts}" + " "{literal} + menuName + {/literal}" ? {ts}This action can not be undone.{/ts}"{literal};
+        var isDelete  = confirm( deleteMsg );
+        if ( isDelete ) {
+          var postURL = {/literal}"{crmURL p='civicrm/ajax/menutree' h=0 q='key='}{crmKey name='civicrm/ajax/menutree'}"{literal};
+          $.get( postURL + '&type=delete&id=' + nodeID,
+            function (data) {
+              $("#reset-menu").show( );
+            }
+          );
+        } else {
+          $("#navigation-tree").jstree('refresh');
+        }
+
+      }).bind("move_node.jstree", function ( e,node ) {
+        node.rslt.o.each(function (i) {
+          var nodeID = node.rslt.o.attr('id').replace("node_","");
+          var refID  = node.rslt.np.attr('id').replace("node_","");
+          if (isNaN( refID ) ){ refID =''; }
+          var ps = node.rslt.cp+i;
+          var postURL = {/literal}"{crmURL p='civicrm/ajax/menutree' h=0 q='key='}{crmKey name='civicrm/ajax/menutree'}"{literal};
+          $.get( postURL + '&type=move&id=' +  nodeID + '&ref_id=' + refID + '&ps='+ps,
+            function (data) {
+              $("#reset-menu").show( );
+            });
+        });
       });
-    });
-    $('#new-menu-item a.button')
-      .on('click', CRM.popup)
-      .on('crmPopupFormSuccess', function() {
+      $('#new-menu-item a.button')
+        .on('click', CRM.popup)
+        .on('crmPopupFormSuccess', function() {
           $("#navigation-tree").jstree('refresh');
           $("#reset-menu").show();
-      });
-  });
+        });
+    });
 </script>
 {/literal}
 {/if}
index 2c23219f92b8cde1bde0624a8a77a0f2ba891505..d75725c4a06de9e08fd122638cc7c2dbd9ae858c 100644 (file)
@@ -70,7 +70,7 @@
 
 <div class="crm-content-block crm-block">
 {if $rows}
-{if $action ne 1 and $action ne 2 and $isLocked ne 1}
+{if $isLocked ne 1}
     <div class="action-link">
         <a href="{crmURL p="civicrm/admin/options/$gName" q='action=add&reset=1'}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$gLabel}Add %1{/ts}</span></a>
     </div>
@@ -79,8 +79,7 @@
         {strip}
   {* handle enable/disable actions*}
   {include file="CRM/common/enableDisableApi.tpl"}
-    {include file="CRM/common/jsortable.tpl"}
-        <table id="options" class="display">
+        <table id="options" class="row-highlight">
          <thead>
          <tr>
             {if $showComponent}
             {if $showCounted}<th>{ts}Counted?{/ts}</th>{/if}
             {if $showVisibility}<th>{ts}Visibility{/ts}</th>{/if}
             <th id="nosort">{ts}Description{/ts}</th>
-            <th id="order">{ts}Order{/ts}</th>
+            <th>{ts}Order{/ts}</th>
             {if $showIsDefault}<th>{ts}Default{/ts}</th>{/if}
             <th>{ts}Reserved{/ts}</th>
             <th>{ts}Enabled?{/ts}</th>
-            <th class="hiddenElement"></th>
             <th></th>
           </tr>
           </thead>
             {/if}
             {if $showVisibility}<td class="crm-admin-visibility_label">{$row.visibility_label}</td>{/if}
             <td class="crm-admin-options-description crm-editable" data-field="description" data-type="textarea">{$row.description}</td>
-            <td class="nowrap crm-admin-options-order">{$row.order}</td>
+            <td class="nowrap crm-admin-options-order">{$row.weight}</td>
             {if $showIsDefault}
               <td class="crm-admin-options-is_default" align="center">{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}&nbsp;</td>
             {/if}
             <td class="crm-admin-options-is_reserved">{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
             <td class="crm-admin-options-is_active" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
             <td>{$row.action|replace:'xx':$row.id}</td>
-            <td class="order hiddenElement">{$row.weight}</td>
           </tr>
         {/foreach}
         </tbody>
         {include file="CRM/common/crmeditable.tpl"}
         {/strip}
 
-        {if $action ne 1 and $action ne 2 and $isLocked ne 1}
-            <div class="action-link">
-                <a href="{crmURL p="civicrm/admin/options/$gName" q='action=add&reset=1'}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$gLabel}Add %1{/ts}</span></a>
-            </div>
-        {/if}
 </div>
 {else}
     <div class="messages status no-popup">
-         <div class="icon inform-icon"></div>
-        {capture assign=link}class="action-item" href="{crmURL p="civicrm/admin/options/$gName" q='action=add&reset=1'}"{/capture}
-        {ts 1=$link}There are no option values entered. You can <a %1>add one</a>.{/ts}
+      <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+      {ts}None found.{/ts}
     </div>
 {/if}
+  {if $isLocked ne 1}
+    <div class="action-link">
+      <a href="{crmURL p="civicrm/admin/options/$gName" q='action=add&reset=1'}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$gLabel}Add %1{/ts}</span></a>
+    </div>
+  {/if}
 </div>
 {/if}
index bbd64c962f2bc7b28a0181446fc71430e5fcce96..8fc34c94d7b58bc5736da298a86bef4d732619dd 100644 (file)
 {if $rows}
     <div id="ltype">
         {strip}
-        {include file="CRM/common/jsortable.tpl"}
-        <table id="pdfFormats" class="display">
+        <table id="pdfFormats" class="row-highlight">
         <thead>
         <tr class="columnheader">
-            <th  class="sortable">{ts}Name{/ts}</th>
-            <th id="nosort">{ts}Description{/ts}</th>
+            <th>{ts}Name{/ts}</th>
+            <th>{ts}Description{/ts}</th>
             <th >{ts}Default?{/ts}</th>
-            <th id="order" class="sortable">{ts}Order{/ts}</th>
-            <th class="hiddenElement"></th>
+            <th>{ts}Order{/ts}</th>
             <th ></th>
         </tr>
         </thead>
@@ -52,8 +50,7 @@
             <td class="crm-pdfFormat-name">{$row.name}</td>
             <td class="crm-pdfFormat-description">{$row.description}</td>
             <td class="crm-pdfFormat-is_default">{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}&nbsp;</td>
-          <td class="crm-pdfFormat-order nowrap">{$row.order}</td>
-          <td class="order hiddenElement">{$row.weight}</td>
+          <td class="crm-pdfFormat-order nowrap">{$row.weight}</td>
           <td>{$row.action|replace:'xx':$row.id}</td>
         </tr>
         {/foreach}
index 99fc3f0e403a8f0351bcfe147a56e3e7cb9aba53..827219de275fa94cff3ef955e27605a73ed710fb 100644 (file)
         </table>
         {/strip}
 
-        {if !($action eq 1 and $action eq 2)}
-            <div class="action-link">
-              <a href="{crmURL q="action=add&reset=1"}" class="button newRelationshipType"><span><div class="icon add-icon"></div>{ts}Add Relationship Type{/ts}</span></a>
-            </div>
-        {/if}
 </div>
 {else}
     <div class="messages status no-popup">
-        <div class="icon inform-icon"></div>
-        {capture assign=crmURL}{crmURL p='civicrm/admin/reltype' q="action=add&reset=1"}{/capture}
-        {ts 1=$crmURL}There are no relationship types present. You can <a href='%1'>add one</a>.{/ts}
+      <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+      {ts}None found.{/ts}
     </div>
 {/if}
+  <div class="action-link">
+    <a href="{crmURL q="action=add&reset=1"}" class="button newRelationshipType"><span><div class="icon add-icon"></div>{ts}Add Relationship Type{/ts}</span></a>
+  </div>
 {/if}
index f2ea634f9c43ced8f0672e2dfb57feba1c466291..6d4e302bc1db3866aa72020ea81a85c32841605f 100644 (file)
@@ -147,10 +147,9 @@ CRM.$(function($) {
           $("input[name=select_merge_tag]", this).crmError(ts('Select a tag'));
           return false;
         }
-        /* send synchronous request so that disabling any actions for slow servers*/
         var postUrl = {/literal}"{crmURL p='civicrm/ajax/mergeTags' h=0 }"{literal};
         var data = {fromId: tag.id, toId: toId, key:{/literal}"{crmKey name='civicrm/ajax/mergeTags'}"{literal}};
-        cj.ajax({
+        $.ajax({
           type: "POST",
           url: postUrl,
           data: data,
index 3fe3693d5ee8b7ca14d8d3e8ee3fd3d99f9f4669..28df468717296925375752efa6cd7df956e7c4c2 100644 (file)
@@ -1,24 +1,24 @@
 //@todo functions partially moved from tpl but still need an enclosure / cleanup
 // jslinting etc
 CRM.$(function($) {
-  cj('.selector-rows').change(function () {
+  $('.selector-rows').change(function () {
     var options = {
       'url': CRM.url('civicrm/ajax/batch')
     };
 
-    cj("#Entry").ajaxSubmit(options);
+    $("#Entry").ajaxSubmit(options);
 
     // validate rows
-    checkColumns(cj(this));
+    checkColumns($(this));
   });
 
-  cj('input[name^="soft_credit_contact["]').change(function(){
-    var rowNum = cj(this).attr('id').replace('soft_credit_contact_','');
-    var totalAmount = cj('#field_'+rowNum+'_total_amount').val();
+  $('input[name^="soft_credit_contact["]').change(function(){
+    var rowNum = $(this).attr('id').replace('soft_credit_contact_','');
+    var totalAmount = $('#field_'+rowNum+'_total_amount').val();
     //assign total amount as default soft credit amount
-    cj('#soft_credit_amount_'+ rowNum).val(totalAmount);
+    $('#soft_credit_amount_'+ rowNum).val(totalAmount);
     //assign soft credit type default value if any
-    cj('#field_'+rowNum+'_soft_credit_type').val(cj('#sct_default_id').val());
+    $('#field_'+rowNum+'_soft_credit_type').val($('#sct_default_id').val());
   });
 
   // validate rows
@@ -27,7 +27,7 @@ CRM.$(function($) {
   //calculate the actual total for the batch
   calculateActualTotal();
 
-  cj('input[id*="_total_amount"]').bind('keyup change', function () {
+  $('input[id*="_total_amount"]').bind('keyup change', function () {
     calculateActualTotal();
   });
 
@@ -36,35 +36,35 @@ CRM.$(function($) {
     hideSendReceipt();
 
     // hide the receipt date if send receipt is checked
-    cj('input[id*="][send_receipt]"]').change(function () {
-      showHideReceipt(cj(this));
+    $('input[id*="][send_receipt]"]').change(function () {
+      showHideReceipt($(this));
     });
 
   }
   else{
-    cj('select[id^="member_option_"]').each(function () {
-      if (cj(this).val() == 1) {
-        cj(this).prop('disabled', true);
+    $('select[id^="member_option_"]').each(function () {
+      if ($(this).val() == 1) {
+        $(this).prop('disabled', true);
       }
     });
 
   // set payment info accord to membership type
-  cj('select[id*="_membership_type_0"]').change(function () {
-    setPaymentBlock(cj(this), null);
+  $('select[id*="_membership_type_0"]').change(function () {
+    setPaymentBlock($(this), null);
   });
 
-  cj('select[id*="_membership_type_1"]').change(function () {
-    setPaymentBlock(cj(this), cj(this).val());
+  $('select[id*="_membership_type_1"]').change(function () {
+    setPaymentBlock($(this), $(this).val());
   });
 
   }
 
   // line breaks between radio buttons and checkboxes
-  cj('input.form-radio').next().after('<br />');
-  cj('input.form-checkbox').next().after('<br />');
+  $('input.form-radio').next().after('<br />');
+  $('input.form-checkbox').next().after('<br />');
 
   //set the focus on first element
-  cj('#primary_contact_1').focus();
+  $('#primary_contact_1').focus();
 
 });
 
index 90c43bd65f1db87918d15e5989da8a20b90cd343..f474ac0c37cbbaeb820d153c22689986f166a177 100644 (file)
 {literal}
 <script type="text/javascript">
 CRM.$(function($) {
-  cj('.selector-rows').change(function () {
+  var $form = $('form.{/literal}{$form.formClass}{literal}');
+  $('.selector-rows').change(function () {
     var options = {
       'url': {/literal}"{crmURL p='civicrm/ajax/batch' h=0}"{literal}
     };
 
-    cj("#Entry").ajaxSubmit(options);
+    $($form).ajaxSubmit(options);
   });
 
-  cj('#crm-container').on('keyup change', '*.selector-rows', function () {
+  $('#crm-container').on('keyup change', '*.selector-rows', function () {
     // validate rows
-    checkColumns(cj(this));
+    checkColumns($(this));
   });
 
   // validate rows
@@ -126,7 +127,7 @@ CRM.$(function($) {
   //calculate the actual total for the batch
   calculateActualTotal();
 
-  cj('input[id*="_total_amount"]').bind('keyup change', function () {
+  $('input[id*="_total_amount"]').bind('keyup change', function () {
     calculateActualTotal();
   });
 
@@ -135,34 +136,34 @@ CRM.$(function($) {
   hideSendReceipt();
 
   // hide the receipt date if send receipt is checked
-  cj('input[id*="][send_receipt]"]').change(function () {
-    showHideReceipt(cj(this));
+  $('input[id*="][send_receipt]"]').change(function () {
+    showHideReceipt($(this));
   });
 
   {/literal}{else}{literal}
-  cj('select[id^="member_option_"]').each(function () {
-    if (cj(this).val() == 1) {
-      cj(this).prop('disabled', true);
+  $('select[id^="member_option_"]').each(function () {
+    if ($(this).val() == 1) {
+      $(this).prop('disabled', true);
     }
   });
 
   // set payment info accord to membership type
-  cj('select[id*="_membership_type_0"]').change(function () {
-    setPaymentBlock(cj(this), null);
+  $('select[id*="_membership_type_0"]').change(function () {
+    setPaymentBlock($(this), null);
   });
 
-  cj('select[id*="_membership_type_1"]').change(function () {
-    setPaymentBlock(cj(this), cj(this).val());
+  $('select[id*="_membership_type_1"]').change(function () {
+    setPaymentBlock($(this), $(this).val());
   });
 
   {/literal}{/if}{literal}
 
   // line breaks between radio buttons and checkboxes
-  cj('input.form-radio').next().after('<br />');
-  cj('input.form-checkbox').next().after('<br />');
+  $('input.form-radio').next().after('<br />');
+  $('input.form-checkbox').next().after('<br />');
 
   //set the focus on first element
-  cj('#primary_contact_1').focus();
+  $('#primary_contact_1').focus();
 
 });
 
@@ -290,7 +291,7 @@ function updateContactInfo(blockNo, prefix) {
   var contactId = cj(contactHiddenElement).val();
 
   var returnProperties = '';
-  var profileFields = new Array();
+  var profileFields = [];
   {/literal}
   {if $contactFields}
   {foreach from=$contactFields item=val key=fldName}
index 46c2f59403c804a199b254b61ef6895b6a6afc1b..290bab2e1a8e6fa3669197fd2699aff71d0fc9a1 100644 (file)
@@ -49,7 +49,7 @@
         <label for="qa_email">{ts}Email:{/ts}</label>
     </div>
     <div>
-        <input type="text" name="email[1][email]" id="qa_email" class="form-text" maxlength="64" />
+        <input type="email" name="email[1][email]" id="qa_email" class="form-text" maxlength="64" />
     </div>
 
     <input type="hidden" name="email[1][location_type_id]" value="{$primaryLocationType}" />
@@ -61,7 +61,7 @@
     <input type="hidden" name="qfKey" value="{crmKey name='CRM_Contact_Form_Contact' addSequence=1}" />
 </div>
 
-<div class="form-item"><input type="submit" name="_qf_Contact_next" value="{ts}Save{/ts}" class="form-submit" /></div>
+<div class="form-item"><input type="submit" name="_qf_Contact_next" value="{ts}Save{/ts}" class="crm-form-submit" /></div>
 
 </form>
 </div>
index 8f8009e0466dbfacaec165c4e8e44e5d1f3591b4..6f0a135766bd98357e8aa193a808a5191e4aea50 100644 (file)
@@ -40,7 +40,7 @@
 <div class="block-crm crm-container">
     <form method="post" id="id_fulltext_search">
     <div style="margin-bottom: 8px;">
-    <input type="text" name="text" id='text' value="" style="width: 10em;" />&nbsp;<input type="submit" name="submit" id="fulltext_submit" value="{ts}Go{/ts}" class="form-submit"/ onclick='submitForm();'>
+    <input type="text" name="text" id='text' value="" style="width: 10em;" />&nbsp;<input type="submit" name="submit" id="fulltext_submit" value="{ts}Go{/ts}" class="crm-form-submit"/ onclick='submitForm();'>
     <input type="hidden" name="qfKey" value="{crmKey name='CRM_Contact_Controller_Search' addSequence=1}" />
   </div>
   <select class="form-select" id="fulltext_table" name="fulltext_table">
index 2c65ec024a528a4c79103dc32649ac440115a4d0..6d6cfcd619a11f56279d9324bad8969504ef7af8 100644 (file)
@@ -46,9 +46,9 @@
 {literal}
 <script type="text/javascript">
     CRM.$(function($) {
-      if (cj('#crm-recently-viewed').offset().left > 150) {
-        cj('#crm-recently-viewed').removeClass('left').addClass('right');
-          }
+      if ($('#crm-recently-viewed').offset().left > 150) {
+        $('#crm-recently-viewed').removeClass('left').addClass('right');
+      }
     });
 </script>
 {/literal}
index e4951c54cb738e0dd1376a9ca745dd1664bd5dbc..2e02d66fbf5e3219d75d597910ff5dbd5743a70d 100644 (file)
 
 {literal}
 <script type="text/javascript">
-cj( document ).ready( function( ) {
+  CRM.$(function($) {
     {/literal}{if $customDataSubType}
-     CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
-        {else}
-     CRM.buildCustomData( '{$customDataType}' );
-        {/if}
+      CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
+    {else}
+      CRM.buildCustomData( '{$customDataType}' );
+    {/if}
     {literal}
-});
+  });
 </script>
 {/literal}
 
index 45446c613de8a528483c29013ef33027c1f732c7..0d878054e29e09e239ab7953af166f0f564780c4 100755 (executable)
@@ -120,7 +120,7 @@ function loadVoterList( )
      var sourceUrl = {/literal}"{crmURL p='civicrm/ajax/rest' h=0 q='snippet=4&className=CRM_Campaign_Page_AJAX&fnName=voterList' }"{literal};
 
      var searchVoterFor = {/literal}'{$searchVoterFor}'{literal};
-     CRM.$( 'table.gotvVoterRecords', 'form#{/literal}{$form.formName}{literal}').dataTable({
+     CRM.$( 'table.gotvVoterRecords', 'form.{/literal}{$form.formClass}{literal}').dataTable({
                "bFilter"    : false,
     "bAutoWidth" : false,
         "bProcessing": true,
@@ -137,7 +137,7 @@ function loadVoterList( )
       var dataLength = aoData.length;
 
       var count = 1;
-      var searchCriteria = new Array( 'campaign_search_voter_for' );
+      var searchCriteria = ['campaign_search_voter_for'];
 
       //get the search criteria.
                         var searchParams = {/literal}{$searchParams}{literal};
index cca8e77cb939d5b08284d0fb7cf57c7eb8ca18d8..4dc49dd7a8d15d40e7dc266fd237d3a44d55ec8d 100644 (file)
     //show edit profile field links
     CRM.$(function($) {
       // show edit for both contact and activity profile
-      cj('select[id$="profile_id"]').change(function () {
-        buildLinks(cj(this), cj(this).val());
+      $('select[id$="profile_id"]').change(function () {
+        buildLinks($(this), $(this).val());
       });
 
       // make sure we set edit links for both profiles when form loads
-      cj('select[id$="profile_id"]').each(function (e) {
-        buildLinks(cj(this), cj(this).val());
+      $('select[id$="profile_id"]').each(function (e) {
+        buildLinks($(this), $(this).val());
       });
     });
   </script>
index faa9f72fc1ba87b4efabe7442298a8fea212edd3..7472e9bce8ce77c02e1a80aa040c555dd9a756e4 100644 (file)
 {literal}
   <script type="text/javascript">
 
-cj(document).ready(function(){
-  cj('#selector tr:even').addClass('odd-row ');
-  cj('#selector tr:odd ').addClass('even-row');
+CRM.$(function($) {
+  $('#selector tr:even').addClass('odd-row ');
+  $('#selector tr:odd ').addClass('even-row');
 });
 
   </script>
index e8ab4965e70d969f8e58b5d573b3255e24ce0616..0818b086d8a2cc8448b8a27a86224bab119e134c 100644 (file)
@@ -88,8 +88,8 @@
 </tr>
 
 <script type="text/javascript">
-    var showRows   = new Array({$showBlocks});
-    var hideBlocks = new Array({$hideBlocks});
+    var showRows   = [{$showBlocks}];
+    var hideBlocks = [{$hideBlocks}];
     var rowcounter = 0;
     var surveyId   = {if $surveyId}{$surveyId}{else}''{/if};
 
       }, "json" );
   }
 
-    cj(document).ready( function( ) {
+    CRM.$(function($) {
         showOptionSelect( );
     });
 
index 0fa3a7f083c561f91581739252428a751928cb13..821a1807bb2abe1c7bb655d0fd08a092db67ae27 100755 (executable)
     noRecordFoundMsg += '<div class="qill">';
 
     var count = 0;
-    var searchQill = new Array();
+    var searchQill = [];
     for (param in searchParams) {
       if (val = CRM.$('#' + param).val()) {
         if (param == 'status_id') {
         var dataLength = aoData.length;
 
         var count = 1;
-        var searchCriteria = new Array();
+        var searchCriteria = [];
 
         //get the search criteria.
         var searchParams = {/literal}{$searchParams}{literal};
index 8781688ed13907582ec9faf3da2914494e0f7437..40be7c322fffcafee7307021707d72f3879ebf77 100755 (executable)
@@ -164,7 +164,7 @@ function loadPetitionList( )
      noRecordFoundMsg += '<div class="qill">';
 
      var count = 0;
-     var searchQill = new Array( );
+     var searchQill = [];
      for ( param in searchParams ) {
        if ( val = CRM.$( '#' + param ).val( ) ) {
          if ( param == 'petition_campaign_id' ) val = campaigns[val];
@@ -216,7 +216,7 @@ function loadPetitionList( )
       var dataLength = aoData.length;
 
       var count = 1;
-      var searchCriteria = new Array( );
+      var searchCriteria = [];
 
       //get the search criteria.
                         var searchParams = {/literal}{$searchParams}{literal};
index 33e58e18160cbb55500cb5d115c1859b9287de80..e3c5fe4b16910b3ab290a2644b21ca792e5af7c1 100755 (executable)
@@ -173,7 +173,7 @@ function loadSurveyList( )
      noRecordFoundMsg += '<div class="qill">';
 
      var count = 0;
-     var searchQill = new Array( );
+     var searchQill = [];
      for ( param in searchParams ) {
        if ( val = CRM.$( '#' + param ).val( ) ) {
          if ( param == 'activity_type_id' ) val = surveyTypes[val];
@@ -231,7 +231,7 @@ function loadSurveyList( )
       var dataLength = aoData.length;
 
       var count = 1;
-      var searchCriteria = new Array( );
+      var searchCriteria = [];
 
       //get the search criteria.
                         var searchParams = {/literal}{$searchParams}{literal};
index 17a08d406941febc0738e87ee1853e23f9016632..c53f2173a57a6f87bbc449fd301be3735dfaa82f 100644 (file)
     //show edit profile field links
     CRM.$(function($) {
         // show edit for profile
-        cj('select[id="profile_id"]').change( function( ) {
-            buildLinks( cj(this), cj(this).val());
+        $('select[id="profile_id"]').change( function( ) {
+            buildLinks( $(this), $(this).val());
         });
 
         // show edit links on form loads
-        var profileField =  cj('select[id="profile_id"]');
+        var profileField =  $('select[id="profile_id"]');
         buildLinks( profileField, profileField.val());
     });
 </script>
 {include file="CRM/common/customData.tpl" includeWysiwygEditor=true}
 {literal}
   <script type="text/javascript">
-    cj(document).ready(function() {
+    CRM.$(function($) {
       {/literal}
         CRM.buildCustomData( 'Survey' );
       {literal}
index 2724483a84d425087aa3704153fb767ff19663d6..129ba414fbd6cc89ea403041ba40e3e74bbfd0b7 100644 (file)
@@ -12,8 +12,7 @@
   {* handle enable/disable actions*}
   {include file="CRM/common/enableDisableApi.tpl"}
   {include file="CRM/common/crmeditable.tpl"}
-        {include file="CRM/common/jsortable.tpl"}
-        <table class="display">
+        <table class="row-highlight">
          <thead>
          <tr>
                  <th>
                  <th>
                    {ts}Value{/ts}
                  </th>
-                 <th id="nosort">{ts}Description{/ts}</th>
-                 <th id="order" class="sortable">{ts}Order{/ts}</th>
+                 <th>{ts}Description{/ts}</th>
+                 <th>{ts}Order{/ts}</th>
                  <th>{ts}Reserved{/ts}</th>
                  <th>{ts}Enabled?{/ts}</th>
                  <th></th>
-     <th class="hiddenElement"></th>
                  </tr>
         </thead>
         {foreach from=$rows item=row}
           <td class="crm-admin-options-label crm-editable" data-field="label">{$row.label}</td>
           <td class="crm-admin-options-value">{$row.value}</td>
           <td class="crm-admin-options-description">{$row.description}</td>
-          <td class="nowrap crm-admin-options-order">{$row.order}</td>
+          <td class="nowrap crm-admin-options-order">{$row.weight}</td>
           <td class="crm-admin-options-is_reserved">{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
           <td class="crm-admin-options-is_active" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
           <td>{$row.action|replace:'xx':$row.id}</td>
-    <td class="order hiddenElement">{$row.weight}</td>
         </tr>
         {/foreach}
         </table>
index 40681ec53a65b8bc373c12225d0f35cefe25030f..fb222caf2b3fefc85ca0e59737be7520440e9a05 100644 (file)
     {literal}
     <script type="text/javascript">
       CRM.$(function($) {
-        cj('.crm-with-contact').click(function(){
-          cj('#with-contacts-widget').toggle();
-          cj('#with-clients').toggle();
+        $('.crm-with-contact').click(function() {
+          $('#with-contacts-widget').toggle();
+          $('#with-clients').toggle();
           return false;
         });
       });
index 4d7217f735ea8e2e4794dfe9d8e6d6df762afb6e..3ba4dbeeae9baf50f22cd38e4ebd11e310e77694 100644 (file)
@@ -33,7 +33,7 @@
 {literal}
 <script type="text/javascript">
   CRM.$(function($) {
-    var $form = $("#{/literal}{$form.formName}{literal}");
+    var $form = $("form.{/literal}{$form.formClass}{literal}");
     $('input[name=link_to_case_id]', $form).crmSelect2({
       placeholder: {/literal}'{ts escape="js"}- select case -{/ts}'{literal},
       minimumInputLength: 1,
index 26111bb0e5884fa992fbb3869af6cb64b26ee646..4cfcbda5d569538222c840f26ce51909a3eba001 100644 (file)
@@ -41,7 +41,7 @@
 
         $el.load(CRM.url('civicrm/case/changeactivitystatus'), data, function() {
           $el.unblock().trigger('crmLoad');
-          cj("#activity_change_status").val(current_status_id);
+          $("#activity_change_status").val(current_status_id);
         });
 
         CRM.confirm({
index 5b175ae3a3b96737cfe846614f6200ad3215dc6a..8429111cb98412a666a3ed20c0f1055553a27256 100644 (file)
@@ -44,7 +44,7 @@
             </td>
             <td style="vertical-align: bottom;">
               {assign var=caseid value=$caseID}
-              <span class="crm-button"><input class="form-submit default" name="_qf_Basic_refresh" value="Search" type="button" onclick="buildCaseActivities( true,{$caseid} )"; /></span>
+              <span class="crm-button"><input class="crm-form-submit default" name="_qf_Basic_refresh" value="Search" type="button" onclick="buildCaseActivities( true,{$caseid} )"; /></span>
             </td>
           </tr>
           <tr>
index ee8963d638a5048279ec3a302017962cf6ff2e6e..b7723b75e30629b4f49a13d58593674581034054 100644 (file)
             return {results: response};
           }
         }
-      }).change(function() {
-        if ($(this).val()) {
-          selectedCaseId = $(this).val();
-          contactId = $(this).select2('data').extra.contact_id;
-        }
       });
     });
 
           },
           buttons: {
             "{/literal}{ts escape='js'}Save{/ts}{literal}": function() {
+              var selectedCaseId = cj('input[name=file_on_case_unclosed_case_id]', '#fileOnCaseDialog').val();
+              var contactId = cj('input[name=file_on_case_unclosed_case_id]', '#fileOnCaseDialog').select2('data').extra.contact_id;
               var subject         = cj("#file_on_case_activity_subject").val( );
               var targetContactId = cj("#file_on_case_target_contact_id").val( );
 
index 6f8785a3f8f210881848c29d9ffb43efe6f1adbd..04576a92005f5800e0026be95fb640c1554f5189 100644 (file)
     {include file="CRM/common/customData.tpl"}
     {literal}
       <script type="text/javascript">
-      cj(document).ready(function() {
-           var customDataSubType = cj('#case_type_id').val();
+      CRM.$(function($) {
+           var customDataSubType = $('#case_type_id').val();
            if ( customDataSubType ) {
               CRM.buildCustomData( {/literal}'{$customDataType}'{literal}, customDataSubType );
            } else {
index d4c0d451d907dad0d64eefd740c80c8508d2518d..7377dc66f4da10d070927d8d66a8aa28a7c19a23 100644 (file)
@@ -23,9 +23,7 @@
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-{if $context EQ 'Search'}
-    {include file="CRM/common/pager.tpl" location="top"}
-{/if}
+{include file="CRM/common/pager.tpl" location="top"}
 {strip}
 <table class="caseSelector">
   <tr class="columnheader">
     <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
   {/if}
 
-  {if $single}
-    <th scope="col">{ts}ID{/ts}</th>
-  {else}
-    <th></th>
-  {/if}
+  <th></th>
 
   {foreach from=$columnHeaders item=header}
     <th scope="col">
         {assign var=cbName value=$row.checkbox}
         <td>{$form.$cbName.html}</td>
     {/if}
-    {if $single }
-        <td class="crm-case-id crm-case-id_{$row.case_id}">{$row.case_id}</td>
-    {/if}
-    {if $context != 'case'}
         <td class="crm-case-id crm-case-id_{$row.case_id}">
         <span id="{$list}{$row.case_id}_show">
             <a href="#" onclick="cj('#caseDetails{$list}{$row.case_id}').show();
                                  cj('#{$list}{$row.case_id}_show').hide();
                                  cj('#minus{$list}{$row.case_id}_hide').show();
                                  cj('#{$list}{$row.case_id}_hide').show();
-                                 return false;"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt="{ts}open section{/ts}"/></a>
+                                 return false;"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt="{ts}Show recent activities{/ts}"/></a>
         </span>
         <span id="minus{$list}{$row.case_id}_hide">
             <a href="#" onclick="cj('#caseDetails{$list}{$row.case_id}').hide();
                                  cj('#{$list}{$row.case_id}_show').show();
                                  cj('#{$list}{$row.case_id}_hide').hide();
                                  cj('#minus{$list}{$row.case_id}_hide').hide();
-                                 return false;"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}open section{/ts}"/></a>
+                                 return false;"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}Hide activities{/ts}"/></a>
         </td>
-    {/if}
 
     {if !$single}
       <td class="crm-case-id crm-case-id_{$row.case_id}"><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}" title="{ts}view contact details{/ts}">{$row.sort_name}</a>{if $row.phone}<br /><span class="description">{$row.phone}</span>{/if}<br /><span class="description">{ts}Case ID{/ts}: {$row.case_id}</span></td>
@@ -97,7 +86,6 @@
   {$row.case_scheduled_activity_type}<br />{$row.case_scheduled_activity_date|crmDate}{else}---{/if}</td>
     <td>{$row.action|replace:'xx':$row.case_id}{$row.moreActions|replace:'xx':$row.case_id}</td>
    </tr>
-{if $context != 'case'}
    <tr id="{$list}{$row.case_id}_hide" class='{$rowClass}'>
      <td>
      </td>
      cj('#{$list}{$row.case_id}_hide').hide();
      cj('#minus{$list}{$row.case_id}_hide').hide();
  </script>
-{/if}
   {/foreach}
 
     {* Dashboard only lists 10 most recent cases. *}
 </table>
 {/strip}
 
-{if $context EQ 'Search'}
-    {include file="CRM/common/pager.tpl" location="bottom"}
-{/if}
+{include file="CRM/common/pager.tpl" location="bottom"}
 
 {* Build case details*}
 {literal}
 <script type="text/javascript">
 
-function buildCaseDetails( caseId, contactId )
-{
-  var dataUrl = {/literal}"{crmURL p='civicrm/case/details' h=0 q='snippet=4&caseId='}{literal}" + caseId +'&cid=' + contactId;
-  cj.ajax({
-            url     : dataUrl,
-            dataType: "html",
-            timeout : 5000, //Time in milliseconds
-            success : function( data ){
-                           cj( '#caseDetails' + caseId ).html( data );
-                      },
-            error   : function( XMLHttpRequest, textStatus, errorThrown ) {
-                              console.error( 'Error: '+ textStatus );
-                    }
-         });
+function buildCaseDetails( caseId, contactId ) {
+  var dataUrl = {/literal}"{crmURL p='civicrm/case/details' h=0 q='caseId='}{literal}" + caseId +'&cid=' + contactId;
+  CRM.loadPage(dataUrl, {target: '#caseDetails' + caseId});
 }
 </script>
 
index e30695981dd55140968f3cb65b93ee0b0f77cc21..f22a587bfe4d0f8f96626798f3d9d3f4ee353136 100644 (file)
   {/foreach}
 {/foreach}
 <div id="case_custom_edit"></div>
-
-{*currently delete is available only for tab custom data*}
-{if $groupId}
-<script type="text/javascript">
-  {literal}
-  function hideStatus(valueID, groupID) {
-    cj('#statusmessg_' + groupID + '_' + valueID).hide( );
-  }
-
-  function showDelete(valueID, elementID, groupID, contactID) {
-    var confirmMsg = '{/literal}{ts escape='js'}Are you sure you want to delete this record?{/ts}{literal} &nbsp; <a href="#" onclick="deleteCustomValue( ' + valueID + ',\'' + elementID + '\',' + groupID + ',' + contactID + ' ); return false;" style="text-decoration: underline;">{/literal}{ts escape='js'}Yes{/ts}{literal}</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="hideStatus( ' + valueID + ', ' +  groupID + ' ); return false;" style="text-decoration: underline;">{/literal}{ts escape='js'}No{/ts}{literal}</a>';
-    cj('tr#statusmessg_' + groupID + '_' + valueID).show( ).children().find('span').html( confirmMsg );
-  }
-
-  function deleteCustomValue( valueID, elementID, groupID, contactID ) {
-    var postUrl = {/literal}"{crmURL p='civicrm/ajax/customvalue' h=0 }"{literal};
-    var request = cj.ajax({
-      type: "POST",
-      data:  "valueID=" + valueID + "&groupID=" + groupID +"&contactId=" + contactID + "&key={/literal}{crmKey name='civicrm/ajax/customvalue'}{literal}",
-      url: postUrl,
-      success: function(html){
-        cj('#'+ elementID).hide();
-        hideStatus(valueID, groupID);
-        var element = cj( '.ui-tabs-nav #tab_custom_' + groupID + ' a' );
-        cj(element).html(cj(element).attr('title') + ' ('+ html+') ');
-      }
-    });
-    CRM.status({success: '{/literal}{ts escape="js"}Record Deleted{/ts}{literal}'}, request);
-  }
-  {/literal}
-</script>
-{/if}
-
index 8923334e0188167c78d4691f382238f5b6cfbd17..a0d94cbc32ca3615ad830fe967619633c9b61f09 100644 (file)
                 {$form.external_identifier.html}
               </td>
               {if $contactId}
-                <td><label for="internal_identifier_display">{ts}CiviCRM ID{/ts}{help id="id-internal-id"}</label><br /><input id="internal_identifier_display" type="text" class="form-text eight" size="8" disabled="disabled" value="{$contactId}"></td>
+                <td>
+                  <label for="internal_identifier_display">{ts}CiviCRM ID{/ts} {help id="id-internal-id"}</label><br />
+                  <input id="internal_identifier_display" type="text" class="crm-form-text six" size="6" readonly="readonly" value="{$contactId}">
+                </td>
               {/if}
             </tr>
           </table>
 
   <script type="text/javascript" >
   CRM.$(function($) {
+    var $form = $("form.{/literal}{$form.formClass}{literal}");
     var action = "{/literal}{$action}{literal}";
 
     $('.crm-accordion-body').each( function() {
       return true;
     });
     {/literal}{/if}{literal}
+
+    // Handle delete of multi-record custom data
+    $form.on('click', '.crm-custom-value-del', function(e) {
+      e.preventDefault();
+      var $el = $(this),
+        msg = '{/literal}{ts escape="js"}The record will be deleted immediately. This action cannot be undone.{/ts}{literal}';
+      CRM.confirm({title: $el.attr('title'), message: msg})
+        .on('crmConfirm:yes', function() {
+          var url = CRM.url('civicrm/ajax/customvalue');
+          var request = $.post(url, $el.data('post'));
+          CRM.status({success: '{/literal}{ts escape="js"}Record Deleted{/ts}{literal}'}, request);
+          var addClass = '.add-more-link-' + $el.data('post').groupID;
+          $el.closest('div.crm-custom-accordion').remove();
+          $('div' + addClass).last().show();
+        });
+    });
   });
 
 </script>
index 8c9152bc0df6da856f77d3ad9f5bf1a4983f258a..8400c2cb4c5d223a601bdac5614599eadcccc8b2 100644 (file)
 CRM.$(function($) {
     var fields = new Array( 'postal_greeting', 'addressee', 'email_greeting');
     for ( var i = 0; i < 3; i++ ) {
-        cj( "#" + fields[i] + "_id").change( function( ) {
-            var fldName = cj(this).attr( 'id' );
-            if ( cj(this).val( ) == 4 ) {
-                cj("#greetings1").show( );
-                cj("#greetings2").show( );
-                cj( "#" + fldName + "_html").show( );
-                cj( "#" + fldName + "_label").show( );
+        $( "#" + fields[i] + "_id").change( function( ) {
+            var fldName = $(this).attr( 'id' );
+            if ( $(this).val( ) == 4 ) {
+                $("#greetings1").show( );
+                $("#greetings2").show( );
+                $( "#" + fldName + "_html").show( );
+                $( "#" + fldName + "_label").show( );
             } else {
-                cj( "#" + fldName + "_html").hide( );
-                cj( "#" + fldName + "_label").hide( );
-                cj( "#" + fldName.slice(0, -3) + "_custom" ).val('');
+                $( "#" + fldName + "_html").hide( );
+                $( "#" + fldName + "_label").hide( );
+                $( "#" + fldName.slice(0, -3) + "_custom" ).val('');
             }
         });
     }
 });
 
 function showGreeting( element ) {
-    cj("#" + element ).show( );
-    cj("#" + element + '_display' ).hide( );
+    $("#" + element ).show( );
+    $("#" + element + '_display' ).hide( );
 
     // TO DO fix for custom greeting
     var fldName = '#' + element + '_id';
-    if ( cj( fldName ).val( ) == 4 ) {
-        cj("#greetings1").show( );
-        cj("#greetings2").show( );
-        cj( fldName + "_html").show( );
-        cj( fldName + "_label").show( );
+    if ( $( fldName ).val( ) == 4 ) {
+        $("#greetings1").show( );
+        $("#greetings2").show( );
+        $( fldName + "_html").show( );
+        $( fldName + "_label").show( );
     }
 }
 
index d0ea6b03dce584881db894342edfd5d8a518702f..ba1c641c18c47cd2885cfee9f8789d68d9f5523f 100644 (file)
  +--------------------------------------------------------------------+
 *}
 
-<script type="text/javascript">var showTab = Array();</script>
 {foreach from=$groupTree item=cd_edit key=group_id}
   {if $cd_edit.is_multiple eq 1}
     {assign var=tableID value=$cd_edit.table_id}
     {assign var=divName value=$group_id|cat:"_$tableID"}
     <div></div>
-    <div id="{$cd_edit.name|cat:'_$divName'}"
+    <div
      class="crm-accordion-wrapper crm-custom-accordion {if $cd_edit.collapse_display and !$skipTitle}collapsed{/if}">
   {else}
     <div id="{$cd_edit.name}"
       {if $cd_edit.is_multiple eq 1}
         {if $cd_edit.table_id}
           <table class="no-border">
-            <tr id="statusmessg_{$group_id|cat:"_$tableID"}" class="hiddenElement">
-              <td><span class="success-status"></span></td>
-            </tr>
             <tr>
-              <div class="crm-submit-buttons">
-                <a href="#"
-                   onclick="showDelete( {$tableID}, '{$cd_edit.name}_{$group_id|cat:"_$tableID"}', {$group_id}, {$contactId} ); return false;"
-                   class="button delete-button" title="{ts 1=$cv_edit.title}Delete this %1 record{/ts}">
-                  <span><div class="icon delete-icon"></div>{ts}Delete{/ts}</span>
-                </a>
-              </div>
+              <a href="#" class="crm-hover-button crm-custom-value-del" title="{ts 1=$cd_edit.title}Delete %1{/ts}"
+               data-post='{ldelim}"valueID": "{$tableID}", "groupID": "{$group_id}", "contactId": "{$contactId}", "key": "{crmKey name='civicrm/ajax/customvalue'}"{rdelim}'>
+                <span class="icon delete-icon"></span> {ts}Delete{/ts}
+              </a>
               <!-- crm-submit-buttons -->
             </tr>
           </table>
   {/foreach}
 
   {include file="CRM/common/customData.tpl"}
-  <script type="text/javascript">
-    {literal}
-
-    function hideStatus(valueID, groupID) {
-      cj('#statusmessg_' + groupID + '_' + valueID).hide();
-    }
-
-    function showDelete(valueID, elementID, groupID, contactID) {
-      var confirmMsg = '{/literal}{ts escape='js'}Are you sure you want to delete this record?{/ts}{literal} &nbsp; <a href="#" onclick="deleteCustomValue( ' + valueID + ',\'' + elementID + '\',' + groupID + ',' + contactID + ' ); return false;" style="text-decoration: underline;">{/literal}{ts escape='js'}Yes{/ts}{literal}</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="hideStatus( ' + valueID + ', ' + groupID + ' ); return false;" style="text-decoration: underline;">{/literal}{ts escape='js'}No{/ts}{literal}</a>';
-      cj('tr#statusmessg_' + groupID + '_' + valueID).show().children().find('span').html(confirmMsg);
-    }
-
-    function deleteCustomValue(valueID, elementID, groupID, contactID) {
-      var postUrl = {/literal}"{crmURL p='civicrm/ajax/customvalue' h=0 }"{literal},
-      request = cj.ajax({
-        type: "POST",
-        data: "valueID=" + valueID + "&groupID=" + groupID + "&contactId=" + contactID + "&key={/literal}{crmKey name='civicrm/ajax/customvalue'}{literal}",
-        url: postUrl,
-        success: function (html) {
-          cj('#' + elementID).hide();
-          hideStatus(valueID, groupID);
-          var element = cj('.ui-tabs-nav #tab_custom_' + groupID + ' a');
-          cj(element).html(cj(element).attr('title') + ' (' + html + ') ');
-        }
-      });
-      CRM.status({success: '{/literal}{ts escape="js"}Record Deleted{/ts}{literal}'}, request);
-    }
-
-    {/literal}
-  </script>
 
   {include file="CRM/Form/attachmentjs.tpl"}
index 0c4c43af100122eebe33be3f130fd9bde9976935..bca56db29bc36cd1888f4130106367d60af9844c 100644 (file)
@@ -1,23 +1,23 @@
 {literal}
 <script type="text/javascript">
 CRM.$(function($) {
-  if (cj('#update_modified_date').length == 0) {
+  if ($('#update_modified_date').length == 0) {
     return;
   }
-  cj('<br>')
-    .appendTo(cj('#update_modified_date'));
-  cj('<button>')
+  $('<br>')
+    .appendTo($('#update_modified_date'));
+  $('<button>')
     .text("{/literal}{ts}Save Anyway{/ts}{literal}")
     .click(function() {
-      cj('input[name="modified_date"]').val(
-              cj('#update_modified_date').attr('data:latest_modified_date')
+      $('input[name="modified_date"]').val(
+              $('#update_modified_date').attr('data:latest_modified_date')
       );
-      cj('.crm-form-block .form-submit.default').first().click();
+      $('.crm-form-block .crm-form-submit.default').first().click();
       return false;
     })
-    .appendTo(cj('#update_modified_date'))
+    .appendTo($('#update_modified_date'))
     ;
-  cj('<button>')
+  $('<button>')
     .text("{/literal}{ts}Reload Page{/ts}{literal}")
     .click(function() {
       window.location.href = CRM.url('civicrm/contact/add', {
@@ -27,7 +27,7 @@ CRM.$(function($) {
       });
       return false;
     })
-    .appendTo(cj('#update_modified_date'))
+    .appendTo($('#update_modified_date'))
     ;
 });
 </script>
index 7eeca293e6b58b7f257cf07bcf825e9ed95c7d0b..ff6a3ca3f0d79d13b584d849689851ecd97ce99d 100644 (file)
     }
   });
   {/literal}{* // Enforce unique is_primary fields *}{literal}
-  cj(':checkbox[id*="[is_primary"]', 'form#Address_{/literal}{$blockId}{literal}').change(function() {
+  cj(':checkbox[id*="[is_primary"]', 'form[name=Address_{/literal}{$blockId}{literal}]').change(function() {
     if (this.defaultChecked) {
       cj(this).crmError("{/literal} {ts escape='js'}Please choose another address to be primary before changing this one.{/ts}{literal}");
       cj(this).prop('checked', true);
     }
   });
   {/literal}{* // Reset location_type_id when cancel button pressed *}{literal}
-  cj(':submit[name$=cancel]', 'form#Address_{/literal}{$blockId}{literal}').click(function() {
+  cj(':submit[name$=cancel]', 'form[name=Address_{/literal}{$blockId}{literal}]').click(function() {
     var container = cj(this).closest('div.crm-inline-edit.address');
     var origValue = container.attr('data-location-type-id') || '';
     container.data('location-type-id', origValue);
index 0e7e3ae67cfe1a2a2371320c1dd153b8b38616ce..2e713af264eaf2ae3e2f066e61e1ef7b92d127b4 100644 (file)
 {literal}
 <script type="text/javascript">
 CRM.$(function($) {
-    var fields = new Array( 'postal_greeting', 'addressee', 'email_greeting');
+    var fields = ['postal_greeting', 'addressee', 'email_greeting'];
     for ( var i = 0; i < 3; i++ ) {
-      cj( "#" + fields[i] + "_id").change( function( ) {
-        var fldName = cj(this).attr( 'id' );
-        if ( cj(this).val( ) == 4 ) {
-          cj("#greetings1").show( );
-          cj("#greetings2").show( );
-          cj( "#" + fldName + "_html").show( );
-          cj( "#" + fldName + "_label").show( );
+      $( "#" + fields[i] + "_id").change( function( ) {
+        var fldName = $(this).attr( 'id' );
+        if ( $(this).val( ) == 4 ) {
+          $("#greetings1").show( );
+          $("#greetings2").show( );
+          $( "#" + fldName + "_html").show( );
+          $( "#" + fldName + "_label").show( );
         } else {
-          cj( "#" + fldName + "_html").hide( );
-          cj( "#" + fldName + "_label").hide( );
-          cj( "#" + fldName.slice(0, -3) + "_custom" ).val('');
+          $( "#" + fldName + "_html").hide( );
+          $( "#" + fldName + "_label").hide( );
+          $( "#" + fldName.slice(0, -3) + "_custom" ).val('');
         }
       });
     }
index 73fea94c0041ce15c771da6ad2e5c4e0c9bb52e7..2cae309ad96639cf9b880f9a35bbb08c5fcae062 100644 (file)
@@ -36,7 +36,7 @@
     <tr>
       <td>{ts}Email{/ts}&nbsp;
       {if $actualBlockCount lt 5 }
-        <span id="add-more-email" title="{ts}click to add more{/ts}"><a class="crm-link-action add-more-inline">{ts}add{/ts}</a></span>
+        <span id="add-more-email" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
       {/if}
       </td>
       <td>{ts}On Hold?{/ts}</td>
@@ -58,7 +58,7 @@
             <td align="center" class="crm-email-is_primary">{$form.email.$blockId.is_primary.1.html}</td>
             <td>
               {if $blockId gt 1}
-                <a title="{ts}delete email block{/ts}" class="crm-delete-inline crm-link-action">{ts}delete{/ts}</a>
+                <a title="{ts}Delete Email{/ts}" class="crm-delete-inline crm-hover-button" href="#"><span class="icon delete-icon"></span></a>
               {/if}
             </td>
         </tr>
index 152d2e89c93d7773e87f04489ec1a074a5f085f5..433e40fbd85637ff87e2c06cc56610402d8c5c59 100644 (file)
@@ -36,7 +36,7 @@
     <tr>
       <td>{ts}Instant Messenger{/ts}&nbsp;
       {if $actualBlockCount lt 5 }
-        <span id="add-more-im" title="{ts}click to add more{/ts}"><a class="crm-link-action add-more-inline">{ts}add{/ts}</a></span>
+        <span id="add-more-im" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
       {/if}
       </td>
       <td>{ts}IM Location{/ts}</td>
@@ -53,7 +53,7 @@
         <td align="center" class="crm-im-is_primary">{$form.im.$blockId.is_primary.1.html}</td>
         <td>
           {if $blockId gt 1}
-            <a class="crm-delete-inline crm-link-action" title="{ts}delete im block{/ts}">{ts}delete{/ts}</a>
+            <a class="crm-delete-inline crm-hover-button" href="#" title="{ts}Delete IM{/ts}"><span class="icon delete-icon"></span></a>
           {/if}
         </td>
     </tr>
index c915f9cedaf5ecc43b37f71db036cd8f6b479b90..572764da67986f4dbeff142551b5d3ffaf3a1042 100644 (file)
@@ -37,7 +37,7 @@
   <tr>
     <td>{ts}Open ID{/ts}&nbsp;
     {if $actualBlockCount lt 5 }
-      <span id="add-more-openid" title="{ts}click to add more{/ts}"><a class="crm-link-action add-more-inline">{ts}add{/ts}</a></span>
+      <span id="add-more-openid" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
     {/if}
     </td>
     <td>{ts}Open ID Location{/ts}</td>
@@ -53,7 +53,7 @@
     <td align="center" id="OpenID-Primary-html" class="crm-openid-is_primary">{$form.openid.$blockId.is_primary.1.html}</td>
     <td>
       {if $blockId gt 1}
-        <a class="crm-delete-inline crm-link-action" title="{ts}Delete OpenID Block{/ts}">{ts}delete{/ts}</a>
+        <a class="crm-delete-inline crm-hover-button" href="#" title="{ts}Delete OpenID{/ts}"><span class="icon delete-icon"></span></a>
       {/if}
     </td>
   </tr>
index 327b02dce00a59d0f2d312886a9218d364a16039..5212461df6a688e15813d6097e213b6564e811b3 100644 (file)
@@ -36,7 +36,7 @@
     <tr>
       <td>{ts}Phone{/ts}&nbsp;
       {if $actualBlockCount lt 5 }
-        <span id="add-more-phone" title="{ts}click to add more{/ts}"><a class="crm-link-action add-more-inline">{ts}add{/ts}</a></span>
+        <span id="add-more-phone" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
       {/if}
       </td>
       <td>{ts}Phone Location{/ts}</td>
@@ -53,7 +53,7 @@
         <td align="center" class="crm-phone-is_primary">{$form.phone.$blockId.is_primary.1.html}</td>
         <td>
           {if $blockId gt 1}
-            <a class="crm-delete-inline crm-link-action" title="{ts}delete phone block{/ts}">{ts}delete{/ts}</a>
+            <a class="crm-delete-inline crm-hover-button\" href="#" title="{ts}Delete phone{/ts}"><span class="icon delete-icon"></span></a>
           {/if}
         </td>
     </tr>
index 327473a0c98a15acde7c8d3cb5e652c02fbf2992..2805e24e4873b9e043781b4e5d98c0eba1b83983 100644 (file)
@@ -38,7 +38,7 @@
       <td>{ts}Website{/ts}
         {help id="id-website" file="CRM/Contact/Form/Contact.hlp"}
         {if $actualBlockCount lt 5 }
-          &nbsp;&nbsp;<span id="add-more-website" title="{ts}click to add more{/ts}"><a class="crm-link-action add-more-inline">{ts}add{/ts}</a></span>
+          &nbsp;&nbsp;<span id="add-more-website" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
         {/if}
       </td>
       <td>{ts}Website Type{/ts}</td>
@@ -52,7 +52,7 @@
       <td>{$form.website.$blockId.website_type_id.html}</td>
       <td>
         {if $blockId > 1} 
-          <a class="crm-delete-inline crm-link-action" title="{ts}delete website block{/ts}">{ts}delete{/ts}</a>
+          <a class="crm-delete-inline crm-hover-button action-item" href="#" title="{ts}Delete Website{/ts}"><span class="icon delete-icon"></span></a>
         {/if}
        </td>
     </tr>
index f74e218b4ad4f6adeda853fbd87c3a61e5fd5211..3b9eb8dab7d00759ec9649889df18fee8579538d 100644 (file)
@@ -35,7 +35,7 @@
 </div>
 
 <div class="action-link">
-       <a id='notDuplicate' href="#" title={ts}Mark this pair as not a duplicate.{/ts} onClick="processDupes( {$main_cid}, {$other_cid}, 'dupe-nondupe', 'merge-contact', '{crmURL p="civicrm/contact/dedupefind" q="reset=1&action=update&rgid=$rgid"}' );return false;">&raquo; {ts}Mark this pair as not a duplicate.{/ts}</a>
+       <a id='notDuplicate' href="#" title={ts}Mark this pair as not a duplicate.{/ts} onClick="processDupes( {$main_cid}, {$other_cid}, 'dupe-nondupe', 'merge-contact', '{if $rgid}{crmURL p="civicrm/contact/dedupefind" q="reset=1&action=update&rgid=$rgid"}{/if}' );return false;">&raquo; {ts}Mark this pair as not a duplicate.{/ts}</a>
 </div>
 
 <table class="row-highlight">
@@ -143,10 +143,10 @@ You will need to manually delete that user (click on the link to open Drupal Use
 {literal}
 <script type="text/javascript">
 
-cj(document).ready(function(){
-    cj('table td input.form-checkbox').each(function() {
+  CRM.$(function($) {
+    $('table td input.form-checkbox').each(function() {
        var ele = null;
-       var element = cj(this).attr('id').split('_',3);
+       var element = $(this).attr('id').split('_',3);
 
        switch ( element['1'] ) {
            case 'addressee':
@@ -160,13 +160,13 @@ cj(document).ready(function(){
        }
 
        if( ele ) {
-          cj(this).on('click', function() {
-            var val = cj(this).prop('checked');
-            cj('input' + ele + ', input' + ele + '_custom').prop('checked', val);
+          $(this).on('click', function() {
+            var val = $(this).prop('checked');
+            $('input' + ele + ', input' + ele + '_custom').prop('checked', val);
           });
        }
     });
-});
+  });
 
 </script>
 {/literal}
index 9a234f6f0bd176d8cee44d86d4d612e576ab9787..4524998ce0ba0f544d0ef9afdc97f7badb32b604 100644 (file)
       {literal}
       CRM.$(function($) {
         var
-          $form = $("form#{/literal}{$form.formName}{literal}"),
+          $form = $("form.{/literal}{$form.formClass}{literal}"),
           relationshipData = {/literal}{$relationshipData|@json_encode}{literal};
         $('[name=relationship_type_id]', $form).change(function() {
           var
index e4664a1e43b0427218e9cf2a717a64005a940f5c..c4cf0663136151beacac8ef0a6c6a1b42afb7324 100644 (file)
         {include file="CRM/common/formButtons.tpl" location="top" buttonStyle="width:80px; text-align:center;"}
       </div>
       <div class="crm-submit-buttons reset-advanced-search">
-        <a href="{crmURL p='civicrm/contact/search/advanced' q='reset=1'}" id="resetAdvancedSearch" class="button" style="width:70px; text-align:center;"><span>{ts}Reset Form{/ts}</span></a>
+        <a href="{crmURL p='civicrm/contact/search/advanced' q='reset=1'}" id="resetAdvancedSearch" class="crm-hover-button" title="{ts}Clear all search criteria{/ts}">
+          <span class="icon ui-icon-circle-close"></span>
+          {ts}Reset Form{/ts}
+        </a>
       </div>
     </td>
   </tr>
   {/if}
   {if $form.group}
     <td>
-      <div id='groupselect'><label>{ts}Group(s){/ts} <span class="description">(<a id='searchbygrouptype'>{ts}search by group type{/ts}</a>)</span></label>
+      <div id='groupselect'><label>{ts}Group(s){/ts} <span class="description">(<a href="#" id='searchbygrouptype'>{ts}search by group type{/ts}</a>)</span></label>
         {$form.group.html}
     </div>
     <div id='grouptypeselect'>
-      <label>{ts}Group Type(s){/ts} <span class="description"> (<a id='searchbygroup'>{ts}search by group{/ts}</a>)</span></label>
+      <label>{ts}Group Type(s){/ts} <span class="description"> (<a href="#" id='searchbygroup'>{ts}search by group{/ts}</a>)</span></label>
       {$form.group_type.html}
         {literal}
         <script type="text/javascript">
         CRM.$(function($) {
-          function showGroupSearch(){
-            cj('#grouptypeselect').hide();
-            cj('#groupselect').show();
-            cj('#group_type').select2('val', '');
+          function showGroupSearch() {
+            $('#grouptypeselect').hide();
+            $('#groupselect').show();
+            $('#group_type').select2('val', '');
+            return false;
           }
-          function showGroupTypeSearch(){
-            cj('#groupselect').hide();
-            cj('#grouptypeselect').show();
-            cj('#group').select2('val', '');
+          function showGroupTypeSearch() {
+            $('#groupselect').hide();
+            $('#grouptypeselect').show();
+            $('#group').select2('val', '');
+            return false;
           }
-          cj('#searchbygrouptype').click(function() {
-              showGroupTypeSearch();
-          });
-          cj('#searchbygroup').click(function() {
-              showGroupSearch();
-          });
+          $('#searchbygrouptype').click(showGroupTypeSearch);
+          $('#searchbygroup').click(showGroupSearch);
 
-          if (cj('#group_type').val() ) {
+          if ($('#group_type').val() ) {
             showGroupTypeSearch();
           }
           else {
index 6b4b5d9924c71c9da5e8777daf1270ab6c88517f..429311d91c7a7d64d4653e1554d97a18d12a129e 100644 (file)
 {literal}
   <script type="text/javascript">
     CRM.$(function($) {
+      function updateChangeLogLabels() {
+        var changeType = $('input[name=log_date]:checked').val();
+        if (changeType == 2) {
+          $('.addedBy').hide();
+          $('.modifiedBy').show();
+        }
+        else {
+          if (changeType == 1) {
+            $('.addedBy').show();
+            $('.modifiedBy').hide();
+          }
+        }
+      }
+      $('[name=log_date]:input').change(updateChangeLogLabels);
       updateChangeLogLabels();
     });
 
-    cj('[name=log_date]:input').change(function () {
-      updateChangeLogLabels();
-    });
 
-    function updateChangeLogLabels() {
-      var changeType = cj('input[name=log_date]:checked').val();
-      if (changeType == 2) {
-        cj('.addedBy').hide();
-        cj('.modifiedBy').show();
-      }
-      else {
-        if (changeType == 1) {
-          cj('.addedBy').show();
-          cj('.modifiedBy').hide();
-        }
-      }
-    }
   </script>
 {/literal}
diff --git a/templates/CRM/Contact/Form/Search/Criteria/Location.hlp b/templates/CRM/Contact/Form/Search/Criteria/Location.hlp
new file mode 100644 (file)
index 0000000..23b700e
--- /dev/null
@@ -0,0 +1,30 @@
+{*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.5                                                |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM.                                    |
+ |                                                                    |
+ | CiviCRM is free software; you can copy, modify, and distribute it  |
+ | under the terms of the GNU Affero General Public License           |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
+ |                                                                    |
+ | CiviCRM is distributed in the hope that it will be useful, but     |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
+ | See the GNU Affero General Public License for more details.        |
+ |                                                                    |
+ | You should have received a copy of the GNU Affero General Public   |
+ | License and the CiviCRM Licensing Exception along                  |
+ | with this program; if not, contact CiviCRM LLC                     |
+ | at info[AT]civicrm[DOT]org. If you have questions about the        |
+ | GNU Affero General Public License or the licensing of CiviCRM,     |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ +--------------------------------------------------------------------+
+*}
+
+{htxt id="location_type"}
+  <p>{ts}Location search uses the PRIMARY location for each contact by default.{/ts}</p>
+  <p>{ts}To search by specific location types (e.g. Home, Work...), select one or more options.{/ts}</p>
+{/htxt}
index 4f3c67434f368503c1454117e4d03b42b156c9b2..756ac6b2efb4b35f88a799ac5bde4800290d2131 100644 (file)
  +--------------------------------------------------------------------+
 *}
 <div id="location" class="form-item">
-    <table class="form-layout">
-  <tr>
-        <td>
-           {$form.location_type.label}<br />
-           {$form.location_type.html}
-           <div class="description" >
-             {ts}Location search uses the PRIMARY location for each contact by default.{/ts}<br />
-             {ts}To search by specific location types (e.g. Home, Work...), check one or more boxes above.{/ts}
-           </div>
-        </td>
-        <td colspan="2">
-          <div id="streetAddress">
-            {$form.street_address.label}<br />
-            {$form.street_address.html|crmAddClass:big}
-{if $parseStreetAddress}
-            <br /><a href="#" title="{ts}Use Address Elements{/ts}" onClick="processAddressFields( 'addressElements' , 1 );return false;">{ts}Use Address Elements{/ts}</a>
-          </div>
-          <div id="addressElements" class=hiddenElement>
-            <table class="crm-block crm-form-block advanced-search-address-elements">
-          <tr><td>{$form.street_number.label}<br />{$form.street_number.html}<br /><span class="description nowrap">{ts}or ODD / EVEN{/ts}</td>
+  <table class="form-layout">
+    <tr>
+      <td>
+        <div id="streetAddress" class="crm-field-wrapper">
+          {$form.street_address.label}<br />
+          {$form.street_address.html|crmAddClass:big}
+          {if $parseStreetAddress}
+            <div>
+              <a href="#" title="{ts}Use Address Elements{/ts}" rel="addressElements" class="address-elements-toggle">{ts}Use Address Elements{/ts}</a>
+            </div>
+          {/if}
+        </div>
+        {if $parseStreetAddress}
+        <div id="addressElements" class="crm-field-wrapper" style="display: none;">
+          <table class="crm-block crm-form-block advanced-search-address-elements">
+            <tr><td>{$form.street_number.label}<br />{$form.street_number.html}<br /><span class="description nowrap">{ts}or ODD / EVEN{/ts}</td>
               <td>{$form.street_name.label}<br />{$form.street_name.html}</td>
               <td>{$form.street_unit.label}<br />{$form.street_unit.html|crmAddClass:four}</td>
-          </tr>
-          <tr>
-                <td colspan="3"><a href="#" title="{ts}Use Complete Address{/ts}" onClick="processAddressFields( 'streetAddress', 1 );return false;">{ts}Use Street Address{/ts}</a></td>
             </tr>
-            </table>
-          </div>
-{/if}
-            <br />
-            {$form.city.label}<br />
-            {$form.city.html}
-    </td>
-    </tr>
-
-    <tr>
-        <td>
-        {if $form.postal_code.html}
-    <table class="inner-table">
-       <tr>
-      <td>
-           {$form.postal_code.label}<br />
-                             {$form.postal_code.html}
+            <tr>
+              <td colspan="3"><a href="#" title="{ts}Use Complete Address{/ts}" rel="streetAddress" class="address-elements-toggle">{ts}Use Street Address{/ts}</a></td>
+            </tr>
+          </table>
+        </div>
+        {/if}
+        <div class="crm-field-wrapper">
+          {$form.city.label}<br />
+          {$form.city.html}
+        </div>
+        <div class="crm-field-wrapper">
+          {$form.country.label}<br />
+          {$form.country.html}
+        </div>
+        <div class="crm-field-wrapper">
+          {$form.state_province.label}<br />
+          {$form.state_province.html}
+        </div>
+        <div class="crm-field-wrapper">
+          {$form.county.label}<br />
+          {$form.county.html}
+        </div>
+        <div class="crm-field-wrapper">
+          {$form.world_region.label}<br />
+          {$form.world_region.html}
+        </div>
       </td>
+
       <td>
-        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-        <label>{ts}OR{/ts}</label>
-        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-      </td>
-      <td><label>{ts}Postal Code{/ts}</label>
-        {$form.postal_code_low.label|replace:'-':'<br />'}
-                    &nbsp;&nbsp;{$form.postal_code_low.html|crmAddClass:six}
-                                {$form.postal_code_high.label}
-                    &nbsp;&nbsp;{$form.postal_code_high.html|crmAddClass:six}
-      </td>
-        </tr>
-        <tr>
-                            <td colspan="2">&nbsp;</td>
-                            <td>{$form.prox_distance.label}<br />{$form.prox_distance.html}&nbsp;{$form.prox_distance_unit.html}</td>
-                    </tr>
-              <tr>
-      <td colspan="2">{$form.address_name.label}<br />
-        {$form.address_name.html|crmAddClass:medium}
-      </td>
-      <td>{$form.world_region.label}<br />
-        {$form.world_region.html}&nbsp;
-      </td>
-        </tr>
-        <tr>
-      <td colspan="2">{$form.county.label}<br />
-        {$form.county.html}&nbsp;
-      </td>
-      <td>{$form.country.label}<br />
-        {$form.country.html}&nbsp;
+        <div class="crm-field-wrapper">
+          <div>{$form.location_type.label} {help id="location_type" title=$form.location_type.label}</div>
+          {$form.location_type.html}
+        </div>
+        {if $form.address_name.html}
+          <div class="crm-field-wrapper">
+            {$form.address_name.label}<br />
+            {$form.address_name.html}
+          </div>
+        {/if}
+        {if $form.postal_code.html}
+          <div class="crm-field-wrapper">
+            {$form.postal_code.label}
+            <input type="checkbox" id="postal-code-range-toggle" value="1"/>
+            <label for="postal-code-range-toggle">{ts}Range{/ts}</label><br />
+            <div class="postal_code-wrapper">
+              {$form.postal_code.html}
+            </div>
+            <div class="postal_code_range-wrapper" style="display: none;">
+              {$form.postal_code_low.html}&nbsp;-&nbsp;{$form.postal_code_high.html}
+            </div>
+          </div>
+          <script type="text/javascript">
+            {literal}
+            CRM.$(function($) {
+              $('#postal-code-range-toggle').change(function() {
+                if ($(this).is(':checked')) {
+                  $('.postal_code_range-wrapper').show();
+                  $('.postal_code-wrapper').hide().find('input').val('');
+                } else {
+                  $('.postal_code-wrapper').show();
+                  $('.postal_code_range-wrapper').hide().find('input').val('');
+                }
+              });
+              if ($('#postal_code_low').val() || $('#postal_code_high').val()) {
+                $('#postal-code-range-toggle').prop('checked', true).change();
+              }
+            });
+            {/literal}
+          </script>
+        {/if}
+        {if $form.prox_distance.html}
+          <div class="crm-field-wrapper">
+            {$form.prox_distance.label}<br />
+            {$form.prox_distance.html}&nbsp;{$form.prox_distance_unit.html}
+          </div>
+        {/if}
       </td>
-        </tr>
-    </table>
-        {/if}&nbsp;
-        </td>
-        <td>{$form.state_province.label}<br />
-            {$form.state_province.html}
-        </td>
     </tr>
+
     {if $addressGroupTree}
-        <tr>
-      <td colspan="2">
+      <tr>
+        <td colspan="2">
           {include file="CRM/Custom/Form/Search.tpl" groupTree=$addressGroupTree showHideLinks=false}
-            </td>
-        </tr>
+        </td>
+      </tr>
     {/if}
-    </table>
+  </table>
 </div>
 
-{if $parseStreetAddress eq 1}
-{literal}
-<script type="text/javascript">
-function processAddressFields( name, loadData ) {
-    if ( name == 'addressElements' ) {
-        if ( loadData ) {
-      cj( '#street_address' ).val( '' );
-      }
+{if $parseStreetAddress}
+  {literal}
+    <script type="text/javascript">
+      CRM.$(function($) {
+        function processAddressFields(name) {
+          $('#' + name).show();
+          if (name == 'addressElements') {
+            $('#streetAddress').hide().find('input').val('');
+          } else {
+            $('#addressElements').hide().find('input').val('');
+          }
 
-      cj('#addressElements').show();
-      cj('#streetAddress').hide();
-  } else {
-        if ( loadData ) {
-             cj( '#street_name'   ).val( '' );
-             cj( '#street_unit'   ).val( '' );
-             cj( '#street_number' ).val( '' );
         }
+        $("a.address-elements-toggle").click(function(e) {
+          e.preventDefault();
+          processAddressFields(this.rel);
+        });
+        if ($('#street_name').val() || $('#street_unit').val() || $('#street_number').val()) {
+          processAddressFields('addressElements');
+        }
+      }
+    );
 
-        cj('#streetAddress').show();
-        cj('#addressElements').hide();
-       }
-
-}
-
-CRM.$(function($) {
-  if (  cj('#street_name').val( ).length > 0 ||
-        cj('#street_unit').val( ).length > 0 ||
-        cj('#street_number').val( ).length > 0 ) {
-    processAddressFields( 'addressElements', 1 );
-  }
-}
-);
-
-</script>
-{/literal}
+    </script>
+  {/literal}
 {/if}
 
 
index f89abca7b071cf855db8384064e740db5c328d3d..9ad792c60066a9197bb56e211d1f5026612bb631 100644 (file)
@@ -36,7 +36,7 @@
             {capture assign=editSmartGroupURL}{crmURL p="civicrm/contact/search/advanced" q="reset=1&force=1&ssID=`$ssID`"}{/capture}
         {/if} 
         <div class="crm-submit-buttons">
-            <a href="{$editSmartGroupURL}" class="button"><span><div class="icon edit-icon"></div> {ts 1=$group.title}Edit Smart Group Search Criteria for %1{/ts}</span></a>
+            <a href="{$editSmartGroupURL}" class="button no-popup"><span><div class="icon edit-icon"></div> {ts 1=$group.title}Edit Smart Group Search Criteria for %1{/ts}</span></a>
             {help id="id-edit-smartGroup"}
         </div>
     {/if}
@@ -44,7 +44,7 @@
     {if $permissionedForGroup}
         {capture assign=addMembersURL}{crmURL q="context=amtg&amtgID=`$group.id`&reset=1"}{/capture}
         <div class="crm-submit-buttons">
-            <a href="{$addMembersURL}" class="button"><span><div class="icon add-icon"></div> {ts 1=$group.title}Add Contacts to %1{/ts}</span></a>
+            <a href="{$addMembersURL}" class="button no-popup"><span><div class="icon add-icon"></div> {ts 1=$group.title}Add Contacts to %1{/ts}</span></a>
             {if $ssID}{help id="id-add-to-smartGroup"}{/if}
         </div>
     {/if}
index 19358ad2c823adc17bf76127c247d8e5f5c933c3..60e3d6cb5e5c1afcc5deb3eceb9c1aaab473c9c4 100644 (file)
 
 {literal}
 <script type="text/javascript">
-  function showHideSharedAddress( blockNo, showSelect ) {
-    // based on checkbox, show or hide
-    if ( cj( '#address\\[' + blockNo + '\\]\\[use_shared_address\\]' ).prop('checked') ) {
-      if ( showSelect && cj( '#shared-address-display-' + blockNo ).length == 0 ) {
-        cj( '#shared-address-' + blockNo ).show( );
+  CRM.$(function($) {
+
+    function showHideSharedAddress( blockNo, showSelect ) {
+      // based on checkbox, show or hide
+      if ( $( '#address\\[' + blockNo + '\\]\\[use_shared_address\\]' ).prop('checked') ) {
+        if ( showSelect && $( '#shared-address-display-' + blockNo ).length == 0 ) {
+          $( '#shared-address-' + blockNo ).show( );
+        }
+        $( 'table#address_table_' + blockNo ).hide( );
+        $( '#shared-address-display-' + blockNo ).show( );
+        $( '#shared-address-display-name-' + blockNo ).show( );
+        $( '#shared-address-display-cancel-' + blockNo ).hide( );
+        $( '.crm-address-custom-set-block-' + blockNo).hide( );
+      } else {
+        $( '#shared-address-' + blockNo ).hide( );
+        $( 'table#address_table_' + blockNo ).show( );
+        $( '#shared-address-display-' + blockNo ).hide( );
+        $( '#shared-address-display-name-' + blockNo ).hide( );
+        $( '#shared-address-display-cancel-' + blockNo ).hide( );
+        $( '.crm-address-custom-set-block-' + blockNo).show( );
       }
-      cj( 'table#address_table_' + blockNo ).hide( );
-      cj( '#shared-address-display-' + blockNo ).show( );
-      cj( '#shared-address-display-name-' + blockNo ).show( );
-      cj( '#shared-address-display-cancel-' + blockNo ).hide( );
-      cj( '.crm-address-custom-set-block-' + blockNo).hide( );
-    } else {
-      cj( '#shared-address-' + blockNo ).hide( );
-      cj( 'table#address_table_' + blockNo ).show( );
-      cj( '#shared-address-display-' + blockNo ).hide( );
-      cj( '#shared-address-display-name-' + blockNo ).hide( );
-      cj( '#shared-address-display-cancel-' + blockNo ).hide( );
-      cj( '.crm-address-custom-set-block-' + blockNo).show( );
     }
-  }
-
-CRM.$(function($) {
     var blockNo = {/literal}{$blockId}{literal};
 
     // call this when form loads
     showHideSharedAddress( blockNo, true );
 
     // handle check / uncheck of checkbox
-    cj( '#address\\[' + blockNo + '\\]\\[use_shared_address\\]' ).click( function( ) {
+    $( '#address\\[' + blockNo + '\\]\\[use_shared_address\\]' ).click( function( ) {
       showHideSharedAddress( blockNo, true );
     });
 
@@ -87,8 +87,8 @@ CRM.$(function($) {
     var contactHiddenElement = 'input[name="address[' + blockNo +'][master_contact_id]"]';
 
     // observe changes
-    cj( contactHiddenElement ).change(function( ) {
-      var sharedContactId = cj( this ).val( );
+    $( contactHiddenElement ).change(function( ) {
+      var sharedContactId = $( this ).val( );
       if ( !sharedContactId || isNaN( sharedContactId ) ) {
         return;
       }
@@ -96,23 +96,23 @@ CRM.$(function($) {
       var addressHTML = '';
       var postUrl = {/literal}"{crmURL p='civicrm/ajax/inline' h=0}"{literal};
 
-      cj.post( postUrl, {
-        'contact_id': sharedContactId,
-        'type': 'method',
-        'async': false,
-        'class_name': 'CRM_Contact_Page_AJAX',
-        'fn_name': 'getAddressDisplay'
+      $.post( postUrl, {
+          'contact_id': sharedContactId,
+          'type': 'method',
+          'async': false,
+          'class_name': 'CRM_Contact_Page_AJAX',
+          'fn_name': 'getAddressDisplay'
         },
         function( response ) {
           if ( response ) {
             var selected = 'checked';
             var addressExists = false;
 
-            cj.each( response, function( i, val ) {
+            $.each( response, function( i, val ) {
               if ( i > 1 ) {
                 selected = '';
               } else {
-                cj( 'input[name="address[' + blockNo + '][master_id]"]' ).val( val.id );
+                $( 'input[name="address[' + blockNo + '][master_id]"]' ).val( val.id );
               }
 
               addressHTML = addressHTML + '<input type="radio" name="selected_shared_address-'+ blockNo +'" value=' + val.id + ' ' + selected +'>' + val.display_text + '<br/>';
@@ -121,23 +121,23 @@ CRM.$(function($) {
             });
 
             if ( addressExists  ) {
-              cj( '#shared-address-' + blockNo + ' .shared-address-list' ).remove( );
-              cj( '#shared-address-' + blockNo ).append( '<tr class="shared-address-list"><td></td><td>' + addressHTML + '</td></tr>');
-              cj( 'input[name^=selected_shared_address-]' ).click( function( ) {
+              $( '#shared-address-' + blockNo + ' .shared-address-list' ).remove( );
+              $( '#shared-address-' + blockNo ).append( '<tr class="shared-address-list"><td></td><td>' + addressHTML + '</td></tr>');
+              $( 'input[name^=selected_shared_address-]' ).click( function( ) {
 
-              // get the block id
-              var elemId = cj(this).attr( 'name' ).split('-');
-              cj( 'input[name="address[' + elemId[1] + '][master_id]"]' ).val( cj(this).val( ) );
+                // get the block id
+                var elemId = $(this).attr( 'name' ).split('-');
+                $( 'input[name="address[' + elemId[1] + '][master_id]"]' ).val( $(this).val( ) );
               });
             } else {
               var helpText = {/literal}"{ts escape='js'}Selected contact does not have an address. Please edit that contact to add an address, or select a different contact.{/ts}"{literal};
-              cj( '#shared-address-' + blockNo + ' .shared-address-list' ).remove( );
-              cj( '#shared-address-' + blockNo ).append( '<tr class="shared-address-list"><td></td><td>' + helpText + '</td></tr>');
+              $( '#shared-address-' + blockNo + ' .shared-address-list' ).remove( );
+              $( '#shared-address-' + blockNo ).append( '<tr class="shared-address-list"><td></td><td>' + helpText + '</td></tr>');
             }
           }
         },'json');
     });
-});
+  });
 </script>
 {/literal}
 
index 3d00eeb0d7da8b49bd829ef404494051586eb306..d501cb1c8206c4ca50dd8617337e2cb12d883c07 100644 (file)
   CRM.$(function($) {
     $("#popupContainer").css({
       "background-color":"#E0E0E0",
-      'display':'none',
+      'display':'none'
     });
 
     $("#popup-button").click(function() {
       $("#popupContainer").dialog({
-        title: "Selected Contacts",
+        title: {/literal}"{ts escape='js'}Selected Contacts{/ts}"{literal},
         width:700,
         height:500,
         modal: true,
index e5bf8413377ef21c67dc4a762b350eecdf7330bd..24b7aaf1fa3d96fff4413d8b5e8c51e4890bdeb1 100644 (file)
        <td class="label">{if $single eq false}{ts}Recipient(s){/ts}{else}{$form.to.label}{/if}</td>
        <td>
          {$form.to.html}{if $noEmails eq true}&nbsp;&nbsp;{$form.emailAddress.html}{/if}
-         <div>
-           <a href="#" rel="cc_id" class="add-cc-link crm-hover-button" {if $form.cc_id.value}style="display:none;"{/if}>{ts}Add CC{/ts}</a>&nbsp;&nbsp;
-           <a href="#" rel="bcc_id" class="add-cc-link crm-hover-button" {if $form.bcc_id.value}style="display:none;"{/if}>{ts}Add BCC{/ts}</a>
-         </div>
        </td>
     </tr>
     <tr class="crm-contactEmail-form-block-cc_id" {if !$form.cc_id.value}style="display:none;"{/if}>
         <a class="crm-hover-button clear-cc-link" rel="bcc_id" title="{ts}Clear{/ts}" href="#"><span class="icon close-icon"></span></a>
       </td>
     </tr>
+    <tr>
+      <td></td>
+      <td>
+        <div>
+          <a href="#" rel="cc_id" class="add-cc-link crm-hover-button" {if $form.cc_id.value}style="display:none;"{/if}>{ts}Add CC{/ts}</a>&nbsp;&nbsp;
+          <a href="#" rel="bcc_id" class="add-cc-link crm-hover-button" {if $form.bcc_id.value}style="display:none;"{/if}>{ts}Add BCC{/ts}</a>
+        </div>
+      </td>
+    </tr>
 
 {if $emailTask}
     <tr class="crm-contactEmail-form-block-template">
@@ -92,7 +97,7 @@
 
 {literal}
 CRM.$(function($) {
-  var $form = $("#{/literal}{$form.formName}{literal}");
+  var $form = $("form.{/literal}{$form.formClass}{literal}");
 
   $('.add-cc-link', $form).click(function(e) {
     e.preventDefault();
index 3f6a1b35d68c7f21dd41788d6a5bdf74bd36db7a..0005f3cc8e88efbd56ec3491e0e9e2c440fbe16a 100644 (file)
@@ -2,13 +2,13 @@ CRM.$(function($) {
   //do not copy & paste this - find a way to generalise it
   'use strict';
   // NOTE: Might be safer to say $('[name=_qf_Email_upload]')
-   $('.form-submit').not('.cancel').on("click", function() {
-     $('.form-submit').not('.cancel').attr({value: ts('Processing')});
+   $('.crm-form-submit').not('.cancel').on("click", function() {
+     $('.crm-form-submit').not('.cancel').attr({value: ts('Processing')});
      // CRM-13449 : setting a 0 ms timeout is needed 
      // for some browsers like chrome. Used for purpose of
      // submit the form and stop accidental multiple clicks
      setTimeout(function(){
-       $('.form-submit').not('.cancel').prop({disabled: true});
+       $('.crm-form-submit').not('.cancel').prop({disabled: true});
      }, 0);
    });
 });
index 1fbf89818f8f58fdda640727b50d60a710a19d1c..64a9a2f155e438820974a06fb4ffbbb160fec22b 100644 (file)
 {literal}
 <script type="text/javascript">
 CRM.$(function($) {
-  var $form = $('form#{/literal}{$form.formName}{literal}');
+  var $form = $('form.{/literal}{$form.formClass}{literal}');
   $('#format_id', $form).on('change', function() {
     selectFormat($(this).val());
   });
index 7850178d510660acbdf1b648cde42ab444809c2b..3192f005a9da50b406b9a3e5bfd295a932958d37 100644 (file)
 
   {literal}
     <script type="text/javascript">
-      cj(document).ready(function() {
+      CRM.$(function($) {
          //build data source form block
          buildDataSourceFormBlock();
          buildSubTypes();
index 799b5742a8bd6d440b95d96d66de30c9fd2ef105..a8b781546e246eeaf481d6fde7ba6bcedf0d160a 100644 (file)
       CRM.$(function($) {
         var defaultLocationType = "{/literal}{$defaultLocationType}{literal}";
         if (defaultLocationType.length) {
-          cj('#map-field').on('change', 'select[id^="mapper"][id$="_0"]', function() {
-            var select = cj(this).next();
-            cj('option', select).each(function() {
-              if (cj(this).attr('value') == defaultLocationType
-              && cj(this).text() == "{/literal}{$defaultLocationTypeLabel}{literal}") {
+          $('#map-field').on('change', 'select[id^="mapper"][id$="_0"]', function() {
+            var select = $(this).next();
+            $('option', select).each(function() {
+              if ($(this).attr('value') == defaultLocationType
+              && $(this).text() == "{/literal}{$defaultLocationTypeLabel}{literal}") {
                 select.val(defaultLocationType);
               }
             });
index 216edee77bd45b08ae9015db58670fd8a6ab19c6..394f51c5d512a846eea6b1e5cf0698d38af8c1eb 100644 (file)
 <script type="text/javascript">
   CRM.$(function($) {
       var currentReSortEvent;
-    cj(".dash-column").sortable({
+    $(".dash-column").sortable({
       connectWith: '.dash-column',
       update: saveSorting
     });
 
-    cj(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
+    $(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
       .find(".portlet-header")
         .addClass("ui-widget-header ui-corner-all")
         .end()
       .find(".portlet-content");
 
-    cj(".dash-column").disableSelection();
+    $(".dash-column").disableSelection();
 
     function saveSorting(e, ui) {
             // this is to prevent double post call
@@ -86,8 +86,8 @@
                 dashletColumns = Array();
 
                 // build post params
-                cj('div[id^=existing-dashlets-col-]').each( function( i ) {
-                    cj(this).find('.portlet-header').each( function( j ) {
+                $('div[id^=existing-dashlets-col-]').each( function( i ) {
+                    $(this).find('.portlet-header').each( function( j ) {
                         var elementID = this.id;
                         var idState = elementID.split('-');
                         params['columns[' + i + '][' + idState[0] + ']'] = idState[1];
                 var postUrl = {/literal}"{crmURL p='civicrm/ajax/dashboard' h=0 }"{literal};
                 params['op'] = 'save_columns';
                 params['key'] = {/literal}"{crmKey name='civicrm/ajax/dashboard'}"{literal};
-                cj.post( postUrl, params, function(response, status) {
+                $.post( postUrl, params, function(response, status) {
                     // TO DO show done / disable escape action
                 });
             }
         }
 
-        cj('.delete-dashlet').click( function( ) {
+        $('.delete-dashlet').click( function( ) {
             var message = {/literal}'{ts escape="js"}Do you want to remove this dashlet as an "Available Dashlet", AND delete it from all user dashboards?{/ts}'{literal};
             if ( confirm( message) ) {
-                var dashletID = cj(this).parent().attr('id');
+                var dashletID = $(this).parent().attr('id');
                 var idState = dashletID.split('-')
 
                 // Build a list of params to post to the server.
                 var postUrl = {/literal}"{crmURL p='civicrm/ajax/dashboard' h=0 }"{literal};
                 params['op'] = 'delete_dashlet';
                 params['key'] = {/literal}"{crmKey name='civicrm/ajax/dashboard'}"{literal};
-                cj.post( postUrl, params, function(response, status) {
+                $.post( postUrl, params, function(response, status) {
                     // delete dom object
-                    cj('#' + dashletID ).parent().remove();
+                    $('#' + dashletID ).parent().remove();
                 });
             }
         });
index 96d8c70240fe06508ca2c071c5014151e9078b61..7a0913ca2da1f184d9b245f4d98c5079f5a57759 100644 (file)
@@ -32,7 +32,7 @@
 <dt>{ts}To{/ts}</dt><dd>{$toName|escape}</dd>
 <dt>{ts}Subject{/ts}</dt><dd>{$subject}</dd>
 <dt>{ts}Message{/ts}</dt><dd>{$message}</dd>
-<dt>&nbsp;</dt><dd><a class="button cancel form-submit" href="{crmURL p='civicrm/contact/view' q="history=1&show=1&selectedChild=activity"}">{ts}Done{/ts}</a></dd>
+<dt>&nbsp;</dt><dd><a class="button cancel crm-form-submit" href="{crmURL p='civicrm/contact/view' q="history=1&show=1&selectedChild=activity"}">{ts}Done{/ts}</a></dd>
 </dl>
 </fieldset>
 </div>
index e4659dde324b3362c9ced5f3680630843a5d1788..1f2b1b8e2fa90addf629051b7148a6bae4492088 100644 (file)
@@ -76,6 +76,7 @@
   {/if}
 
   {if $contactSmartGroupSettings neq 3}
+    <div class="spacer" style="height: 1.5em;"></div>
     <div class="accordion ui-accordion ui-widget ui-helper-reset">
       <div class="crm-accordion-wrapper crm-ajax-accordion crm-smartgroup-accordion {if $contactSmartGroupSettings eq 1}collapsed{/if}">
         <div class="crm-accordion-header" id="crm-contact_smartgroup" contact_id="{$contactId}">
@@ -83,7 +84,7 @@
         </div>
         <!-- /.crm-accordion-header -->
         <div class="crm-accordion-body">
-          <div class="crm-contact_smartgroup"></div>
+          <div class="crm-contact_smartgroup" style="min-height: 3em;"></div>
         </div>
         <!-- /.crm-accordion-body -->
       </div>
   CRM.$(function($) {
     // load panes function calls for snippet based on id of crm-accordion-header
     function loadPanes() {
-      var id = $(this).attr('id');
+      var $el = $(this).parent().find('div.crm-contact_smartgroup');
       var contactId = $(this).attr('contact_id');
-      if (!$('div.' + id).html()) {
-        var loading = '<img src="{/literal}{$config->resourceBase}i/loading.gif{literal}" alt="{/literal}{ts escape='js'}loading{/ts}{literal}" />&nbsp;{/literal}{ts escape='js'}Loading{/ts}{literal}...';
-        $('div.' + id).html(loading).load(CRM.url('civicrm/contact/view/smartgroup', {snippet: 4, cid: contactId}));
+      if (!$el.html()) {
+        CRM.loadPage(CRM.url('civicrm/contact/view/smartgroup', {cid: contactId}), {target: $el});
       }
     }
     // bind first click of accordion header to load crm-accordion-body with snippet
index 29cace82c896c28a7ae0ca6dda1d04102b2d4735..f43d8236d6c1c289e55b182b0518c4fd00d5b579 100644 (file)
@@ -26,7 +26,6 @@
 <div class="view-content">
 {if $action eq 4}{* when action is view  *}
     {if $notes}
-        <h3>{ts}View Note{/ts}</h3>
         <div class="crm-block crm-content-block crm-note-view-block">
           <table class="crm-info-panel">
             <tr><td class="label">{ts}Subject{/ts}</td><td>{$note.subject}</td></tr>
@@ -38,7 +37,9 @@
                {include file="CRM/Form/attachment.tpl"}
             {/if}
           </table>
-          <div class="crm-submit-buttons"><input type="submit" class='cancel form-submit' value="{ts}Done{/ts}"/></div>
+          <div class="crm-submit-buttons">
+            <a class="button cancel" href="{crmURL p='civicrm/contact/view' q="selectedChild=note&reset=1&cid=`$contactId`"}">{ts}Done{/ts}</a>
+          </div>
 
         {if $comments}
         <fieldset>
         </div>
         {/if}
 {elseif $action eq 1 or $action eq 2} {* action is add or update *}
-    <h3>
-        {if $parentId}
-            {if $action eq 1}{ts}New Comment{/ts}{else}{ts}Edit Comment{/ts}{/if}
-        {else}
-            {if $action eq 1}{ts}New Note{/ts}{else}{ts}Edit Note{/ts}{/if}
-        {/if}
-    </h3>
   <div class="crm-block crm-form-block crm-note-form-block">
     <div class="content crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
         <table class="form-layout">
     </div>
 {/if}
 {if ($action eq 8)}
-<fieldset><legend>{ts}Delete Note{/ts}</legend>
 <div class=status>{ts 1=$notes.$id.note}Are you sure you want to delete the note '%1'?{/ts}</div>
 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl"}</div>
-</fieldset>
 
 {/if}
 
 
     <script type="text/javascript">
     {literal}
-        cj(document).ready( function() {
-            var tabId = cj.fn.dataTableSettings[0].sInstance;
+      CRM.$(function($) {
+        var tabId = $.fn.dataTableSettings[0].sInstance;
 
-            cj('table#'+ tabId).dataTable().fnSettings().aoDrawCallback.push( {
-                    "fn": function () {
-                        cj('#'+ tabId +' tr').each( function() {
-                            drawCommentRows(this.id)
-                        });
-                    },
-                    "sName": "user"
-            } );
-        });
+        $('table#'+ tabId).dataTable().fnSettings().aoDrawCallback.push( {
+          "fn": function () {
+            $('#'+ tabId +' tr').each( function() {
+              drawCommentRows(this.id)
+            });
+          },
+          "sName": "user"
+        } );
+      });
 
     {/literal}
     </script>
                 {* Include '(more)' link to view entire note if it has been truncated *}
                 {assign var="noteSize" value=$note.note|count_characters:true}
                 {if $noteSize GT 80}
-            <a href="{crmURL p='civicrm/contact/view/note' q="action=view&selectedChild=note&reset=1&cid=`$contactId`&id=`$note.id`"}">{ts}(more){/ts}</a>
+                  <a class="crm-popup" href="{crmURL p='civicrm/contact/view/note' q="action=view&selectedChild=note&reset=1&cid=`$contactId`&id=`$note.id`"}">{ts}(more){/ts}</a>
                 {/if}
             </td>
             <td class="crm-note-subject">{$note.subject}</td>
index 2748e89fe86ab854adf26cec3af1574c19b26b26..3c51488f82fa5eb49c8c2827190cee398dd3e864 100644 (file)
@@ -35,7 +35,7 @@
 {/literal}
 <form action="{crmURL p='civicrm/contact/view' q="&cid=`$contactId`&reset=1"}" method="post" id="Print1" >
   <div class="form-item">
-       <span class="element-right"><input onclick="window.print(); return false" class="form-submit default" name="_qf_Print_next" value="{ts}Print{/ts}" type="submit" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="form-submit" name="_qf_Print_back" value="{ts}Done{/ts}" type="submit" /></span>
+       <span class="element-right"><input onclick="window.print(); return false" class="crm-form-submit default" name="_qf_Print_next" value="{ts}Print{/ts}" type="submit" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="crm-form-submit" name="_qf_Print_back" value="{ts}Done{/ts}" type="submit" /></span>
   </div>
 </form>
 <br />
@@ -43,7 +43,7 @@
     {include file="CRM/Contact/Page/View/Summary.tpl"}
     <form action="{crmURL p='civicrm/contact/view' q="&cid=`$contactId`&reset=1"}" method="post" id="Print2" >
       <div class="form-item">
-           <span class="element-right"><input onclick="window.print(); return false" class="form-submit default" name="_qf_Print_next" value="{ts}Print{/ts}" type="submit" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="form-submit" name="_qf_Print_back" value="{ts}Done{/ts}" type="submit" /></span>
+           <span class="element-right"><input onclick="window.print(); return false" class="crm-form-submit default" name="_qf_Print_next" value="{ts}Print{/ts}" type="submit" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="crm-form-submit" name="_qf_Print_back" value="{ts}Done{/ts}" type="submit" /></span>
       </div>
     </form>
 </div>
index c814aec7bfcd836f39099c18dba97941aff15718..44dce9f3e71692c7ad55ab6a7567c0339b6f5e71 100644 (file)
@@ -92,7 +92,7 @@
         CRM.status(ts('Saved'));
       }
       // Update changelog tab and contact footer
-      if (response.changeLog.count) {
+      if (response.changeLog && response.changeLog.count) {
         CRM.tabHeader.updateCount('#tab_log', response.changeLog.count);
       }
       $("#crm-record-log").replaceWith(response.changeLog.markup);
           .click(function() {
             $(form).find('input[name=oplock_ts]').val(errorTag.attr('data:update_oplock_ts'));
             errorTag.parent().hide();
-            $(this).closest('form').find('.form-submit.default').first().click();
+            $(this).closest('form').find('.crm-form-submit.default').first().click();
             return false;
           })
           .appendTo(buttonContainer)
     $('.crm-inline-edit.form form').unblock();
   }
 
-  $('document').ready(function() {
+  $(function() {
     // don't perform inline edit during print mode
     if (CRM.summaryPrint.mode) {
       $('div').removeClass('crm-inline-edit');
         }
       })
       // handle delete link within blocks
-      .on('click', '.crm-delete-inline', function() {
+      .on('click', '.crm-delete-inline', function(e) {
         var row = $(this).closest('tr');
         var form = $(this).closest('form');
-        row.addClass('hiddenElement');
+        row.hide();
         $('input', row).val('');
         //if the primary is checked for deleted block
         //unset and set first as primary
           $('[class$=is_primary] input:first', form).prop('checked', true );
         }
         $('.add-more-inline', form).show();
+        e.preventDefault();
       })
       // Delete an address
       .on('click', '.crm-inline-edit.address .delete-button', function() {
         return false;
       })
       // add more and set focus to new row
-      .on('click', '.add-more-inline', function() {
+      .on('click', '.add-more-inline', function(e) {
         var form = $(this).closest('form');
         var row = $('tr[class="hiddenElement"]:first', form);
         row.removeClass('hiddenElement');
         if ($('tr[class="hiddenElement"]').length < 1) {
           $(this).hide();
         }
+        e.preventDefault();
       });
     // Trigger cancel button on esc keypress
     $(document).keydown(function(key) {
index 9d802e73b1773c6d16bc31ed0b17805fec27e201..ad812c53eda97e1ecf8c269441492567b4a8b7de 100644 (file)
         {foreach from=$allTabs key=tabName item=tabValue}
           <li id="tab_{$tabValue.id}" class="crm-tab-button ui-corner-all crm-count-{$tabValue.count}{if isset($tabValue.class)} {$tabValue.class}{/if}">
             <a href="{$tabValue.url}" title="{$tabValue.title}">
-              <span> </span> {$tabValue.title}
-              <em>{$tabValue.count}</em>
+              {$tabValue.title}
+              {if empty($tabValue.hideCount)}<em>{$tabValue.count}</em>{/if}
             </a>
           </li>
         {/foreach}
index afbcc184eac40c4f2c3e83103cd94b1b4f63512d..c271373fa838ba8e803e00b628bb0ce591e804b8 100644 (file)
@@ -59,7 +59,7 @@
                var min_amount = document.getElementById("min_amount");
 
 
-               var amount = new Array();
+               var amount = [];
                amount[0] = '';
 
                if( product_id > 0 ) {
index 4986af3e9682e14d9020e3aaa241d615a99be965..822c69fdeaf4ee65dc4e6b9b48e76c909b34c50b 100644 (file)
   {include file="CRM/Contribute/Form/AdditionalInfo/$formType.tpl"}
 {else}
 
-{if $paymentType eq 'refund'}
-<h3>{ts}New Event Refund{/ts}</h3>
-{else}
-<h3>{if $component eq 'event'}{if $contributionMode}{ts}Credit Card Event Payment{/ts}{else}{ts}New Event Payment{/ts}{/if}{/if}</h3>
-{/if}
 <div class="crm-block crm-form-block crm-payment-form-block">
 
   {if $contributionMode == 'test'}
           {if $showCheckNumber || !$isOnline}
             <tr id="checkNumber" class="crm-payment-form-block-check_number">
               <td class="label">{$form.check_number.label}</td>
-              <td>{$form.check_number.html|crmReplace:class:six}</td>
+              <td>{$form.check_number.html}</td>
             </tr>
           {/if}
           <tr class="crm-payment-form-block-trxn_id">
             <td class="label">{$form.trxn_id.label}</td>
-            <td {$valueStyle}>{$form.trxn_id.html|crmReplace:class:twelve} {help id="id-trans_id"}</td>
+            <td {$valueStyle}>{$form.trxn_id.html} {help id="id-trans_id"}</td>
           </tr>
           {if $email and $outBound_option != 2}
             <tr class="crm-payment-form-block-is_email_receipt">
index e2d14afd6c8c04d4917a3bf284dcc008efa15786..7c2ee411fbde58d39d3977cb0104f28cc458763f 100644 (file)
   {include file="CRM/Contribute/Form/AdditionalInfo/$formType.tpl"}
 {else}
 
-  {if $contributionMode}
-  <h3>{if $ppID}{ts}Credit Card Pledge Payment{/ts}{else}{ts}Credit Card Contribution{/ts}{/if}</h3>
-    {elseif $context NEQ 'standalone'}
-  <h3>{if $action eq 1 or $action eq 1024}{if $ppID}{ts}Pledge Payment{/ts}{else}{ts}New Contribution{/ts}{/if}{elseif $action eq 8}{ts}Delete Contribution{/ts}{else}{ts}Edit Contribution{/ts}{/if}</h3>
-  {/if}
-
   <div class="crm-block crm-form-block crm-contribution-form-block">
 
   {if $contributionMode == 'test' }
@@ -75,7 +69,7 @@
       {else}
         {capture assign=ccModeLink}{crmURL p='civicrm/contact/view/contribution' q="reset=1&action=add&context=standalone&mode=live"}{/capture}
       {/if}
-      <span class="action-link crm-link-credit-card-mode">&nbsp;<a class="open-inline crm-hover-button" href="{$ccModeLink}">&raquo; {ts}submit credit card contribution{/ts}</a></span>
+      <span class="action-link crm-link-credit-card-mode">&nbsp;<a class="open-inline crm-hover-button action-item" href="{$ccModeLink}">&raquo; {ts}submit credit card contribution{/ts}</a></span>
     {/if}
   </div>
   {if $isOnline}{assign var=valueStyle value=" class='view-value'"}{else}{assign var=valueStyle value=""}{/if}
@@ -85,9 +79,6 @@
       <td class="font-size12pt label"><strong><strong>{ts}Contributor{/ts}</strong></td><td class="font-size12pt"><strong>{$displayName}</strong></td>
     </tr>
     {else}
-      {if !$contributionMode and !$email and $outBound_option != 2}
-        {assign var='profileCreateCallback' value=1 }
-      {/if}
       <td class="label">{$form.contact_id.label}</td>
       <td>{$form.contact_id.html}</td>
     {/if}
             </tr>
             <tr id="cancelReason">
               <td class="label" style="vertical-align: top;">{$form.cancel_reason.label}</td>
-              <td>{$form.cancel_reason.html|crmReplace:class:huge}</td>
+              <td>{$form.cancel_reason.html}</td>
             </tr>
           </table>
         </fieldset>
           {if $showCheckNumber || !$isOnline}
             <tr id="checkNumber" class="crm-contribution-form-block-check_number">
               <td class="label">{$form.check_number.label}</td>
-              <td>{$form.check_number.html|crmReplace:class:six}</td>
+              <td>{$form.check_number.html}</td>
             </tr>
           {/if}
           <tr class="crm-contribution-form-block-trxn_id">
             <td class="label">{$form.trxn_id.label}</td>
-            <td {$valueStyle}>{$form.trxn_id.html|crmReplace:class:twelve} {help id="id-trans_id"}</td>
+            <td {$valueStyle}>{$form.trxn_id.html} {help id="id-trans_id"}</td>
           </tr>
           {if $email and $outBound_option != 2}
             <tr class="crm-contribution-form-block-is_email_receipt">
     {if $context eq 'standalone' and $outBound_option != 2 }
       {literal}
       CRM.$(function($) {
-        cj("#contact_id").change( function( ) {
-          checkEmail( );
-        });
+
+        var $form = $("form.{/literal}{$form.formClass}{literal}");
+        $("#contact_id", $form).change(checkEmail);
         checkEmail( );
+
+        function checkEmail( ) {
+          var data = $("#contact_id", $form).select2('data');
+          if (data && data.extra && data.extra.email && data.extra.email.length) {
+            $("#email-receipt", $form).show();
+            $("#email-address", $form).html(data.extra.email);
+          }
+          else {
+            $("#email-receipt", $form).hide();
+          }
+        }
+
         showHideByValue( 'is_email_receipt', '', 'receiptDate', 'table-row', 'radio', true);
         showHideByValue( 'is_email_receipt', '', 'fromEmail', 'table-row', 'radio', false );
       });
 
-      function checkEmail( ) {
-        var contactID = cj("#contact_id").val();
-        if (contactID) {
-          var postUrl = "{/literal}{crmURL p='civicrm/ajax/checkemail' h=0}{literal}";
-          cj.post( postUrl, {contact_id: contactID},
-            function (response) {
-              if (response) {
-                cj("#email-receipt").show( );
-                cj("#email-address").html(response);
-              }
-              else {
-                cj("#email-receipt").hide( );
-              }
-            }
-          );
-        }
-        else {
-          cj("#email-receipt").hide( );
-        }
-      }
-
-      function profileCreateCallback( blockNo ) {
-        checkEmail( );
-      }
     {/literal}
     {/if}
   </script>
index feb71e9af2346311dc467139361ed9ec07b0339a..1c8dab03df15741d1485c42d81021d6d942751e1 100644 (file)
 CRM.$(function($) {
     //if price set is set we use below below code to show for showing auto renew
     var autoRenewOption =  {/literal}'{$autoRenewOption}'{literal};
-    cj('#allow_auto_renew').hide();
+    $('#allow_auto_renew').hide();
     if ( autoRenewOption == 1 ) {
-        cj('#allow_auto_renew').show();
+        $('#allow_auto_renew').show();
     } else if ( autoRenewOption == 2 ) {
-        var autoRenew = cj("#auto_renew");
+        var autoRenew = $("#auto_renew");
         autoRenew.prop('checked',  true );
         autoRenew.attr( 'readonly', true );
-        cj('#allow_auto_renew').show();
+        $('#allow_auto_renew').show();
     }
 });
 </script>
index 38773cf2b5571ad4b256e780928864babb0b90dc..b9181ecc6d37559725c9431269fd469cd81ba837 100644 (file)
@@ -296,9 +296,9 @@ function selectCreateOrg( orgOption, reset ) {
 {if $membershipContactID}
 {literal}
   CRM.$(function($) {
-    cj('#organization_id').val("{/literal}{$membershipContactName}{literal}");
-    cj('#organization_name').val("{/literal}{$membershipContactName}{literal}");
-    cj('#onbehalfof_id').val("{/literal}{$membershipContactID}{literal}");
+    $('#organization_id').val("{/literal}{$membershipContactName}{literal}");
+    $('#organization_name').val("{/literal}{$membershipContactName}{literal}");
+    $('#onbehalfof_id').val("{/literal}{$membershipContactID}{literal}");
     setLocationDetails( "{/literal}{$membershipContactID}{literal}" );
   });
 {/literal}
index 96f5c6bcac1de08f33ef0814692bc7ea00ce1929..ea9f21a8fa94c656a04a1d472ceec4a49554026d 100644 (file)
 
         // select a new premium
         function select_premium(premium_id) {
-          if(cj(premium_id).length) {
+          if($(premium_id).length) {
             // hide other active premium
-            cj('.premium-full').hide();
-            cj('.premium-short').show();
+            $('.premium-full').hide();
+            $('.premium-short').show();
             // show this one
-            cj('.premium-short', cj(premium_id)).hide();
-            cj('.premium-full', cj(premium_id)).show();
+            $('.premium-short', $(premium_id)).hide();
+            $('.premium-full', $(premium_id)).show();
             // record this one
             var id_parts = premium_id.split('-');
-            cj('#selectProduct').val(id_parts[1]);
+            $('#selectProduct').val(id_parts[1]);
           }
         }
 
         // click premium to select
-        cj('.premium-short').click(function(){
-          select_premium( '#'+cj(cj(this).parent()).attr('id') );
+        $('.premium-short').click(function(){
+          select_premium( '#'+$($(this).parent()).attr('id') );
         });
 
         // select the default premium
-        var premium_id = cj('#selectProduct').val();
+        var premium_id = $('#selectProduct').val();
         if(premium_id == '') premium_id = 'no_thanks';
         select_premium('#premium_id-'+premium_id);
 
           }
 
           // see if other amount exists and has a value
-          if(cj('.other_amount-content input').length) {
-            amount = Number(cj('.other_amount-content input').val());
+          if($('.other_amount-content input').length) {
+            amount = Number($('.other_amount-content input').val());
             if(isNaN(amount))
               amount = 0;
           }
 
           function check_price_set(price_set_radio_buttons) {
             if (!amount) {
-              cj(price_set_radio_buttons).each(function(){
-                if (cj(this).prop('checked')) {
-                  amount = cj(this).attr('data-amount');
+              $(price_set_radio_buttons).each(function(){
+                if ($(this).prop('checked')) {
+                  amount = $(this).attr('data-amount');
                   if (typeof amount !== "undefined") {
                     amount = Number(amount);
                   }
         function update_premiums() {
           var amount = get_amount();
 
-          cj('.premium').each(function(){
-            var min_contribution = cj(this).attr('min_contribution');
+          $('.premium').each(function(){
+            var min_contribution = $(this).attr('min_contribution');
             if(amount < min_contribution) {
-              cj(this).addClass('premium-disabled');
+              $(this).addClass('premium-disabled');
             } else {
-              cj(this).removeClass('premium-disabled');
+              $(this).removeClass('premium-disabled');
             }
           });
         }
-        cj('.other_amount-content input').change(update_premiums);
-        cj('input, #priceset').change(update_premiums);
+        $('.other_amount-content input').change(update_premiums);
+        $('input, #priceset').change(update_premiums);
         update_premiums();
 
         // build a list of price sets
         var amounts = [];
         var price_sets = {};
-        cj('input, #priceset  select,#priceset').each(function(){
+        $('input, #priceset  select,#priceset').each(function(){
           if (this.tagName == 'SELECT') {
-            var selectID = cj(this).attr('id');
-            var selectvalues = JSON.parse(cj(this).attr('price'));
+            var selectID = $(this).attr('id');
+            var selectvalues = JSON.parse($(this).attr('price'));
             Object.keys(selectvalues).forEach(function (key) {
               var option = selectvalues[key].split(optionSep);
               amount = Number(option[0]);
             });
           }
           else {
-            var amount = Number(cj(this).attr('data-amount'));
+            var amount = Number($(this).attr('data-amount'));
             if (!isNaN(amount)) {
               amounts.push(amount);
 
-             var id = cj(this).attr('id');
+             var id = $(this).attr('id');
              price_sets[amount] = '#'+id;
             }
           }
         amounts.sort(function(a,b){return a - b});
 
         // make contribution instead buttons work
-        cj('.premium-full-disabled input').click(function(){
-          var amount = Number(cj(this).attr('amount'));
+        $('.premium-full-disabled input').click(function(){
+          var amount = Number($(this).attr('amount'));
           if (price_sets[amount]) {
-            if (!cj(price_sets[amount]).length) {
+            if (!$(price_sets[amount]).length) {
               var option =  price_sets[amount].split('-');
-              cj(option[0]).val(option[1]);
-              cj(option[0]).trigger('change');
+              $(option[0]).val(option[1]);
+              $(option[0]).trigger('change');
             }
-            else if (cj(price_sets[amount]).attr('type') == 'checkbox') {
-               cj(price_sets[amount]).prop("checked",true);
+            else if ($(price_sets[amount]).attr('type') == 'checkbox') {
+               $(price_sets[amount]).prop("checked",true);
                if ((typeof totalfee !== 'undefined') && (typeof display == 'function')) {
                  if (totalfee > 0) {
                    totalfee += amount;
                }
              }
              else {
-               cj(price_sets[amount]).click();
-               cj(price_sets[amount]).trigger('click');
+               $(price_sets[amount]).click();
+               $(price_sets[amount]).trigger('click');
              }
           } else {
             // is there an other amount input box?
-            if(cj('.other_amount-section input').length) {
+            if($('.other_amount-section input').length) {
               // is this a membership form with separate payment?
               if(is_separate_payment) {
                 var current_amount = 0;
-                if(cj('#priceset input[type="radio"]:checked').length) {
-                  current_amount = Number(cj('#priceset input[type="radio"]:checked').attr('data-amount'));
+                if($('#priceset input[type="radio"]:checked').length) {
+                  current_amount = Number($('#priceset input[type="radio"]:checked').attr('data-amount'));
                   if(!current_amount) current_amount = 0;
                 }
                 var new_amount = amount - current_amount;
-                cj('.other_amount-section input').val(new_amount.toFixed(2));
+                $('.other_amount-section input').val(new_amount.toFixed(2));
               } else {
-                cj('.other_amount-section input').click();
-                cj('.other_amount-section input').val(cj(this).attr('amount'));
+                $('.other_amount-section input').click();
+                $('.other_amount-section input').val($(this).attr('amount'));
               }
             } else {
               // find the next best price set
                 selected_price_set = amounts[amounts.length-1];
               }
 
-              if (!cj(price_sets[selected_price_set]).length) {
+              if (!$(price_sets[selected_price_set]).length) {
                 var option =  price_sets[selected_price_set].split('-');
-                cj(option[0]).val(option[1]);
-                cj(option[0]).trigger('change');
+                $(option[0]).val(option[1]);
+                $(option[0]).trigger('change');
               }
-              else if (cj(price_sets[selected_price_set]).attr('type') == 'checkbox') {
-                cj(price_sets[selected_price_set]).prop("checked",true);
+              else if ($(price_sets[selected_price_set]).attr('type') == 'checkbox') {
+                $(price_sets[selected_price_set]).prop("checked",true);
                 if ((typeof totalfee !== 'undefined') && (typeof display == 'function')) {
                   if (totalfee > 0) {
                     totalfee += amount;
                 }
              }
              else {
-               cj(price_sets[selected_price_set]).click();
-               cj(price_sets[selected_price_set]).trigger('click');
+               $(price_sets[selected_price_set]).click();
+               $(price_sets[selected_price_set]).trigger('click');
              }
             }
           }
 
         // validation of premiums
         var error_message = '{/literal}{ts escape="js"}You must contribute more to get that item{/ts}{literal}';
-        cj.validator.addMethod('premiums', function(value, element, params){
-          var premium_id = cj('#selectProduct').val();
-          var premium$ = cj('#premium_id-'+premium_id);
+        $.validator.addMethod('premiums', function(value, element, params){
+          var premium_id = $('#selectProduct').val();
+          var premium$ = $('#premium_id-'+premium_id);
           if(premium$.length) {
             if(premium$.hasClass('premium-disabled')) {
               return false;
 
         // add validation rules
         CRM.validate.functions.push(function(){
-          cj('#selectProduct').rules('add', 'premiums');
+          $('#selectProduct').rules('add', 'premiums');
         });
 
         // need to use jquery validate's ignore option, so that it will not ignore hidden fields
index 354be5427d7f88e0f1ab4f0ca614089ea6cf0fe3..6141e3f66ed5e0d9904458af070de9c573694f7a 100644 (file)
 {/if} {* $action ne view *}
 </div>
 
-<script language="JavaScript" type="text/javascript">
+<script type="text/javascript">
 {literal}
-function getFinancialType()
-{
-{/literal}
-   productID         = "#product_id";
-   financialTypeID    = "#financial_type_id"
-   callbackURL        = "{crmURL p='civicrm/ajax/rest' h=0 q='className=CRM_Financial_Page_AJAX&fnName=jqFinancialType'}"
-{literal}
-
-          var check          = cj(productID).val();
-          callbackURL = callbackURL+"&_value="+check;
-                cj.ajax({
-                         url: callbackURL,
-                         context: document.body,
-                         success: function( data, textStatus ){
-       data = eval(data);//get json array
-                              if ( data != null ) {
-             cj(financialTypeID).val(data);
-
-           }
-
-      }
-           });
 
-  }
+  CRM.$(function($) {
 
-cj(document).ready(function(){
+    function getFinancialType() {
+      var callbackURL = CRM.url('civicrm/ajax/rest', {
+        className: 'CRM_Financial_Page_AJAX',
+        fnName: 'jqFinancialType',
+        _value: $("#product_id").val()
+      });
+      $.ajax({
+        url: callbackURL,
+        success: function( data, textStatus ){
+          data = eval(data);//get json array
+          if ( data != null ) {
+            $("#financial_type_id").val(data);
+  
+          }
+  
+        }
+      });
+  
+    }
     getFinancialType();
 
-    cj("#product_id").change( function(){
-         getFinancialType();
-    });
+    $("#product_id").change(getFinancialType);
 });
 {/literal}
 </script>
index ef85c5424f34bd49e49b6240e4cd886ea95d53e2..3e673ae38819b286f87577ef1773b4e3a5a25ca5 100644 (file)
 *}
 {capture assign="adminPriceSets"}{crmURL p='civicrm/admin/price' q="reset=1"}{/capture}
 <div class="crm-block crm-form-block crm-contribution-contributionpage-amount-form-block">
-{if $isQuick}
-    <div id="popupContainer">
-    {ts}Once you switch to using a Price Set, you won't be able to switch back to your existing settings below except by re-entering them. Are you sure you want to switch to a Price Set?{/ts}
-    </div>
-{/if}
 <div id="help">
     {ts}Use this form to configure Contribution Amount options. You can give contributors the ability to enter their own contribution amounts - and/or provide a fixed list of amounts. For fixed amounts, you can enter a label for each 'level' of contribution (e.g. Friend, Sustainer, etc.). If you allow people to enter their own dollar amounts, you can also set minimum and maximum values. Depending on your choice of Payment Processor, you may be able to offer a recurring contribution option.{/ts} {docURL page="user/contributions/payment-processors"}
 </div>
 
 {literal}
 <script type="text/javascript">
-   var paymentProcessorMapper = new Array( );
+   var paymentProcessorMapper = [];
      {/literal}
        {if $recurringPaymentProcessor}
            {foreach from=$recurringPaymentProcessor item="paymentProcessor" key="index"}{literal}
            {/literal}{/foreach}
        {/if}
      {literal}
-    cj( document ).ready( function( ) {
-    cj("#popupContainer").hide();
-        function checked_payment_processors() {
-            var ids = [];
-            cj('.crm-contribution-contributionpage-amount-form-block-payment_processor input[type="checkbox"]').each(function(){
-                if(cj(this).prop('checked')) {
-                    var id = cj(this).attr('id').split('_')[2];
-        ids.push(id);
-                }
-            });
-            return ids;
-        }
+     CRM.$(function($) {
+       function checked_payment_processors() {
+         var ids = [];
+         $('.crm-contribution-contributionpage-amount-form-block-payment_processor input[type="checkbox"]').each(function(){
+           if($(this).prop('checked')) {
+             var id = $(this).attr('id').split('_')[2];
+             ids.push(id);
+           }
+         });
+         return ids;
+       }
 
         // show/hide recurring block
-        cj('.crm-contribution-contributionpage-amount-form-block-payment_processor input[type="checkbox"]').change(function(){
-            showRecurring( checked_payment_processors() )
+        $('.crm-contribution-contributionpage-amount-form-block-payment_processor input[type="checkbox"]').change(function(){
+            showRecurring( checked_payment_processors() );
         });
-        showRecurring( checked_payment_processors() )
+        showRecurring( checked_payment_processors() );
     });
   var element_other_amount = document.getElementsByName('is_allow_other_amount');
     if (! element_other_amount[0].checked) {
 {if $isQuick}
 {literal}
 <script type="text/javascript">
-cj("#quickconfig").click(function(){
-cj("#popupContainer").dialog({
-  title: "Selected Price Set",
-  width:400,
-  height:220,
-  modal: true,
-  overlay: {
-                 opacity: 0.5,
-                  background: "black"
-        },
-        buttons: {
-                   "Ok": function() {
-       var dataUrl  = {/literal}'{crmURL p="civicrm/ajax/rest" h=0 q="className=CRM_Core_Page_AJAX&fnName=setIsQuickConfig&context=civicrm_contribution_page&id=$contributionPageID" }';
-        var redirectUrl = '{crmURL p="civicrm/admin/price/field" h=0 q="reset=1&action=browse&sid=" }';
-       {literal}
-       cj.ajax({
-      url: dataUrl,
-      async: false,
-      global: false,
-      success: function ( result ) {
-        if (result) {
-          window.location= redirectUrl+eval(result);
-        }
-      }
-       });
-                   },
-       "Close": function() {
-                     cj(this).dialog("close");
-                   }
-  }
-});
-return false;
-});
+  CRM.$(function($) {
+    $("#quickconfig").click(function(e) {
+      e.preventDefault();
+      CRM.confirm({
+        width: 400,
+        message: {/literal}"{ts escape='js'}Once you switch to using a Price Set, you won't be able to switch back to your existing settings below except by re-entering them. Are you sure you want to switch to a Price Set?{/ts}"{literal}
+      }).on('crmConfirm:yes', function() {
+        {/literal}
+        var dataUrl = '{crmURL p="civicrm/ajax/rest" h=0 q="className=CRM_Core_Page_AJAX&fnName=setIsQuickConfig&context=civicrm_contribution_page&id=$contributionPageID" }';
+        {literal}
+        $.getJSON(dataUrl).done(function(result) {window.location = CRM.url("civicrm/admin/price/field", {reset: 1, action: 'browse', sid: result});});
+      });
+    });
+  });
 </script>
 {/literal}
 {/if}
index f73b93cf3ba73d13d349d2c689f2e62693f5d0e5..82616899a6a9e16898aa01a923a6bdcc77953f1d 100644 (file)
   CRM.$(function($) {
 
     // bind click event to premiums_active checkbox
-    cj('#premiums_active').click(function () {
+    $('#premiums_active').click(function () {
       premiumBlock();
     });
 
     // hide premium setting if premium block is not enabled
-    if (!cj('#premiums_active').prop('checked')) {
-      cj('#premiumSettings').hide();
+    if (!$('#premiums_active').prop('checked')) {
+      $('#premiumSettings').hide();
     }
   });
 
index 609d39ec92710c164072e333d5985ac6a7a1e89a..91f51e76655c12f32e94e7dcb1b1b653c97133c1 100644 (file)
@@ -24,8 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 <div class="crm-block crm-content-block crm-contribution-view-form-block">
-<h3>{ts}View Contribution{/ts}</h3>
-
 <div class="action-link">
   <div class="crm-submit-buttons">
     {if call_user_func(array('CRM_Core_Permission','check'), 'edit contributions')}
index 3a55d415edfba4bc3241907efc6ee665d31848b9..28f2657f1b0a5a17f2d45928a92d7d72574dae09 100644 (file)
@@ -24,9 +24,7 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting premium  *}
-<h3>{if $action eq 1}{ts}New Premium{/ts}{elseif $action eq 2}{ts}Edit Premium{/ts}{elseif $action eq 1024}{ts}Preview a Premium{/ts}{else}{ts}Delete Premium Product{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-contribution-manage_premiums-form-block">
-<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
    {if $action eq 8}
       <div class="messages status no-popup">
           <div class="icon inform-icon"></div>
@@ -35,6 +33,7 @@
   {elseif $action eq 1024}
      {include file="CRM/Contribute/Form/Contribution/PremiumBlock.tpl" context="previewPremium"}
   {else}
+     <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
   <table class="form-layout-compressed">
      <tr class="crm-contribution-form-block-name">
   <td class="label">{$form.name.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_product' field='name' id=$productId}{/if}
index 5536591305d505238b063784ea038cd1fd8f8483..d9532edd096c48562fe10a76472d047aa8e4ff94 100644 (file)
@@ -23,9 +23,7 @@
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-{if $context EQ 'Search'}
-    {include file="CRM/common/pager.tpl" location="top"}
-{/if}
+{include file="CRM/common/pager.tpl" location="top"}
 
 {strip}
 <table class="selector row-highlight">
   </tr>
   {/foreach}
 
-{* Link to "View all contributions" for Contact Summary selector display *}
-{if $limit and $pager->_totalItems GT $limit }
-  {if $context eq 'dashboard' }
-      <tr class="even-row">
-      <td colspan="10"><a href="{crmURL p='civicrm/contribute/search' q='reset=1'}">&raquo; {ts}Find more contributions{/ts}... </a></td>
-      </tr>
-  {elseif $context eq 'contribution' }
-      <tr class="even-row">
-      <td colspan="8"><a href="{crmURL p='civicrm/contribute/search' q="reset=1&force=1&cid=$contactId"}">&raquo; {ts}View all contributions from this contact{/ts}... </a></td>
-      </tr>
-  {/if}
-{/if}
 </table>
 {/strip}
 
-
-
-{if $context EQ 'Search'}
-    {include file="CRM/common/pager.tpl" location="bottom"}
-{/if}
+{include file="CRM/common/pager.tpl" location="bottom"}
index b9e762e6f9f4905daf89ced8e9d720edda333f4c..71dc72fdeafcaa653d4f221394f14c4047de43be 100644 (file)
@@ -67,7 +67,7 @@
 {literal}
 <script type="text/javascript">
   CRM.$(function($) {
-    var $form = $("#{/literal}{$form.formName}{literal}");
+    var $form = $("form.{/literal}{$form.formClass}{literal}");
     $('#showPCP, #showSoftCredit').click(function(){
       return showHideSoftCreditAndPCP();
     });
index b30efb3c9d27f83740aa1bec54d95f62e3a6a6c1..4521d91e0186e84fd1e8320987bb66aec6f587cb 100644 (file)
@@ -51,7 +51,7 @@
             <tr><td class="label">{ts}Auto Renew?{/ts}</td><td>{if $recur.auto_renew}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</td></tr>
             {if $recur.payment_processor}<tr><td class="label">{ts}Payment Processor{/ts}</td><td>{$recur.payment_processor}</td></tr>{/if}
           </table>
-          <div class="crm-submit-buttons"><a class="button cancel form-submit" href="{crmURL p='civicrm/contact/view' q='action=browse&selectedChild=contribute'}">{ts}Done{/ts}</a></div>
+          <div class="crm-submit-buttons"><a class="button cancel crm-form-submit" href="{crmURL p='civicrm/contact/view' q='action=browse&selectedChild=contribute'}">{ts}Done{/ts}</a></div>
         </div>
     {/if}
 {/if}
@@ -69,7 +69,7 @@
 
         {foreach from=$recurRows item=row}
             {assign var=id value=$row.id}
-            <tr id="contribution_recur-{$row.id}" class="crm-entity {cycle values="even-row,odd-row"}{if NOT $row.is_active} disabled{/if}">
+            <tr id="contribution_recur-{$row.id}" data-action="cancel" class="crm-entity {cycle values="even-row,odd-row"}{if NOT $row.is_active} disabled{/if}">
                 <td>{$row.amount|crmMoney}{if $row.is_test} ({ts}test{/ts}){/if}</td>
                 <td>{ts}Every{/ts} {$row.frequency_interval} {$row.frequency_unit} </td>
                 <td>{$row.start_date|crmDate}</td>
index b56013ecdf43faa54619e143f0f789dd2ba8185f..653a6ceb0979a19ebdc4bfd8a6a53b68a1984fd4 100644 (file)
@@ -1,7 +1,7 @@
 // http://civicrm.org/licensing
 /*jslint indent: 2 */
 /*global CRM, cj */
-CRM.$(function($) {
+(function($) {
   'use strict';
 
   var load = {
@@ -21,20 +21,24 @@ CRM.$(function($) {
     }
   };
 
-  $('#chart_view, #table_view').click(function() {
-    if ($(this).hasClass('ui-state-default')) {
-      $('.ui-tabs-selected', '#mainTabContainer').removeClass('ui-state-active ui-tabs-selected').addClass('ui-state-default');
-      $(this).removeClass('ui-state-default').addClass('ui-state-active ui-tabs-selected');
-      load[this.id]();
+  $('#crm-container').on('crmLoad', function (e) {
+    if ($(e.target).is('#crm-main-content-wrapper, #crm-container')) {
+      $('#chart_view, #table_view').click(function () {
+        if ($(this).hasClass('ui-state-default')) {
+          $('.ui-tabs-selected', '#mainTabContainer').removeClass('ui-state-active ui-tabs-selected').addClass('ui-state-default');
+          $(this).removeClass('ui-state-default').addClass('ui-state-active ui-tabs-selected');
+          load[this.id]();
+        }
+      });
+
+      // Initialize chart or table based on url hash
+      if (window.location.hash === '#table_layout') {
+        $('#table_view').click();
+      }
+      else {
+        load.chart_view();
+      }
     }
   });
-
-  // Initialize chart or table based on url hash
-  if (window.location.hash === '#table_layout') {
-    $('#table_view').click();
-  }
-  else {
-    load.chart_view();
-  }
-});
+})(CRM.$);
 
index ec124d5ea62375252be0b320e7285676c868f9ab..0c856353e853909ae2f47729b14db811ac29968d 100644 (file)
 
 <div class="float-right">
 <table class="form-layout-compressed">
-<tr>
+  <tr>
     <td>
-     <a href="{$configPagesURL}" class="button"><span>{ts}Manage Contribution Pages{/ts}
-       </span></a>
+      <a href="{$configPagesURL}" class="button no-popup"><span>{ts}Manage Contribution Pages{/ts}</span></a>
     </td>
-    <td><a href="{$newPageURL}" class="button"><span><div class="icon add-icon"></div>{ts}Add Contribution Page{/ts}
-        </span></a>
+    <td>
+      <a href="{$newPageURL}" class="button no-popup"><span><div class="icon add-icon"></div>{ts}Add Contribution Page{/ts}</span></a>
     </td>
-</tr>
+  </tr>
 </table>
 </div>
 {/if}
index 3cfc2d10ee409b73865d7c3d97c4424dfd59e64b..0b92e79076aa4a832b2c43a018e068c371bc1354 100644 (file)
 {literal}
 <script type='text/javascript'>
 CRM.$(function($) {
-  if (cj("#payment-info").length) {
+  if ($("#payment-info").length) {
     var dataUrl = {/literal}'{crmURL p="civicrm/payment/view" h=0 q="action=browse&id=$participantId&cid=`$contactId`&component=event&context=payment_info&snippet=4"}'{literal};
-    cj.ajax({
+    $.ajax({
       url: dataUrl,
       async: false,
       success: function(html) {
-        cj("#payment-info").html(html).trigger('crmLoad');
+        $("#payment-info").html(html).trigger('crmLoad');
       }
     });
 
     var taxAmount = "{$totalTaxAmount}";
     if (taxAmount) {
-      cj('.total_amount-section').show();
+      $('.total_amount-section').show();
     }
     else {
-      cj('.total_amount-section').remove();
+      $('.total_amount-section').remove();
     }
   }
 });
index 4fcd5d90690f81367cdc05d7e3f2eaf450950d11..ac15eaa723f74292f74c2f8635c39161012f2aa0 100644 (file)
@@ -177,11 +177,11 @@ CRM.$(function($) {
   var address_fields = {/literal}{$profileAddressFields|@json_encode}{literal};
   var input_ids = {};
   var select_ids = {};
-  var orig_id = field = field_name = null;
+  var orig_id, field, field_name;
 
   // build input ids
-  cj('.billing_name_address-section input').each(function(i){
-    orig_id = cj(this).attr('id');
+  $('.billing_name_address-section input').each(function(i){
+    orig_id = $(this).attr('id');
     field = orig_id.split('-');
     field_name = field[0].replace('billing_', '');
     if(field[1]) {
@@ -190,16 +190,16 @@ CRM.$(function($) {
       }
     }
   });
-  if(cj('#first_name').length)
+  if($('#first_name').length)
     input_ids['#first_name'] = '#billing_first_name';
-  if(cj('#middle_name').length)
+  if($('#middle_name').length)
     input_ids['#middle_name'] = '#billing_middle_name';
-  if(cj('#last_name').length)
+  if($('#last_name').length)
     input_ids['#last_name'] = '#billing_last_name';
 
   // build select ids
-  cj('.billing_name_address-section select').each(function(i){
-    orig_id = cj(this).attr('id');
+  $('.billing_name_address-section select').each(function(i){
+    orig_id = $(this).attr('id');
     field = orig_id.split('-');
     field_name = field[0].replace('billing_', '').replace('_id', '');
     if(field[1]) {
@@ -212,82 +212,86 @@ CRM.$(function($) {
   // detect if billing checkbox should default to checked
   var checked = true;
   for(var id in input_ids) {
-    var orig_id = input_ids[id];
-    if(cj(id).val() != cj(orig_id).val()) {
+    orig_id = input_ids[id];
+    if($(id).val() != $(orig_id).val()) {
       checked = false;
       break;
     }
   }
   for(var id in select_ids) {
-    var orig_id = select_ids[id];
-    if(cj(id).val() != cj(orig_id).val()) {
+    orig_id = select_ids[id];
+    if($(id).val() != $(orig_id).val()) {
       checked = false;
       break;
     }
   }
   if(checked) {
-    cj('#billingcheckbox').prop('checked', true);
-    cj('.billing_name_address-group').hide();
+    $('#billingcheckbox').prop('checked', true);
+    if (CRM.billing.billingProfileIsHideable) {
+      $('.billing_name_address-group').hide();
+    }
   }
 
   // onchange handlers for non-billing fields
   for(var id in input_ids) {
-    var orig_id = input_ids[id];
-    cj(id).change(function(){
-      var id = '#'+cj(this).attr('id');
+    orig_id = input_ids[id];
+    $(id).change(function(){
+      var id = '#'+$(this).attr('id');
       var orig_id = input_ids[id];
 
       // if billing checkbox is active, copy other field into billing field
-      if(cj('#billingcheckbox').prop('checked')) {
-        cj(orig_id).val( cj(id).val() );
-      };
+      if($('#billingcheckbox').prop('checked')) {
+        $(orig_id).val( $(id).val() );
+      }
     });
-  };
+  }
   for(var id in select_ids) {
-    var orig_id = select_ids[id];
-    cj(id).change(function(){
-      var id = '#'+cj(this).attr('id');
+    orig_id = select_ids[id];
+    $(id).change(function(){
+      var id = '#'+$(this).attr('id');
       var orig_id = select_ids[id];
 
       // if billing checkbox is active, copy other field into billing field
-      if(cj('#billingcheckbox').prop('checked')) {
-        cj(orig_id+' option').prop('selected', false);
-        cj(orig_id+' option[value="'+cj(id).val()+'"]').prop('selected', true);
-      };
+      if($('#billingcheckbox').prop('checked')) {
+        $(orig_id+' option').prop('selected', false);
+        $(orig_id+' option[value="'+$(id).val()+'"]').prop('selected', true);
+      }
 
       if(orig_id == '#billing_country_id-5') {
-        cj(orig_id).change();
+        $(orig_id).change();
       }
     });
-  };
+  }
 
 
   // toggle show/hide
-  cj('#billingcheckbox').click(function(){
+  $('#billingcheckbox').click(function(){
     if(this.checked) {
-      cj('.billing_name_address-group').hide(200);
+      if (CRM.billing.billingProfileIsHideable) {
+        $('.billing_name_address-group').hide(200);
+      }
 
       // copy all values
       for(var id in input_ids) {
-        var orig_id = input_ids[id];
-        cj(orig_id).val( cj(id).val() );
-      };
+        orig_id = input_ids[id];
+        $(orig_id).val( $(id).val() );
+      }
       for(var id in select_ids) {
-        var orig_id = select_ids[id];
-        cj(orig_id+' option').prop('selected', false);
-        cj(orig_id+' option[value="'+cj(id).val()+'"]').prop('selected', true);
-      };
+        orig_id = select_ids[id];
+        $(orig_id+' option').prop('selected', false);
+        $(orig_id+' option[value="'+$(id).val()+'"]').prop('selected', true);
+      }
     } else {
-      cj('.billing_name_address-group').show(200);
+      $('.billing_name_address-group').show(200);
     }
   });
 
   // remove spaces, dashes from credit card number
-  cj('#credit_card_number').change(function(){
-    var cc = cj('#credit_card_number').val()
+  $('#credit_card_number').change(function(){
+    var cc = $('#credit_card_number').val()
       .replace(/ /g, '')
       .replace(/-/g, '');
-    cj('#credit_card_number').val(cc);
+    $('#credit_card_number').val(cc);
   });
 });
 {/literal}
index 68f53f6e1693f34345e923a10078c638ac557f74..1749dab10c04f8c2e47173f9cf20e3d5abbac52b 100644 (file)
 <script type="text/javascript">
 var fieldName = "{/literal}{$field}{literal}";
 var tsLocale = "{/literal}{$tsLocale}{literal}";
-cj('#Form').submit(function() {
+var $form = $('form.{/literal}{$form.formClass}{literal}');
+cj($form).submit(function() {
       cj(this).ajaxSubmit({
                             beforeSubmit: function (formData, jqForm, options) {
                                                     var queryString = cj.param(formData);
-                                                    var postUrl     = cj('#Form').attr('action');
+                                                    var postUrl     = cj($form).attr('action');
                                                     cj.ajax({
                                                              type   : "POST",
                                                              url    : postUrl,
index 467026328953da449264717be24c4f368359d8af..50c444755c3c3bc39fcf173768c28aecaf65c701 100644 (file)
 </div>
 {literal}
 <script type="text/Javascript">
-  var srcHtmlType = '{/literal}{$srcHtmlType}{literal}';
-  var singleValOps = new Array('Text', 'Select', 'Radio', 'Autocomplete-Select');
-  var multiValOps  = new Array('CheckBox', 'Multi-Select', 'AdvMulti-Select');
   function checkCustomDataField( ) {
+    var srcHtmlType = '{/literal}{$srcHtmlType}{literal}';
+    var singleValOps = ['Text', 'Select', 'Radio', 'Autocomplete-Select'];
+    var multiValOps  = ['CheckBox', 'Multi-Select', 'AdvMulti-Select'];
     var dstHtmlType = cj('#dst_html_type').val( );
     if ( !dstHtmlType ) {
       return true;
index 0960fae327c32844ee06f925400530ad3bd94fc3..1a4677d58f43ad91de6c7b1438d9f487a69a5f44 100644 (file)
     <div class="messages help">{$cd_edit.help_post}</div>
   {/if}
   {if $cd_edit.is_multiple and ( ( $cd_edit.max_multiple eq '' )  or ( $cd_edit.max_multiple > 0 and $cd_edit.max_multiple > $cgCount ) ) }
-    <div id="add-more-link-{$cgCount}" class="add-more-link-{$group_id}-{$cgCount}"><a href="#" onclick="CRM.buildCustomData('{$cd_edit.extends}',{if $cd_edit.subtype}'{$cd_edit.subtype}'{else}'{$cd_edit.extends_entity_column_id}'{/if}, '', {$cgCount}, {$group_id}, true ); return false;">{ts 1=$cd_edit.title}Add another %1 record{/ts}</a></div>
+    <div id="add-more-link-{$cgCount}" class="add-more-link-{$group_id} add-more-link-{$group_id}-{$cgCount}">
+      <a href="#" class="crm-hover-button" onclick="CRM.buildCustomData('{$cd_edit.extends}',{if $cd_edit.subtype}'{$cd_edit.subtype}'{else}'{$cd_edit.extends_entity_column_id}'{/if}, '', {$cgCount}, {$group_id}, true ); return false;">
+        <span class="icon ui-icon-circle-plus"></span>
+        {ts 1=$cd_edit.title}Another %1 record{/ts}
+      </a>
+    </div>
   {/if}
 {else}
   {foreach from=$groupTree item=cd_edit key=group_id name=custom_sets}
@@ -61,7 +66,7 @@
      <div class="custom-group custom-group-{$cd_edit.name} crm-accordion-wrapper {if $cd_edit.collapse_display and !$skipTitle}collapsed{/if}">
       {if !$skipTitle}
       <div class="crm-accordion-header">
-        {$cd_edit.title}
+        {$cd_edit.title} {$cgCount}
        </div><!-- /.crm-accordion-header -->
       {/if}
       <div class="crm-accordion-body">
           <em>{ts 1=$cd_edit.title}Click "Edit Contact" to add more %1 records{/ts}</em>
         </div>
       {else}
-        <div id="add-more-link-{$cgCount}"><a href="#" onclick="CRM.buildCustomData('{$cd_edit.extends}',{if $cd_edit.subtype}'{$cd_edit.subtype}'{else}'{$cd_edit.extends_entity_column_id}'{/if}, '', {$cgCount}, {$group_id}, true ); return false;">{ts 1=$cd_edit.title}Add another %1 record{/ts}</a></div>       
+        <div id="add-more-link-{$cgCount}">
+          <a href="#" class="crm-hover-button" onclick="CRM.buildCustomData('{$cd_edit.extends}',{if $cd_edit.subtype}'{$cd_edit.subtype}'{else}'{$cd_edit.extends_entity_column_id}'{/if}, '', {$cgCount}, {$group_id}, true ); return false;">
+            <span class="icon ui-icon-circle-plus"></span>
+            {ts 1=$cd_edit.title}Another %1 record{/ts}
+          </a>
+        </div>
       {/if}
     {/if}
     {/if}
index 72f861217e1b83f060e7a1f9efed0f2f0a45075f..ea2cf56999e385793e6491eae6803432445ee2f4 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for confirmation of delete for a Fields  *}
-<h3>{ts}Delete Custom Field{/ts} - {$title}</h3>
 <div class="crm-block crm-form-block crm-custom-deletefield-form-block">
     <div class="messages status no-popup">
          <div class="icon inform-icon"></div>
index 4697876fe2d26de645ef403bdfae579473bcdf78..e4b3d042db2880e52b8f74774f60d8d353384d9b 100644 (file)
@@ -88,7 +88,7 @@
 CRM.$(function($) {
 
   showHideStyle();
-  cj('#extends_0').change(function() {
+  $('#extends_0').change(function() {
     showHideStyle();
   });
 
@@ -96,64 +96,64 @@ CRM.$(function($) {
   if (isGroupEmpty) {
     showRange(true);
   }
-  cj('#is_multiple').click(function() {
+  $('#is_multiple').click(function() {
     showRange();
   });
 
   function showHideStyle() {
     var isShow  = false;
-    var extend  = cj('#extends_0').val();
+    var extend  = $('#extends_0').val();
 
     var contactTypes    = {/literal}{$contactTypes}{literal};
     var showStyle       = "{/literal}{$showStyle}{literal}";
     var showMultiple    = "{/literal}{$showMultiple}{literal}";
     var showMaxMultiple = "{/literal}{$showMaxMultiple}{literal}";
 
-    if (cj.inArray(extend, contactTypes) >= 0) {
+    if ($.inArray(extend, contactTypes) >= 0) {
       isShow  = true;
     }
 
     if (isShow) {
-      cj("tr#style").show();
-      cj("tr#is_multiple").show();
-      if (cj('#is_multiple :checked').length) {
-        cj("tr#multiple").show();
+      $("tr#style").show();
+      $("tr#is_multiple").show();
+      if ($('#is_multiple :checked').length) {
+        $("tr#multiple").show();
       }
     }
     else {
-      cj("tr#style").hide();
-      cj("tr#is_multiple").hide();
-      cj("tr#multiple").hide();
+      $("tr#style").hide();
+      $("tr#is_multiple").hide();
+      $("tr#multiple").hide();
     }
 
     if (showStyle) {
-      cj("tr#style").show();
+      $("tr#style").show();
     }
 
     if (showMultiple) {
-      cj("tr#style").show();
-      cj("tr#is_multiple").show();
+      $("tr#style").show();
+      $("tr#is_multiple").show();
     }
 
     if (!showMaxMultiple) {
-      cj("tr#multiple").hide();
+      $("tr#multiple").hide();
     }
-    else if(cj( '#is_multiple').prop('checked')) {
-      cj("tr#multiple").show();
+    else if($( '#is_multiple').prop('checked')) {
+      $("tr#multiple").show();
     }
   }
 
   function showRange(onFormLoad) {
-    if(cj("#is_multiple :checked").length) {
-      cj("tr#multiple").show();
-      cj('#collapse_display').prop('checked', '');
-      cj("select#style option[value='Tab with table']").prop("selected", true);
+    if($("#is_multiple :checked").length) {
+      $("tr#multiple").show();
+      $('#collapse_display').prop('checked', '');
+      $("select#style option[value='Tab with table']").prop("selected", true);
     }
     else {
-      cj('#collapse_display').prop('checked', 'checked');
-      cj("tr#multiple").hide();
+      $('#collapse_display').prop('checked', 'checked');
+      $("tr#multiple").hide();
       if (!onFormLoad) {
-        cj("select#style option[value='Inline']").prop("selected", true);
+        $("select#style option[value='Inline']").prop("selected", true);
       }
     }
   }
diff --git a/templates/CRM/Custom/Form/MultiValueSearch.js.tpl b/templates/CRM/Custom/Form/MultiValueSearch.js.tpl
new file mode 100644 (file)
index 0000000..a0c7de7
--- /dev/null
@@ -0,0 +1,39 @@
+{*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.5                                                |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM.                                    |
+ |                                                                    |
+ | CiviCRM is free software; you can copy, modify, and distribute it  |
+ | under the terms of the GNU Affero General Public License           |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
+ |                                                                    |
+ | CiviCRM is distributed in the hope that it will be useful, but     |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
+ | See the GNU Affero General Public License for more details.        |
+ |                                                                    |
+ | You should have received a copy of the GNU Affero General Public   |
+ | License and the CiviCRM Licensing Exception along                  |
+ | with this program; if not, contact CiviCRM LLC                     |
+ | at info[AT]civicrm[DOT]org. If you have questions about the        |
+ | GNU Affero General Public License or the licensing of CiviCRM,     |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ +--------------------------------------------------------------------+
+*}
+{literal}
+  <script type="text/javascript">
+    CRM.$(function($) {
+      function showHideOperator() {
+        var val = $(this).val();
+        $(this).siblings("span.crm-multivalue-search-op").toggle(!!(val && val.length > 1));
+      }
+      $("span.crm-multivalue-search-op").siblings('select')
+        .off('.crmMultiValue')
+        .on('change.crmMultiValue', showHideOperator)
+        .each(showHideOperator);
+    });
+  </script>
+{/literal}
index 2dd5b37f380cc50c876bd1d6a9d96fe2b5dad262..792e6af02c01c128aedf8936a50be7c91459ba16 100644 (file)
     <div class="crm-accordion-body">
     <table class="form-layout-compressed">
     {foreach from=$cd_edit.fields item=element key=field_id}
-      {assign var="element_name" value='custom_'|cat:$field_id}
-      {if $element.options_per_line != 0}
-         <tr>
-           <td class="label">{$form.$element_name.label}</td>
-           <td>
-            {assign var="count" value="1"}
-            {strip}
-            <table class="form-layout-compressed">
-             <tr>
-                {* sort by fails for option per line. Added a variable to iterate through the element array*}
-                {assign var="index" value="1"}
-                {foreach name=outer key=key item=item from=$form.$element_name}
-                {if $index < 10} {* Hack to skip QF field properties that are not checkbox elements. *}
-                    {assign var="index" value=`$index+1`}
-                {else}
-                    {if $element.html_type EQ 'CheckBox' AND  $smarty.foreach.outer.last EQ 1} {* Put 'match ANY / match ALL' checkbox in separate row. *}
-                        </tr>
-                        <tr>
-                        <td class="op-checkbox" colspan="{$element.options_per_line}" style="padding-top: 0px;">{$form.$element_name.$key.html}</td>
-                    {else}
-                        <td class="labels font-light">{$form.$element_name.$key.html}</td>
-                        {if $count EQ $element.options_per_line}
-                          </tr>
-                          <tr>
-                          {assign var="count" value="1"}
-                        {else}
-                          {assign var="count" value=`$count+1`}
-                        {/if}
-                    {/if}
-                {/if}
-                {/foreach}
-             </tr>
-            </table>
-            {/strip}
-           </td>
-         </tr>
-        {else}
             {assign var="type" value=`$element.html_type`}
             {assign var="element_name" value='custom_'|cat:$field_id}
+            {assign var="operator_name" value='custom_'|cat:$field_id|cat:'_operator'}
             {if $element.is_search_range}
                 {assign var="element_name_from" value=$element_name|cat:"_from"}
                 {assign var="element_name_to" value=$element_name|cat:"_to"}
                 {elseif $element.skip_calendar NEQ true }
                     {include file="CRM/common/jcalendar.tpl" elementName=$element_name}
                 {/if}
+                {if !empty($form.$operator_name)}
+                  <span class="crm-multivalue-search-op" for="{$element_name}">{$form.$operator_name.html}</span>
+                  {assign var="add_multivalue_js" value=true}
+                {/if}
             {/if}
             {if $element.html_type eq 'Autocomplete-Select'}
                 {if $element.data_type eq 'ContactReference'}
             {/if}
             </td>
           </tr>
-      {/if}
       {/foreach}
      </table>
     </div><!-- /.crm-accordion-body -->
   </div><!-- /.crm-accordion-wrapper -->
 
 {/foreach}
+  {if !empty($add_multivalue_js)}
+    {include file="CRM/Custom/Form/MultiValueSearch.js.tpl"}
+  {/if}
 {/if}
 
index 28474618b50ed88637cc4d13e4b020c9260f4e62..66783eaf8feac9b5961d1abef8f9525b645298e5 100644 (file)
@@ -25,6 +25,7 @@
 *}
 {* Custom Data view mode*}
 {assign var="showEdit" value=1}
+{assign var="rowCount" value=1}
 {foreach from=$viewCustomData item=customValues key=customGroupId}
   {foreach from=$customValues item=cd_edit key=cvID}
 {if $multiRecordDisplay neq 'single'}
           <div class="crm-accordion-wrapper {if $cd_edit.collapse_display eq 0 or $skipTitle} {else}collapsed{/if}">
             {if !$skipTitle}
               <div class="crm-accordion-header">
-                {$cd_edit.title}
+                {$cd_edit.title} {$rowCount}
               </div>
             {/if}
             <div class="crm-accordion-body">
               {if $groupId and $cvID and $editCustomData}
                 <div class="crm-submit-buttons">
-                  <a href="#"
-                     onclick="showDelete( {$cvID}, '{$cd_edit.name}_{$index}', {$customGroupId}, {$contactId} ); return false;"
-                     class="button delete-button" title="{ts 1=$cd_edit.title}Delete this %1 record{/ts}">
-                    <span><div class="icon delete-icon"></div>{ts}Delete{/ts}</span>
+                  <a href="#" class="crm-hover-button crm-custom-value-del"
+                     data-post='{ldelim}"valueID": "{$cvID}", "groupID": "{$customGroupId}", "contactId": "{$contactId}", "key": "{crmKey name='civicrm/ajax/customvalue'}"{rdelim}'
+                     title="{ts 1=$cd_edit.title|cat:" `$rowCount`"}Delete %1{/ts}">
+                    <span class="icon delete-icon"></span> {ts}Delete{/ts}
                   </a>
                 </div>
               {/if}
                   </tr>
                 </table>
               {/foreach}
+              {assign var="rowCount" value=$rowCount+1}
             </div>
             <!-- end of body -->
             <div class="clear"></div>
 {if $groupId}
   <script type="text/javascript">
     {literal}
-    function hideStatus(valueID, groupID) {
-      cj('#statusmessg_' + groupID + '_' + valueID).hide();
-    }
-    function showDelete(valueID, elementID, groupID, contactID) {
-      var confirmMsg = '{/literal}{ts escape='js'}Are you sure you want to delete this record?{/ts}{literal} &nbsp; <a href="#" onclick="deleteCustomValue( ' + valueID + ',\'' + elementID + '\',' + groupID + ',' + contactID + ' ); return false;" style="text-decoration: underline;">{/literal}{ts escape='js'}Yes{/ts}{literal}</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="hideStatus( ' + valueID + ', ' + groupID + ' ); return false;" style="text-decoration: underline;">{/literal}{ts escape='js'}No{/ts}{literal}</a>';
-      cj('tr#statusmessg_' + groupID + '_' + valueID).show().children().find('span').html(confirmMsg);
-    }
-    function deleteCustomValue(valueID, elementID, groupID, contactID) {
-      var postUrl = {/literal}"{crmURL p='civicrm/ajax/customvalue' h=0 }"{literal},
-      request = cj.ajax({
-        type: "POST",
-        data: "valueID=" + valueID + "&groupID=" + groupID + "&contactId=" + contactID + "&key={/literal}{crmKey name='civicrm/ajax/customvalue'}{literal}",
-        url: postUrl,
-        success: function (html) {
-          cj('#' + elementID).hide();
-          hideStatus(valueID, groupID);
-          var element = cj('.ui-tabs-nav #tab_custom_' + groupID + ' a');
-          cj(element).html(cj(element).attr('title') + ' (' + html + ') ');
-        }
+    CRM.$(function($) {
+      // Handle delete of multi-record custom data
+      $('#crm-container')
+        .off('.customValueDel')
+        .on('click.customValueDel', '.crm-custom-value-del', function(e) {
+          e.preventDefault();
+          var $el = $(this),
+            msg = '{/literal}{ts escape="js"}The record will be deleted immediately. This action cannot be undone.{/ts}{literal}';
+          CRM.confirm({title: $el.attr('title'), message: msg})
+            .on('crmConfirm:yes', function() {
+              var url = CRM.url('civicrm/ajax/customvalue');
+              var request = $.post(url, $el.data('post'))
+                .done(CRM.refreshParent($el));
+              CRM.status({success: '{/literal}{ts escape="js"}Record Deleted{/ts}{literal}'}, request);
+            });
+        });
       });
-      CRM.status({success: '{/literal}{ts escape="js"}Record Deleted{/ts}{literal}'}, request);
-    }
     {/literal}
   </script>
 {/if}
index 14f9a511e3d10026c4f1f12855fb4847b4c6fe3c..ceb0eb39c70bff326d5348529abc1584ca96e381 100644 (file)
         {strip}
       {* handle enable/disable actions*}
         {include file="CRM/common/enableDisableApi.tpl"}
-        {include file="CRM/common/jsortable.tpl"}
-         <table id="options" class="display">
+         <table id="options" class="row-highlight">
          <thead>
          <tr>
             <th>{ts}Field Label{/ts}</th>
             <th>{ts}Data Type{/ts}</th>
             <th>{ts}Field Type{/ts}</th>
-            <th id="order" class="sortable">{ts}Order{/ts}</th>
+            <th>{ts}Order{/ts}</th>
             <th>{ts}Req?{/ts}</th>
             <th>{ts}Searchable?{/ts}</th>
             <th>{ts}Enabled?{/ts}</th>
             <th></th>
-      <th class="hiddenElement"></th>
         </tr>
         </thead>
         <tbody>
             <td><span class="crm-editable crmf-label">{$row.label}</span></td>
             <td>{$row.data_type}</td>
             <td>{$row.html_type}</td>
-            <td class="nowrap">{$row.order}</td>
+            <td class="nowrap">{$row.weight}</td>
             <td>{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
             <td>{if $row.is_searchable eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
             <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
             <td>{$row.action|replace:'xx':$row.id}</td>
-            <td class="order hiddenElement">{$row.weight}</td>
         </tr>
         {/foreach}
         </tbody>
         </table>
         {/strip}
 
-        <div class="action-link">
-            <a href="{crmURL p='civicrm/admin/custom/group/field/add' q="reset=1&action=add&gid=$gid"}" id="newCustomField" class="button action-item"><span><div class="icon add-icon"></div>{ts}Add Custom Field{/ts}</span></a>
-        </div>
      </div>
 
     {else}
         {if $action eq 16}
         <div class="messages status no-popup">
-        <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
-        {capture assign=crmURL}{crmURL p='civicrm/admin/custom/group/field/add' q="action=add&reset=1&gid=$gid"}{/capture}
-        {ts 1=$groupTitle 2=$crmURL}There are no custom fields for custom group '%1', <a class="action-item" href='%2'>add one</a>.{/ts}
+          <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+          {ts 1=$groupTitle}There are no fields for custom group '%1'</a>.{/ts}
         </div>
         {/if}
     {/if}
+    <div class="action-link">
+      <a href="{crmURL p='civicrm/admin/custom/group/field/add' q="reset=1&action=add&gid=$gid"}" id="newCustomField" class="button action-item"><span><div class="icon add-icon"></div>{ts}Add Custom Field{/ts}</span></a>
+    </div>
 {/if}
 
 {include file="CRM/common/crmeditable.tpl"}
index 117c217ed1e2d646465939a06b801aa496163482..90e9170210173b81a31fc488b93b1057fb0a138e 100644 (file)
    {* handle enable/disable actions*}
    {include file="CRM/common/enableDisableApi.tpl"}
    {include file="CRM/common/crmeditable.tpl"}
-   {include file="CRM/common/jsortable.tpl"}
-      <table id="options" class="display">
+      <table id="options" class="row-highlight">
         <thead>
           <tr>
             <th>{ts}Set{/ts}</th>
             <th>{ts}Enabled?{/ts}</th>
             <th>{ts}Used For{/ts}</th>
             <th>{ts}Type{/ts}</th>
-            <th id="order" class="sortable">{ts}Order{/ts}</th>
+            <th>{ts}Order{/ts}</th>
             <th>{ts}Style{/ts}</th>
             <th></th>
-            <th class='hiddenElement'></th>
           </tr>
         </thead>
         <tbody>
           <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
           <td>{if $row.extends eq 'Contact'}{ts}All Contact Types{/ts}{else}{$row.extends_display}{/if}</td>
           <td>{$row.extends_entity_column_value}</td>
-          <td class="nowrap">{$row.order}</td>
+          <td class="nowrap">{$row.weight}</td>
           <td>{$row.style_display}</td>
           <td>{$row.action|replace:'xx':$row.id}</td>
-          <td class="order hiddenElement">{$row.weight}</td>
         </tr>
         {/foreach}
         </tbody>
index 81a7a4aa7d10ebf0216b51601ae986cf7a9f2ef6..c7962ee9633583111579b66a2bb82040cc257460 100644 (file)
 <script type="text/javascript">
 var pay_later_sel = "input#{$form.is_pay_later.name}";
 {literal}
-cj("document").ready(function() {
+CRM.$(function($) {
   function refresh() {
-    var is_pay_later = cj(pay_later_sel).prop("checked");
-    cj(".credit_card_info-group").toggle(!is_pay_later);
-    cj(".pay-later-instructions").toggle(is_pay_later);
-    cj("div.billingNameInfo-section .description").html(is_pay_later ? "Enter the billing address at which you can be invoiced." : "Enter the name as shown on your credit or debit card, and the billing address for this card.");
+    var is_pay_later = $(pay_later_sel).prop("checked");
+    $(".credit_card_info-group").toggle(!is_pay_later);
+    $(".pay-later-instructions").toggle(is_pay_later);
+    $("div.billingNameInfo-section .description").html(is_pay_later ? "Enter the billing address at which you can be invoiced." : "Enter the name as shown on your credit or debit card, and the billing address for this card.");
   }
-  cj("input#source").prop('disabled', true);
+  $("input#source").prop('disabled', true);
 
-  cj(pay_later_sel).change(function() {
+  $(pay_later_sel).change(function() {
     refresh();
   });
-  cj(".payment_type-section :radio").change(function() {
-    var sel = cj(this).attr("id");
-    cj(".check_number-section").toggle(
-        cj(this).is(":checked") &&
-        cj("label[for="+sel+"]").html() == "{/literal}{ts escape='js'}Check{/ts}{literal}"
+  $(".payment_type-section :radio").change(function() {
+    var sel = $(this).attr("id");
+    $(".check_number-section").toggle(
+        $(this).is(":checked") &&
+        $("label[for="+sel+"]").html() == "{/literal}{ts escape='js'}Check{/ts}{literal}"
     );
   });
   refresh();
index 2c1e44ec7056346ed8750ce8a33e7cbbc4d7a184..afff593cd7fafe85b76a8fbf534ac990eaff64b6 100644 (file)
 <script type="text/javascript">
 {literal}
 CRM.$(function($) {
-    cj("#contact_id").change( function( ) {
+    $("#contact_id").change( function( ) {
         checkEmail( );
     } );
     checkEmail( );
index c524e4709945c7223924790ab396c15080840122..f180f7bf0ee7465ab6cd8e4546e05dd7932c9574 100644 (file)
   {include file="CRM/common/customData.tpl"}
   {literal}
     <script type="text/javascript">
-      cj(document).ready(function() {
+      CRM.$(function($) {
         {/literal}
         {if $customDataSubType}
           CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
 {literal}
 <script type="text/javascript">
   CRM.$(function($) {
-    $('#template_id', '#EventInfo').change(function() {
+    var $form = $('form.{/literal}{$form.formClass}{literal}');
+    $('#template_id', $form).change(function() {
       $('#crm-main-content-wrapper')
         .crmSnippet({url: CRM.url('civicrm/event/add', {action: 'add', reset: 1, template_id: $(this).val()})})
         .crmSnippet('refresh');
index 9e5f6e14f2fc9408a04a241157abb37c07e9f294..d61cc6dd02601d0e4bb39acedbaafde80e4e4fed 100644 (file)
         </div>
     {/if}
 <div class="crm-block crm-form-block crm-event-manage-fee-form-block">
-{if $isQuick}
-    <div id="popupContainer">
-    {ts}Once you switch to using a Price Set, you won't be able to switch back to your existing settings below except by re-entering them. Are you sure you want to switch to a Price Set?{/ts}
-    </div>
-{/if}
-<div class="crm-submit-buttons">
+  <div class="crm-submit-buttons">
    {include file="CRM/common/formButtons.tpl" location="top"}
-</div>
+  </div>
 
     <table class="form-layout">
        <tr class="crm-event-manage-fee-form-block-title">
                 <script type="text/javascript">
                 {literal}
                     CRM.$(function($) {
-                        cj('#discounted_label_1').focus( );
+                        $('#discounted_label_1').focus( );
                     });
                 {/literal}
                 </script>
 {if $isQuick}
 {literal}
 <script type="text/javascript">
-cj( document ).ready( function( ) {
-    cj("#popupContainer").hide();
-});
-cj("#quickconfig").click(function(){
-cj("#popupContainer").dialog({
-  title: "Selected Price Set",
-  width:400,
-  height:220,
-  modal: true,
-  overlay: {
-                 opacity: 0.5,
-                  background: "black"
-        },
-        buttons: {
-                   "Ok": function() {
-        var dataUrl  = {/literal}'{crmURL p="civicrm/ajax/rest" h=0 q="className=CRM_Core_Page_AJAX&fnName=setIsQuickConfig&context=civicrm_event&id=$eventId" }';
-        var redirectUrl = '{crmURL p="civicrm/admin/price/field" h=0 q="reset=1&action=browse&sid=" }';
-        {literal}
-       cj.ajax({
-      url: dataUrl,
-      async: false,
-      global: false,
-      success: function ( result ) {
-        if (result) {
-          window.location= redirectUrl+eval(result);
-        }
-      }
-       });
-                   },
-       "Close": function() {
-                     cj(this).dialog("close");
-                   }
-  }
-});
-return false;
-});
+  CRM.$(function($) {
+    $("#quickconfig").click(function(e) {
+      e.preventDefault();
+      CRM.confirm({
+        width: 400.
+        message: {/literal}"{ts escape='js'}Once you switch to using a Price Set, you won't be able to switch back to your existing settings below except by re-entering them. Are you sure you want to switch to a Price Set?{/ts}"{literal}
+      }).on('crmConfirm:yes', function() {
+          {/literal}
+          var dataUrl  = '{crmURL p="civicrm/ajax/rest" h=0 q="className=CRM_Core_Page_AJAX&fnName=setIsQuickConfig&context=civicrm_event&id=$eventId" }';
+          {literal}
+        $.getJSON(dataUrl).done(function(result) {window.location = CRM.url("civicrm/admin/price/field", {reset: 1, action: 'browse', sid: result});});
+        });
+      });
+    });
 </script>
 {/literal}
 {/if}
index 1ac4deb8a3f87065515cbc1420ab33256073dd8c..d5741974b6e711c1a01b5484c23e3cc2932c9a4b 100644 (file)
@@ -108,7 +108,7 @@ if ( {/literal}"{$locUsed}"{literal} ) {
    displayMessage( true );
 }
 
-cj(document).ready(function() {
+CRM.$(function($) {
   //FIX ME: by default load 2 blocks and hide add and delete links
   //we should make additional block function more flexible to set max block limit
   buildBlocks('Email');
@@ -116,7 +116,7 @@ cj(document).ready(function() {
 
   // build blocks only if it is not built
   function buildBlocks(element) {
-    if (!cj('[id='+ element +'_Block_2]').length) {
+    if (!$('[id='+ element +'_Block_2]').length) {
       buildAdditionalBlocks(element, 'CRM_Event_Form_ManageEvent_Location');
     }
   }
@@ -124,18 +124,18 @@ cj(document).ready(function() {
   hideAddDeleteLinks('Email');
   hideAddDeleteLinks('Phone');
   function hideAddDeleteLinks(element) {
-    cj('#add'+ element).hide();
-    cj('[id='+ element +'_Block_2] a:last').hide();
+    $('#add'+ element).hide();
+    $('[id='+ element +'_Block_2] a:last').hide();
   }
 
-  cj('#loc_event_id').change(function() {
-    cj.ajax({
+  $('#loc_event_id').change(function() {
+    $.ajax({
       url: CRM.url('civicrm/ajax/locBlock', 'reset=1'),
       type: 'POST',
-      data: {'lbid': cj(this).val()},
+      data: {'lbid': $(this).val()},
       dataType: 'json',
       success: function(data) {
-        var selectLocBlockId = cj('#loc_event_id').val();
+        var selectLocBlockId = $('#loc_event_id').val();
         for(i in data) {
           if ( i == 'count_loc_used' ) {
             if ( ((selectLocBlockId == locBlockId) && data['count_loc_used'] > 1) ||
@@ -146,10 +146,10 @@ cj(document).ready(function() {
             }
           } else {
             if (i == 'phone_1_phone_type_id' || i == 'phone_2_phone_type_id') {
-              cj('#'+i).select2('val', data[i]);
+              $('#'+i).select2('val', data[i]);
             }
             else {
-              cj('#'+i).val(data[i]);
+              $('#'+i).val(data[i]);
             }
           }
         }
@@ -160,11 +160,11 @@ cj(document).ready(function() {
 });
 
 function displayMessage( set ) {
-   cj(document).ready(function() {
+   CRM.$(function($) {
      if ( set ) {
-       cj('#locUsedMsg').html( locUsedMsgTxt ).addClass('status');
+       $('#locUsedMsg').html( locUsedMsgTxt ).addClass('status');
      } else {
-       cj('#locUsedMsg').html( ' ' ).removeClass('status');
+       $('#locUsedMsg').html( ' ' ).removeClass('status');
      }
    });
 }
index 405774df9693f338a75568682110ec5ddeafea51..9b9ba3462358f9bcba3597d779389a2fc0dcf5e8 100755 (executable)
     <script type='text/javascript'>
       CRM.$(function($) {
         populateRecipient();
-        cj('#recipient').click( function( ) {
+        $('#recipient').click( function( ) {
           populateRecipient();
         });
       });
index c08bfe874bd5a5f07c0b077c40edb0bd30d5a721..f04d976a2f9543be14eb3ec68c74641c239583c1 100644 (file)
     {literal}
     <script type="text/javascript">
 
-    var fieldOptionsFull = new Array( );
+    var fieldOptionsFull = [];
     {/literal}
     {foreach from=$priceSet.fields item=fldElement key=fldId}
       {if $fldElement.options}
         {foreach from=$fldElement.options item=fldOptions key=opId}
           {if $fldOptions.is_full}
             {literal}
-              fieldOptionsFull[{/literal}{$fldId}{literal}] = new Array( );
+              fieldOptionsFull[{/literal}{$fldId}{literal}] = [];
             fieldOptionsFull[{/literal}{$fldId}{literal}][{/literal}{$opId}{literal}] = 1;
           {/literal}
           {/if}
 
     if ( fieldOptionsFull.length > 0 ) {
       CRM.$(function($) {
-        cj("input,#priceset select,#priceset").each(function () {
-          if ( cj(this).attr('price') ) {
-            switch( cj(this).attr('type') ) {
+        $("input,#priceset select,#priceset").each(function () {
+          if ( $(this).attr('price') ) {
+            switch( $(this).attr('type') ) {
               case 'checkbox':
               case 'radio':
-                cj(this).click( function() {
+                $(this).click( function() {
                   validatePriceField(this);
                 });
                 break;
 
               case 'select-one':
-                cj(this).change( function() {
+                $(this).change( function() {
                   validatePriceField(this);
                 });
                 break;
               case 'text':
-                cj(this).bind( 'keyup', function() { validatePriceField(this) });
+                $(this).bind( 'keyup', function() { validatePriceField(this) });
                 break;
             }
           }
     }
   );
 
-  cj('#Participant').on("click",'.validate',
+  cj('form[name=Participant]').on("click", '.validate',
     function(e) {
       var userSubmittedStatus = cj('#status_id').val();
       var statusLabel = cj('#status_id option:selected').text();
     {elseif $participantMode == 'live'}
     {assign var=registerMode value="LIVE"}
   {/if}
-  <h3>{if $action eq 1}{ts}New Event Registration{/ts}{elseif $action eq 8}{ts}Delete Event Registration{/ts}{else}{ts}Edit Event Registration{/ts}{/if}</h3>
   <div class="crm-block crm-form-block crm-participant-form-block">
     <div class="view-content">
       {if $participantMode}
       {/if}
 
       {if $action eq 8} {* If action is Delete *}
-        <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
         <div class="crm-participant-form-block-delete messages status no-popup">
           <div class="crm-content">
             <div class="icon inform-icon"></div> &nbsp;
               <td class="font-size12pt view-value">{$displayName}&nbsp;</td>
             </tr>
             {else}
-            {if !$participantMode and !$email and $outBound_option != 2 }
-              {assign var='profileCreateCallback' value=1}
-            {/if}
             <tr class="crm-participant-form-contact-id">
               <td class="label">{$form.contact_id.label}</td>
               <td>{$form.contact_id.html}</td>
       {literal}
       CRM.$(function($) {
 
-        var $form = $('form#{/literal}{$form.formName}{literal}');
+        var $form = $('form.{/literal}{$form.formClass}{literal}');
 
         // don't show cart related statuses if it's disabled
         {/literal}{if !$enableCart}{literal}
   }
 
   {/literal}
-  {if $profileCreateCallback}
-    {literal}
-    function profileCreateCallback( blockNo ) {
-      if( cj('#event_id').val( ) &&  cj('#email-receipt').length > 0 ) {
-        checkEmail( );
-      }
-    }
-    {/literal}
-  {/if}
 </script>
 
 {/if} {* end of main event block*}
index e6838e2f2ec4bf02967c8b572f26e0cb9e9674aa..60f0b9044fd861fa94da1769c9c60f5a27102170 100644 (file)
@@ -86,7 +86,7 @@ function populatebalanceFee(updatedAmt, onlyStatusUpdate) {
 }
 
 CRM.$(function($) {
-  var updatedFeeUnFormatted = cj('#pricevalue').text();
+  var updatedFeeUnFormatted = $('#pricevalue').text();
   var updatedAmt = parseFloat(updatedFeeUnFormatted.replace(/[^0-9-.]/g, ''));
 
   populatebalanceFee(updatedAmt, true);
@@ -199,9 +199,10 @@ CRM.$(function($) {
 {literal}
 <script type='text/javascript'>
 CRM.$(function($) {
+  var $form = $('form.{/literal}{$form.formClass}{literal}');
   cj('.total_amount-section').remove(); 
 
-  cj('#ParticipantFeeSelection').submit(function(e) {
+  cj($form).submit(function(e) {
     var partiallyPaid = {/literal}{$partiallyPaid}{literal};
     var pendingRefund = {/literal}{$pendingRefund}{literal};
     var statusId = cj('#status_id').val();
index bc51b308bd58f2c2dae0bae2fe68f9f8847fe282..a83a3d2874385f8c624f94eb588f6629534423e3 100644 (file)
@@ -25,7 +25,6 @@
 *}
 {* View existing event registration record. *}
 <div class="crm-block crm-content-block crm-event-participant-view-form-block">
-    <h3>{ts}View Participant{/ts}</h3>
     <div class="action-link">
         <div class="crm-submit-buttons">
             {if call_user_func(array('CRM_Core_Permission','check'), 'edit event participants')}
index 147ece88a0ea9596ee871fc400e35c9cbfc7edf1..1e254c4de6b188212b0c9be1634aa63d9dbea1bf 100644 (file)
@@ -79,7 +79,7 @@
 
 function allowGroupOnWaitlist( participantCount, currentCount )
 {
-  var formId          = {/literal}'{$formId}'{literal};
+  var formId          = {/literal}'{$formName}'{literal};
   var waitingMsg      = {/literal}'{$waitingMsg}'{literal};
   var confirmedMsg    = {/literal}'{$confirmedMsg}'{literal};
   var paymentBypassed = {/literal}'{$paymentBypassed}'{literal};
index daa9633093e7e0738a4a41d2666068af31bba714..7e14d5aeed0d53f46c0be1d775ab2a8ae6265a5e 100644 (file)
@@ -93,9 +93,9 @@
  * Function to update participant status
  */
 CRM.$(function($) {
-   cj('#status_change').change( function() {
-      if ( cj(this).val() ) {
-        cj('.crm-copy-fields [name^="field["][name*="[participant_status]"]').val( cj(this).val() );
+   $('#status_change').change( function() {
+      if ( $(this).val() ) {
+        $('.crm-copy-fields [name^="field["][name*="[participant_status]"]').val( $(this).val() );
       }
    });
 
index 1368a541ad3479e17c8acea4116ca90b4500982d..03940dc20f079ac1586cd217083193d482b03d62 100644 (file)
 {literal}
 <script type="text/javascript">
   CRM.$(function($) {
-    cj('input[name="export_format"]').filter('[value=IIF]').prop('checked', true);
-    cj('#_qf_Export_next').click(function(){
-      cj(this).hide();
-      cj('#_qf_Export_cancel').val('{/literal}{ts}Done{/ts}{literal}');
+    $('input[name="export_format"]').filter('[value=IIF]').prop('checked', true);
+    $('#_qf_Export_next').click(function(){
+      $(this).hide();
+      $('#_qf_Export_cancel').val('{/literal}{ts}Done{/ts}{literal}');
     });
   });
 </script>
index 0492fc8a450e8d552e1d64c730bc671a5d08a5d7..76c109753fc18968a21f72f55f16f30d092cf7c2 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting financial type  *}
-<h3>{if $action eq 1}{ts}New Financial Account{/ts}{elseif $action eq 2}{ts}Edit Financial Account{/ts}{else}{ts}Delete Financial Account{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-contribution_type-form-block crm-financial_type-form-block">
 {if $action eq 8}
   <div class="messages status no-popup">
@@ -50,7 +49,7 @@
     </tr>
     <tr class="crm-contribution-form-block-financial_account_type_id">
       <td class="label">{$form.financial_account_type_id.label}</td>
-      <td class="html-adjust">{$form.financial_account_type_id.html|crmReplace:class:twenty}</td>
+      <td class="html-adjust">{$form.financial_account_type_id.html}</td>
     </tr>
     <tr class="crm-contribution-form-block-accounting_code">
       <td class="label">{$form.accounting_code.label}</td>
index 55d7bfb48a50abd45ddbf23ec6bd47b9aa946012..ac12013792b49581c2ba9d0d47053c0f4a0225e8 100644 (file)
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting financial batch  *}
-<h3>{if $action eq 8}
-  {ts}Delete Batch{/ts} - {$batchTitle}
-  {elseif $action eq 1}
-  {ts}Add New Batch{/ts}
-  {elseif $action eq 2}
-  {ts}Edit Batch{/ts} - {$batchTitle}
-  {/if}
-</h3>
 <div class="crm-block crm-form-block crm-financial_type-form-block">
 {if $action eq 8}
   <div class="messages status">
index 2abfad9f2c2c67a50eae67490ea37e9dbcd8c702..6af2ae8be3473f970189b1fd3af421717c9e50b8 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting financial type  *}
-<h3>{if $action eq 1}{ts}New Financial Type{/ts}{elseif $action eq 2}{ts}Edit Financial Type{/ts}{else}{ts}Delete Financial Type{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-financial_type-form-block">
    {if $action eq 8}
       <div class="messages status">
index ba5497f18edf2e0c7a2220bc15808eb06393e2b7..1dc67719f4a141c2e76634265af0594f3bce1aa8 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting financial type  *}
-<h3>{if $action eq 8}{ts}Delete Financial Type Account{/ts}{elseif $action eq 1}{ts}Add New Financial Type Account{/ts}{elseif $action eq 2}{ts}Edit Financial Type Account{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-financial_type-form-block">
   {if $action eq 8}
     <div class="messages status">
index a15368d324763a1de07317ff3b76757a4a951555..f95f59ec8dbbc6bb8418f7a7e7c1e336ae1b4712 100644 (file)
     {literal}
     <script type="text/javascript">
       CRM.$(function($) {
-        var $form = $("#{/literal}{$form.formName}{literal}");
+        var $form = $("form.{/literal}{$form.formClass}{literal}");
         $form
           .on('click', '.crm-clear-attachment', function(e) {
             e.preventDefault();
index 852a2b7c2177c1d36df049b16b3625a12c69dc32..117867892ff2fba4a191818ca1b8650719862bf7 100644 (file)
 *}
 {* Initialize jQuery validate on a form *}
 {* Extra params and functions may be added to the CRM.validate object before this template is loaded *}
-{if !$crm_form_validate_included and $smarty.get.snippet neq 'json' and $form and $form.formName}
+{if !$crm_form_validate_included and $smarty.get.snippet neq 'json' and $form and $form.formClass}
   {assign var=crm_form_validate_included value=1}
   {literal}
   <script type="text/javascript">
     CRM.$(function($) {
-      $("#{/literal}{$form.formName}{literal}").crmValidate();
+      $("form.{/literal}{$form.formClass}{literal}").crmValidate();
     });
   </script>
   {/literal}
index ac5cf62769c16e45e09c62c2ef8dcd1651b93cc9..7abe7e6b93108841234171bb4a003b048ddc62a3 100644 (file)
   {include file="CRM/Custom/Form/CustomData.tpl"}
 {else}
 
-{if $action eq 1 and $context ne 'standalone'}
-   <h3>{ts}New Grant{/ts}</h3>
-{elseif $action eq 2}
-   <h3>{ts}Edit Grant{/ts}</h3>
-{elseif $action eq 8}
-   <h3>{ts}Delete Grant{/ts}</h3>
-{/if}
-
 <div class="crm-block crm-form-block crm-grant-form-block">
   {if $action eq 8}
      <div class="messages status">
index 07797d1bfad6ef9f49ee4d3d01a47bd1a417792d..58554e8f1d7bf230e5df20347369f0ec0573d49b 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for viewing grants *}
-<h3>{ts}View Grant{/ts}</h3>
 <div class="crm-block crm-content-block crm-grant-view-block">
     <div class="crm-submit-buttons">
         {if call_user_func(array('CRM_Core_Permission','check'), 'edit grants')}
index 3c0ae601202d764602bb93d803c12957a496f992..f20ce65a30d6f27b9205062166b062bdd9f44163 100644 (file)
@@ -37,7 +37,7 @@
         <table class="form-layout">
             <tr>
                <td class="font-size12pt" colspan="3">
-                    {$form.sort_name.label}&nbsp;&nbsp;{$form.sort_name.html|crmReplace:class:'twenty'}&nbsp;&nbsp;&nbsp;{$form.buttons.html}<br />
+                    {$form.sort_name.label}&nbsp;&nbsp;{$form.sort_name.html}&nbsp;&nbsp;&nbsp;{$form.buttons.html}<br />
                </td>
             </tr>
 
index 97737872094f38c7d5b2b177b8caad3968d8e0af..526116c7b6a20e5c64e7ee0ecff90ba702228686 100644 (file)
   </tr>
 </table>
 </div>
-<br/>
+<div class="css_right">
+  <a class="crm-hover-button action-item" href="{crmURL q="reset=1&update_smart_groups=1"}">{ts}Update Smart Group Counts{/ts}</a> {help id="update_smart_groups"}
+</div>
 <table class="crm-group-selector">
   <thead>
     <tr>
       <th class='crm-group-name'>{ts}Name{/ts}</th>
-      <th class='crm-group-group_id'>{ts}ID{/ts}</th>
+      <th class='crm-group-count'>{ts}Count{/ts}</th>
       <th class='crm-group-created_by'>{ts}Created By{/ts}</th>
       <th class='crm-group-description'>{ts}Description{/ts}</th>
       <th class='crm-group-group_type'>{ts}Group Type{/ts}</th>
@@ -105,8 +107,8 @@ CRM.$(function($) {
     .on('click', 'a.button, a.action-item[href*="action=update"], a.action-item[href*="action=delete"]', CRM.popup)
     .on('crmPopupFormSuccess', 'a.button, a.action-item[href*="action=update"], a.action-item[href*="action=delete"]', function() {
         // Refresh datatable when form completes
-       var $context = $('#crm-main-content-wrapper');
-        $('table.crm-group-selector',$context ).dataTable().fnDraw();
+       var $context = $('#crm-main-content-wrapper');
+        $('table.crm-group-selector', $context).dataTable().fnDraw();
     });
 
   function buildGroupSelector( filterSearch, parentsOnlyArg ) {
@@ -137,7 +139,7 @@ CRM.$(function($) {
         "aaSorting"  : [],
         "aoColumns"  : [
                         {sClass:'crm-group-name'},
-                        {sClass:'crm-group-group_id'},
+                        {sClass:'crm-group-count'},
                         {sClass:'crm-group-created_by'},
                         {sClass:'crm-group-description', bSortable:false},
                         {sClass:'crm-group-group_type'},
@@ -171,14 +173,20 @@ CRM.$(function($) {
                         }
                     },
         "fnRowCallback": function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
-          var id = $('td:eq(1)', nRow).text();
-          $(nRow).addClass('crm-entity').attr('data-entity', 'group').attr('data-id', id);
-          $('td:eq(0)', nRow).wrapInner('<span class="crm-editable crmf-name" />');
+          var id = $('td:last', nRow).text().split(',')[0];
+          var cl = $('td:last', nRow).text().split(',')[1];
+          $(nRow).addClass(cl).attr({id: 'row_' + id, 'data-id': id, 'data-entity': 'group'});
+          $('td:eq(0)', nRow).wrapInner('<span class="crm-editable crmf-title" />');
+          $('td:eq(1)', nRow).addClass('right');
           $('td:eq(3)', nRow).wrapInner('<span class="crm-editable crmf-description" data-type="textarea" />');
+          if (parentsOnly) {
+            if ($(nRow).hasClass('crm-group-parent')) {
+              $(nRow).find('td:first').prepend('{/literal}<span class="collapsed show-children" title="{ts}show child groups{/ts}"/></span>{literal}');
+            }
+          }
           return nRow;
         },
         "fnDrawCallback": function() {
-          setSelectorClass( parentsOnly, showOrgInfo );
           $('.crm-editable').crmEditable();
         },
         "fnServerData": function ( sSource, aoData, fnCallback ) {
@@ -230,20 +238,6 @@ CRM.$(function($) {
     });
   }
 
-  function setSelectorClass( parentsOnly, showOrgInfo ) {
-    var $context = $('#crm-main-content-wrapper');
-    $('table.crm-group-selector tr', $context).each( function( ) {
-      var className = $(this).find('td:last-child').text();
-      $(this).addClass( className );
-      var rowID = $(this).find('td:nth-child(2)').text();
-      $(this).prop( 'id', 'row_' + rowID );
-      if (parentsOnly) {
-        if ( $(this).hasClass('crm-group-parent') ) {
-          $(this).find('td:first').prepend('{/literal}<span class="collapsed show-children" title="{ts}show child groups{/ts}"/></span>{literal}');
-        }
-      }
-    });
-  }
   // show hide children
   var $context = $('#crm-main-content-wrapper');
   $('table.crm-group-selector', $context).on( 'click', 'span.show-children', function(){
@@ -292,21 +286,21 @@ CRM.$(function($) {
           "success": function(response){
             var appendHTML = '';
             $.each( response, function( i, val ) {
-              appendHTML += '<tr id="row_'+ val.group_id +'_'+parent_id+'" data-entity="group" data-id="'+ val.group_id +'" class="crm-entity parent_is_' + parent_id + ' crm-row-child ' + val.class + '">';
+              appendHTML += '<tr id="row_'+ val.group_id +'_'+parent_id+'" data-entity="group" data-id="'+ val.group_id +'" class="parent_is_' + parent_id + ' crm-row-child ' + val.class.split(',')[1] + '">';
               if ( val.is_parent ) {
-                appendHTML += '<td class="crm-group-name ' + levelClass + '">' + '{/literal}<span class="collapsed show-children" title="{ts}show child groups{/ts}"/></span>{literal}<span class="crm-editable crmf-name">' + val.group_name + '</span></td>';
+                appendHTML += '<td class="crm-group-name ' + levelClass + '">' + '{/literal}<span class="collapsed show-children" title="{ts}show child groups{/ts}"/></span>{literal}<span class="crm-editable crmf-title">' + val.group_name + '</span></td>';
               }
               else {
-                appendHTML += '<td class="crm-group-name ' + levelClass + '"><span class="crm-no-children"></span><span class="crm-editable crmf-name">' + val.group_name + '</span></td>';
+                appendHTML += '<td class="crm-group-name ' + levelClass + '"><span class="crm-no-children"></span><span class="crm-editable crmf-title">' + val.group_name + '</span></td>';
               }
-              appendHTML += "<td>" + val.group_id + "</td>";
+              appendHTML += '<td class="right">' + val.count + "</td>";
               appendHTML += "<td>" + val.created_by + "</td>";
               appendHTML += '<td><span class="crm-editable crmf-description" data-type="textarea">' + (val.group_description || '') + "</span></td>";
               appendHTML += "<td>" + val.group_type + "</td>";
               appendHTML += "<td>" + val.visibility + "</td>";
-             if (showOrgInfo) {
-               appendHTML += "<td>" + val.org_info + "</td>";
-             }
+              if (showOrgInfo) {
+                appendHTML += "<td>" + val.org_info + "</td>";
+              }
               appendHTML += "<td>" + val.links + "</td>";
               appendHTML += "</tr>";
             });
index 4d92cea6704f5a3d4aa55c25aa749abce526ac46..2af87ef0ac2dc9f7387db3956f71b2e5a7b51d06 100644 (file)
 {htxt id="id-group-organization"}
 <p>{ts}Some organizations find it useful to be able to connect Organization contacts to Groups (one-to-one relationship) to represent a multi-org hierarchy. The org contact holds info about the org itself (name, location, etc.) and the group holds other sub-groups/contacts related to that group (employees, alumni, online activists, members, etc.).{/ts}</p>
 {/htxt}
+
+{htxt id="update_smart_groups-title"}
+  {ts}Update Smart Group Counts{/ts}
+{/htxt}
+{htxt id="update_smart_groups"}
+  <p>
+    {ts}Update this page with current statistics on the number of contacts in each smart group.{/ts}
+  </p>
+{/htxt}
index 4be3523f5fdab6f983c249f781f8604076850263..55c170945f1d2c187e7d73443a519c1530922a18 100644 (file)
   </div>
 {literal}
 <script type="text/javascript">
-cj("#popupContainer").hide();
-cj("#button").click(function(){
-  cj("#popupContainer").dialog({
-    title: "Selected Contacts",
-    width:700,
-    height:500,
-    modal: true,
-    overlay: {
-                 opacity: 0.5,
-                  background: "black"
-                  }
-     });
-  });
-
-    CRM.$(function($) {
-        var count = 0; var columns=''; var sortColumn = '';
 
-        cj('#selectedRecords th').each( function( ) {
-          if ( cj(this).attr('class') == 'contact_details' ) {
-      sortColumn += '[' + count + ', "asc" ],';
-      columns += '{"sClass": "contact_details"},';
-    } else {
-      columns += '{ "bSortable": false },';
-    }
-    count++;
-  });
+  CRM.$(function($) {
+    $("#popupContainer").hide();
+    $("#button").click(function() {
+      $("#popupContainer").dialog({
+        title: {/literal}"{ts escape='js'}Selected Contacts{/ts}"{literal},
+        width:700,
+        height:500,
+        modal: true
+      });
+    });
+    var count = 0; var columns=''; var sortColumn = '';
 
-  columns    = columns.substring(0, columns.length - 1 );
-  sortColumn = sortColumn.substring(0, sortColumn.length - 1 );
-  eval('sortColumn =[' + sortColumn + ']');
-  eval('columns =[' + columns + ']');
+    $('#selectedRecords th').each( function( ) {
+      if ( $(this).attr('class') == 'contact_details' ) {
+        sortColumn += '[' + count + ', "asc" ],';
+        columns += '{"sClass": "contact_details"},';
+      } else {
+        columns += '{ "bSortable": false },';
+      }
+      count++;
+    });
 
-  //load jQuery data table.
-        cj('#selectedRecords').dataTable( {
-    "sPaginationType": "full_numbers",
-    "bJQueryUI"  : true,
-    "aaSorting"  : sortColumn,
-    "aoColumns"  : columns,
-    "bFilter"    : false
-        });
+    columns    = columns.substring(0, columns.length - 1 );
+    sortColumn = sortColumn.substring(0, sortColumn.length - 1 );
+    eval('sortColumn =[' + sortColumn + ']');
+    eval('columns =[' + columns + ']');
 
+    //load jQuery data table.
+    $('#selectedRecords').dataTable( {
+      "sPaginationType": "full_numbers",
+      "bJQueryUI"  : true,
+      "aaSorting"  : sortColumn,
+      "aoColumns"  : columns,
+      "bFilter"    : false
     });
 
+  });
+
 </script>
 {/literal}
 {/if}
index 7ad51d80322451b28571cafbff82bf10addc9d3e..9e6129463cb033e9d0ff42aef4467cf682ae634f 100644 (file)
@@ -29,7 +29,7 @@
 <script type="text/javascript" src="{$config->resourceBase}packages/jquery/plugins/jquery-fieldselection.js"></script>
 
 <script type="text/javascript">
-cj('form#{$form.formName}').data('tokens', {$tokens|@json_encode});
+cj('form.{$form.formClass}').data('tokens', {$tokens|@json_encode});
 var text_message = null;
 var html_message = null;
 var isPDF        = false;
@@ -253,7 +253,7 @@ if ( isMailing ) {
   {literal}
     CRM.$(function($) {
       if ( isMailing ) {
-        cj('div.html').hover(
+        $('div.html').hover(
           function( ) {
             if ( tinyMCE.get(html_message) ) {
               tinyMCE.get(html_message).onKeyUp.add(function() {
@@ -276,7 +276,7 @@ if ( isMailing ) {
   {literal}
     CRM.$(function($) {
       if ( isMailing ) {
-        cj('div.html').hover(
+        $('div.html').hover(
           verify,
           verify
         );
@@ -347,12 +347,12 @@ CRM.$(function($) {
       }
     }
     else {
-      cj( "#"+ html_message ).replaceSelection( token );
+      $( "#"+ html_message ).replaceSelection( token );
     }
   }
 
   // Initialize token selector widgets
-  var form = $('#{/literal}{$form.formName}{literal}');
+  var form = $('form.{/literal}{$form.formClass}{literal}');
   $('input.crm-token-selector', form)
     .addClass('crm-action-menu')
     .change(insertToken)
@@ -361,29 +361,29 @@ CRM.$(function($) {
       placeholder: '{/literal}{ts escape='js'}Insert Token{/ts}{literal}'
     });
 
-  cj('.accordion .head').addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ");
-  cj('.resizable-textarea textarea').css( 'width', '99%' );
-  cj('.grippie').css( 'margin-right', '3px');
-  cj('.accordion .head').hover( function() { cj(this).addClass( "ui-state-hover");
-  }, function() { cj(this).removeClass( "ui-state-hover");
+  $('.accordion .head').addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ");
+  $('.resizable-textarea textarea').css( 'width', '99%' );
+  $('.grippie').css( 'margin-right', '3px');
+  $('.accordion .head').hover( function() { $(this).addClass( "ui-state-hover");
+  }, function() { $(this).removeClass( "ui-state-hover");
   }).bind('click', function() {
-    var checkClass = cj(this).find('span').attr( 'class' );
+    var checkClass = $(this).find('span').attr( 'class' );
     var len        = checkClass.length;
     if ( checkClass.substring( len - 1, len ) == 's' ) {
-      cj(this).find('span').removeClass().addClass('ui-icon ui-icon-triangle-1-e');
-      cj("span#help"+cj(this).find('span').attr('id')).hide();
+      $(this).find('span').removeClass().addClass('ui-icon ui-icon-triangle-1-e');
+      $("span#help"+$(this).find('span').attr('id')).hide();
     }
     else {
-      cj(this).find('span').removeClass().addClass('ui-icon ui-icon-triangle-1-s');
-      cj("span#help"+cj(this).find('span').attr('id')).show();
+      $(this).find('span').removeClass().addClass('ui-icon ui-icon-triangle-1-s');
+      $("span#help"+$(this).find('span').attr('id')).show();
     }
-    cj(this).next().toggle(); return false;
+    $(this).next().toggle(); return false;
   }).next().hide();
-  cj('span#html').removeClass().addClass('ui-icon ui-icon-triangle-1-s');
-  cj("div.html").show();
+  $('span#html').removeClass().addClass('ui-icon ui-icon-triangle-1-s');
+  $("div.html").show();
 
   if ( !isMailing ) {
-    cj("div.text").show();
+    $("div.text").show();
   }
 
   function setSignature() {
@@ -433,12 +433,12 @@ CRM.$(function($) {
       }, 'json');
     }
   }
-  if (!cj().find('div.crm-error').text()) {
-    cj(window).load(function () {
+  if (!$().find('div.crm-error').text()) {
+    $(window).load(function () {
       setSignature();
     });
   }
-  cj("#fromEmailAddress").change( function( ) {
+  $("#fromEmailAddress").change( function( ) {
     setSignature( );
   });
 });
index 80fdc36e24cafcab23bb1e8faa6022ddffa63221..64f65c4cd6a71895a29f2a9f447f2bdd93ce800e 100644 (file)
 <script type="text/javascript">
 {literal}
 CRM.$(function($) {
-   cj('#start_date_display').change( function( ) {
-       if ( cj(this).val( ) ) {
-          cj('#now').prop('checked', false );
+   $('#start_date_display').change( function( ) {
+       if ( $(this).val( ) ) {
+          $('#now').prop('checked', false );
        }
    });
-   cj('#now').change( function( ) { 
-       if ( cj('#now').prop('checked', true ) ) {
-          cj('#start_date_display').val( '' );
-          cj('#start_date').val( '' );
-          cj('#start_date_time').val( '' );
+   $('#now').change( function( ) { 
+       if ( $('#now').prop('checked', true ) ) {
+          $('#start_date_display').val( '' );
+          $('#start_date').val( '' );
+          $('#start_date_time').val( '' );
        }
    });
 });
index 88d57ab12f6a562436434ddd8b8aaa4ee5855e6b..728fbad2eb9b79a3dca50df1a834412501dd0f30 100644 (file)
 
 {literal}
 <script type="text/javascript">
-  cj(document).ready( function( ) {
-    var archiveOption = cj("input[name^='is_archived']:radio");
-    cj('#status_unscheduled').change(function() {
-      if (cj(this).prop('checked') ) {
+  CRM.$(function($) {
+    var archiveOption = $("input[name^='is_archived']:radio");
+    $('#status_unscheduled').change(function() {
+      if ($(this).prop('checked') ) {
         archiveOption.prop({checked: false, disabled: true}).change();
       } else {
         archiveOption.prop('disabled', false);
       }
     }).trigger('change');
     archiveOption.change(function() {
-      if (cj("input[name^='is_archived']:radio:checked").length) {
-        cj('#status_unscheduled').prop({checked: false, disabled: true}).change();
+      if ($("input[name^='is_archived']:radio:checked").length) {
+        $('#status_unscheduled').prop({checked: false, disabled: true}).change();
       } else {
-        cj('#status_unscheduled').prop('disabled', false);
+        $('#status_unscheduled').prop('disabled', false);
       }
     }).trigger('change');
   });
index 4a1c1d4398d316437cf095cce8e19f5ae7e9a7c2..06a1b9b3df3c06a5622d0b1193a0e5150e6f5917 100644 (file)
 
 CRM.$(function($) {
   // hide all the selects that contains only one option
-  cj('.crm-message-select select').each(function (){
-    if (cj(this).find('option').size() == 1) {
-      cj(this).parent().parent().hide();
+  $('.crm-message-select select').each(function (){
+    if ($(this).find('option').size() == 1) {
+      $(this).parent().parent().hide();
     }
   });
-  if (!cj('#override_verp').prop('checked')){
-    cj('.crm-mailing-settings-form-block-forward_replies,.crm-mailing-settings-form-block-auto_responder').hide();
+  if (!$('#override_verp').prop('checked')){
+    $('.crm-mailing-settings-form-block-forward_replies,.crm-mailing-settings-form-block-auto_responder').hide();
   }
-  cj('#override_verp').click(function(){
-      cj('.crm-mailing-settings-form-block-forward_replies,.crm-mailing-settings-form-block-auto_responder').toggle();
-       if (!cj('#override_verp').prop('checked')) {
-             cj('#forward_replies, #auto_responder').prop('checked', false);
+  $('#override_verp').click(function(){
+      $('.crm-mailing-settings-form-block-forward_replies,.crm-mailing-settings-form-block-auto_responder').toggle();
+       if (!$('#override_verp').prop('checked')) {
+             $('#forward_replies, #auto_responder').prop('checked', false);
            }
     });
 
index d22463560dd374e5446ba96933432905e8ccc304..741144a3af13ba59844fa5940cf9edad55760871 100644 (file)
@@ -72,7 +72,7 @@
   <script type="text/javascript">
     var totalPages = {/literal}{$pager->_totalPages}{literal};
     CRM.$(function($) {
-      cj("#crm-container .crm-pager input.form-submit").click(function () {
+      $("#crm-container .crm-pager input.crm-form-submit").click(function () {
         submitPagerData(this);
       });
     });
index 2212cd886333b9a010de67d78b28e84981d4e082..dd841d340a7f6d80e5b616ed7fc88ed6e3ee6666 100644 (file)
@@ -34,9 +34,9 @@
 {ts 1=$display_name 2=$email}Are you sure you want to resubscribe: %1 (%2){/ts}
 <br/>
 <center>
-<input type="submit" name="_qf_resubscribe_next" value="{ts}Resubscribe{/ts}" class="form-submit" />
+<input type="submit" name="_qf_resubscribe_next" value="{ts}Resubscribe{/ts}" class="crm-form-submit" />
 &nbsp;&nbsp;&nbsp;
-<input type="submit" name="_qf_resubscribe_cancel" value="{ts}Cancel{/ts}" class="form-submit" />
+<input type="submit" name="_qf_resubscribe_cancel" value="{ts}Cancel{/ts}" class="crm-form-submit" />
 </center>
 </form>
 </div>
index 5ae8c96059d987a8c79bd0518ac4cd3316788d3b..767dcc62c873b332458fb15ecefe148db1eca149 100644 (file)
@@ -38,7 +38,7 @@
   {literal}
   <script type="text/javascript">
   CRM.$(function($) {
-    var membershipValues = new Array;
+    var membershipValues = [];
     {/literal}{foreach from=$optionsMembershipTypes item=memType key=opId}{literal}
       membershipValues[{/literal}{$opId}{literal}] = {/literal}{$memType}{literal};
     {/literal}{/foreach}{literal}
@@ -61,9 +61,6 @@
     <p>{ts}You will not be able to send an automatic email receipt for this Membership because there is no email address recorded for this contact. If you want a receipt to be sent when this Membership is recorded, click Cancel and then click Edit from the Summary tab to add an email address before recording the Membership.{/ts}</p>
   </div>
   {/if}
-  {if $context NEQ 'standalone'}
-  <h3>{if $action eq 1}{ts}New Membership{/ts}{elseif $action eq 2}{ts}Edit Membership{/ts}{else}{ts}Delete Membership{/ts}{/if}</h3>
-  {/if}
   {if $membershipMode}
   <div id="help">
     {ts 1=$displayName 2=$registerMode}Use this form to submit Membership Record on behalf of %1. <strong>A %2 transaction will be submitted</strong> using the selected payment processor.{/ts}
@@ -85,9 +82,6 @@
             <td class="font-size12pt label"><strong>{ts}Member{/ts}</strong></td><td class="font-size12pt"><strong>{$displayName}</strong></td>
           </tr>
         {else}
-          {if !$membershipMode and !$emailExists and $outBound_option != 2}
-            {assign var='profileCreateCallback' value=1 }
-          {/if}
           <td class="label">{$form.contact_id.label}</td>
           <td>{$form.contact_id.html}</td>
         {/if}
     {if $context eq 'standalone' and $outBound_option != 2 }
     {literal}
     CRM.$(function($) {
-      var $form = $("#{/literal}{$form.formName}{literal}");
+      var $form = $("form.{/literal}{$form.formClass}{literal}");
       $("#contact_id", $form).change(checkEmail);
       checkEmail( );
 
     {literal}
     //keep read only always checked.
     CRM.$(function($) {
-      var $form = $("#{/literal}{$form.formName}{literal}");
+      var $form = $("form.{/literal}{$form.formClass}{literal}");
       var allowAutoRenew   = {/literal}'{$allowAutoRenew}'{literal};
       var alreadyAutoRenew = {/literal}'{$alreadyAutoRenew}'{literal};
       if ( allowAutoRenew || alreadyAutoRenew ) {
       if ((memType > 0) && (allMemberships[memType]['has_related'])) {
         if (setDefault) cj('#max_related').val(allMemberships[memType]['max_related']);
         cj('#maxRelated').show();
-        if(CRM.ids.contact > 0) {
-          CRM.api('relationship', 'getcount', {'contact_id' : CRM.ids.contact, 'membership_type_id' : memType}, {
+        var cid = {/literal}{if $contactID}{$contactID}{else}null{/if}{literal};
+        if (cid) {
+          CRM.api('relationship', 'getcount', {contact_id: cid, membership_type_id: memType}, {
             success: function(result) {
               var relatable = ' ' + result.result + ts(' contacts are ');
               if(result.result === 0) {
       }
     }
 
-    var lastMembershipTypes = new Array;
-    var optionsMembershipTypes = new Array;
+    var lastMembershipTypes = [];
+    var optionsMembershipTypes = [];
 
     // function to load custom data for selected membership types through priceset
     function processMembershipPriceset( membershipValues, autoRenewOption, reload ) {
-      var currentMembershipType = new Array;
+      var currentMembershipType = [];
       var count = 0;
       var loadCustomData = 0;
       if ( membershipValues ) {
       }
 
       if ( reload ) {
-        lastMembershipTypes = new Array;
+        lastMembershipTypes = [];
         {/literal}{if $allowAutoRenew}{literal}
         cj('#autoRenew').hide();
         var autoRenew = cj("#auto_renew");
index 5e4feb6f24dede21606a333441aaefcfe254de60..51f82127a40ac78cb8ec4fc62d7093cba73561b6 100644 (file)
 *}
 {* Configure Membership signup/renewal block for an Online Contribution page *}
 <div id="form" class="crm-block crm-form-block crm-member-membershipblock-form-block">
-{if $isQuick}
-    <div id="memPopupContainer">
-    {ts}Once you switch to using a Price Set, you won't be able to switch back to your existing settings below except by re-entering them. Are you sure you want to switch to a Price Set?{/ts}
-    </div>
-{/if}
 <div id="help">
     {ts}Use this form to enable and configure a Membership Signup and Renewal section for this Online Contribution Page. If you're not using this page for membership signup, leave the <strong>Enabled</strong> box un-checked..{/ts} {docURL page="user/membership/setup"}
 </div>
     CRM.$(function($) {
         //show/hide membership block
         showHideMembershipBlock();
-        cj('#member_is_active').click( function() {
+        $('#member_is_active').click( function() {
             showHideMembershipBlock();
         });
 
         //show/ hide blocks if price set is selected
         checkIfPriceSetIsSelected( );
-        cj('#member_price_set_id').change( function(){
+        $('#member_price_set_id').change( function(){
             checkIfPriceSetIsSelected( );
         });
     });
 {if $isQuick}
 {literal}
 <script type="text/javascript">
-cj( document ).ready( function( ) {
-  cj("#memPopupContainer").hide();
-});
-cj("#memQuickconfig").click(function(){
-  cj("#memPopupContainer").dialog({
-  title: "Selected Price Set",
-  width:400,
-  height:220,
-  modal: true,
-  overlay: {
-                 opacity: 0.5,
-                  background: "black"
-        },
-        buttons: {
-                   "Ok": function() {
-       var dataUrl  = {/literal}'{crmURL p="civicrm/ajax/rest" h=0 q="className=CRM_Core_Page_AJAX&fnName=setIsQuickConfig&context=civicrm_contribution_page&id=$contributionPageID" }';
-       var redirectUrl = '{crmURL p="civicrm/admin/price/field" h=0 q="reset=1&action=browse&sid=" }';                     {literal}
-
-       cj.ajax({
-      url: dataUrl,
-      async: false,
-      global: false,
-      success: function ( result ) {
-        if (result) {
-          window.location= redirectUrl+eval(result);
-        }
-      }
-       });
-                   },
-       "Close": function() {
-                     cj(this).dialog("close");
-                   }
-  }
+  CRM.$(function($) {
+    $("#memQuickconfig").click(function(e) {
+      e.preventDefault();
+      CRM.confirm({
+        width: 400,
+        message: {/literal}"{ts escape='js'}Once you switch to using a Price Set, you won't be able to switch back to your existing settings below except by re-entering them. Are you sure you want to switch to a Price Set?{/ts}"{literal}
+      }).on('crmConfirm:yes', function() {
+        {/literal}
+        var dataUrl = '{crmURL p="civicrm/ajax/rest" h=0 q="className=CRM_Core_Page_AJAX&fnName=setIsQuickConfig&context=civicrm_contribution_page&id=$contributionPageID" }';
+        {literal}
+        $.getJSON(dataUrl).done(function(result) {window.location = CRM.url("civicrm/admin/price/field", {reset: 1, action: 'browse', sid: result});});
+      });
+    });
   });
-return false;
-});
 </script>
 {/literal}
 {/if}
index 17b220ae30170b6c013db5719318808fbd5324fa..a8331a63ffa3eca27d8594fb5309f24e6091738e 100644 (file)
@@ -54,7 +54,6 @@
             if you want to cancel the automatic renewal option.{/ts}</p>
       </div>
     {/if}
-    <h3>{ts}Renew Membership{/ts}</h3>
   {/if}
   <div class="crm-block crm-form-block crm-member-membershiprenew-form-block">
     <div id="help" class="description">
 {literal}
   <script type="text/javascript">
     CRM.$(function($) {
-      cj('#membershipOrgType').hide();
-      cj('#changeNumTerms').hide();
+      $('#membershipOrgType').hide();
+      $('#changeNumTerms').hide();
       {/literal}
       CRM.buildCustomData('{$customDataType}');
       {if $customDataSubType}
index d936f7c7bda34a7cfc32cb6384a5ed4f88b1aa5b..b7f1e8c5e386378d815a023f23827e700c63be49 100644 (file)
  +--------------------------------------------------------------------+
 *}
 {* this template is used for adding/editing/deleting membership type  *}
-<h3>{if $action eq 1}{ts}New Membership Type{/ts}{elseif $action eq 2}{ts}Edit Membership Type{/ts}{else}{ts}Delete Membership Type{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-membership-type-form-block">
 
-  <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
   <div class="form-item" id="membership_type_form">
   {if $action eq 8}
     <div class="messages status no-popup">
@@ -35,6 +33,7 @@
     </div>
     <div> {include file="CRM/common/formButtons.tpl"}</div>
   {else}
+    <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
     <table class="form-layout-compressed">
       <tr class="crm-membership-type-form-block-name">
         <td class="label">{$form.name.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_membership_type' field='name' id=$membershipTypeId}{/if}
 <script type="text/javascript">
 CRM.$(function($) {
   showHidePeriodSettings();
-  cj('#duration_unit').change(function(){
+  $('#duration_unit').change(function(){
     showHidePeriodSettings();
   });
 
-  cj('#period_type').change(function(){
+  $('#period_type').change(function(){
     showHidePeriodSettings();
   });
 
   {/literal}
   {if $action eq 2}
   {literal}
-    showHideMaxRelated(cj('#relationship_type_id').val());
-    cj('#relationship_type_id').change(function(){
-      showHideMaxRelated(cj('#relationship_type_id').val());
+    showHideMaxRelated($('#relationship_type_id').val());
+    $('#relationship_type_id').change(function(){
+      showHideMaxRelated($('#relationship_type_id').val());
     });
   {/literal}{else}{literal}
-    showHideMaxRelated(cj('#relationship_type_id :selected').val());
-    cj('#relationship_type_id').change(function(){
-      showHideMaxRelated(cj('#relationship_type_id :selected').val());
+    showHideMaxRelated($('#relationship_type_id :selected').val());
+    $('#relationship_type_id').change(function(){
+      showHideMaxRelated($('#relationship_type_id :selected').val());
     });
   {/literal}{/if}{literal}
 });
index 5ea03f4b25b4859cd42edd01cf79c8e1968edcd0..c68b17f459352aac8bd093f4df8070d54a78b475 100644 (file)
@@ -25,7 +25,6 @@
 *}
 {* View existing membership record. *}
 <div class="crm-block crm-content-block crm-membership-view-form-block">
-    <h3>{ts}View Membership{/ts}</h3>
     <div class="crm-submit-buttons">
         {* Check permissions and make sure this is not an inherited membership (edit and delete not allowed for inherited memberships) *}
         {if ! $owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'edit memberships') }
index 1ba52d061fc59c2cb2b4ade3fe18e4f3d2e6253b..1dcdbf63b9a18096de0973543911bb0707d97963 100644 (file)
@@ -36,8 +36,7 @@
   {* handle enable/disable actions*}
   {include file="CRM/common/enableDisableApi.tpl"}
   {include file="CRM/common/crmeditable.tpl"}
-  {include file="CRM/common/jsortable.tpl"}
-    <table id="options" class="display">
+    <table id="options" class="row-highlight">
       <thead>
       <tr>
         <th>{ts}Membership{/ts}</th>
         <th>{ts}Related{/ts}</th>
         <th>{ts}Max{/ts}</th>
         <th>{ts}Visibility{/ts}</th>
-        <th id="order" class="sortable">{ts}Order{/ts}</th>
+        <th>{ts}Order{/ts}</th>
         <th>{ts}Enabled?{/ts}</th>
         <th></th>
-        <th class="hiddenElement"></th>
       </tr>
       </thead>
       {foreach from=$rows item=row}
           <td class="crm-membership-type-relationship_type_name">{$row.relationshipTypeName}</td>
           <td class="crm-membership-type-max_related" align="right">{$row.maxRelated}</td>
           <td class="crm-membership-type-visibility">{$row.visibility}</td>
-          <td class="nowrap crm-membership_type-order">{$row.order}</td>
+          <td class="nowrap crm-membership_type-order">{$row.weight}</td>
           <td class="crm-membership-type-status_{$row.id}" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
           <td>{$row.action|replace:'xx':$row.id}</td>
-          <td class="order hiddenElement">{$row.weight}</td>
         </tr>
       {/foreach}
     </table>
index 510ba78d8296d572e48b914f7eebfd3c40736be1..e7386081b683c9ed4ecbb3b23d62c26841378cfa 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* this template is used for updating pledge payment*}
-<h3>{ts}Edit Scheduled Pledge Payment{/ts}</h3>
 <div class="crm-block crm-form-block crm-pledge-payment-form-block">
       <table class="form-layout-compressed">
         <tr><td class="label">{ts}Status{/ts}</td><td class="form-layout">{$status}</td></tr>
 </div>
 {literal}
 <script type="text/javascript">
-cj(document).ready( function() {
-    cj('#adjust-option-type').hide();
-});
-function adjustPayment( ) {
-cj('#adjust-option-type').show();
-cj("#scheduled_amount").removeAttr("READONLY");
-cj("#scheduled_amount").css('background-color', '#ffffff');
-}
+  CRM.$(function($) {
+    $('#adjust-option-type').hide();
+  });
+  function adjustPayment( ) {
+    cj('#adjust-option-type').show();
+    cj("#scheduled_amount").removeAttr("READONLY").css('background-color', '#ffffff');
+  }
 </script>
 {/literal}
index df073bb0587514793e200cf5693bb4eaf3a640c9..0a390d443cbd5464205632a7d29ace60c45aa331 100644 (file)
         <p>{ts}You will not be able to send an acknowledgment for this pledge because there is no email address recorded for this contact. If you want a acknowledgment to be sent when this pledge is recorded, click Cancel and then click Edit from the Summary tab to add an email address before recording the pledge.{/ts}</p>
 </div>
 {/if}
-{if $action EQ 1}
-    <h3>{ts}New Pledge{/ts}</h3>
-{elseif $action EQ 2}
-    <h3>{ts}Edit Pledge{/ts}</h3>
+{if $action EQ 2}
     {* Check if current Total Pledge Amount is different from original pledge amount. *}
     {math equation="x / y" x=$amount y=$installments format="%.2f" assign="currentInstallment"}
     {* Check if current Total Pledge Amount is different from original pledge amount. *}
     {if $currentInstallment NEQ $eachPaymentAmount}
       {assign var=originalPledgeAmount value=`$installments*$eachPaymentAmount`}
     {/if}
-{elseif $action EQ 8}
-    <h3>{ts}Delete Pledge{/ts}</h3>
 {/if}
 <div class="crm-block crm-form-block crm-pledge-form-block">
  <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
@@ -59,9 +54,6 @@
    {else}
       <table class="form-layout-compressed">
         {if $context eq 'standalone'}
-          {if !$email and $outBound_option != 2}
-            {assign var='profileCreateCallback' value=1 }
-          {/if}
           <tr class="crm-pledge-form-contact-id">
             <td class="label">{$form.contact_id.label}</td>
             <td>{$form.contact_id.html}</td>
@@ -245,35 +237,25 @@ function loadPanes( id ) {
     {if $context eq 'standalone' and $outBound_option != 2 }
     {literal}
     CRM.$(function($) {
-        cj("#contact_1").blur( function( ) {
-            checkEmail( );
-        });
-        checkEmail( );
-  showHideByValue( 'is_acknowledge', '', 'acknowledgeDate', 'table-row', 'radio', true);
-  showHideByValue( 'is_acknowledge', '', 'fromEmail', 'table-row', 'radio', false );
+      var $form = $("form.{/literal}{$form.formClass}{literal}");
+      $("#contact_id", $form).change(checkEmail);
+      checkEmail( );
+
+      function checkEmail( ) {
+        var data = $("#contact_id", $form).select2('data');
+        if (data && data.extra && data.extra.email && data.extra.email.length) {
+          $("#acknowledgment-receipt", $form).show();
+          $("#email-address", $form).html(data.extra.email);
+        }
+        else {
+          $("#acknowledgment-receipt", $form).hide();
+        }
+      }
+
+      showHideByValue( 'is_acknowledge', '', 'acknowledgeDate', 'table-row', 'radio', true);
+      showHideByValue( 'is_acknowledge', '', 'fromEmail', 'table-row', 'radio', false );
     });
-    function checkEmail( ) {
-        var contactID = cj("input[name='contact_select_id[1]']").val();
-        if ( contactID ) {
-            var postUrl = "{/literal}{crmURL p='civicrm/ajax/checkemail' h=0}{literal}";
-            cj.post( postUrl, {contact_id: contactID},
-                function ( response ) {
-                    if ( response ) {
-                        cj("#acknowledgment-receipt").show( );
-                        cj("#email-address").html( response );
-                    } else {
-                        cj("#acknowledgment-receipt").hide( );
-                    }
-                }
-            );
-        } else {
-    cj("#acknowledgment-receipt").hide( );
-  }
-    }
 
-    function profileCreateCallback( blockNo ) {
-        checkEmail( );
-    }
     {/literal}
     {/if}
 </script>
index bc6a6bcccb58c8bb22c7579e983437384da27512..99416468d8923038f2db81177075a3ffcc86b7de 100644 (file)
@@ -29,7 +29,6 @@
     {assign var=originalPledgeAmount value=`$installments*$original_installment_amount`}
 {/if}
 
-<h3>{ts}View Pledge{/ts}</h3>
 <div class="crm-block crm-content-block crm-pledge-view-block">
 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
 <table class="crm-info-panel">
index ffb510e64a343f6bf89c353742cca9460beb5c28..2dd8e9a3f994115822e969403c7b2c895fe2fab9 100644 (file)
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-{if $context EQ 'Search'}
     {include file="CRM/common/pager.tpl" location="top"}
-{/if}
 
-{capture assign=iconURL}<img src="{$config->resourceBase}i/TreePlus.gif" alt="{ts}open section{/ts}"/>{/capture}
-{ts 1=$iconURL}Click %1 to view pledge payments.{/ts}
+<p class="description">
+  {ts}Click arrow to view pledge payments.{/ts}
+</p>
 {strip}
 <table class="selector row-highlight">
     <thead class="sticky">
                 {if ! $single }
                     &nbsp;{$row.contact_type}<br/>
                 {/if}
-                <span id="{$row.pledge_id}_show">
+                <span id="{$row.pledge_id}_show" title="{ts}Show payments{/ts}">
                     <a href="#" onclick="cj('#paymentDetails{$row.pledge_id},#minus{$row.pledge_id}_hide,#{$row.pledge_id}_hide').show();
                         buildPaymentDetails('{$row.pledge_id}','{$row.contact_id}');
                         cj('#{$row.pledge_id}_show').hide();
-                        return false;"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt="{ts}open section{/ts}"/></a>
+                        return false;"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt="&gt;"/></a>
                 </span>
-                <span id="minus{$row.pledge_id}_hide">
+                <span id="minus{$row.pledge_id}_hide" title="{ts}Hide payments{/ts}">
                     <a href="#" onclick="cj('#paymentDetails{$row.pledge_id},#{$row.pledge_id}_hide,#minus{$row.pledge_id}_hide').hide();
                             cj('#{$row.pledge_id}_show').show();
-                            return false;"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}open section{/ts}"/></a>
+                            return false;"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="^"/></a>
                 </span>
             </td>
             {if ! $single }
 </table>
 {/strip}
 
-{if $context EQ 'Search'}
     {include file="CRM/common/pager.tpl" location="bottom"}
-{/if}
 
 {* Build pledge payment details*}
 {literal}
     function buildPaymentDetails( pledgeId, contactId )
     {
         var dataUrl = {/literal}"{crmURL p='civicrm/pledge/payment' h=0 q="action=browse&snippet=4&context=`$context`&pledgeId="}"{literal} + pledgeId + '&cid=' + contactId;
-
-        cj.ajax({
-                url     : dataUrl,
-                dataType: "html",
-                timeout : 5000, //Time in milliseconds
-                success : function( data ){
-                            cj( '#paymentDetails' + pledgeId ).html( data ).trigger('crmLoad');
-                          },
-                error   : function( XMLHttpRequest, textStatus, errorThrown ) {
-                            console.error( 'Error: '+ textStatus );
-                          }
-             });
+        CRM.loadPage(dataUrl, {target: '#paymentDetails' + pledgeId});
     }
 </script>
 {/literal}
index 1d303920c54ccb54d3b4941dc26239c9925f5548..b87b1535c40503a99bbfbdf3f0e96e63bb71309a 100644 (file)
     <td {if ! ($permission EQ 'edit' and ($row.status eq 'Pending' or $row.status eq 'Overdue' or $row.status eq 'Completed')) } colspan="2"{/if} >{$row.label}</td>
 {if $context neq user}
     {if $permission EQ 'edit' and ($row.status eq 'Pending' or $row.status eq 'Overdue' or $row.status eq 'Completed') }
-        <td>
+        <td class="nowrap">
         {if $row.status eq 'Completed'} {* Link to view contribution record for completed payment.*}
             {capture assign=viewContribURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&id=`$row.contribution_id`&cid=`$contactId`&action=view&context=`$context`"}{/capture}
-            {ts 1=$viewContribURL}<a href='%1'>View Payment</a>{/ts}
+            <a class="crm-hover-button action-item" href="{$viewContribURL}">{ts}View Payment{/ts}</a>
         {else} {* Links to record / submit a payment. *}
             {capture assign=newContribURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&action=add&cid=`$contactId`&context=`$context`&ppid=`$row.id`"}{/capture}
-            {ts 1=$newContribURL}<a href='%1'>Record Payment (Check, Cash, EFT ...)</a>{/ts}
+            <a class="crm-hover-button action-item" href="{$newContribURL}">{ts}Record Payment{/ts}</a>
             {if $newCredit}
-              <br/>
               {capture assign=newCreditURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&action=add&cid=`$contactId`&ppid=`$row.id`&context=`$context`&mode=live"}{/capture}
-              {ts 1=$newCreditURL}<a href='%1'>Submit Credit Card Payment</a>{/ts}
+              <a class="crm-hover-button action-item" href="{$newCreditURL}">{ts}Credit Card Payment{/ts}</a>
             {/if}
-            <br/>
             {capture assign=editURL}{crmURL p="civicrm/pledge/payment" q="reset=1&action=update&cid=`$contactId`&context=`$context`&ppId=`$row.id`"}{/capture}
-            {ts 1=$editURL}<a href='%1'>Edit Scheduled Payment</a>{/ts}
+            <a class="crm-hover-button action-item" href="{$editURL}">{ts}Edit Scheduled Payment{/ts}</a>
         {/if}
         </td>
     {/if}
index 5c9eb2d427cb76fd312aa5f6569eb3eaae0e944d..4c678b322c340d399476006a734f118cd7341c3a 100644 (file)
@@ -67,7 +67,6 @@
   }
 </script>
 {/literal}
-<h3>{if $action eq 1}{ts}Add Field{/ts}{elseif $action eq 2}{ts}Edit Field{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-price-field-form-block">
   <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
   <table class="form-layout">
index d2ae77d6d33cb6ff06eae6da286bf112a0fcd536..a085961e32435d487967f6e34e6db2561fa49e8c 100644 (file)
        <td class="left"><h5 class='editPayment'></h5>
 {literal}
 <script type="text/javascript">
-cj(document).ready(function(){
-  cj(document).on('blur', '.distribute', function() {
+CRM.$(function($) {
+  $(document).on('blur', '.distribute', function() {
    var totalAmount = 0;
-   cj('.distribute').each(function (){
-   if(cj(this).val( ).length > 0){
-    totalAmount     = parseFloat( totalAmount ) + parseFloat( cj(this).val( ) );
+   $('.distribute').each(function (){
+   if($(this).val( ).length > 0){
+    totalAmount     = parseFloat( totalAmount ) + parseFloat( $(this).val( ) );
     }
    });
 
-    cj('.editPayment').text('$ '+totalAmount);
+    $('.editPayment').text('$ '+totalAmount);
       var unlocateAmount = '{/literal}{$total}{literal}';
-      cj('.unlocateAmount').text('$ '+(unlocateAmount - totalAmount));
+      $('.unlocateAmount').text('$ '+(unlocateAmount - totalAmount));
    });
 });
 </script>
index bde0774cc7525ba4bc684989c54f9156f2b3421f..9a25771ed912523fdac21232067ef0bba300092c 100644 (file)
@@ -32,7 +32,7 @@
     var pPartiRef   = Array( );
     var optionSep   = '|';
 
-    cj(document).ready( function( ) {
+    CRM.$(function($) {
       pricesetParticipantCount( );
       allowGroupOnWaitlist(0, pPartiCount);
     });
index af42c3e3f6e7bb91fe7bce54120766819257503c..ffc687da4129df506796a5f8be2933bb858f6cfc 100644 (file)
   {* handle enable/disable actions*}
    {include file="CRM/common/enableDisableApi.tpl"}
    {include file="CRM/common/crmeditable.tpl"}
-    {include file="CRM/common/jsortable.tpl"}
-         <table id="options" class="display">
+         <table id="options" class="row-highlight">
          <thead>
          <tr>
             <th>{ts}Field Label{/ts}</th>
             <th>{ts}Field Type{/ts}</th>
-            <th id="order" class="sortable">{ts}Order{/ts}</th>
+            <th>{ts}Order{/ts}</th>
             <th>{ts}Req?{/ts}</th>
             <th>{ts}Enabled?{/ts}</th>
             <th>{ts}Active On{/ts}</th>
             <th>{ts}Expire On{/ts}</th>
-            <th id="nosort">{ts}Price{/ts}</th>
+            <th>{ts}Price{/ts}</th>
             {if $getTaxDetails}
               <th>{ts}Tax Label{/ts}</th>
               <th>{ts}Tax Amount{/ts}</th>
             {/if}
             <th></th>
-            <th class="hiddenElement"></th>
         </tr>
         </thead>
         {foreach from=$priceField key=fid item=row}
       <tr id="price_field-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
             <td class="crm-editable" data-field="label">{$row.label}</td>
             <td>{$row.html_type}</td>
-            <td class="nowrap">{$row.order}</td>
+            <td class="nowrap">{$row.weight}</td>
             <td>{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
             <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
             <td>{if $row.active_on}{$row.active_on|date_format:"%Y-%m-%d %T"}{/if}</td>
@@ -95,7 +93,6 @@
               <td>{if $row.html_type eq "Text / Numeric Quantity" }{$row.tax_amount|crmMoney}{/if}</td>
             {/if}
             <td class="field-action">{$row.action|replace:'xx':$row.id}</td>
-            <td class="order hiddenElement">{$row.weight}</td>
         </tr>
         {/foreach}
         </table>
         {if $action eq 16}
         <div class="messages status no-popup">
             <div class="icon inform-icon"></div>
-            {capture assign=crmURL}{crmURL p='civicrm/admin/price/field q="action=add&reset=1&sid=$sid"}{/capture}
-            {ts 1=$groupTitle 2=$crmURL}There are no fields for price set '%1', <a href='%2'>add one</a>.{/ts}
+            {ts 1=$groupTitle 2=$crmURL}There are no fields for price set '%1'.{/ts}
+        </div>
+        <div class="action-link">
+          <a href="{crmURL q="reset=1&action=add&sid=$sid"}" id="newPriceField" class="button"><span><div class="icon add-icon"></div>{ts}Add Price Field{/ts}</span></a>
         </div>
         {/if}
   {/if}
index 9bccacc711337cbedc79a9e0e30911c8795c4944..4813ffea7377ef45aeb0da9d4fc37cbb75251a62 100644 (file)
 {/if}
 {literal}
 <script type="text/javascript">
-cj(document).ready(function($) {
+CRM.$(function($) {
   {/literal}
     var comma = '{$config->monetaryThousandSeparator}';
     var dot = '{$config->monetaryDecimalPoint}';
index efef17ae28bd2f7328053b812444d16cb8d65021..eba42d92db0ce13ceb9608a741e3f1fef2273fd2 100644 (file)
   {* handle enable/disable actions*}
    {include file="CRM/common/enableDisableApi.tpl"}
    {include file="CRM/common/crmeditable.tpl"}
-   {include file="CRM/common/jsortable.tpl"}
-        <table id="options" class="display">
+        <table id="options" class="row-highlight">
         <thead>
          <tr>
-            <th>{ts}Option Label{/ts}</th>
-            <th>{ts}Option Amount{/ts}</th>
+          <th>{ts}Option Label{/ts}</th>
+          <th>{ts}Option Amount{/ts}</th>
           <th>{ts}Default{/ts}</th>
           <th>{ts}Financial Type{/ts}</th>
-            <th id="order" class="sortable">{ts}Order{/ts}</th>
+          <th>{ts}Order{/ts}</th>
             {if $getTaxDetails}
               <th>{ts}Tax Label{/ts}</th>
               <th>{ts}Tax Amount{/ts}</th>
             {/if}
           <th>{ts}Enabled?{/ts}</th>
-            <th></th>
-            <th class="hiddenElement"></th>
+          <th></th>
          </tr>
         </thead>
         {foreach from=$customOption item=row}
@@ -86,7 +84,6 @@
             {/if}
             <td id="row_{$row.id}_status" class="crm-price-option-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
             <td>{$row.action|replace:'xx':$row.id}</td>
-            <td class="order hiddenElement">{$row.weight}</td>
         </tr>
         {/foreach}
         </tbody>
index 4415a527c188543943187d1384a6581abe4e3cd4..c9bd7da4e78ca22993b46b387ec49be9f924f103 100644 (file)
@@ -31,7 +31,7 @@
     {include file="CRM/Price/Form/DeleteSet.tpl"}
 {else}
     <div id="help">
-        {ts}Price sets allow you to set up multiple event registration options with associated fees (e.g. pre-conference workshops, additional meals, etc.). Configure Price Sets for events which need more than a single set of fee levels.{/ts}
+      {ts}Price sets allow you to set up flexible multi-option pricing schemes for your contribution, event and membership pages. Use a price set if the standard pricing options are insufficient for your needs.{/ts}
     </div>
 
     {if $usedBy}
index 83565003632684dbe30c49423b11d274d958e672..0d9784f35611911c04130d8141c32b80626005cc 100644 (file)
@@ -265,7 +265,7 @@ invert              = 0
 {literal}
 <script type="text/javascript">
 
-cj(document).ready(function(){
+CRM.$(function($) {
   cj('#selector tr:even').addClass('odd-row ');
   cj('#selector tr:odd ').addClass('even-row');
 });
index c690b58990a7a9b1b0209e31a35fd08616d07bce..9cb83280cb9780b6b402d1786696427198055e7e 100644 (file)
@@ -40,6 +40,7 @@
         {continue}
       {/if}
       {assign var=n value=$field.name}
+      {assign var="operator_name" value=$n|cat:'_operator'}
       {if $field.is_search_range}
         {assign var=from value=$field.name|cat:'_from'}
         {assign var=to value=$field.name|cat:'_to'}
               &nbsp;&nbsp;{$form.$to.label}&nbsp;&nbsp;{include file="CRM/common/jcalendar.tpl" elementName=$to}</td>
           </tr>
         {/if}
-      {elseif $field.options_per_line}
-        <tr>
-          <td class="option-label">{$form.$n.label}</td>
-          <td>
-            {assign var="count" value="1"}
-            {strip}
-              <table class="form-layout-compressed">
-              <tr>
-              {* sort by fails for option per line. Added a variable to iterate through the element array*}
-                {assign var="index" value="1"}
-                {foreach name=outer key=key item=item from=$form.$n}
-                  {if $index < 10} {* Hack to skip QF field properties that are not checkbox elements. *}
-                    {assign var="index" value=`$index+1`}
-                  {else}
-                    {if $field.html_type EQ 'CheckBox' AND  $smarty.foreach.outer.last EQ 1} {* Put 'match ANY / match ALL' checkbox in separate row. *}
-                    </tr>
-                    <tr>
-                      <td class="op-checkbox" colspan="{$field.options_per_line}" style="padding-top: 0px;">{$form.$n.$key.html}</td>
-                      {else}
-                      <td class="labels font-light">{$form.$n.$key.html}</td>
-                      {if $count EQ $field.options_per_line}
-                      </tr>
-                      <tr>
-                        {assign var="count" value="1"}
-                      {else}
-                        {assign var="count" value=`$count+1`}
-                      {/if}
-                    {/if}
-                  {/if}
-                {/foreach}
-              </tr>
-              </table>
-            {/strip}
-          </td>
-        </tr>
       {else}
         <tr>
           <td class="label">
               {else}
                 {$form.$n.html}
               {/if}
-              {if $field.html_type eq 'Autocomplete-Select'}
-                {if $field.data_type eq 'ContactReference'}
-                  {include file="CRM/Custom/Form/ContactReference.tpl" element_name = $n}
-                {/if}
+              {if $field.html_type eq 'Autocomplete-Select' and $field.data_type eq 'ContactReference'}
+                {include file="CRM/Custom/Form/ContactReference.tpl" element_name = $n}
+              {/if}
+              {if !empty($form.$operator_name)}
+                <span class="crm-multivalue-search-op" for="{$n}">{$form.$operator_name.html}</span>
+                {assign var="add_multivalue_js" value=true}
               {/if}
             </td>
           {/if}
 {literal}
   <script type="text/javascript">
     CRM.$(function($) {
-      cj('#selector tr:even').addClass('odd-row ');
-      cj('#selector tr:odd ').addClass('even-row');
+      $('#selector tr:even').addClass('odd-row ');
+      $('#selector tr:odd ').addClass('even-row');
     });
   </script>
 {/literal}
+
+{if !empty($add_multivalue_js)}
+  {include file="CRM/Custom/Form/MultiValueSearch.js.tpl"}
+{/if}
index dc9705e9664288d398b27a9eec8947487b48bfca..f8b2cb09a6b4b9f3b6af837dbd26e7d65dd6eff1 100644 (file)
@@ -28,32 +28,32 @@ CRM.$(function($) {
     }
     
     var pct = 100 * queueRunnerData.completed / (queueRunnerData.completed + queueRunnerData.numberOfItems);
-    cj("#crm-queue-runner-progress").progressbar({ value: pct });
+    $("#crm-queue-runner-progress").progressbar({ value: pct });
     
     if (data.is_error) {
-      cj("#crm-queue-runner-buttonset").show();
+      $("#crm-queue-runner-buttonset").show();
       if (queueRunnerData.isEnded) {
-        cj('#crm-queue-runner-skip').button('disable');
+        $('#crm-queue-runner-skip').button('disable');
       }
-      cj('#crm-queue-runner-title').text('Error: ' + data.last_task_title);
+      $('#crm-queue-runner-title').text('Error: ' + data.last_task_title);
     } else if (!data.is_continue && queueRunnerData.numberOfItems == 0) {
-      cj('#crm-queue-runner-title').text('Done');
+      $('#crm-queue-runner-title').text('Done');
     } else {
-      cj('#crm-queue-runner-title').text('Executed: ' + data.last_task_title);
+      $('#crm-queue-runner-title').text('Executed: ' + data.last_task_title);
     }
     
     if (data.exception) {
-      cj('#crm-queue-runner-message').html('');
-      cj('<div></div>').html(data.exception).prependTo('#crm-queue-runner-message');
+      $('#crm-queue-runner-message').html('');
+      $('<div></div>').html(data.exception).prependTo('#crm-queue-runner-message');
     }
     
   };
   
   var handleError = function(jqXHR, textStatus, errorThrown) {
     // Do this regardless of whether the response was well-formed
-    cj("#crm-queue-runner-buttonset").show();
+    $("#crm-queue-runner-buttonset").show();
     
-    var data = cj.parseJSON(jqXHR.responseText)
+    var data = $.parseJSON(jqXHR.responseText)
     if (data) {
       displayResponseData(data);
     }
@@ -80,7 +80,7 @@ CRM.$(function($) {
   
   // Dequeue and execute the next item
   var runNext = function() {
-    cj.ajax({
+    $.ajax({
       type: 'POST',
       url: (queueRunnerData.isEnded ? queueRunnerData.onEndAjax : queueRunnerData.runNextAjax),
       data: {
@@ -88,7 +88,7 @@ CRM.$(function($) {
       },
       dataType: 'json',
       beforeSend: function(jqXHR, settings) {
-          cj("#crm-queue-runner-buttonset").hide();
+          $("#crm-queue-runner-buttonset").hide();
       },
       error: handleError,
       success: handleSuccess
@@ -96,13 +96,13 @@ CRM.$(function($) {
   }
   
   var retryNext = function() {
-    cj('#crm-queue-runner-message').html('');
+    $('#crm-queue-runner-message').html('');
     runNext();
   }
   
   // Dequeue and the next item, then move on to runNext for the subsequent items
   var skipNext = function() {
-    cj.ajax({
+    $.ajax({
       type: 'POST',
       url: queueRunnerData.skipNextAjax,
       data: {
@@ -110,8 +110,8 @@ CRM.$(function($) {
       },
       dataType: 'json',
       beforeSend: function(jqXHR, settings) {
-        cj('#crm-queue-runner-message').html('');
-        cj("#crm-queue-runner-buttonset").hide();
+        $('#crm-queue-runner-message').html('');
+        $("#crm-queue-runner-buttonset").hide();
       },
       error: handleError,
       success: handleSuccess
@@ -120,25 +120,25 @@ CRM.$(function($) {
   
   // Set up the UI
   
-  cj("#crm-queue-runner-progress").progressbar({ value: 0 });
+  $("#crm-queue-runner-progress").progressbar({ value: 0 });
   if (queueRunnerData.buttons.retry == 1) {
-  cj("#crm-queue-runner-retry").button({
+  $("#crm-queue-runner-retry").button({
     text: false,
     icons: {primary: 'ui-icon-refresh'}
   }).click(retryNext);
   } else {
-    cj("#crm-queue-runner-retry").remove();
+    $("#crm-queue-runner-retry").remove();
   }
   if (queueRunnerData.buttons.skip == 1) {
-  cj("#crm-queue-runner-skip").button({
+  $("#crm-queue-runner-skip").button({
     text: false,
     icons: {primary: 'ui-icon-seek-next'}
   }).click(skipNext);
   } else {
-    cj("#crm-queue-runner-skip").remove();
+    $("#crm-queue-runner-skip").remove();
   }
-  cj("#crm-queue-runner-buttonset").buttonset();
-  cj("#crm-queue-runner-buttonset").hide();
+  $("#crm-queue-runner-buttonset").buttonset();
+  $("#crm-queue-runner-buttonset").hide();
   window.setTimeout(runNext, 50);
 });
 
index 70c4fb49600777e60f4ff2670e1e0c7f3cdef195..0cba19d649577c28e2b296a126710f52ebe596c2 100644 (file)
                         {/if}
                         {if $form.groups}
                             <tr>
-                                <td>{$form.groups.html|crmAddClass:big}</td>
-                                <td align="right">{$form.$group.html}</td>
+                                <td>
+                                  {$form.groups.html}{$form.$group.html}
+                                  <script type="text/javascript">
+                                    {literal}
+                                    (function($) {
+                                      $('#groups').val('').change(function() {
+                                        CRM.confirm({
+                                          message: ts({/literal}'{ts escape='js' 1='<em>%1</em>'}Add all contacts to %1 group?{/ts}'{literal}, {1: $('option:selected', '#groups').text()})
+                                        })
+                                          .on('crmConfirm:yes', function() {
+                                            $('#groups').siblings(':submit').click();
+                                          });
+                                        $('#groups').select2('val', '');
+                                      });
+                                    })(CRM.$);
+                                    {/literal}
+                                  </script>
+                                </td>
                             </tr>
                         {/if}
                     </table>
index b3fa82d23d865918675014be89a5b9508ec876ac..2679bf054cf7bdc855e58f3195bdaef6a0aebff8 100644 (file)
             }
         }
 
-    cj(document).ready(function(){
-      cj('.crm-report-criteria-groupby input:checkbox').click(function() {
-        cj('#fields_' + this.id.substr(10)).prop('checked', this.checked);
+    CRM.$(function($) {
+      $('.crm-report-criteria-groupby input:checkbox').click(function() {
+        $('#fields_' + this.id.substr(10)).prop('checked', this.checked);
       });
       {/literal}{if $displayToggleGroupByFields}{literal}
-      cj('.crm-report-criteria-field input:checkbox').click(function() {
-        cj('#group_bys_' + this.id.substr(7)).prop('checked', this.checked);
+      $('.crm-report-criteria-field input:checkbox').click(function() {
+        $('#group_bys_' + this.id.substr(7)).prop('checked', this.checked);
       });
       {/literal}{/if}{literal}
     });
index fd2472d3152b58a3f50a5853cf6236dd555750bf..7519db6d23688e01851383416bde63da675660d1 100644 (file)
 
 {literal}
 <script type="text/javascript">
-  cj(document).ready(function(){
-    cj('#birth_date_from').attr('startOffset',200);
-    cj('#birth_date_from').attr('endoffset',0);
-    cj('#birth_date_to').attr('startOffset',200);
-    cj('#birth_date_to').attr('endoffset',0);
+  CRM.$(function($) {
+    $('#birth_date_from, #birth_date_to').attr({startOffset: '200', endoffset: '0'});
   });
 </script>
 {/literal}
index 301da14aa769df9baebcf72047676aa7672f9eff..0e6e1e73620b848e1acaa8d502617dfb52fbcb29 100644 (file)
 
 {literal}
 <script type="text/javascript">
-  cj(document).ready(function() {
-    cj('#title').data('initial_value', cj('#title').val());
-  });
   CRM.$(function($) {
       var formName = {/literal}"{$form.formName}"{literal};
-      cj('#_qf_' + formName + '_submit_save').click (
+      $('#title').data('initial_value', $('#title').val());
+      $('#_qf_' + formName + '_submit_save').click (
           function(){
-              if ( cj('#is_navigation').prop('checked') && cj('#parent_id').val() == '') {
+              if ( $('#is_navigation').prop('checked') && $('#parent_id').val() == '') {
                   var confirmMsg = {/literal}'{ts escape="js"}You have chosen to include this report in the Navigation Menu without selecting a Parent Menu item from the dropdown. This will add the report to the top level menu bar. Are you sure you want to continue?{/ts}'{literal}
                   return confirm(confirmMsg);
               }
           }
       );
-      cj('#_qf_' + formName + '_submit_next').click (
+      $('#_qf_' + formName + '_submit_next').click (
           function(){
-              if ( cj('#title').data('initial_value') == cj('#title').val() ) {
+              if ( $('#title').data('initial_value') == $('#title').val() ) {
                   var confirmMsg = {/literal}'{ts escape="js"}You are saving a copy of this report with the same report title. Are you sure you want to continue?{/ts}'{literal}
                   return confirm(confirmMsg);
               }
index c23920f0f2197f3d34f30f1ce73790c912d32ae0..5936a356cb0048a24c67733cbbfc23f59ddf900d 100644 (file)
@@ -50,7 +50,7 @@
    CRM.$(function($) {
      buildChart( );
 
-     cj("input[id$='submit_print'],input[id$='submit_pdf']").bind('click', function(e){
+     $("input[id$='submit_print'],input[id$='submit_pdf']").bind('click', function(e){
        // image creator php file path and append image name
        var url = CRM.url('civicrm/report/chart', 'name=' + '{/literal}{$chartId}{literal}' + '.png');
 
index db9c22b103fba0ef91d35a9fca2b7867efbd9522..e4898a0ae6f4a3273b1eb104a075f3a862189957 100644 (file)
   {* handle enable/disable actions*}
    {include file="CRM/common/enableDisableApi.tpl"}
    {include file="CRM/common/crmeditable.tpl"}
-   {include file="CRM/common/jsortable.tpl"}
-       <table id="options" class="display">
+       <table id="options" class="row-highlight">
        <thead>
     <tr>
         <th>{ts}Label{/ts}</th>
         <th>{ts}URL{/ts}</th>
-        <th id="nosort">{ts}Description{/ts}</th>
-        <th id="order" class="sortable">{ts}Order{/ts}</th>
+        <th>{ts}Description{/ts}</th>
+        <th>{ts}Order{/ts}</th>
         {if $showIsDefault}
             <th>{ts}Default{/ts}</th>
         {/if}
@@ -61,7 +60,7 @@
              <td class="crm-report-optionList-label crm-editable" data-field="label">{$row.label}</td>
             <td class="crm-report-optionList-value">{$row.value}</td>
             <td class="crm-report-optionList-description">{$row.description}</td>
-            <td class="nowrap crm-report-optionList-order">{$row.order}</td>
+            <td class="nowrap crm-report-optionList-order">{$row.weight}</td>
             {if $showIsDefault}
                 <td class="crm-report-optionList-default_value">{$row.default_value}</td>
             {/if}
@@ -69,7 +68,6 @@
           <td class="crm-report-optionList-is_active" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
           <td class="crm-report-optionList-component_name">{$row.component_name}</td>
             <td class="crm-report-optionList-action">{$row.action}</td>
-                        <td class="order hiddenElement">{$row.weight}</td>
         </tr>
     {/foreach}
       </table>
index f75e6f1af8860dd85e89ce882a36ec0148cb89c7..857130447f12eeca22505ed5c0819512ec7fc4f7 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 *}
 {* This template is used for adding/configuring SMS Providers  *}
-<h3>{if $action eq 1}{ts}New Provider{/ts}{elseif $action eq 2}{ts}Edit Provider{/ts}{else}{ts}Delete Provider{/ts}{/if}</h3>
 <div class="crm-block crm-form-block crm-job-form-block">
  <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
 
 {if $action eq 1  or $action eq 2}
 <script type="text/javascript" >
 {literal}
-    function reload(refresh) {
-        var provider = document.getElementById("name");
-        var url = {/literal}"{$refreshURL}"{literal}
-        var post = url + "&key=" + provider.value;
-        if( refresh ) {
-            window.location.href = post;
-        }
-    }
+  CRM.$(function($) {
+    var $form = $("form.{/literal}{$form.formClass}{literal}");
+    $('select[name=name]', $form).change(function() {
+      var url = {/literal}"{$refreshURL}"{literal} + "&key=" + this.value;
+      $(this).closest('.crm-ajax-container, #crm-main-content-wrapper').crmSnippet({url: url}).crmSnippet('refresh');
+    });
+  });
 {/literal}
 </script>
 {/if}
index 86679daeb77202ce48af2d27d10f353cdde64639..950db84a3e36088d5194fd17c43ff9e8ef16ad7d 100644 (file)
 
 {literal}
 CRM.$(function($) {
-   cj('#start_date_display').change( function( ) { 
-       if ( cj(this).val( ) ) {
-          cj('#now').prop('checked', false );
+   $('#start_date_display').change( function( ) { 
+       if ( $(this).val( ) ) {
+          $('#now').prop('checked', false );
        }
    });
-   cj('#now').change( function( ) { 
-       if ( cj('#now').prop('checked', true ) ) {
-          cj('#start_date_display').val( '' );
-          cj('#start_date').val( '' );
-          cj('#start_date_time').val( '' );
+   $('#now').change( function( ) { 
+       if ( $('#now').prop('checked', true ) ) {
+          $('#start_date_display').val( '' );
+          $('#start_date').val( '' );
+          $('#start_date_time').val( '' );
        }
    });
 });
index 3a6f0b232f269ba632ecedf2661b3dc0d96f158e..fe074894a6555c52be3d59716247ceed2aecf188 100644 (file)
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-{capture assign=wikiLink}{docURL page="Setting up a SMS Provider for CiviSMS" text="(How to add a SMS Provider)" resource="wiki"}{/capture}
-<div id="help">
-    {ts}You can configure one or more SMS Providers for your CiviCRM installation. To learn more about the procedure to install SMS extension and Provider, refer{/ts} {$wikiLink}
-</div>
 {if $action eq 1 or $action eq 2 or $action eq 8}
    {include file="CRM/SMS/Form/Provider.tpl"}
 {else}
+  {capture assign=wikiLink}{docURL page="Setting up a SMS Provider for CiviSMS" text="(How to add a SMS Provider)" resource="wiki"}{/capture}
+  <div id="help">
+    {ts}You can configure one or more SMS Providers for your CiviCRM installation. To learn more about the procedure to install SMS extension and Provider, refer{/ts} {$wikiLink}
+  </div>
 
   {if $rows}
 
-      {if $action ne 1 and $action ne 2}
-        <div class="action-link">
-          <a href="{crmURL q="action=add&reset=1"}" id="newProvider" class="button"><span><div class="icon add-icon"></div>{ts}Add New Provider{/ts}</span></a>
-       </div>
-      {/if}
-
-<div id="ltype">
+  <div id="ltype">
     {strip}
         {* handle enable/disable actions*}
        {include file="CRM/common/enableDisableApi.tpl"}
         {/foreach}
         </table>
     {/strip}
-</div>
-{elseif $action ne 1}
+  </div>
+  {else}
     <div class="messages status no-popup">
       <div class="icon inform-icon"></div>
-        {ts}There are no providers configured.{/ts}
-     </div>
-     <div class="action-link">
-       <a href="{crmURL p='civicrm/admin/sms/provider' q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div>{ts}Add SMS Provider{/ts}</span></a>
+        {ts}None found.{/ts}
      </div>
 
-{/if}
+  {/if}
+  <div class="action-link">
+    <a href="{crmURL p='civicrm/admin/sms/provider' q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div>{ts}Add SMS Provider{/ts}</span></a>
+  </div>
 {/if}
index 834b586fc84e0b3450d3f93d9e41060896dd06d8..3051d4ec68860fd40bcd4fc62deb4e7513b13c91 100644 (file)
 {* this template is used for adding/editing tags  *}
 {literal}
 <style>
-  #tagtree .highlighted > label {
-    background-color: #FEFD7B;
+  #tagtree .highlighted > span {
+    background-color: #fefca6;
+  }
+  #tagtree .helpicon ins {
+    display: none;
+  }
+  #tagtree ins.jstree-icon {
+    cursor: pointer;
   }
 </style>
 <script type="text/javascript">
   (function($, _){{/literal}
-    var entityID={$entityID};
-    var entityTable='{$entityTable}';
+    var entityID={$entityID},
+      entityTable='{$entityTable}',
+      $form = $('form.{$form.formClass}');
     {literal}
     CRM.updateContactSummaryTags = function() {
       var tags = [];
-      $('#tagtree input:checkbox:checked+label').each(function() {
+      $('#tagtree input:checkbox:checked+span label').each(function() {
         tags.push($(this).text());
       });
       $('input.crm-contact-tagset').each(function() {
         tags = tags.concat(setTags);
       });
       // contact summary tabs and search forms both listen for this event
-      $('#Tag').closest('.crm-ajax-container').trigger('crmFormSuccess', {tabCount: tags.length});
+      $($form).closest('.crm-ajax-container').trigger('crmFormSuccess', {tabCount: tags.length});
       // update summary tab
       $("#contact-summary #tags").html(tags.join(', '));
     };
 
     $(function() {
-      $("#tagtree ul input:checked").each (function(){
-        $(this).closest("li").addClass('highlighted');
-      });
+      function highlightSelected() {
+        $("ul input:not(:checked)", '#tagtree').each(function () {
+          $(this).closest("li").removeClass('highlighted');
+        });
+        $("ul input:checked", '#tagtree').each(function () {
+          $(this).parents("li[id^=tag]").addClass('highlighted');
+        });
+      }
+      highlightSelected();
 
       $("#tagtree input").change(function(){
         var tagid = this.id.replace("check_", "");
         var op = (this.checked) ? 'create' : 'delete';
         var api = CRM.api3('entity_tag', op, {entity_table: entityTable, entity_id: entityID, tag_id: tagid}, true);
-        $(this).closest("li").toggleClass('highlighted');
+        highlightSelected();
         CRM.updateContactSummaryTags();
       });
 
       //load js tree.
       $("#tagtree").jstree({
-        "plugins" : ["themes", "html_data"],
-        "themes": {"url": CRM.config.resourceBase + 'packages/jquery/plugins/jstree/themes/default/style.css'}
+        plugins : ["themes", "html_data"],
+        themes: {
+          "theme": 'classic',
+          "dots": false,
+          "icons": false,
+          "url": CRM.config.resourceBase + 'packages/jquery/plugins/jstree/themes/classic/style.css'
+        }
       });
 
       {/literal}
 <div id="Tag" class="view-content">
   <h3>{if !$hideContext}{ts}Tags{/ts}{/if}</h3>
   <div id="tagtree">
-    <ul class="tree">
-    {foreach from=$tree item="node" key="id"}
-      <li id="tag_{$id}">
-        {if ! $node.children}<input name="tagList[{$id}]" id="check_{$id}" type="checkbox" {if $tagged[$id]}checked="checked"{/if}/>{/if}
-        {if $node.children}<input name="tagList[{$id}]" id="check_{$id}" type="checkbox" {if $tagged[$id]}checked="checked"{/if}/>{/if}
-        {if $node.children} <span class="hit"></span> {/if} <label for="check_{$id}" id="tagLabel_{$id}">{$node.name}</label>
-        {if $node.children}
-          <ul>
-            {foreach from=$node.children item="subnode" key="subid"}
-              <li id="tag_{$subid}">
-                <input id="check_{$subid}" name="tagList[{$subid}]" type="checkbox" {if $tagged[$subid]}checked="checked"{/if}/>
-                {if $subnode.children} <span class="hit"></span> {/if} <label for="check_{$subid}" id="tagLabel_{$subid}">{$subnode.name}</label>
-                {if $subnode.children}
-                  <ul>
-                    {foreach from=$subnode.children item="subsubnode" key="subsubid"}
-                      <li id="tag_{$subsubid}">
-                        <input id="check_{$subsubid}" name="tagList[{$subsubid}]" type="checkbox" {if $tagged[$subsubid]}checked="checked"{/if}/>
-                        <label for="check_{$subsubid}" id="tagLabel_{$subsubid}">{$subsubnode.name}</label>
-                      </li>
-                    {/foreach}
-                  </ul>
-                {/if}
-              </li>
-            {/foreach}
-          </ul>
-        {/if}
-      </li>
-    {/foreach}
-    </ul>
+    {include file="CRM/Tag/Form/Tagtree.tpl" level=1}
   </div>
   <br />
 {include file="CRM/common/Tagset.tpl"}
diff --git a/templates/CRM/Tag/Form/Tagtree.hlp b/templates/CRM/Tag/Form/Tagtree.hlp
new file mode 100644 (file)
index 0000000..e5d9719
--- /dev/null
@@ -0,0 +1,30 @@
+{*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.5                                                |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM.                                    |
+ |                                                                    |
+ | CiviCRM is free software; you can copy, modify, and distribute it  |
+ | under the terms of the GNU Affero General Public License           |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
+ |                                                                    |
+ | CiviCRM is distributed in the hope that it will be useful, but     |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
+ | See the GNU Affero General Public License for more details.        |
+ |                                                                    |
+ | You should have received a copy of the GNU Affero General Public   |
+ | License and the CiviCRM Licensing Exception along                  |
+ | with this program; if not, contact CiviCRM LLC                     |
+ | at info[AT]civicrm[DOT]org. If you have questions about the        |
+ | GNU Affero General Public License or the licensing of CiviCRM,     |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ +--------------------------------------------------------------------+
+*}
+
+{htxt id=$id}
+  {crmAPI var='result' entity='tag' action='getsingle' return="description" id=$id}
+  {$result.description}
+{/htxt}
diff --git a/templates/CRM/Tag/Form/Tagtree.tpl b/templates/CRM/Tag/Form/Tagtree.tpl
new file mode 100644 (file)
index 0000000..14fc903
--- /dev/null
@@ -0,0 +1,41 @@
+{*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.5                                                |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM.                                    |
+ |                                                                    |
+ | CiviCRM is free software; you can copy, modify, and distribute it  |
+ | under the terms of the GNU Affero General Public License           |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
+ |                                                                    |
+ | CiviCRM is distributed in the hope that it will be useful, but     |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
+ | See the GNU Affero General Public License for more details.        |
+ |                                                                    |
+ | You should have received a copy of the GNU Affero General Public   |
+ | License and the CiviCRM Licensing Exception along                  |
+ | with this program; if not, contact CiviCRM LLC                     |
+ | at info[AT]civicrm[DOT]org. If you have questions about the        |
+ | GNU Affero General Public License or the licensing of CiviCRM,     |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ +--------------------------------------------------------------------+
+*}
+{* This tpl runs recursively to build each level of the tag tree *}
+<ul class="tree-level-{$level}">
+  {foreach from=$tree item="node" key="id"}
+    <li id="tag_{$id}">
+      <input name="tagList[{$id}]" id="check_{$id}" type="checkbox" {if $tagged[$id]}checked="checked"{/if}/>
+      <span>
+        <label for="check_{$id}" id="tagLabel_{$id}">{$node.name}</label>
+        {if $node.description}{help id=$id title=$node.name file="CRM/Tag/Form/Tagtree"}{/if}
+      </span>
+      {if $node.children}
+        {* Recurse... *}
+        {include file="CRM/Tag/Form/Tagtree.tpl" tree=$node.children level=$level+1}
+      {/if}
+    </li>
+  {/foreach}
+</ul>
index a7763289b698026624f13c7c2a423dda5d99edb2..e49f3c257791f892c7bd2afa92c518f3195b56f2 100644 (file)
 {literal}
 <script type="text/javascript">
   CRM.$(function($) {
-    cj('#selector tr:even').addClass('odd-row ');
-    cj('#selector tr:odd ').addClass('even-row');
+    $('#selector tr:even').addClass('odd-row');
+    $('#selector tr:odd ').addClass('even-row');
   });
 </script>
 {/literal}
index 02f4572378a4595b919225e1a878fcfb27061cb6..2b0f5dc0c4c3011a7f91c6effdf8404bbd473195 100644 (file)
@@ -23,7 +23,6 @@
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-<h3>{if $action eq 8}{ts}Delete Field{/ts} - {$fieldTitle}{elseif $action eq 1}{ts}Add Field{/ts}{elseif $action eq 2}{ts}Edit Field{/ts} - {$fieldTitle}{/if}</h3>
 <div class="crm-block crm-form-block crm-uf-field-form-block">
 {if $action eq 8}
   <div class="messages status no-popup">
 
 {literal}
 <script type="text/javascript">
-var otherModule = new Array( );
-{/literal}{foreach from=$otherModules item="mval" key="mkey"}{literal}
-otherModule[{/literal}{$mkey}{literal}] = '{/literal}{$mval}{literal}';
-{/literal}{/foreach}{literal}
 
 CRM.$(function($) {
+  var otherModule = {/literal}{$otherModules|@json_encode}{literal};
   if ( $.inArray( "Profile", otherModule ) > -1 && $.inArray( "Search Profile", otherModule ) == -1 ){
     $('#profile_visibility').show();
   }
index 9ff5e779d140231126c002c9c2a6c2ca438d61cd..265e19d812e893887da5776a28303bab384c757b 100644 (file)
@@ -45,8 +45,7 @@
         {* handle enable/disable actions*}
    {include file="CRM/common/enableDisableApi.tpl"}
    {include file="CRM/common/crmeditable.tpl"}
-   {include file="CRM/common/jsortable.tpl"}
-        <table id="options" class="display">
+        <table id="options" class="row-highlight">
             <thead>
             <tr>
                 <th>{ts}Field Name{/ts}</th>
                 <th>{ts}Searchable?{/ts}</th>
                 <th>{ts}In Selector?{/ts}</th>
                 {/if}
-                <th id="order" class="sortable">{ts}Order{/ts}</th>
+                <th>{ts}Order{/ts}</th>
                 <th>{ts}Required{/ts}</th>
                 <th>{ts}View Only{/ts}</th>
                 <th>{ts}Reserved{/ts}</th>
                 <th></th>
-                <th class="hiddenElement"></th>
             </tr>
             </thead>
             {foreach from=$ufField item=row}
                 <td class="crmf-is_searchable">{if $row.is_searchable   eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
                 <td class="crmf-in_selector">{if $row.in_selector     eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
                 {/if}
-                <td class="nowrap">{$row.order}</td>
+                <td class="nowrap">{$row.weight}</td>
                 <td class="crmf-is_required">{if $row.is_required     eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
                 <td>{if $row.is_view         eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
                 <td>{if $row.is_reserved     eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
                 <td>{$row.action|replace:'xx':$row.id}</td>
-                <td class="order hiddenElement">{$row.weight}</td>
             </tr>
             {/foreach}
         </table>
         {if $action eq 16}
         {capture assign=crmURL}{crmURL p="civicrm/admin/uf/group/field/add" q="reset=1&action=add&gid=$gid"}{/capture}
         <div class="messages status no-popup">
-        <div class="icon inform-icon"></div>
-       {ts 1=$groupTitle 2=$crmURL}There are no CiviCRM Profile Fields for '%1', you can <a href='%2'>add one now</a>.{/ts}
+          <div class="icon inform-icon"></div>
+          {ts 1=$groupTitle 2=$crmURL}There are no CiviCRM Profile Fields for '%1'</a>.{/ts}
+        </div>
+        <div class="action-link">
+          <a href="{crmURL p="civicrm/admin/uf/group/field/add" q="reset=1&action=add&gid=$gid"}" class="button"><span><div class="icon add-icon"></div>{ts}Add Field{/ts}</span></a>
         </div>
         {/if}
     {/if}
index 21289ec4821264f3d6584de20f2793d0696369b2..bcdd8cc6d4709cfdfcce3d65d2fb389c906dc083 100644 (file)
   <script type='text/javascript'>
       CRM.$(function($) {ldelim}
         var selectedTab = '{if $selectedChild}{$selectedChild}{else}user-profiles{/if}';
-        var tabIndex = cj('#tab_' + selectedTab).prevAll().length;
+        var tabIndex = $('#tab_' + selectedTab).prevAll().length;
         {literal}
-        cj("#mainTabContainer").tabs( {active: tabIndex} );
+        $("#mainTabContainer").tabs( {active: tabIndex} );
       });
     {/literal}
   </script>
index 82c19815e039c202bb7e671862d2df45570e7fa1..f6aa5f398a15fca944cdca224d5c346903ad7519 100644 (file)
@@ -23,7 +23,7 @@ CRM.$(function($) {
           params.autoClose = params.openInline = params.cancelButton = params.refreshAction = false;
           ui.panel.on('crmFormLoad', function() {
             // Hack: "Save and done" and "Cancel" buttons submit without ajax
-            $('.cancel.form-submit, input[name$=upload_done]', this).on('click', function(e) {
+            $('.cancel.crm-form-submit, input[name$=upload_done]', this).on('click', function(e) {
               $(this).closest('form').ajaxFormUnbind();
             })
           });
index 6dbff68fc2e15ad948de0ad5f77e9065ab1ee57e..30ea784edc41ce33a13506bf005c1e03e7ed2b56 100644 (file)
@@ -29,7 +29,7 @@
 CRM.$(function($) {
 {/literal}
     {foreach from=$trackingFields key=trackingFieldName item=dontCare}
-       cj("#{$trackingFieldName}").parent().parent().hide( );
+       $("#{$trackingFieldName}").parent().parent().hide( );
     {/foreach}
 {literal}
   }
index 45adc63e4d883a27169173b2abcbf5fb31da0587..c0cbaf0ad74fed11d93c4c170919ef955ceeaf9c 100644 (file)
@@ -177,7 +177,7 @@ function clearFirstBlock( blockName , blockId ) {
 }
 
 function getAddressBlock( position ) {
-   var addressBlockIds = new Array();
+   var addressBlockIds = [];
    var i = 0;
    switch ( position ) {
         case 'last':
index 8103142b1fe012e526ddbdc0855669d50a0f1491..2b6456b6fc12cd2f1e50ed0e51622d2e016f3c9f 100644 (file)
 {literal}
 <script type="text/javascript">
   CRM.$(function($) {
-    //bind the click event for action icon
-    cj('.action-icon').click( function( ) {
-      copyFieldValues( cj(this).attr('fname') );
-    });
-  });
-
-  /**
-   * This function use to copy fieldsi
-   *
-   * @param fname string field name
-   * @return void
-   */
-  function copyFieldValues( fname ) {
-    // this is the most common pattern for elements, so first check if it exits
-    // this check field starting with "field[" and contains [fname] and is not
-    // hidden ( for checkbox hidden element is created )
-    var elementId    = cj('.crm-copy-fields [name^="field["][name*="[' + fname +']"][type!=hidden]');
-
-    // get the first element and it's value
-    var firstElement = elementId.eq(0);
-    var firstElementValue = firstElement.val();
-
-    //console.log( elementId );
-    //console.log( firstElement );
-    //console.log( firstElementValue );
-
-    //check if it is date element
-    var isDateElement     = elementId.attr('format');
-
-    // check if it is wysiwyg element
-    var editor = elementId.attr('editor');
-
-    //get the element type
-    var elementType       = elementId.attr('type');
-
-    // set the value for all the elements, elements needs to be handled are
-    // select, checkbox, radio, date fields, text, textarea, multi-select
-    // wysiwyg editor, advanced multi-select ( to do )
-    if ( elementType == 'radio' ) {
-      firstElementValue = elementId.filter(':checked').eq(0).val();
-      elementId.filter("[value=" + firstElementValue + "]").prop("checked",true).change();
-    }
-    else if ( elementType == 'checkbox' ) {
-      // handle checkbox
-      // get the entity id of first element
-      var firstEntityId = cj('.crm-copy-fields > tbody > tr');
-
-      if ( firstEntityId.length == 0 ) {
-        firstEntityId = firstElement.closest('div.crm-grid-row');
+    /**
+     * This function use to copy fields
+     *
+     * @param fname string field name
+     * @return void
+     */
+    function copyFieldValues( fname ) {
+      // this is the most common pattern for elements, so first check if it exits
+      // this check field starting with "field[" and contains [fname] and is not
+      // hidden ( for checkbox hidden element is created )
+      var elementId    = $('.crm-copy-fields [name^="field["][name*="[' + fname +']"][type!=hidden]');
+
+      // get the first element and it's value
+      var firstElement = elementId.eq(0);
+      var firstElementValue = firstElement.val();
+
+      //check if it is date element
+      var isDateElement     = elementId.attr('format');
+
+      // check if it is wysiwyg element
+      var editor = elementId.attr('editor');
+
+      //get the element type
+      var elementType       = elementId.attr('type');
+
+      // set the value for all the elements, elements needs to be handled are
+      // select, checkbox, radio, date fields, text, textarea, multi-select
+      // wysiwyg editor, advanced multi-select ( to do )
+      if ( elementType == 'radio' ) {
+        firstElementValue = elementId.filter(':checked').eq(0).val();
+        elementId.filter("[value=" + firstElementValue + "]").prop("checked",true).change();
       }
+      else if ( elementType == 'checkbox' ) {
+        // handle checkbox
+        // get the entity id of first element
+        var firstEntityId = $('.crm-copy-fields > tbody > tr');
 
-      firstEntityId = firstEntityId.attr('entity_id');
+        if ( firstEntityId.length == 0 ) {
+          firstEntityId = firstElement.closest('div.crm-grid-row');
+        }
 
-      var firstCheckElement = cj('.crm-copy-fields [type=checkbox][name^="field['+ firstEntityId +']['+ fname +']"][type!=hidden]');
+        firstEntityId = firstEntityId.attr('entity_id');
 
-      if ( firstCheckElement.length > 1 ) {
-        // lets uncheck all the checkbox except first one
-        cj('.crm-copy-fields [type=checkbox][name^="field["][name*="[' + fname +']"][type=checkbox]:not([name^="field['+ firstEntityId +']['+ fname +']["])').prop('checked', false);
+        var firstCheckElement = $('.crm-copy-fields [type=checkbox][name^="field['+ firstEntityId +']['+ fname +']"][type!=hidden]');
 
-        //here for each checkbox for first row, check if it is checked and set remaining checkboxes
-        firstCheckElement.each(function() {
-          if (cj(this).prop('checked') ) {
-            var elementName = cj(this).attr('name');
-            var correctIndex = elementName.split('field['+ firstEntityId +']['+ fname +'][');
-            correctIndexValue = correctIndex[1].replace(']', '');
-            cj('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']['+ correctIndexValue+']"][type!=hidden]').prop('checked',true).change();
-          }
-        });
-      }
-      else {
-        if ( firstCheckElement.prop('checked') ) {
-          cj('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']"][type!=hidden]').prop('checked',true).change();
+        if ( firstCheckElement.length > 1 ) {
+          // lets uncheck all the checkbox except first one
+          $('.crm-copy-fields [type=checkbox][name^="field["][name*="[' + fname +']"][type=checkbox]:not([name^="field['+ firstEntityId +']['+ fname +']["])').prop('checked', false);
+
+          //here for each checkbox for first row, check if it is checked and set remaining checkboxes
+          firstCheckElement.each(function() {
+            if ($(this).prop('checked') ) {
+              var elementName = $(this).attr('name');
+              var correctIndex = elementName.split('field['+ firstEntityId +']['+ fname +'][');
+              correctIndexValue = correctIndex[1].replace(']', '');
+              $('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']['+ correctIndexValue+']"][type!=hidden]').prop('checked',true).change();
+            }
+          });
         }
         else {
-          cj('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']"][type!=hidden]').prop('checked', false).change();
+          if ( firstCheckElement.prop('checked') ) {
+            $('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']"][type!=hidden]').prop('checked',true).change();
+          }
+          else {
+            $('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']"][type!=hidden]').prop('checked', false).change();
+          }
         }
       }
-    }
-    else if ( editor ) {
+      else if ( editor ) {
         var firstElementId = firstElement.attr('id');
         switch ( editor ) {
           case 'ckeditor':
 
             // copy first element content to all the elements
             elementId.each( function() {
-              var elemtId = cj(this).attr('id');
+              var elemtId = $(this).attr('id');
               oEditor = CKEDITOR.instances[elemtId];
               oEditor.setData( htmlContent );
             });
 
             // copy first element content to all the elements
             elementId.each( function() {
-              var elemtId = cj(this).attr('id');
+              var elemtId = $(this).attr('id');
               tinyMCE.get( elemtId ).setContent( htmlContent );
             });
             break;
         if (elementId.is('select') === true && firstElement.parent().find(':input').select().index() >= 1 && firstElement.parent().find('select').select().index < 1) {
           // its a multiselect case
           firstElement.parent().find(':input').select().each( function(count) {
-            var firstElementValue = cj(this).val();
-            var elementId = cj('.crm-copy-fields [name^="field["][name*="[' + fname +'][' + count + '"][type!=hidden]');
+            var firstElementValue = $(this).val();
+            var elementId = $('.crm-copy-fields [name^="field["][name*="[' + fname +'][' + count + '"][type!=hidden]');
             elementId.val(firstElementValue).not(":first").change();
           });
         }
         }
       }
 
-    // since we use different display field for date we also need to set it.
-    // also check for date time field and set the value correctly
-    if ( isDateElement ) {
-      copyValuesDate( fname );
+      // since we use different display field for date we also need to set it.
+      // also check for date time field and set the value correctly
+      if ( isDateElement ) {
+        copyValuesDate( fname );
+      }
+    }
+
+    /**
+     * Special function to handle setting values for date fields
+     *
+     * @param fname string field name
+     * @return void
+     */
+    function copyValuesDate(fname) {
+      var fnameDisplay = fname + '_display';
+      var fnameTime    = fname + '_time';
+
+      var displayElement = $('.crm-copy-fields [name^="field_"][name$="_' + fnameDisplay +'"][type!=hidden]');
+      var timeElement    = $('.crm-copy-fields [name^="field["][name*="[' + fnameTime +']"][type!=hidden]');
+
+      displayElement.val( displayElement.eq(0).val() );
+      timeElement.val( timeElement.eq(0).val() );
     }
-  }
-
-  /**
-   * Special function to handle setting values for date fields
-   *
-   * @param fname string field name
-   * @return void
-   */
-  function copyValuesDate(fname) {
-    var fnameDisplay = fname + '_display';
-    var fnameTime    = fname + '_time';
-
-    var displayElement = cj('.crm-copy-fields [name^="field_"][name$="_' + fnameDisplay +'"][type!=hidden]');
-    var timeElement    = cj('.crm-copy-fields [name^="field["][name*="[' + fnameTime +']"][type!=hidden]');
-
-    displayElement.val( displayElement.eq(0).val() );
-    timeElement.val( timeElement.eq(0).val() );
-  }
+
+    //bind the click event for action icon
+    $('.action-icon').click(function( ) {
+      copyFieldValues($(this).attr('fname'));
+    });
+  });
+
 
 </script>
 {/literal}
index 1b9b2a45d012bc26638d0703cb3d1d671bbaa331..1336459465a7c1af0050dd7e8d93e7f5dc70fc48 100644 (file)
@@ -38,6 +38,13 @@ function processDupes( cid, oid, oper, context, reloadURL ) {
                                      // redirect after a small delay
                                      setTimeout("window.location.href = '" + reloadURL + "'", 500);
         }
+        else {
+          //CRM-15113 this has the effect of causing the alert to display. Also, as they are already 'actioned' Civi sensibly returns the browser to the
+          //search screen
+          setTimeout(function(){
+            window.location.reload();
+          }, 500);
+        }
       }
     }
   });
index 83a9964c39e27e9e75e596aba4c42a2f66d361ed..87a87ae62ddba0439cd0ff14645e016318f2a28b 100644 (file)
@@ -41,7 +41,7 @@
 
     function save() {
       $row.closest('table').block();
-      CRM.api3(info.entity, 'setvalue', {id: info.id, field: 'is_active', value: enabled ? 0 : 1}, {success: successMsg}).done(refresh);
+      CRM.api3(info.entity, info.action, {id: info.id, field: 'is_active', value: enabled ? 0 : 1}, {success: successMsg}).done(refresh);
       if (enabled) {
         $(this).dialog('close');
       }
@@ -53,8 +53,8 @@
         conf.html(response.content);
         if (!response.illegal) {
           conf.dialog('option', 'buttons', [
-            {text: {/literal}'{ts escape="js"}Disable{/ts}'{literal}, click: save},
-            {text: {/literal}'{ts escape="js"}Cancel{/ts}'{literal}, click: function() {$(this).dialog('close');}}
+            {text: {/literal}'{ts escape="js"}Yes{/ts}'{literal}, click: save},
+            {text: {/literal}'{ts escape="js"}No{/ts}'{literal}, click: function() {$(this).dialog('close');}}
           ]);
         }
       });
@@ -63,7 +63,7 @@
     function enableDisable() {
       $row = $(this).closest('.crm-entity');
       info = $(this).crmEditableEntity();
-      fieldLabel = info.label || info.title || info.name || {/literal}'{ts escape="js"}Record{/ts}'{literal};
+      fieldLabel = info.label || info.title || info.display_name || info.name || {/literal}'{ts escape="js"}Record{/ts}'{literal};
       enabled = !$row.hasClass('disabled');
       if (enabled) {
         CRM.confirm({{/literal}
index b4e25f3d0dbd02e30298f4fdd47330ee1aa42daf..ea6560f6b61530fb93d5c5fc7dcdf1b7436f8ea2 100644 (file)
       var element_time  = "#{$elementId}_time";
       {if $timeElement}
           element_time  = "#{$timeElement}";
-          var time_format   = cj( element_time ).attr('timeFormat');
+          var time_format   = $( element_time ).attr('timeFormat');
           {literal}
-              cj(element_time).timeEntry({ show24Hours : time_format, spinnerImage: '' });
+              $(element_time).timeEntry({ show24Hours : time_format, spinnerImage: '' });
           {/literal}
       {/if}
       var currentYear = new Date().getFullYear();
       var alt_field   = '#{$elementId}';
-      cj( alt_field ).hide();
-      var date_format = cj( alt_field ).attr('format');
+      $( alt_field ).hide();
+      var date_format = $( alt_field ).attr('format');
 
       var altDateFormat = 'mm/dd/yy';
       {literal}
       }
 
       if ( !( ( date_format == 'M yy' ) || ( date_format == 'yy' ) || ( date_format == 'yy-mm' ) ) ) {
-          cj( element_date ).addClass( 'dpDate' );
+          $( element_date ).addClass( 'dpDate' );
       }
 
       {/literal}
-      var yearRange   = currentYear - parseInt( cj( alt_field ).attr('startOffset') );
+      var yearRange   = currentYear - parseInt( $( alt_field ).attr('startOffset') );
           yearRange  += ':';
-          yearRange  += currentYear + parseInt( cj( alt_field ).attr('endOffset'  ) );
+          yearRange  += currentYear + parseInt( $( alt_field ).attr('endOffset'  ) );
       {literal}
 
-      var startRangeYr = currentYear - parseInt( cj( alt_field ).attr('startOffset') );
-      var endRangeYr = currentYear + parseInt( cj( alt_field ).attr('endOffset'  ) );
+      var startRangeYr = currentYear - parseInt( $( alt_field ).attr('startOffset') );
+      var endRangeYr = currentYear + parseInt( $( alt_field ).attr('endOffset'  ) );
 
       var lcMessage = {/literal}"{$config->lcMessages}"{literal};
       var localisation = lcMessage.split('_');
-      var dateValue = cj(alt_field).val( );
-      cj(element_date).datepicker({
+      var dateValue = $(alt_field).val( );
+      $(element_date).datepicker({
                                     closeAtTop        : true,
                                     dateFormat        : date_format,
                                     changeMonth       : true,
       // set default value to display field, setDefault param for datepicker
       // is not working hence using below logic
       // parse the date
-      var displayDateValue = cj.datepicker.parseDate( altDateFormat, dateValue );
+      var displayDateValue = $.datepicker.parseDate( altDateFormat, dateValue );
 
       // format date according to display field
-      displayDateValue = cj.datepicker.formatDate( date_format, displayDateValue );
-      cj( element_date).val( displayDateValue );
+      displayDateValue = $.datepicker.formatDate( date_format, displayDateValue );
+      $( element_date).val( displayDateValue );
       //support unsaved-changes warning: CRM-14353
-      cj( element_date).data('crm-initial-value', displayDateValue);
+      $( element_date).data('crm-initial-value', displayDateValue);
 
-      cj(element_date).click( function( ) {
+      $(element_date).click( function( ) {
           hideYear( this );
       });
-      cj('.ui-datepicker-trigger').click( function( ) {
-          hideYear( cj(this).prev() );
+      $('.ui-datepicker-trigger').click( function( ) {
+          hideYear( $(this).prev() );
       });
       function hideYear( element ) {
-        var format = cj( element ).attr('format');
+        var format = $( element ).attr('format');
         if ( format == 'dd-mm' || format == 'mm/dd' ) {
-          cj(".ui-datepicker-year").css('display', 'none');
+          $(".ui-datepicker-year").css('display', 'none');
         }
       }
-      cj(alt_field + ',' + element_date + ',' + element_time).on('blur change', function() {
-        var vis = cj(alt_field).val() || cj(element_time).val() ? '' : 'hidden';
-        cj(this).siblings('.crm-clear-link').css('visibility', vis);
+      $(alt_field + ',' + element_date + ',' + element_time).on('blur change', function() {
+        var vis = $(alt_field).val() || $(element_time).val() ? '' : 'hidden';
+        $(this).siblings('.crm-clear-link').css('visibility', vis);
       });
-      cj(alt_field).change();
+      $(alt_field).change();
     });
 
     {/literal}
index 1491a16b6a53a0cbe6bb4418e58c205e4bed8b69..bcbea30b2bd5bc4a0dd9f6554a733a9faf7ef485 100644 (file)
 *}
 {literal}
 <script type="text/javascript">
-CRM.$(function($) {
-// for date sorting see http://wiki.civicrm.org/confluence/display/CRMDOC/Sorting+Date+Fields+in+dataTables+Widget
-var useAjax = {/literal}{if $useAjax}1{else}0{/if}{literal};
-var sortEnabled = true;
-var sourceUrl = '';
-var useClass  = 'display';
+  CRM.$(function($) {
 
-var tcount =1;
-if ( useAjax ) {
- {/literal}{if isset($sourceUrl)}sourceUrl = "{$sourceUrl}";{/if}{literal}
- useClass = 'pagerDisplay';
- tcount =5;
-}
+    function getElementClass(element) {
+      return $(element).attr('class') || '';
+    }
 
-var tableId = '';
-var count   = 1;
+    // fetch the occurrence of element
+    function getRowId(row, str) {
+      var optionId;
+      $.each(row, function(i, n) {
+        if (str === $(n).attr('class')) {
+          optionId = i;
+        }
+      });
+      return optionId;
+    }
+    
+    // for date sorting see http://wiki.civicrm.org/confluence/display/CRMDOC/Sorting+Date+Fields+in+dataTables+Widget
+    var useAjax = {/literal}{if $useAjax}1{else}0{/if}{literal};
+    var sourceUrl = '';
+    var useClass  = 'display';
 
-//rename id of table with sequence
-//and create the object for navigation
-cj('table.' + useClass).each(function(){
-    cj(this).attr('id','option' + tcount + count);
-    tableId += count + ',';
-    count++;
-});
+    var tcount = 1;
+    if ( useAjax ) {
+      {/literal}{if isset($sourceUrl)}sourceUrl = "{$sourceUrl}";{/if}{literal}
+      useClass = 'pagerDisplay';
+      tcount = 5;
+    }
 
-//remove last comma
-tableId = tableId.substring(0, tableId.length - 1 );
-eval('tableId =[' + tableId + ']');
+    var tableId = [], count = 1;
 
-  cj.each(tableId, function(i,n){
-    tabId = '#option' + tcount + n;
-    //get the object of first tr data row.
-    tdObject = cj(tabId + ' tr:nth(1) td');
-    var id = -1; var count = 0; var columns=''; var sortColumn = '';
-    //build columns array for sorting or not sorting
-    cj(tabId + ' th').each( function( ) {
-        var option = cj(this).prop('id').split("_");
+    //rename id of table with sequence
+    //and create the object for navigation
+    $('table.' + useClass).each(function() {
+      $(this).attr('id','option' + tcount + count);
+      tableId.push(count);
+      count++;
+    });
+
+    $.each(tableId, function(i,n){
+      var tabId = '#option' + tcount + n;
+      //get the object of first tr data row.
+      var tdObject = $(tabId + ' tr:nth(1) td');
+      var id = -1; var count = 0; var columns=''; var sortColumn = '';
+      //build columns array for sorting or not sorting
+      $(tabId + ' th').each( function( ) {
+        var option = $(this).prop('id').split("_");
         option  = ( option.length > 1 ) ? option[1] : option[0];
-        stype   = 'numeric';
+        var stype   = 'numeric';
         switch( option ) {
-            case 'sortable':
-                sortColumn += '[' + count + ', "asc" ],';
-                columns += '{"sClass": "'+ getElementClass( this ) +'"},';
+          case 'sortable':
+            sortColumn += '[' + count + ', "asc" ],';
+            columns += '{"sClass": "'+ getElementClass( this ) +'"},';
             break;
-            case 'date':
-                stype = 'date';
-            case 'order':
-                if ( cj(this).attr('class') == 'sortable' ){
-                    sortColumn += '[' + count + ', "asc" ],';
-                }
-                sortId   = getRowId(tdObject, cj(this).attr('id') +' hiddenElement' );
-                sortEnabled = true;
-                columns += '{ "render": function ( data, type, row ) { return "<div style=\'display:none\'>"+ data +"</div>" + row[sortId] ; }, "targets": sortColumn,"bUseRendered": false},';
+          case 'date':
+            stype = 'date';
+          case 'order':
+            if ( $(this).attr('class') == 'sortable' ){
+              sortColumn += '[' + count + ', "asc" ],';
+            }
+            var sortId   = getRowId(tdObject, $(this).attr('id') +' hiddenElement' );
+            columns += '{ "render": function ( data, type, row ) { return "<div style=\'display:none\'>"+ data +"</div>" + row[sortId] ; }, "targets": sortColumn,"bUseRendered": false},';
             break;
-            case 'nosort':
-                columns += '{ "bSortable": false, "sClass": "'+ getElementClass( this ) +'"},';
+          case 'nosort':
+            columns += '{ "bSortable": false, "sClass": "'+ getElementClass( this ) +'"},';
             break;
-            case 'currency':
-                columns += '{ "sType": "currency" },';
+          case 'currency':
+            columns += '{ "sType": "currency" },';
             break;
-            case 'link':
-                columns += '{"sType": "html"},';
+          case 'link':
+            columns += '{"sType": "html"},';
             break;
-            default:
-                if ( cj(this).text() ) {
-                    columns += '{"sClass": "'+ getElementClass( this ) +'"},';
-                } else {
-                    columns += '{ "bSortable": false },';
-                }
+          default:
+            if ( $(this).text() ) {
+              columns += '{"sClass": "'+ getElementClass( this ) +'"},';
+            } else {
+              columns += '{ "bSortable": false },';
+            }
             break;
         }
         count++;
-  });
-  columns    = columns.substring(0, columns.length - 1 );
-  sortColumn = sortColumn.substring(0, sortColumn.length - 1 );
-  eval('sortColumn =[' + sortColumn + ']');
-  eval('columns =[' + columns + ']');
+      });
+      // Fixme: this could be done without eval
+      columns    = columns.substring(0, columns.length - 1 );
+      sortColumn = sortColumn.substring(0, sortColumn.length - 1 );
+      eval('sortColumn =[' + sortColumn + ']');
+      eval('columns =[' + columns + ']');
 
-        var currTable = cj(tabId);
-        if (currTable) {
-            // contains the dataTables master records
-            var s = cj(document).dataTableSettings;
-            if (s != 'undefined') {
-                var len = s.length;
-                for (var i=0; i < len; i++) {
-                    // if already exists, remove from the array
-                    if (s[i].sInstance = tabId) {
-                        s.splice(i,1);
-              }
-              }
+      var currTable = $(tabId);
+      if (currTable) {
+        // contains the dataTables master records
+        var s = $(document).dataTableSettings;
+        if (s != 'undefined') {
+          var len = s.length;
+          for (var i=0; i < len; i++) {
+            // if already exists, remove from the array
+            if (s[i].sInstance = tabId) {
+              s.splice(i,1);
+            }
+          }
         }
-  }
+      }
 
-    var noRecordFoundMsg  = {/literal}'{ts escape="js"}There are no records.{/ts}'{literal};
-
-    oTable = null;
-    if ( useAjax ) {
-      oTable = cj(tabId).dataTable({
-              "bFilter"    : false,
-              "bAutoWidth" : false,
-              "aaSorting"  : sortColumn,
-              "aoColumns"  : columns,
-              "bProcessing": true,
-              "bJQueryUI"  : true,
-              "asStripClasses" : [ "odd-row", "even-row" ],
-              "sPaginationType": "full_numbers",
-              "sDom"       : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>',
-              "bServerSide": true,
-              "sAjaxSource": sourceUrl,
-              "oLanguage":{"sEmptyTable"  : noRecordFoundMsg,
-              "sZeroRecords" : noRecordFoundMsg },
-
-              {/literal}{if !empty($callBack)}{literal}
-              "fnDrawCallback": function() { checkSelected(); },
-              {/literal}{/if}{literal}
-
-              "fnServerData": function ( sSource, aoData, fnCallback ) {
-                cj.ajax( {
-                  "dataType": 'json',
-                  "type": "POST",
-                  "url": sSource,
-                  "data": aoData,
-                  "success": fnCallback
-                });
-              }
-         });
-    } else {
-      oTable = cj(tabId).dataTable({
-                "aaSorting"    : sortColumn,
-                "bPaginate"    : false,
-                "bLengthChange": true,
-                "bFilter"      : false,
-                "bInfo"        : false,
-                "asStripClasses" : [ "odd-row", "even-row" ],
-                "bAutoWidth"   : false,
-                "aoColumns"   : columns,
-                "bSort" : sortEnabled,
-            "oLanguage":{"sEmptyTable"  : noRecordFoundMsg,
-                         "sZeroRecords" : noRecordFoundMsg }
-              });
-    }
-    var object;
+      var noRecordFoundMsg  = {/literal}'{ts escape="js"}There are no records.{/ts}'{literal};
 
+      var oTable;
+      if ( useAjax ) {
+        oTable = $(tabId).dataTable({
+          "bFilter": false,
+          "bAutoWidth": false,
+          "aaSorting": sortColumn,
+          "aoColumns": columns,
+          "bProcessing": true,
+          "bJQueryUI": true,
+          "asStripClasses": [ "odd-row", "even-row" ],
+          "sPaginationType": "full_numbers",
+          "sDom": '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>',
+          "bServerSide": true,
+          "sAjaxSource": sourceUrl,
+          "oLanguage":{
+            "sEmptyTable": noRecordFoundMsg,
+            "sZeroRecords": noRecordFoundMsg
+          },
+          "fnServerData": function ( sSource, aoData, fnCallback ) {
+            $.ajax( {
+              "dataType": 'json',
+              "type": "POST",
+              "url": sSource,
+              "data": aoData,
+              "success": fnCallback
+            });
+          }
+        });
+      } else {
+        oTable = $(tabId).dataTable({
+          "aaSorting": sortColumn,
+          "bPaginate": false,
+          "bLengthChange": true,
+          "bFilter": false,
+          "bInfo": false,
+          "asStripClasses": [ "odd-row", "even-row" ],
+          "bAutoWidth": false,
+          "aoColumns": columns,
+          "bSort": true,
+          "oLanguage":{
+            "sEmptyTable": noRecordFoundMsg,
+            "sZeroRecords": noRecordFoundMsg
+          }
+        });
+      }
     });
-});
-
-function getElementClass( element ) {
-if( cj(element).attr('class') )   return cj(element).attr('class');
-return '';
-}
-
-//function to fetch the occurence of element
-function getRowId(row,str){
- cj.each( row, function(i, n) {
-    if( str === cj(n).attr('class') ) {
-        optionId = i;
-    }
- });
-return optionId;
-}
+  });
 
-//plugin to sort on currency
-var symbol = "{/literal}{$config->defaultCurrencySymbol($config->defaultSymbol)}{literal}";
-cj.fn.dataTableExt.oSort['currency-asc']  = function(a,b) {
-  var x = (a == "-") ? 0 : a.replace( symbol, "" );
-  var y = (b == "-") ? 0 : b.replace( symbol, "" );
-  x = parseFloat( x );
-  y = parseFloat( y );
-  return ((x < y) ? -1 : ((x > y) ?  1 : 0));
-};
+  //plugin to sort on currency
+  cj.fn.dataTableExt.oSort['currency-asc']  = function(a,b) {
+    var symbol = "{/literal}{$config->defaultCurrencySymbol($config->defaultSymbol)}{literal}";
+    var x = (a == "-") ? 0 : a.replace( symbol, "" );
+    var y = (b == "-") ? 0 : b.replace( symbol, "" );
+    x = parseFloat( x );
+    y = parseFloat( y );
+    return ((x < y) ? -1 : ((x > y) ?  1 : 0));
+  };
 
-cj.fn.dataTableExt.oSort['currency-desc'] = function(a,b) {
-  var x = (a == "-") ? 0 : a.replace( symbol, "" );
-  var y = (b == "-") ? 0 : b.replace( symbol, "" );
-  x = parseFloat( x );
-  y = parseFloat( y );
-  return ((x < y) ?  1 : ((x > y) ? -1 : 0));
-};
+  cj.fn.dataTableExt.oSort['currency-desc'] = function(a,b) {
+    var symbol = "{/literal}{$config->defaultCurrencySymbol($config->defaultSymbol)}{literal}";
+    var x = (a == "-") ? 0 : a.replace( symbol, "" );
+    var y = (b == "-") ? 0 : b.replace( symbol, "" );
+    x = parseFloat( x );
+    y = parseFloat( y );
+    return ((x < y) ?  1 : ((x > y) ? -1 : 0));
+  };
 </script>
 {/literal}
index d5c0a31cedb893cc1ac63c777180a6e209be0ed2..05c8c53d0c3a8e54bcfda052343156f7f0a21b1d 100644 (file)
@@ -33,7 +33,7 @@
             <input type="text" id="sort_contact_id" style="display: none" />
             <input type="hidden" name="hidden_location" value="1" />
             <input type="hidden" name="qfKey" value="{crmKey name='CRM_Contact_Controller_Search' addSequence=1}" />
-            <div style="height:1px; overflow:hidden;"><input type="submit" value="{ts}Go{/ts}" name="_qf_Advanced_refresh" class="form-submit default" /></div>
+            <div style="height:1px; overflow:hidden;"><input type="submit" value="{ts}Go{/ts}" name="_qf_Advanced_refresh" class="crm-form-submit default" /></div>
           </div>
         </form>
         <ul>
index 83edc911f51abe1fa9cf482b28826b6d95c953b2..4f56256b2d85689e6f1a7b92c9d240e46d1a2f8c 100644 (file)
@@ -48,8 +48,8 @@
     {* Controller for 'Rows Per Page' *}
     {if $location eq 'bottom' and $pager->_totalItems > 25}
      <div class="form-item float-right">
-       <label for="{$form.formName}-rows-per-page-select">{ts}Rows per page:{/ts}</label> &nbsp;
-       <input class="crm-rows-per-page-select" id="{$form.formName}-rows-per-page-select" type="text" size="3" value="{$pager->_perPage}"/>
+       <label for="{$form.formClass}-rows-per-page-select">{ts}Rows per page:{/ts}</label> &nbsp;
+       <input class="crm-rows-per-page-select" id="{$form.formClass}-rows-per-page-select" type="text" size="3" value="{$pager->_perPage}"/>
      </div>
      <div class="clear"></div>
     {/if}
@@ -60,7 +60,7 @@
         CRM.$(function($) {
           {/literal}
           var
-            $form = $('#{$form.formName}'),
+            $form = $('form.{$form.formClass}'),
             numPages = {$pager->_response.numPages},
             currentPage = {$pager->_response.currentPage},
             perPageCount = {$pager->_perPage},
                 }
               }, 200);
             })
-            .on('click', 'a.crm-pager-link, #alpha-filter a', function() {
+            // Handle sorting, paging and alpha filtering links
+            .on('click', 'a.crm-pager-link, #alpha-filter a, th a.sorting, th a.sorting_desc, th a.sorting_asc', function(e) {
               refresh($(this).attr('href'));
-              return false;
+              e.preventDefault();
             });
         });
         {/literal}
index f3ad083fa8189e84d3ad152b877128ba2dc41ab2..c1a5b8b8056fde8db98ba55f4216b6c019a55093 100644 (file)
@@ -61,10 +61,10 @@ function buildPaymentBlock( type ) {
 }
 
 CRM.$(function($) {
-    cj('.crm-group.payment_options-group').show();
+    $('.crm-group.payment_options-group').show();
 
-    cj('input[name="payment_processor"]').change( function() {
-        buildPaymentBlock( cj(this).val() );
+    $('input[name="payment_processor"]').change( function() {
+        buildPaymentBlock( $(this).val() );
     });
 });
 
index 0dac59a7c8376ebb7e8f7964965adeda26b9c9cb..a140e7199cdadd56221ae7c4265968bed1fb517b 100644 (file)
@@ -1,14 +1,12 @@
 <html>
-<head>
-<script type="text/javascript">
-  window.location.href = "{$redirectURL}"
-</script>
-<title>{$title}</title>
-</head>
-<body>
-<h2>{$title}</h2>
-<p>
-{$message}
-</p>
-</body>
+  <head>
+    <script type="text/javascript">
+      window.location.href = "{$redirectURL}"
+    </script>
+    <title>{$title}</title>
+  </head>
+  <body>
+    <h2>{$title}</h2>
+    <p>{$message}</p>
+  </body>
 </html>
index 90f7274d5842ea8475e752288f8d0d90fe1d3261..a1e0e2f18b187e8e96aa94dd55305a3985352027 100644 (file)
 <script type="text/javascript">
   {literal}
   CRM.$(function($) {
+    var $form = $('form.{/literal}{$form.formClass}{literal}');
     function chainSelect(e) {
       var info = $(this).data('chainSelect');
       var val = info.target.val();
       var multiple = info.target.attr('multiple');
       var placeholder = $(this).val() ? "{/literal}{ts escape='js'}Loading{/ts}{literal}..." : info.placeholder;
-      !multiple && info.target.html('<option value="">' + placeholder + '</option>');
+      if (multiple) {
+        info.target.html('').prop('disabled', true).crmSelect2({placeholder: placeholder});
+      }
+      else {
+        info.target.html('<option value="">' + placeholder + '</option>').prop('disabled', true).crmSelect2();
+      }
       if ($(this).val()) {
-        if (multiple) {
+        $.getJSON(info.callback, {_value: $(this).val()}, function(data) {
           var options = '';
-          $.each($(this).val(), function(index, value) {
-            $.getJSON(info.callback, {_value: value}, function(data) {
-              $.each(data, function() {
-                if (this.value) {
-                  options += '<option value="' + this.value + '">' + this.name + '</option>';
-                }
-              });
-              info.target.html(options).val(val).trigger('change');
-            });
-          });
-        }
-        else {
-          $.getJSON(info.callback, {_value: $(this).val()}, function(data) {
-            var options = '';
+          function buildOptions(data) {
             $.each(data, function() {
-              if (this.name) {
+              if (this.children) {
+                options += '<optgroup label="' + this.name + '">';
+                buildOptions(this.children);
+                options += '</optgroup>';
+              }
+              else if (this.value || !multiple) {
                 options += '<option value="' + this.value + '">' + this.name + '</option>';
               }
+              else {
+                info.target.crmSelect2({placeholder: this.name});
+              }
             });
-            info.target.html(options).val(val).trigger('change');
-          });
-        }
+          }
+          buildOptions(data);
+          info.target.html(options).val(val).prop('disabled', false).trigger('change');
+        });
+      }
+      else {
+        info.target.trigger('change');
+      }
+    }
+    function initField(selector, removePlaceholder) {
+      var $el = $(selector, $form);
+      if (removePlaceholder !== false) {
+        $el.removeAttr('placeholder');
       }
+      return $el.css('min-width', '20em').crmSelect2();
     }
     {/literal}
     {foreach from=$config->stateCountryMap item=stateCountryMap}
-      {if $stateCountryMap.country && $stateCountryMap.state_province}
-        $('select[name="{$stateCountryMap.country}"], #{$stateCountryMap.country}').data('chainSelect', {ldelim}
-          callback: CRM.url('civicrm/ajax/jqState'),
-          target: $('select[name="{$stateCountryMap.state_province}"], #{$stateCountryMap.state_province}'),
-          placeholder: "{ts escape='js'}(choose country first){/ts}"
-          {rdelim}).on('change', chainSelect);
-      {/if}
       {if $stateCountryMap.state_province && $stateCountryMap.county}
-        $('select[name="{$stateCountryMap.state_province}"], #{$stateCountryMap.state_province}').data('chainSelect', {ldelim}
+        $('select[name="{$stateCountryMap.state_province}"], select#{$stateCountryMap.state_province}', $form).data('chainSelect', {ldelim}
           callback: CRM.url('civicrm/ajax/jqCounty'),
-          target: $('select[name="{$stateCountryMap.county}"], #{$stateCountryMap.county}'),
-          placeholder: "{ts escape='js'}(choose state first){/ts}"
+          target: initField('select[name="{$stateCountryMap.county}"], #{$stateCountryMap.county}'),
+          placeholder: "{ts escape='js'}Choose state first{/ts}"
         {rdelim}).on('change',  chainSelect);
       {/if}
+      {if $stateCountryMap.country && $stateCountryMap.state_province}
+        initField('select[name="{$stateCountryMap.country}"], select#{$stateCountryMap.country}', false).data('chainSelect', {ldelim}
+          callback: CRM.url('civicrm/ajax/jqState'),
+          target: initField('select[name="{$stateCountryMap.state_province}"], #{$stateCountryMap.state_province}'),
+          placeholder: "{ts escape='js'}Choose country first{/ts}"
+        {rdelim}).on('change', chainSelect).change();
+      {/if}
     {/foreach}
     {literal}
   });
index 77abce1d26d22f884e1e7326f5efc0f6e9dca975..29b6f7e418cda73868174e33888d9886afb8f30e 100644 (file)
         <p>{ts}Click 'Upgrade Now' if you are ready to proceed. Otherwise click 'Cancel' to return to the CiviCRM home page.{/ts}</p>
         <input type="hidden" name="action" value="begin" />
         <input type="submit" value="{ts}Upgrade Now{/ts}" name="upgrade" onclick="return confirm('{ts escape="js"}Are you sure you are ready to upgrade now?{/ts}');" /> &nbsp;&nbsp;
-        <a class="button cancel form-submit" value="{ts}Cancel{/ts}" href="{$cancelURL}">{ts}Cancel{/ts}</a>
+        <a class="button cancel crm-form-submit" value="{ts}Cancel{/ts}" href="{$cancelURL}">{ts}Cancel{/ts}</a>
     </form>
   </div>
 
 {else}
     <div class="crm-container" style="margin-top: 2em; padding: 1em; background-color: #EEFFEE; border: 1px #070 solid; color: black;">
-      <p><span class="crm-status-icon success"> </span><strong>{$message}</strong></p>
       <div style="padding: 1em; background-color: rgba(255, 255, 255, 0.76);">
         <p>
           <img style="display:block; float:left; width:40px; margin-right:10px;" src="{$config->resourceBase}i/logo_lg.png">
-          {ts 1='http://civicrm.org/civicrm/profile/create?reset=1&gid=15'}This release was made possible by contributions from people like <strong>you</strong>. <a href="%1" target="_blank">Register your site</a> to join the community.{/ts}
+          {ts 1='https://civicrm.org/membership'}If you feel that CiviCRM is valuable to your organization, consider that thousands of organizations worldwide also feel the same way. Protect your investment, and theirs, by <a href="%1" target="_blank">ensuring that CiviCRM remains stable, sustainable and consistently improving through membership</a>. ~Donald Lobo {/ts}
         </p>
         <p>
-          {ts 1='http://civicrm.org/contribute' 2='http://civicrm.org/make-it-happen'}If CiviCRM is useful to your organization, consider making a <a href="%1" target="_blank">monthly contribution</a>, or helping to <a href="%2" target="_blank">fund a proposed improvement</a>.{/ts}
+          {ts 1='https://civicrm.org/register-site'}Not ready for a membership yet? You can still help us learn how to improve CiviCRM by <a href="%1" target="_blank">registering your site</a>.{/ts}
         </p>
       </div>
+      <p><span class="crm-status-icon success"> </span><strong>{$message}</strong></p>
       {if $afterUpgradeMessage}
         <h3>{ts}Important Notes{/ts}</h3>
         <p>{$afterUpgradeMessage}</p>
index f3e195f2723ee7849d955b1cffc422a73cb7e262..d0e7907dbd7f2eefd1b56c47b952b204f80215fd 100644 (file)
@@ -67,7 +67,7 @@ class test_extension_manager_searchtest extends CRM_Contact_Form_Search_Custom_B
   function &columns() {
     // return by reference
     $columns = array(
-      ts('Contact Id') => 'contact_id',
+      ts('Contact ID') => 'contact_id',
       ts('Contact Type') => 'contact_type',
       ts('Name') => 'sort_name',
       ts('State') => 'state_province',
index 41c767ff13fb11aca25105aca82de3950f315aa4..98886b59e167c1ba86297481e0dfc32ba7e6a662 100644 (file)
@@ -285,7 +285,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
   function testGetActivitiesCountforAdminDashboard() {
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/activities_for_dashboard_count.xml'
       )
     );
@@ -314,7 +314,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
   function testGetActivitiesCountforNonAdminDashboard() {
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/activities_for_dashboard_count.xml'
       )
     );
@@ -344,7 +344,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
   function testGetActivitiesCountforContactSummary() {
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/activities_for_dashboard_count.xml'
       )
     );
@@ -373,7 +373,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
   function testGetActivitiesCountforContactSummaryWithNoActivities() {
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/activities_for_dashboard_count.xml'
       )
     );
@@ -401,7 +401,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
   function testGetActivitiesforAdminDashboard() {
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/activities_for_dashboard_count.xml'
       )
     );
@@ -436,7 +436,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
   function testGetActivitiesforNonAdminDashboard() {
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/activities_for_dashboard_count.xml'
       )
     );
@@ -479,7 +479,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
   function testGetActivitiesforContactSummary() {
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/activities_for_dashboard_count.xml'
       )
     );
@@ -534,7 +534,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
   function testGetActivitiesforContactSummaryWithNoActivities() {
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/activities_for_dashboard_count.xml'
       )
     );
index a76ac9e2443bb57e72141c64d550517ece844f91..bb7c03d165008857dea4fdf96fe9c91040294d51 100644 (file)
@@ -19,11 +19,33 @@ class CRM_Case_BAO_CaseTest extends CiviUnitTestCase {
   function setUp() {
     parent::setUp();
 
+    $this->tablesToTruncate = array(
+      'civicrm_activity',
+      'civicrm_contact',
+      'civicrm_custom_group',
+      'civicrm_custom_field',
+      'civicrm_case',
+      'civicrm_case_contact',
+      'civicrm_case_activity',
+      'civicrm_case_type',
+      'civicrm_activity_contact',
+      'civicrm_managed',
+      'civicrm_relationship',
+      'civicrm_relationship_type',
+    );
+
+    $this->quickCleanup($this->tablesToTruncate);
+
     $this->loadAllFixtures();
 
     CRM_Core_BAO_ConfigSetting::enableComponent('CiviCase');
   }
 
+  protected function tearDown() {
+    parent::tearDown();
+    $this->quickCleanup($this->tablesToTruncate, TRUE);
+  }
+
   function testAddCaseToContact() {
     $params = array(
       'case_id' => 1,
diff --git a/tests/phpunit/CRM/Case/BAO/CaseTypeForkTest.php b/tests/phpunit/CRM/Case/BAO/CaseTypeForkTest.php
new file mode 100644 (file)
index 0000000..170a428
--- /dev/null
@@ -0,0 +1,99 @@
+<?php
+
+require_once 'CiviTest/CiviCaseTestCase.php';
+
+/**
+ * Case Types support an optional forking mechanism wherein the local admin
+ * creates a custom DB-based definition that deviates from the file-based definition.
+ */
+class CRM_Case_BAO_CaseTypeForkTest extends CiviCaseTestCase {
+  public function setUp() {
+    parent::setUp();
+    CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
+  }
+
+  function tearDown() {
+    parent::tearDown();
+    CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
+  }
+
+
+  /**
+   * Edit the definition of ForkableCaseType
+   */
+  function testForkable() {
+    $caseTypeId = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_CaseType', 'ForkableCaseType', 'id', 'name');
+    $this->assertTrue(is_numeric($caseTypeId) && $caseTypeId > 0);
+
+    $this->assertDBNull('CRM_Case_BAO_CaseType', $caseTypeId, 'definition', 'id', "Should not have DB-based definition");
+    $this->assertTrue(CRM_Case_BAO_CaseType::isForkable($caseTypeId));
+    $this->assertFalse(CRM_Case_BAO_CaseType::isForked($caseTypeId));
+
+    $this->callAPISuccess('CaseType', 'create', array(
+      'id' => $caseTypeId,
+      'definition' => array(
+        'activityTypes' => array(
+          array('name' => 'First act'),
+          array('name' => 'Second act'),
+        ),
+      )
+    ));
+
+    $this->assertTrue(CRM_Case_BAO_CaseType::isForkable($caseTypeId));
+    $this->assertTrue(CRM_Case_BAO_CaseType::isForked($caseTypeId));
+    $this->assertDBNotNull('CRM_Case_BAO_CaseType', $caseTypeId, 'definition', 'id', "Should not have DB-based definition");
+
+    $this->callAPISuccess('CaseType', 'create', array(
+      'id' => $caseTypeId,
+      'definition' => 'null',
+    ));
+
+    $this->assertDBNull('CRM_Case_BAO_CaseType', $caseTypeId, 'definition', 'id', "Should not have DB-based definition");
+    $this->assertTrue(CRM_Case_BAO_CaseType::isForkable($caseTypeId));
+    $this->assertFalse(CRM_Case_BAO_CaseType::isForked($caseTypeId));
+  }
+
+  /**
+   * Attempt to edit the definition of UnforkableCaseType. This fails.
+   */
+  function testUnforkable() {
+    $caseTypeId = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_CaseType', 'UnforkableCaseType', 'id', 'name');
+    $this->assertTrue(is_numeric($caseTypeId) && $caseTypeId > 0);
+    $this->assertDBNull('CRM_Case_BAO_CaseType', $caseTypeId, 'definition', 'id', "Should not have DB-based definition");
+
+    $this->assertFalse(CRM_Case_BAO_CaseType::isForkable($caseTypeId));
+    $this->assertFalse(CRM_Case_BAO_CaseType::isForked($caseTypeId));
+
+    $this->callAPISuccess('CaseType', 'create', array(
+      'id' => $caseTypeId,
+      'definition' => array(
+        'activityTypes' => array(
+          array('name' => 'First act'),
+          array('name' => 'Second act'),
+        ),
+      )
+    ));
+
+    $this->assertFalse(CRM_Case_BAO_CaseType::isForkable($caseTypeId));
+    $this->assertFalse(CRM_Case_BAO_CaseType::isForked($caseTypeId));
+    $this->assertDBNull('CRM_Case_BAO_CaseType', $caseTypeId, 'definition', 'id', "Should not have DB-based definition");
+  }
+
+  /**
+   * @param $caseTypes
+   * @see \CRM_Utils_Hook::caseTypes
+   */
+  function hook_caseTypes(&$caseTypes) {
+    $caseTypes['ForkableCaseType'] = array(
+      'module' => 'civicrm',
+      'name' => 'ForkableCaseType',
+      'file' => __DIR__ . '/ForkableCaseType.xml',
+    );
+    $caseTypes['UnforkableCaseType'] = array(
+      'module' => 'civicrm',
+      'name' => 'UnforkableCaseType',
+      'file' => __DIR__ . '/UnforkableCaseType.xml',
+    );
+  }
+
+}
\ No newline at end of file
index aceffd46903b5879ba9e22dc1454b1803538020f..ebccffad527882778bef2a9d754bd5b44bab5282 100644 (file)
@@ -182,12 +182,38 @@ class CRM_Case_BAO_CaseTypeTest extends CiviUnitTestCase {
       ',
     );
 
+    $fixtures['forkable-0'] = array(
+      'json' => json_encode(array(
+        'forkable' => 0,
+      )),
+      'xml' => '<?xml version="1.0" encoding="iso-8859-1" ?>
+<CaseType>
+  <name>Housing Support</name>
+  <forkable>0</forkable>
+</CaseType>
+      ',
+    );
+
+    $fixtures['forkable-1'] = array(
+      'json' => json_encode(array(
+        'forkable' => 1,
+      )),
+      'xml' => '<?xml version="1.0" encoding="iso-8859-1" ?>
+<CaseType>
+  <name>Housing Support</name>
+  <forkable>1</forkable>
+</CaseType>
+      ',
+    );
+
     $cases = array();
     foreach (array(
                'empty-defn',
                'empty-lists',
                'one-item-in-each',
                'two-items-in-each',
+               'forkable-0',
+               'forkable-1',
              ) as $key) {
       $cases[] = array($key, $fixtures[$key]['json'], $fixtures[$key]['xml']);
     }
diff --git a/tests/phpunit/CRM/Case/BAO/ForkableCaseType.xml b/tests/phpunit/CRM/Case/BAO/ForkableCaseType.xml
new file mode 100644 (file)
index 0000000..8a60080
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+
+<CaseType>
+  <name>Forkable Case Type</name>
+  <ActivityTypes>
+    <ActivityType>
+      <name>Open Case</name>
+      <max_instances>1</max_instances>
+    </ActivityType>
+    <ActivityType>
+      <name>Change Case Type</name>
+    </ActivityType>
+    <ActivityType>
+      <name>Change Case Status</name>
+    </ActivityType>
+    <ActivityType>
+      <name>Change Case Start Date</name>
+    </ActivityType>
+    <ActivityType>
+      <name>Link Cases</name>
+    </ActivityType>
+  </ActivityTypes>
+  <ActivitySets>
+    <ActivitySet>
+      <name>standard_timeline</name>
+      <label>Standard Timeline</label>
+      <timeline>true</timeline>
+      <ActivityTypes>
+        <ActivityType>
+          <name>Open Case</name>
+          <status>Completed</status>
+        </ActivityType>
+      </ActivityTypes>
+    </ActivitySet>
+  </ActivitySets>
+  <CaseRoles>
+    <RelationshipType>
+        <name>Homeless Services Coordinator</name>
+        <creator>1</creator>
+        <manager>1</manager>
+    </RelationshipType>
+ </CaseRoles>
+</CaseType>
diff --git a/tests/phpunit/CRM/Case/BAO/UnforkableCaseType.xml b/tests/phpunit/CRM/Case/BAO/UnforkableCaseType.xml
new file mode 100644 (file)
index 0000000..9395ceb
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+
+<CaseType>
+  <name>Unforkable Case Type</name>
+  <forkable>0</forkable>
+  <ActivityTypes>
+    <ActivityType>
+      <name>Open Case</name>
+      <max_instances>1</max_instances>
+    </ActivityType>
+    <ActivityType>
+      <name>Change Case Type</name>
+    </ActivityType>
+    <ActivityType>
+      <name>Change Case Status</name>
+    </ActivityType>
+    <ActivityType>
+      <name>Change Case Start Date</name>
+    </ActivityType>
+    <ActivityType>
+      <name>Link Cases</name>
+    </ActivityType>
+  </ActivityTypes>
+  <ActivitySets>
+    <ActivitySet>
+      <name>standard_timeline</name>
+      <label>Standard Timeline</label>
+      <timeline>true</timeline>
+      <ActivityTypes>
+        <ActivityType>
+          <name>Open Case</name>
+          <status>Completed</status>
+        </ActivityType>
+      </ActivityTypes>
+    </ActivitySet>
+  </ActivitySets>
+  <CaseRoles>
+    <RelationshipType>
+        <name>Homeless Services Coordinator</name>
+        <creator>1</creator>
+        <manager>1</manager>
+    </RelationshipType>
+ </CaseRoles>
+</CaseType>
index 5899e68a3ddfbd0c4d81ff837bd403429107bb20..03e32efc076af3947e0b9528877432eb0bf57590 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Contact_BAO_QueryTest extends CiviUnitTestCase {
   function testSearch($fv, $count, $ids, $full) {
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/queryDataset.xml'
       )
     );
diff --git a/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/1854_pre44_membership_type.sql b/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/1854_pre44_membership_type.sql
new file mode 100644 (file)
index 0000000..06dcfe0
--- /dev/null
@@ -0,0 +1,10 @@
+#membership search from smart builder created before 4.4
+INSERT INTO `civicrm_mapping` (`id`, `name`, `description`, `mapping_type_id`) VALUES (554, NULL, NULL, NULL);
+INSERT INTO `civicrm_mapping_field` (`id`, `mapping_id`, `name`, `contact_type`, `column_number`, `location_type_id`, `phone_type_id`, `im_provider_id`, `website_type_id`, `relationship_type_id`, `relationship_direction`, `grouping`, `operator`, `value`) VALUES (13338, 554, 'street_address', 'Individual', 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, '', '');
+INSERT INTO `civicrm_mapping_field` (`id`, `mapping_id`, `name`, `contact_type`, `column_number`, `location_type_id`, `phone_type_id`, `im_provider_id`, `website_type_id`, `relationship_type_id`, `relationship_direction`, `grouping`, `operator`, `value`) VALUES (13339, 554, 'state_province', 'Individual', 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '=', 'Maine');
+INSERT INTO `civicrm_mapping_field` (`id`, `mapping_id`, `name`, `contact_type`, `column_number`, `location_type_id`, `phone_type_id`, `im_provider_id`, `website_type_id`, `relationship_type_id`, `relationship_direction`, `grouping`, `operator`, `value`) VALUES (13340, 554, 'membership_status', 'Membership', 2, NULL, NULL, NULL, NULL, NULL, NULL, 1, '=', 'Current');
+INSERT INTO `civicrm_saved_search` (`id`, `form_values`, `mapping_id`, `search_custom_id`, `where_clause`, `select_tables`, `where_tables`) VALUES (794, 'a:8:{s:5:"qfKey";s:37:"a2a8452a4e966a5a8ec245264a5c4b5b_9671";s:6:"mapper";a:2:{i:1;a:3:{i:0;a:3:{i:0;s:10:"Individual";i:1;s:14:"street_address";i:2;s:1:" ";}i:1;a:3:{i:0;s:10:"Individual";i:1;s:14:"state_province";i:2;s:1:" ";}i:2;a:2:{i:0;s:10:"Membership";i:1;s:17:"membership_status";}}i:2;a:1:{i:0;a:1:{i:0;s:0:"";}}}s:8:"operator";a:2:{i:1;a:3:{i:0;s:7:"IS NULL";i:1;s:1:"=";i:2;s:1:"=";}i:2;a:1:{i:0;s:0:"";}}s:5:"value";a:2:{i:1;a:3:{i:0;s:0:"";i:1;s:5:"Maine";i:2;s:7:"Current";}i:2;a:1:{i:0;s:0:"";}}s:4:"task";s:2:"13";s:8:"radio_ts";s:6:"ts_all";s:11:"uf_group_id";s:0:"";s:14:"component_mode";i:1;}', 554, NULL, ' (  (  (civicrm_address.street_address IS NULL  ) AND civicrm_state_province.name IN (\'Maine\') AND LOWER(civicrm_membership_status.name) = \'current\' AND contact_a.contact_type IN (\'Individual\') )  ) ', 'a:13:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:18:"civicrm_membership";i:1;s:25:"civicrm_membership_status";i:1;s:6:"gender";i:1;s:17:"individual_prefix";i:1;s:17:"individual_suffix";i:1;}', 'a:5:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:18:"civicrm_membership";i:1;s:25:"civicrm_membership_status";i:1;}');
+INSERT INTO `civicrm_group` (`id`, `name`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `refresh_date`, `parents`, `children`, `is_hidden`, `is_reserved`, `created_id`, `modified_id`) VALUES (1854, 'Maine__Members_with_no_addre_1854', 'Maine - Members with no address', NULL, NULL, 794, 1, 'User and User Admin Only', ' ( `civicrm_group_contact_cache_1854`.group_id = 1854 ) ', 'a:12:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:34:"`civicrm_group_contact_cache_1854`";s:138:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_1854` ON contact_a.id = `civicrm_group_contact_cache_1854`.contact_id ";s:6:"gender";i:1;s:17:"individual_prefix";i:1;s:17:"individual_suffix";i:1;}', 'a:2:{s:15:"civicrm_contact";i:1;s:34:"`civicrm_group_contact_cache_1854`";s:138:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_1854` ON contact_a.id = `civicrm_group_contact_cache_1854`.contact_id ";}', '\ 12\ 1', NULL, NULL, NULL, NULL, 0, 0, NULL, NULL);
+
+
+
index 1af3b27206eebf7f08fa29b1fbcac68846619678..0bf7faa9cf3f8e13a1367110373058376ab17634 100644 (file)
@@ -101,7 +101,7 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase {
     // echo "testCount\n";
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/dataset.xml'
       )
     );
@@ -132,7 +132,7 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase {
     // echo "testAll\n";
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/dataset.xml'
       )
     );
@@ -163,7 +163,7 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase {
     // echo "testContactIDs\n";
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/dataset.xml'
       )
     );
index f3a45feb5d55325c05449ce7e654aba601605161..22735a36d8a4db8a2ec5ea1b3dfaa3dd13df81f7 100644 (file)
@@ -69,7 +69,7 @@ class CRM_Core_BAO_IMTest extends CiviUnitTestCase {
     $op = new PHPUnit_Extensions_Database_Operation_Insert;
     $op->execute(
       $this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(dirname(__FILE__) . '/dataset/im_test.xml')
+      $this->createFlatXMLDataSet(dirname(__FILE__) . '/dataset/im_test.xml')
     );
 
     $contactId = 69;
diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php
deleted file mode 100644 (file)
index e69de29..0000000
index 72b38be28e4842c4c0a122e804c6643610cb8a76..6a4c24bbafc50c3d53ebef25df08d5956392b7a4 100644 (file)
@@ -53,7 +53,7 @@ class CRM_Mailing_BAO_QueryTest extends CiviUnitTestCase {
   function testSearch($fv, $count, $ids, $full) {
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/queryDataset.xml'
       )
     );
index 0c59467321cd57419754e3c96bbcf17cc33060d5..d6db032709f2ae665abb2fdb2c367cd99ccc83a8 100644 (file)
@@ -199,7 +199,7 @@ class CRM_Member_Form_MembershipTest extends CiviUnitTestCase {
     //  Insert test data
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/dataset/data.xml'
       )
     );
index 6405ce5cea1f216d09d6118f6ad03fcecc683bb8..b9f2236a2a990f854be3834876162d397e2f3b47 100644 (file)
@@ -50,12 +50,12 @@ class CRM_Utils_DeprecatedUtilsTest extends CiviUnitTestCase {
     //  Insert a row in civicrm_contact creating individual contact
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-        new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+        $this->createXMLDataSet(
             dirname(__FILE__) . '/../../api/v3/dataset/contact_17.xml'
         )
     );
     $op->execute($this->_dbconn,
-        new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+        $this->createXMLDataSet(
             dirname(__FILE__) . '/../../api/v3/dataset/email_contact_17.xml'
         )
     );
@@ -82,12 +82,12 @@ class CRM_Utils_DeprecatedUtilsTest extends CiviUnitTestCase {
     //  Insert a row in civicrm_contact creating individual contact
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-        new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+        $this->createXMLDataSet(
             dirname(__FILE__) . '/../../api/v3/dataset/contact_17.xml'
         )
     );
     $op->execute($this->_dbconn,
-        new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+        $this->createXMLDataSet(
             dirname(__FILE__) . '/../../api/v3/dataset/email_contact_17.xml'
         )
     );
index bfb6df2a31e9a6716321863a2cec94abf7057705..157759bf9ee594bb8aa7d2ac57571642fee26887 100644 (file)
@@ -23,69 +23,70 @@ class SequenceListenerTest extends \CiviCaseTestCase {
     $case = $this->callAPISuccess('case', 'create', $this->_params);
 
     $analyzer = new \Civi\CCase\Analyzer($case['id']);
-    $this->assertEquals($caseStatuses['Open'], $analyzer->getCase()['status_id']);
-    $this->assertApproxTime('2013-11-30 01:00:00', $analyzer->getSingleActivity('Medical evaluation')['activity_date_time']);
-    $this->assertEquals($actStatuses['Scheduled'], $analyzer->getSingleActivity('Medical evaluation')['status_id']);
+    $this->assertEquals($caseStatuses['Open'], self::ag($analyzer->getCase(), 'status_id'));
+    $this->assertApproxTime('2013-11-30 01:00:00', self::ag($analyzer->getSingleActivity('Medical evaluation'), 'activity_date_time'));
+    $this->assertEquals($actStatuses['Scheduled'], self::ag($analyzer->getSingleActivity('Medical evaluation'), 'status_id'));
     $this->assertFalse($analyzer->hasActivity('Mental health evaluation'));
     $this->assertFalse($analyzer->hasActivity('Secure temporary housing'));
 
     // Edit details of first activity -- but don't finish it yet!
     \CRM_Utils_Time::setTime('2013-11-30 01:30:00');
     $this->callApiSuccess('Activity', 'create', array(
-      'id' => $analyzer->getSingleActivity('Medical evaluation')['id'],
+      'id' => self::ag($analyzer->getSingleActivity('Medical evaluation'), 'id'),
       'subject' => 'This is the new subject',
     ));
 
     $analyzer = new \Civi\CCase\Analyzer($case['id']);
-    $this->assertEquals($caseStatuses['Open'], $analyzer->getCase()['status_id']);
-    $this->assertApproxTime('2013-11-30 01:00:00', $analyzer->getSingleActivity('Medical evaluation')['activity_date_time']);
-    $this->assertEquals($actStatuses['Scheduled'], $analyzer->getSingleActivity('Medical evaluation')['status_id']);
+    $this->assertEquals($caseStatuses['Open'], self::ag($analyzer->getCase(), 'status_id'));
+    $this->assertApproxTime('2013-11-30 01:00:00', self::ag($analyzer->getSingleActivity('Medical evaluation'), 'activity_date_time'));
+    $this->assertEquals($actStatuses['Scheduled'], self::ag($analyzer->getSingleActivity('Medical evaluation'), 'status_id'));
     $this->assertFalse($analyzer->hasActivity('Mental health evaluation'));
     $this->assertFalse($analyzer->hasActivity('Secure temporary housing'));
 
     // Complete first activity; schedule second
     \CRM_Utils_Time::setTime('2013-11-30 02:00:00');
     $this->callApiSuccess('Activity', 'create', array(
-      'id' => $analyzer->getSingleActivity('Medical evaluation')['id'],
+      'id' => self::ag($analyzer->getSingleActivity('Medical evaluation'), 'id'),
       'status_id' => $actStatuses['Completed'],
     ));
     $analyzer->flush();
-    $this->assertEquals($caseStatuses['Open'], $analyzer->getCase()['status_id']);
-    $this->assertApproxTime('2013-11-30 01:00:00', $analyzer->getSingleActivity('Medical evaluation')['activity_date_time']);
-    $this->assertEquals($actStatuses['Completed'], $analyzer->getSingleActivity('Medical evaluation')['status_id']);
-    $this->assertApproxTime('2013-11-30 02:00:00', $analyzer->getSingleActivity('Mental health evaluation')['activity_date_time']);
-    $this->assertEquals($actStatuses['Scheduled'], $analyzer->getSingleActivity('Mental health evaluation')['status_id']);
+    $this->assertEquals($caseStatuses['Open'], self::ag($analyzer->getCase(), 'status_id'));
+    $this->assertApproxTime('2013-11-30 01:00:00', self::ag($analyzer->getSingleActivity('Medical evaluation'), 'activity_date_time'));
+    $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Medical evaluation'), 'status_id'));
+    $this->assertApproxTime('2013-11-30 02:00:00', self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'activity_date_time'));
+    $this->assertEquals($actStatuses['Scheduled'], self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'status_id'));
     $this->assertFalse($analyzer->hasActivity('Secure temporary housing'));
 
     // Complete second activity; schedule third
     \CRM_Utils_Time::setTime('2013-11-30 03:00:00');
     $this->callApiSuccess('Activity', 'create', array(
-      'id' => $analyzer->getSingleActivity('Mental health evaluation')['id'],
+      'id' => self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'id'),
       'status_id' => $actStatuses['Completed'],
     ));
     $analyzer->flush();
-    $this->assertEquals($caseStatuses['Open'], $analyzer->getCase()['status_id']);
-    $this->assertApproxTime('2013-11-30 01:00:00', $analyzer->getSingleActivity('Medical evaluation')['activity_date_time']);
-    $this->assertEquals($actStatuses['Completed'], $analyzer->getSingleActivity('Medical evaluation')['status_id']);
-    $this->assertApproxTime('2013-11-30 02:00:00', $analyzer->getSingleActivity('Mental health evaluation')['activity_date_time']);
-    $this->assertEquals($actStatuses['Completed'], $analyzer->getSingleActivity('Mental health evaluation')['status_id']);
-    $this->assertApproxTime('2013-11-30 03:00:00', $analyzer->getSingleActivity('Secure temporary housing')['activity_date_time']);
-    $this->assertEquals($actStatuses['Scheduled'], $analyzer->getSingleActivity('Secure temporary housing')['status_id']);
+    $this->assertEquals($caseStatuses['Open'], self::ag($analyzer->getCase(), 'status_id'));
+    $this->assertApproxTime('2013-11-30 01:00:00', self::ag($analyzer->getSingleActivity('Medical evaluation'), 'activity_date_time'));
+    $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Medical evaluation'), 'status_id'));
+    $this->assertApproxTime('2013-11-30 02:00:00', self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'activity_date_time'));
+    $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'status_id'));
+    $this->assertApproxTime('2013-11-30 03:00:00', self::ag($analyzer->getSingleActivity('Secure temporary housing'), 'activity_date_time'));
+    $this->assertEquals($actStatuses['Scheduled'], self::ag($analyzer->getSingleActivity('Secure temporary housing'), 'status_id'));
 
     // Complete third activity; close case
     \CRM_Utils_Time::setTime('2013-11-30 04:00:00');
     $this->callApiSuccess('Activity', 'create', array(
-      'id' => $analyzer->getSingleActivity('Secure temporary housing')['id'],
+      'id' => self::ag($analyzer->getSingleActivity('Secure temporary housing'), 'id'),
       'status_id' => $actStatuses['Completed'],
     ));
     $analyzer->flush();
-    $this->assertApproxTime('2013-11-30 01:00:00', $analyzer->getSingleActivity('Medical evaluation')['activity_date_time']);
-    $this->assertEquals($actStatuses['Completed'], $analyzer->getSingleActivity('Medical evaluation')['status_id']);
-    $this->assertApproxTime('2013-11-30 02:00:00', $analyzer->getSingleActivity('Mental health evaluation')['activity_date_time']);
-    $this->assertEquals($actStatuses['Completed'], $analyzer->getSingleActivity('Mental health evaluation')['status_id']);
-    $this->assertApproxTime('2013-11-30 03:00:00', $analyzer->getSingleActivity('Secure temporary housing')['activity_date_time']);
-    $this->assertEquals($actStatuses['Completed'], $analyzer->getSingleActivity('Secure temporary housing')['status_id']);
-    $this->assertEquals($caseStatuses['Closed'], $analyzer->getCase()['status_id']);
+    $this->assertApproxTime('2013-11-30 01:00:00', self::ag($analyzer->getSingleActivity('Medical evaluation'), 'activity_date_time'));
+    $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Medical evaluation'), 'status_id'));
+    $this->assertApproxTime('2013-11-30 02:00:00', self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'activity_date_time'));
+    $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'status_id'));
+    $this->assertApproxTime('2013-11-30 03:00:00', self::ag($analyzer->getSingleActivity('Secure temporary housing'), 'activity_date_time'));
+    $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Secure temporary housing'), 'status_id'));
+    $this->assertEquals($caseStatuses['Closed'], self::ag($analyzer->getCase(), 'status_id'));
+    // */
   }
 
   /**
@@ -106,4 +107,15 @@ class SequenceListenerTest extends \CiviCaseTestCase {
       $expected, $actual, $tolerance
     ));
   }
+
+  /**
+   * Get a value from an array. This is syntactic-sugar to work-around PHP 5.3's limited syntax.
+   *
+   * @param $array
+   * @param $key
+   * @return mixed
+   */
+  static function ag($array, $key) {
+    return $array[$key];
+  }
 }
\ No newline at end of file
index 9fe873a62a11f26903f30083eaff44f612d6e10c..07eb0bf6bd92c2ea9e1d8964124c62bb416d01b1 100644 (file)
@@ -52,6 +52,7 @@ class CiviCaseTestCase extends CiviUnitTestCase {
     $hooks = \CRM_Utils_Hook::singleton();
     $hooks->setHook('civicrm_caseTypes', array($this, 'hook_caseTypes'));
     \CRM_Case_XMLRepository::singleton(TRUE);
+    \CRM_Case_XMLProcessor::flushStaticCaches();
 
     // CRM-9404 - set-up is a bit cumbersome but had to put something in place to set up activity types & case types
     //. Using XML was causing breakage as id numbers were changing over time
index a8f3853ccb808620629d5c52d899e7d9fd662f1f..800e2ebe1f4fcb671b141587573f809c86f94a3c 100644 (file)
@@ -25,8 +25,6 @@
  +--------------------------------------------------------------------+
 */
 
-require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
-
 /**
  *  Include configuration
  */
index c482511a1ae7391f88ff922a3b0c7546d45ad5ac..deb4d67c4975b7f1bd0c9b3d8aeed22ae27a0220 100644 (file)
@@ -39,11 +39,6 @@ require_once CIVICRM_SETTINGS_PATH;
 /**
  *  Include class definitions
  */
-require_once 'PHPUnit/Extensions/Database/TestCase.php';
-require_once 'PHPUnit/Framework/TestResult.php';
-require_once 'PHPUnit/Extensions/Database/DataSet/FlatXmlDataSet.php';
-require_once 'PHPUnit/Extensions/Database/DataSet/XmlDataSet.php';
-require_once 'PHPUnit/Extensions/Database/DataSet/QueryDataSet.php';
 require_once 'tests/phpunit/Utils.php';
 require_once 'api/api.php';
 require_once 'CRM/Financial/BAO/FinancialType.php';
@@ -391,7 +386,7 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
     $xmlFiles = glob($fixturesDir . '/*.xml');
     foreach ($xmlFiles as $xmlFixture) {
       $op = new PHPUnit_Extensions_Database_Operation_Insert();
-      $dataset = new PHPUnit_Extensions_Database_DataSet_XMLDataSet($xmlFixture);
+      $dataset = $this->createXMLDataSet($xmlFixture);
       $this->_tablesToTruncate = array_merge($this->_tablesToTruncate, $dataset->getTableNames());
       $op->execute($this->_dbconn, $dataset);
     }
@@ -438,6 +433,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
    */
   protected function tearDown() {
     error_reporting(E_ALL & ~E_NOTICE);
+    $session = CRM_Core_Session::singleton();
+    $session->set('userID', NULL);
     $tablesToTruncate = array('civicrm_contact');
     $this->quickCleanup($tablesToTruncate);
     $this->cleanTempDirs();
@@ -1054,7 +1051,6 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
       $params[$key] = $values[$seq % sizeof($values)];
     }
     if ($contact_type == 'Individual' ) {
-        $employer = $this->sampleContact('Organization', $seq);
         $params['email'] = strtolower(
           $params['first_name'] . '_' . $params['last_name'] . '@civicrm.org'
         );
@@ -2809,6 +2805,7 @@ AND    ( TABLE_NAME LIKE 'civicrm_value_%' )
   function setupACL() {
     global $_REQUEST;
     $_REQUEST = $this->_params;
+    
     CRM_Core_Config::singleton()->userPermissionClass->permissions = array('access CiviCRM');
     $optionGroupID = $this->callAPISuccessGetValue('option_group', array('return' => 'id', 'name' => 'acl_role'));
     $optionValue = $this->callAPISuccess('option_value', 'create', array('option_group_id' => $optionGroupID,
@@ -2880,7 +2877,6 @@ AND    ( TABLE_NAME LIKE 'civicrm_value_%' )
     $this->callAPISuccess('price_field_value', 'create', $priceFieldValue);
     $this->callAPISuccess('price_field_value', 'create', $priceFieldValue);
     $this->callAPISuccess('price_field_value', 'create', array_merge($priceFieldValue, array('price_field_id' => $newPriceField['id'])));
-
   }
 
 /**
diff --git a/tests/phpunit/CiviTest/bootstrap.php b/tests/phpunit/CiviTest/bootstrap.php
new file mode 100644 (file)
index 0000000..f32f6a4
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+// ADAPTED FROM tools/scripts/phpunit
+
+$GLOBALS['base_dir'] = dirname(dirname(dirname(__DIR__)));
+$tests_dir = $GLOBALS['base_dir']  . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'phpunit';
+$civi_pkgs_dir = $GLOBALS['base_dir'] .   DIRECTORY_SEPARATOR . 'packages';
+ini_set('safe_mode', 0);
+ini_set('include_path',
+        "{$GLOBALS['base_dir']}" . PATH_SEPARATOR .
+        "$tests_dir"            . PATH_SEPARATOR .
+        "$civi_pkgs_dir"        . PATH_SEPARATOR
+        . ini_get( 'include_path') );
+
+#  Relying on system timezone setting produces a warning,
+#  doing the following prevents the warning message
+if ( file_exists( '/etc/timezone' ) ) {
+    $timezone = trim( file_get_contents( '/etc/timezone' ) );
+    if ( ini_set('date.timezone', $timezone ) === false ) {
+        echo "ini_set( 'date.timezone', '$timezone' ) failed\n";
+    }
+}
+
+# Crank up the memory
+ini_set('memory_limit', '2G');
+
+require_once $GLOBALS['base_dir'] . '/packages/vendor/autoload.php';
+
+/*
+require $GLOBALS['base_dir'] . DIRECTORY_SEPARATOR .
+        'packages' . DIRECTORY_SEPARATOR .
+        'PHPUnit' . DIRECTORY_SEPARATOR .
+        'Autoload.php';
+*/
\ No newline at end of file
diff --git a/tests/phpunit/EnvTests.php b/tests/phpunit/EnvTests.php
new file mode 100644 (file)
index 0000000..cd44c65
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * The EnvTests suite allows you to specify an arbitrary mix of tests
+ * using an environment variable. For example:
+ *
+ * env PHPUNIT_TESTS="MyFirstTest MySecondTest" phpunit EnvTests
+ *
+ * The PHPUNIT_TESTS variable contains a space-delimited list of test
+ * names. Each name may be a class (eg "MyFirstTest") or a method
+ * (eg "MyFirstTest::testFoo").
+ */
+class EnvTests extends \PHPUnit_Framework_TestSuite {
+  public static function suite() {
+    require_once 'CRM/Core/ClassLoader.php';
+    CRM_Core_ClassLoader::singleton()->register();
+
+    $suite = new EnvTests();
+    $tests = getenv('PHPUNIT_TESTS');
+    foreach (explode(' ', $tests) as $test) {
+      if (strpos($test, '::') !== FALSE) {
+        list ($class, $method) = explode('::', $test);
+        $clazz = new \ReflectionClass($class);
+        $suite->addTestMethod($clazz, $clazz->getMethod($method));
+      } else {
+        $suite->addTestSuite($test);
+      }
+    }
+    return $suite;
+  }
+}
\ No newline at end of file
index da36fe97ae8d6b8bd3c34dde5b622c3330b73f70..ce0aaf7db4f20876541d946df7d5f6d1f887ddf0 100644 (file)
@@ -39,8 +39,6 @@
  * UR DOIN IT RIGHT!
  */
 
-require_once 'PHPUnit/Framework/TestCase.php';
-
 /**
  * Class HelloTest
  */
index 432da5c1be87d11fc7ac3487ebbe29ee656a71b7..b88c3c1b8e77960ef3f6f0af95841c8474caece8 100644 (file)
@@ -86,6 +86,109 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase {
     $this->_testAddNewActivity($firstName, $subject, $customGroupTitle, $contactName);
   }
 
+  function testLinkCases() {
+    $this->webtestLogin();
+
+    //Add Case 1
+    $this->openCiviPage('case/add', 'reset=1&action=add&atype=13&context=standalone', '_qf_Case_upload-bottom');
+
+    // Adding contact with randomized first name (so we can then select that contact when creating case)
+    // We're using pop-up New Contact dialog
+    $firstName = substr(sha1(rand()), 0, 7);
+    $lastName = "Fraser";
+    $contactName = "{$lastName}, {$firstName}";
+    $displayName = "{$firstName} {$lastName}";
+    $email = "{$lastName}.{$firstName}@example.org";
+    $this->webtestNewDialogContact($firstName, $lastName, $email, $type = 4, "s2id_client_id");
+
+    // Fill in other form values. We'll use a case type which is included in CiviCase sample data / xml files.
+    $caseTypeLabel = "Adult Day Care Referral";
+    $subject = "Safe daytime setting - senior female";
+    $this->select('medium_id', 'value=1');
+    $this->type('activity_location', 'Main offices');
+    $details = "65 year old female needs safe location during the day for herself and her dog. She is in good health but somewhat disoriented.";
+    $this->fillRichTextField("activity_details", $details, 'CKEditor');
+    $this->type('activity_subject', $subject);
+
+    $this->select('case_type_id', "label={$caseTypeLabel}");
+
+    // Choose Case Start Date.
+    // Using helper webtestFillDate function.
+    $this->webtestFillDate('start_date', 'now');
+    $today = date('F jS, Y', strtotime('now'));
+
+    $this->type('duration', "20");
+    $this->clickLink('_qf_Case_upload-bottom', '_qf_CaseView_cancel-bottom', FALSE);
+
+    // Is status message correct?
+    $this->waitForText('crm-notification-container', "Case opened successfully.");
+
+    //Add Case 2
+    $this->openCiviPage('case/add', 'reset=1&action=add&atype=13&context=standalone', '_qf_Case_upload-bottom');
+
+    // Adding contact with randomized first name (so we can then select that contact when creating case)
+    // We're using pop-up New Contact dialog
+    $firstName2 = substr(sha1(rand()), 0, 7);
+    $lastName2 = "Fraser";
+    $contactName2 = "{$lastName}, {$firstName}";
+    $displayName2 = "{$firstName} {$lastName}";
+    $email2 = "{$lastName2}.{$firstName2}@example.org";
+    $this->webtestNewDialogContact($firstName2, $lastName2, $email2, $type = 4, "s2id_client_id");
+
+    // Fill in other form values. We'll use a case type which is included in CiviCase sample data / xml files.
+    $caseTypeLabel2 = "Adult Day Care Referral";
+    $subject2 = "Subject For Case 2";
+    $this->select('medium_id', 'value=1');
+    $this->type('activity_location', 'Main offices');
+    $details2 = "Details For Case 2";
+    $this->fillRichTextField("activity_details", $details2, 'CKEditor');
+    $this->type('activity_subject', $subject2);
+
+    $this->select('case_type_id', "label={$caseTypeLabel2}");
+
+    // Choose Case Start Date.
+    // Using helper webtestFillDate function.
+    $this->webtestFillDate('start_date', 'now');
+    $today = date('F jS, Y', strtotime('now'));
+
+    $this->type('duration', "20");
+    $this->clickLink('_qf_Case_upload-bottom', '_qf_CaseView_cancel-bottom', FALSE);
+
+    // Is status message correct?
+    $this->waitForText('crm-notification-container', "Case opened successfully.");
+
+    //Add Link Case Activity
+    $this->select('add_activity_type_id', 'Link Cases');
+    $this->waitForElementPresent("_qf_Activity_cancel-bottom");
+    $this->select2('link_to_case_id', $firstName);
+    $activitydetails = 'Details of Link Case Activity';
+    $this->fillRichTextField("details", $activitydetails, 'CKEditor');
+    $this->click('activity-details');
+    $this->waitForElementPresent('subject');
+    $activitySubject = 'Link Case Activity between case 1 and case 2';
+    $activitylocation = 'Main Office Building';
+    $this->select2('source_contact_id', $firstName2);
+    $this->type('subject', $activitySubject);
+    $this->type('location', $activitylocation);
+    $this->click('_qf_Activity_upload-bottom');
+    $id = $this->urlArg('id');
+    $this->waitForText("case_id_$id", $activitySubject);
+    $this->click("xpath=//a[contains(text(),'$activitySubject')]");
+
+    $LinkCaseActivityData = array(
+      "Client" => $firstName2,
+      "Activity Type" => "Link Cases",
+      "Subject" => $activitySubject,
+      "Reported By" => "{$firstName2} {$lastName2}",
+      "Medium" => "Phone",
+      "Location" => $activitylocation,
+      "Date and Time" => $today,
+      "Details" => $activitydetails,
+      "Status" => "Scheduled",
+      "Priority" => "Normal",
+    );
+    $this->webtestVerifyTabularData($LinkCaseActivityData);
+  }
   /**
    * @param $firstName
    * @param $caseSubject
index 98ddd48437428bbe906c17c336b2b5b9c3aa2ec9..bab7a97ec25356edb742dd45dc6e8dbf2dc734d6 100644 (file)
@@ -141,6 +141,7 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase {
     $this->_testSearchbyDate($firstName, $lastName, "this.quarter");
     $this->_testSearchbyDate($firstName, $lastName, "0");
     $this->_testSearchbyDate($firstName, $lastName, "this.year");
+    $this->_testAssignToClient($firstName, $lastName, $caseTypeLabel);
   }
 
   function testAjaxCustomGroupLoad() {
@@ -176,13 +177,14 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase {
    * @param $creatorName
    */
   function _testVerifyCaseRoles($caseRoles, $creatorName) {
-    $this->waitForElementPresent("xpath=//table[@id='caseRoles-selector']/tbody/tr[4]/td[2]/a");
+    $id = $this->urlArg('id');
+    $this->waitForElementPresent("xpath=//table[@id='caseRoles-selector-$id']/tbody/tr[4]/td[2]/a");
     // check that expected roles are listed in the Case Roles pane
     foreach ($caseRoles as $role) {
       $this->assertText("css=div.crm-case-roles-block", $role);
     }
     // check that case creator role has been assigned to logged in user
-    $this->verifyText("xpath=//table[@id='caseRoles-selector']/tbody/tr[4]/td[2]", $creatorName);
+    $this->verifyText("xpath=//table[@id='caseRoles-selector-$id']/tbody/tr[4]/td[2]", $creatorName);
   }
 
   /**
@@ -266,5 +268,28 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
     $this->assertElementContainsText('Advanced', "$lastName, $firstName");
   }
+  
+  /**
+   * @param $firstName
+   * @param $lastName
+   * @param $caseTypeLabel
+   * 
+   * test for assign case to another client 
+   */
+   function _testAssignToClient($firstName, $lastName, $caseTypeLabel) {
+    $this->openCiviPage('case/search', 'reset=1', '_qf_Search_refresh-bottom'); 
+    $this->type('sort_name', $firstName);
+    $this->click('_qf_Search_refresh-bottom');
+    $this->waitForElementPresent("xpath=//table[@class='caseSelector']/tbody//tr/td[3]/a[text()='{$lastName}, {$firstName}']");
+
+    $this->click("xpath=//table[@class='caseSelector']/tbody//tr/td[3]/a[text()='{$lastName}, {$firstName}']/../../td[11]/span[2]/ul/li/a[contains(text(),'Assign to Another Client')]");
+    $clientFirstName = substr(sha1(rand()), 0, 7);
+    $clientLastName = "Fraser";
+    $clientEmail = "{$clientLastName}.{$clientFirstName}@example.org";
+    $this->waitForElementPresent('_qf_EditClient_done-bottom');
+    $this->webtestNewDialogContact($clientFirstName, $clientLastName, $clientEmail, $type = 4, "s2id_reassign_contact_id");
+    $this->clickLink('_qf_EditClient_done-bottom');
+    $this->assertElementContainsText('page-title', "$clientFirstName $clientLastName - $caseTypeLabel");
+  }
 }
 
diff --git a/tests/phpunit/WebTest/Case/AddCaseTypeTest.php b/tests/phpunit/WebTest/Case/AddCaseTypeTest.php
new file mode 100644 (file)
index 0000000..8c15ed9
--- /dev/null
@@ -0,0 +1,145 @@
+<?php
+/*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.5                                                |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM.                                    |
+ |                                                                    |
+ | CiviCRM is free software; you can copy, modify, and distribute it  |
+ | under the terms of the GNU Affero General Public License           |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
+ |                                                                    |
+ | CiviCRM is distributed in the hope that it will be useful, but     |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
+ | See the GNU Affero General Public License for more details.        |
+ |                                                                    |
+ | You should have received a copy of the GNU Affero General Public   |
+ | License along with this program; if not, contact CiviCRM LLC       |
+ | at info[AT]civicrm[DOT]org. If you have questions about the        |
+ | GNU Affero General Public License or the licensing of CiviCRM,     |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ +--------------------------------------------------------------------+
+*/
+
+require_once 'CiviTest/CiviSeleniumTestCase.php';
+
+/**
+ * Class WebTest_Case_AddCaseTest
+ */
+class WebTest_Case_AddCaseTypeTest extends CiviSeleniumTestCase {
+
+  protected function setUp() {
+    parent::setUp();
+  }
+
+  function testAddEditCaseType() {
+    $caseRoles = array(1 => 'Parent of', 2 => 'Spouse of', 3 => 'Partner of');
+    $activityTypes = array(1 => 'Meeting',2 => 'Contribution',3 => 'Event Registration');
+    $timelineActivityTypes = array(1 => 'Meeting',2 => 'Phone Call',3 => 'Email');
+    // Log in as admin first to verify permissions for CiviCase
+    $this->webtestLogin('admin');
+
+    // Enable CiviCase module if necessary
+    $this->enableComponents("CiviCase");
+
+    // let's give full CiviCase permissions to demo user (registered user).
+    $permission = array('edit-2-access-all-cases-and-activities', 'edit-2-access-my-cases-and-activities', 'edit-2-administer-civicase', 'edit-2-delete-in-civicase');
+    $this->changePermissions($permission);
+
+    // Log in as normal user
+    $this->webtestLogin();
+
+    $this->openCiviPage('a/#/caseType/new');
+
+    $caseTypeLabel = "Case Type". substr(sha1(rand()), 0, 7);
+    $this->waitForElementPresent('title');
+    $this->type('title', $caseTypeLabel);
+
+    foreach ($caseRoles as $cRoles) {
+      $this->select2("xpath=//tr[@class='addRow']/td/span/div/a", $cRoles, FALSE, TRUE);
+    }
+
+    foreach ($activityTypes as $aType) {
+      $this->select2("xpath=//tr[@class='addRow']/td[contains(text(),'Add activity type:')]/span/div/a", $aType, FALSE, TRUE);
+    }
+
+    $this->click("xpath=//a[text()='Standard Timeline']");
+    foreach ($timelineActivityTypes as $tActivityType) {
+      $this->select2("xpath=//tr[@class='addRow']/td[contains(text(),'Add activity:')]/span/div/a", $tActivityType, FALSE, TRUE);
+    }
+
+    $this->click("xpath=//div[@class='crm-submit-buttons']/span/input[@value='Save']");
+
+    $this->openCiviPage('case/add', 'reset=1&action=add&atype=13&context=standalone', '_qf_Case_upload-bottom');
+    $firstName = substr(sha1(rand()), 0, 7);
+    $lastName = "Fraser";
+    $contactName = "{$lastName}, {$firstName}";
+    $displayName = "{$firstName} {$lastName}";
+    $email = "{$lastName}.{$firstName}@example.org";
+    $this->webtestNewDialogContact($firstName, $lastName, $email, $type = 4, "s2id_client_id");
+
+    $caseStatusLabel = "Ongoing";
+    $subject = "Safe daytime setting - senior female";
+    $this->select("medium_id", "value=1");
+    $location = "Main offices";
+    $this->type("activity_location", $location);
+    $details = "65 year old female needs safe location during the day for herself and her dog. She is in good health but somewhat disoriented.";
+    $this->fireEvent('activity_details', 'focus');
+    $this->fillRichTextField("activity_details", $details, 'CKEditor');
+    $this->type("activity_subject", $subject);
+
+    $this->select("case_type_id", "label={$caseTypeLabel}");
+    $this->select("status_id", "label={$caseStatusLabel}");
+
+    $this->webtestFillDate('start_date', 'now');
+    $today = date('F jS, Y', strtotime('now'));
+
+    $this->type("duration", "20");
+    $this->clickLink("_qf_Case_upload-bottom", "_qf_CaseView_cancel-bottom");
+
+    // Is status message correct?
+    $this->waitForText('crm-notification-container', "Case opened successfully.");
+
+    foreach ($activityTypes as $aType) {
+      $this->assertText("add_activity_type_id", $aType);
+    }
+
+    $this->click("xpath=//div[contains(text(), 'Roles')]");
+
+    // check that expected roles are listed in the Case Roles pane
+    foreach ($caseRoles as $key => $role) {
+      $this->assertText("css=div.crm-case-roles-block", $role);
+    }
+
+    $id = $this->urlArg('id');
+    // check that expected activities are listed in the Case Activities table
+    foreach ($timelineActivityTypes as $tActivityType) {
+      $this->assertText("case_id_$id", $tActivityType);
+    }
+
+    // for edit case type
+    $this->openCiviPage('a/#/caseType');
+    $this->waitForElementPresent("xpath=//*[@id='crm-main-content-wrapper']/div/div/div[2]/a/span[contains(text(),'New Case Type')]");
+
+    $this->click("xpath=//table/tbody//tr/td[1][text()='{$caseTypeLabel}']/../td[5]/span/a[text()='Edit']");
+    $this->waitForElementPresent("xpath=//div[@class='crm-submit-buttons']/span/input[@value='Save']");
+
+    $editCaseTypeLabel = "Case Type Edit". substr(sha1(rand()), 0, 7);
+    $this->waitForElementPresent('title');
+    $this->type('title', $editCaseTypeLabel);
+
+    $this->select2("xpath=//tr[@class='addRow']/td/span/div/a", 'Sibling of', FALSE, TRUE);
+    $this->click("xpath=//*[@id='crm-main-content-wrapper']/div/div/form/div/div[3]/table/tbody/tr[4]/td[2]/input[@type='checkbox']");
+
+    $this->click("xpath=//a[text()='Standard Timeline']");
+    $this->select2("xpath=//tr[@class='addRow']/td[contains(text(),'Add activity:')]/span/div/a", 'SMS', FALSE, TRUE);
+
+    $this->click("xpath=//div[@class='crm-submit-buttons']/span/input[@value='Save']");
+    $this->waitForElementPresent("xpath=//*[@id='crm-main-content-wrapper']/div/div/div[2]/a/span[contains(text(),'New Case Type')]");
+
+    $this->verifyText("xpath=//table/tbody//tr/td[contains(text(),'$editCaseTypeLabel')]", $editCaseTypeLabel);
+  }
+}
index 7db9fcc93c42747996a9fb94045719e18f303514..8442d855df449b815853e2cacb2a68b5390c0eac 100644 (file)
@@ -65,14 +65,14 @@ class WebTest_Case_CaseDashboardTest extends CiviSeleniumTestCase {
     $this->openCiviPage('case', 'reset=1', 'css=a.button');
 
     // Click on find my cases and check if right radio is checked
-    $this->clickLink("name=find_my_cases", "css=input.form-submit");
+    $this->clickLink("name=find_my_cases", "css=input.crm-form-submit");
     $this->assertTrue($this->isChecked("name=case_owner value=2"), 'Find my cases button not properly setting search form value to my cases.');
 
     // Go back to dashboard
     $this->openCivipage('case', 'reset=1', 'css=a.button');
 
     // Click on a drilldown cell and check if right radio is checked
-    $this->clickLink("css=a.crm-case-summary-drilldown", "css=input.form-submit");
+    $this->clickLink("css=a.crm-case-summary-drilldown", "css=input.crm-form-submit");
     $this->assertTrue($this->isChecked("name=case_owner value=1"), 'Drilldown on dashboard summary cells not properly setting search form value to all cases.');
 
     // Go back to dashboard and reset to my cases
@@ -80,7 +80,7 @@ class WebTest_Case_CaseDashboardTest extends CiviSeleniumTestCase {
     $this->clickLink("name=allupcoming value=0", "css=a.button");
 
     // Click on a drilldown cell and check if right radio is checked
-    $this->clickLink("css=a.crm-case-summary-drilldown", "css=input.form-submit");
+    $this->clickLink("css=a.crm-case-summary-drilldown", "css=input.crm-form-submit");
     $this->assertTrue($this->isChecked("name=case_owner value=2"), 'Drilldown on dashboard summary cells not properly setting search form value to my cases.');
   }
 }
index e89a512ab69b9cee9e49f0df3a1d502e8a0a1f93..4e16677649f06116021920c80a192f789f96e3f3 100644 (file)
@@ -237,4 +237,51 @@ class WebTest_Contact_GroupAddTest extends CiviSeleniumTestCase {
     $this->click("edit-submit");
     $this->waitForTextPresent("The role has been deleted.");
   }
+
+   /**
+   * Webtest for add contact to group (CRM-15108)
+   */
+  function testAddContactToGroup() {
+    $this->webtestLogin();
+    $this->openCiviPage("contact/add", "reset=1&ct=Individual");
+    $this->waitForElementPresent('_qf_Contact_upload_view-bottom');
+
+    //Create contact.
+    $group = "Advisory Board";
+    $firstName = "Adams".substr(sha1(rand()), 0, 4);
+    $lastName = substr(sha1(rand()), 0, 4);
+    $email = "{$lastName}.{$firstName}@example.org";
+    $this->type('first_name', $firstName);
+    $this->type('last_name', $lastName);
+    $this->type('email_1_email', "{$firstName}.{$lastName}@example.com");
+    $this->click('_qf_Contact_upload_view-bottom');
+    $this->waitForText('crm-notification-container', "Contact Saved");
+
+    $this->openCiviPage('group', 'reset=1');
+    $this->waitForElementPresent("xpath=//a/span[text()='Add Group']");
+    $this->waitForElementPresent("xpath=//table[@id='DataTables_Table_0']/tbody//tr/td[1]/span[contains(text(), '{$group}')]");
+    $this->click("xpath=//table[@id='DataTables_Table_0']/tbody//tr/td[1]/span[text()='{$group}']/../../td[7]/span[1]/a[1]");
+    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->clickLink("xpath=//form[@id='Basic']/div[2]/a/span");
+    $this->waitForElementPresent("_qf_Basic_refresh");
+    $this->type('sort_name', $firstName);
+    $this->click('_qf_Basic_refresh');
+    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->waitForElementPresent("_qf_Basic_next_action");
+
+    $this->assertTrue($this->isElementPresent("xpath=//table/tbody//tr/td[3]/a[text()='{$lastName}, {$firstName}']"));
+    $this->click("xpath=//table/tbody//tr/td[1]/input[@type='checkbox']");
+    $this->click('_qf_Basic_next_action');
+    $this->waitForElementPresent("_qf_AddToGroup_back-bottom");
+    $this->click('_qf_AddToGroup_next-bottom');
+    $this->waitForText('crm-notification-container', "1 contact added to group");
+
+    $this->openCiviPage('contact/search', 'reset=1');
+    $this->waitForElementPresent("_qf_Basic_refresh");
+    $this->type('sort_name', $firstName);
+    $this->select('group',"Advisory Board");
+    $this->click('_qf_Basic_refresh');
+    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->assertTrue($this->isElementPresent("xpath=//table/tbody//tr/td[3]/a[text()='{$lastName}, {$firstName}']"));
+  }
 }
index 7db1986a4a7568a0a58265bdf87f8a67ebf5d49d..1a8200ea0e5e80ba1110027941765f6f1aa25baa 100644 (file)
@@ -270,7 +270,7 @@ class WebTest_Contact_InlineFieldsEditTest extends CiviSeleniumTestCase {
           break;
       }
     }
-    $this->click("css=#$block input.form-submit");
+    $this->click("css=#$block input.crm-form-submit");
     if ($valid !== 'error') {
       // Verify the form saved
       $this->waitForElementPresent("css=#$block > .crm-inline-block-content");
index 7e2247fa5862d1df387ba7ae1fde6dfb668b9b1b..629aa71ec6cba9f1a9b0809fc10ea87de87f42b4 100644 (file)
@@ -199,6 +199,57 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     $this->assertChecked("check_3");
   }
 
+  function testMergeContactSubType() {
+    $this->webtestLogin();
+    $this->openCiviPage("contact/add", "reset=1&ct=Individual");
+    $this->waitForElementPresent('_qf_Contact_cancel-bottom');
+    //fill in first name
+    $firstName = "Anderson".substr(sha1(rand()), 0, 4);
+    $this->type('first_name', $firstName);
+    
+    //fill in last name
+    $lastName = substr(sha1(rand()), 0, 4);
+    $this->type('last_name', $lastName);
+
+    //fill in email id
+    $this->waitForElementPresent('email_1_email');
+    $this->type('email_1_email', "{$firstName}.{$lastName}@example.com");
+    $this->waitForElementPresent('contact_sub_type');
+    $this->select('contact_sub_type', "Parent");
+
+    // Clicking save.
+    $this->click("_qf_Contact_upload_view");
+    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->waitForText('crm-notification-container', "Contact Saved");
+
+    // contact2: contact with same email id as contact 1.
+    $this->openCiviPage("contact/add", "reset=1&ct=Individual");
+    $this->waitForElementPresent('_qf_Contact_cancel-bottom');
+
+    $fName = "John".substr(sha1(rand()), 0, 4);
+    $this->type('first_name', $fName);
+    $lName = substr(sha1(rand()), 0, 4);
+    $this->type('last_name', $lName);
+    $this->type('email_1_email', "{$firstName}.{$lastName}@example.com");
+    $this->waitForElementPresent('contact_sub_type');
+    $this->multiselect2('contact_sub_type', array("Student", "Staff"));
+    $this->click("_qf_Contact_upload_view");
+    $this->waitForText('crm-notification-container', "Contact Saved");
+    $this->openCiviPage("contact/deduperules", "reset=1");
+    $this->click("xpath=//*[@id='option12']/tbody/tr[3]/td[3]/span/a[1][contains(text(),'Use Rule')]");
+    $this->waitForElementPresent('_qf_DedupeFind_submit-bottom');
+    $this->click("_qf_DedupeFind_next-bottom");
+
+    $this->waitForElementPresent("xpath=//table[@id='option51']/tbody/tr[1]/td[4]/a[text()='merge']");
+    $this->waitForElementPresent("xpath=//*[@id='DedupeFind']/a[3]/span[contains(text(),'Done')]");
+    $this->isElementPresent("xpath=//table[@id='option51']/tbody/tr/td[1]/a[text()='{$firstName} {$lastName}']/../td[2]/a[text()='{$fName} {$lName}']");
+    $this->click("xpath=//table[@id='option51']/tbody/tr[1]/td[4]/a[text()='merge']");
+    $this->waitForElementPresent('_qf_Merge_cancel-bottom');
+    $this->click('toggleSelect');
+    $this->click('_qf_Merge_next-bottom');
+    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->assertTrue($this->isTextPresent("Staff, Student"));
+  }
   /**
    * @param $firstName
    * @param $lastName
index a4af1e267320b42b2ab90e69ca583bbd12817274..70ae4d40d3cb61eb51f0a5b82de1991224b89aa6 100644 (file)
@@ -558,6 +558,92 @@ class WebTest_Contribute_OnBehalfOfOrganization extends CiviSeleniumTestCase {
      $this->_testOrganization($pageId, $cid, $pageTitle);
   }
 
+  function testWithContactSubtypeDupe() {
+    $this->webtestLogin();
+
+    //create organisation
+    $orgName = "Org WebAccess ". substr(sha1(rand()), 0, 7);
+    $orgEmail = "org". substr(sha1(rand()), 0, 7) . "@web.com";
+    $contactSubType = 'Sponsor';
+    $this->webtestAddOrganization($orgName, $orgEmail, $contactSubType);
+
+    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $cid = $this->urlArg('cid');
+
+    $pageTitle = substr(sha1(rand()), 0, 7);
+    $rand = 100;
+    $hash = substr(sha1(rand()), 0, 7);
+    $amountSection = TRUE;
+    $payLater = TRUE;
+    $onBehalf = TRUE;
+    $pledges = FALSE;
+    $recurring = FALSE;
+    $memberships = FALSE;
+    $memPriceSetId = NULL;
+    $friend = FALSE;
+    $profilePreId = NULL;
+    $profilePostId = NULL;
+    $premiums = FALSE;
+    $widget = FALSE;
+    $pcp = FALSE;
+    $honoreeSection = FALSE;
+    $isAddPaymentProcessor = FALSE;
+    $isPcpApprovalNeeded = FALSE;
+    $isSeparatePayment = FALSE;
+
+    // create a new online contribution page
+    // create contribution page with randomized title and default params
+    $pageId = $this->webtestAddContributionPage($hash,
+      $rand,
+      $pageTitle,
+      null,
+      $amountSection,
+      $payLater,
+      $onBehalf,
+      $pledges,
+      $recurring,
+      $memberships,
+      $memPriceSetId,
+      $friend,
+      $profilePreId,
+      $profilePostId,
+      $premiums,
+      $widget,
+      $pcp,
+      $isAddPaymentProcessor,
+      $isPcpApprovalNeeded,
+      $isSeparatePayment,
+      $honoreeSection
+    );
+
+     //Open Live Contribution Page
+    $this->openCiviPage("contribute/transact", "reset=1&id=$pageId", "_qf_Main_upload-bottom");
+    $this->waitForElementPresent("onbehalf_state_province-3");
+
+    $this->type("onbehalf_organization_name", $orgName);
+    $this->waitForElementPresent("onbehalf_phone-3-1");
+    $this->type("onbehalf_phone-3-1", 9999999999);
+    $this->waitForElementPresent("onbehalf_email-3");
+    $this->type("onbehalf_email-3", "org@example.com");
+    $this->type("onbehalf_street_address-3", "Test Street Address");
+    $this->type("onbehalf_city-3", "Test City");
+    $this->type("onbehalf_postal_code-3", substr(sha1(rand()), 0, 6));
+    $this->click("onbehalf_country-3");
+    $this->select("onbehalf_country-3", "label=United States");
+    $this->click("onbehalf_state_province-3");
+    $this->select("onbehalf_state_province-3", "label=Alabama");
+
+    $this->waitForElementPresent("_qf_Main_upload-bottom");
+    $this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next-bottom");
+
+    $this->click("_qf_Confirm_next-bottom");
+    $this->waitForPageToLoad($this->getTimeoutMsec());
+
+    $this->openCiviPage("contact/view", "reset=1&cid=$cid", "xpath=//div[@class='crm-content crm-contact_type_label']");
+
+    $this->verifyText("xpath=//div[@class='crm-content crm-contact_type_label']", $contactSubType);
+  }
+
   /**
    * @param $pageId
    * @param $cid
index 4bef4ef0ee3d2250f8d0cb38e24356bdea07eb71..0d9d402b0216b9096a623a39cbe2974a8aad6468 100644 (file)
@@ -318,7 +318,7 @@ class WebTest_Event_AddEventTest extends CiviSeleniumTestCase {
     $this->click("CIVICRM_QFID_0_is_monetary");
 
     $this->clickLink("_qf_Fee_upload-bottom", "_qf_Fee_upload-bottom", FALSE);
-    $this->waitForElementPresent("xpath=//div[@id='event-fees'][@style='display: none;']");
+    sleep(2);
     //check if pay later option is disabled
     $this->click('CIVICRM_QFID_1_is_monetary');
     $this->waitForElementPresent('is_pay_later');
index 376aea867b5592927fe82d7f308aacfe69aaccb8..c06f2486e62e0578f59ebcc6be7ccddb20c1968a 100644 (file)
@@ -722,12 +722,6 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase {
     //check the delete for price field
     $this->openCiviPage("admin/price/field", "reset=1&action=browse&sid={$sid}");
     $this->click("xpath=//table[@id='option11']/tbody/tr/td[9]/span[2]/ul/li[2]/a");
-    // Check confirmation alert.
-    $this->assertTrue((bool)preg_match("/^Are you sure you want to delete this price field?/",
-      $this->getConfirmation()
-    ));
-    $this->chooseOkOnNextConfirmation();
-    $this->waitForPageToLoad($this->getTimeoutMsec());
     //assert the message
     $this->waitForText('price_set_used_by',
       "it is currently in use by one or more active events or contribution pages or contributions or event templates.");
index 310d00df632bf2917e06982cbc10f66530a86e39..57c88b5599466b235a5af06253c5379dbe40a791 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 require_once 'CiviTest/CiviSeleniumTestCase.php';
-require_once 'WebTest/Event/AddEventTest.php';
 
 /**
  * Class WebTest_Event_PCPAddTest
index f74209f42026b260b4cceff447409ba1708a6e7f..92bac878545a7e59df7fe4eb61cdc69c87a88fc6 100644 (file)
@@ -154,13 +154,13 @@ class WebTest_Event_TellAFriendTest extends CiviSeleniumTestCase {
       preg_quote("$lastName, $firstName")
     );
 
-    $this->verifyText("xpath=//table[@class='crm-info-panel']/tbody/tr[2]/td[2]/span/a[1]",
+    $this->verifyText("xpath=//table[@class='crm-info-panel']/tbody/tr[2]/td[2]/span",
       preg_quote("$lastName1, $firstName1")
     );
-    $this->verifyText("xpath=//table[@class='crm-info-panel']/tbody/tr[2]/td[2]/span/a[2]",
+    $this->verifyText("xpath=//table[@class='crm-info-panel']/tbody/tr[2]/td[2]/span",
       preg_quote("$lastName2, $firstName2")
     );
-    $this->verifyText("xpath=//table[@class='crm-info-panel']/tbody/tr[2]/td[2]/span/a[3]",
+    $this->verifyText("xpath=//table[@class='crm-info-panel']/tbody/tr[2]/td[2]/span",
       preg_quote("$lastName3, $firstName3")
     );
 
index fdddd616f038300ceacd920979d5814ed3386249..41c226f7d2d895634d7758955bd82043434d97b7 100644 (file)
@@ -29,7 +29,7 @@ require_once 'WebTest/Import/ImportCiviSeleniumTestCase.php';
 /**
  * Class WebTest_Import_SavedMapping
  */
-class WebTest_Import_SavedMapping extends ImportCiviSeleniumTestCase {
+class WebTest_Import_SavedMappingTest extends ImportCiviSeleniumTestCase {
 
   protected function setUp() {
     parent::setUp();
index 8123794d5e08dbeafb0998e994c1210782755f11..bd51f8c4a765803e976e3544d420c5d7627a0f1a 100644 (file)
@@ -88,6 +88,74 @@ class WebTest_Member_StandaloneAddTest extends CiviSeleniumTestCase {
     $this->webtestVerifyTabularData($expected);
   }
 
+  function testStandaloneGiftMembership() {
+
+    $this->webtestLogin();
+
+    // create contact
+    $firstName = substr(sha1(rand()), 0, 7);
+    $this->webtestAddContact($firstName, "Memberson", "Memberson{$firstName}@memberson.name");
+    $contactName = "Memberson, $firstName";
+
+    $giftMemberfirstName = substr(sha1(rand()), 0, 7);
+    $this->webtestAddContact($giftMemberfirstName, "Memberson", "Memberson{$giftMemberfirstName}@memberson.name");
+    $giftMembercontactName = "Memberson, $giftMemberfirstName";
+
+    // add membership type
+    $membershipTypes = $this->webtestAddMembershipType();
+
+    // now add membership
+    $this->openCiviPage("member/add", "reset=1&action=add&context=standalone", "_qf_Membership_upload");
+
+    // select contact
+    $this->webtestFillAutocomplete($firstName);
+
+    // fill in Membership Organization
+    $this->select("membership_type_id[0]", "label={$membershipTypes['member_of_contact']}");
+
+    // select membership type
+    $this->select("membership_type_id[1]", "label={$membershipTypes['membership_type']}");
+
+    // fill in Source
+    $this->type("source", "Membership StandaloneAddTest Webtest");
+
+    // fill in Start Date
+    $this->webtestFillDate('start_date');
+
+    // add softcredit details
+    $totalAmount = 100;
+    $financialType = 'Donation';
+    $this->clickLink('is_different_contribution_contact','total_amount',FALSE);
+
+    $this->select('soft_credit_type_id', 'Gift');
+    $this->select2('soft_credit_contact_id', $giftMembercontactName);
+    $this->select('financial_type_id','Donation');
+    $this->type('total_amount', $totalAmount);
+    $this->select('payment_instrument_id', 'Check');
+    $this->select('contribution_status_id', 'Completed');
+
+    $this->click("_qf_Membership_upload");
+
+    //View Membership
+    $this->waitForElementPresent("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
+    $this->click("xpath=//div[@id='memberships']//table/tbody/tr[1]/td[9]/span/a[text()='View']");
+    $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
+
+    // verify soft credit data
+    $expected = array(
+      '1' => $giftMemberfirstName.' Memberson',
+      '2' => $totalAmount,
+      '3' => 'Gift',
+      '4' => 'Donation',
+      '6' => 'Completed',
+    );
+
+    foreach($expected as $key => $value) {
+      $this->verifyText("xpath=//div[@class='crm-accordion-wrapper']//table/tbody//tr/td[$key]", $value);
+    }
+
+  }
+
   function testStandaloneMemberOverrideAdd() {
 
     $this->webtestLogin();
index acb75571608d3326c2d00a34e66e9f47de72846f..1d38f8875c9bf160d9b67fe2d05ec51656a9cda8 100644 (file)
@@ -247,10 +247,10 @@ class WebTest_Profile_MultiRecordProfileAddTest extends CiviSeleniumTestCase {
     // Justification for this instance: FIXME
     sleep(3);
     $this->click("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr/td[3]/span/a[text()='Edit']");
-    $this->waitForElementPresent("xpath=//div[@class='ui-dialog-content ui-widget-content modal-dialog crm-ajax-container']/form/div[2]//div[@id='crm-profile-block']//div[@class='crm-submit-buttons']/span/input[@class='validate form-submit default crm-form-submit']");
+    $this->waitForElementPresent("xpath=//div[@class='ui-dialog-content ui-widget-content modal-dialog crm-ajax-container']/form/div[2]//div[@id='crm-profile-block']//div[@class='crm-submit-buttons']/span/input[@class='validate crm-form-submit default crm-form-submit']");
     $this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/thead/tr/th[1]", preg_quote($params['textFieldLabel']));
     $this->type("//div[@id='crm-profile-block']/div/div[2]/input[@class='crm-form-text required']", $recordNew['text'].'edit');
-    $this->click("xpath=//div[@class='ui-dialog-content ui-widget-content modal-dialog crm-ajax-container']/form/div[2]//div[@id='crm-profile-block']//div[@class='crm-submit-buttons']/span/input[@class='validate form-submit default crm-form-submit']");
+    $this->click("xpath=//div[@class='ui-dialog-content ui-widget-content modal-dialog crm-ajax-container']/form/div[2]//div[@id='crm-profile-block']//div[@class='crm-submit-buttons']/span/input[@class='validate crm-form-submit default crm-form-submit']");
     $this->waitForText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[1]/td[1]", $recordNew['text'].'edit');
     $editalertText = $this->getAlert();
     $this->assertEquals("Thank you. Your information has been saved.", $editalertText);
@@ -399,12 +399,12 @@ class WebTest_Profile_MultiRecordProfileAddTest extends CiviSeleniumTestCase {
       $this->type('email-Primary', $params['email']);
       $this->waitForElementPresent("//div[@id='crm-profile-block']//div/div[2]/select");
       $this->select("//div[@id='crm-profile-block']//div/div[2]/select",'value=1');
-      $this->click("xpath=//div[@id='crm-profile-block']//div[@class='crm-submit-buttons']/span/input[@class='validate form-submit default crm-form-submit']");
+      $this->click("xpath=//div[@id='crm-profile-block']//div[@class='crm-submit-buttons']/span/input[@class='validate crm-form-submit default crm-form-submit']");
     }
     else {
       $this->waitForElementPresent("//div[@id='crm-profile-block']//div/div[2]/select");
       $this->select("//div[@id='crm-profile-block']//div/div[2]/select",'value=1');
-      $this->click("xpath=//div[@class='ui-dialog-content ui-widget-content modal-dialog crm-ajax-container']/form/div[2]//div[@id='crm-profile-block']//div[@class='crm-submit-buttons']/span/input[@class='validate form-submit default crm-form-submit']");
+      $this->click("xpath=//div[@class='ui-dialog-content ui-widget-content modal-dialog crm-ajax-container']/form/div[2]//div[@id='crm-profile-block']//div[@class='crm-submit-buttons']/span/input[@class='validate crm-form-submit default crm-form-submit']");
     }
     return $params;
   }
index 6b18decdc8139852cc8a52c5b62234015504b49b..2f0c47204ea69e432793330cb8a6dc5b803b72cf 100644 (file)
@@ -66,6 +66,14 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase {
     CRM_Utils_Hook::singleton()->reset();
     $tablesToTruncate = array(
       'civicrm_contact',
+      'civicrm_group_contact',
+      'civicrm_group',
+      'civicrm_acl',
+      'civicrm_acl_cache',
+      'civicrm_acl_entity_role',
+      'civicrm_acl_contact_cache',
+      'civicrm_contribution',
+      'civicrm_participant',
     );
     $this->quickCleanup($tablesToTruncate);
     $config = CRM_Core_Config::singleton();
@@ -233,6 +241,94 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase {
     );
   }
 
+  function setupCoreACL() {
+    $this->createLoggedInUser();
+    $this->_permissionedDisabledGroup = $this->groupCreate(array('title' => 'pick-me-disabled', 'is_active' => 0, 'name' => 'pick-me-disabled'));
+    $this->_permissionedGroup = $this->groupCreate(array('title' => 'pick-me-active', 'is_active' => 1, 'name' => 'pick-me-active'));
+    $this->setupACL();
+  }
+  /**
+   * @dataProvider entities
+   * confirm that without check permissions we still get 2 contacts returned
+   */
+  function testEntitiesGetHookLimitingHookNoCheck($entity) {
+    CRM_Core_Config::singleton()->userPermissionClass->permissions = array();
+    $this->setUpEntities($entity);
+    $this->hookClass->setHook('civicrm_aclWhereClause', array($this, 'aclWhereHookNoResults'));
+    $result = $this->callAPISuccess($entity, 'get', array(
+      'check_permissions' => 0,
+      'return' => 'contact_id',
+    ));
+    $this->assertEquals(2, $result['count']);
+  }
+
+  /**
+   * @dataProvider entities
+   * confirm that without check permissions we still get 2 entities returned
+   */
+  function testEntitiesGetCoreACLLimitingHookNoCheck($entity) {
+    $this->setupCoreACL();
+    //CRM_Core_Config::singleton()->userPermissionClass->permissions = array();
+    $this->setUpEntities($entity);
+    $this->hookClass->setHook('civicrm_aclWhereClause', array($this, 'aclWhereHookNoResults'));
+    $result = $this->callAPISuccess($entity, 'get', array(
+      'check_permissions' => 0,
+      'return' => 'contact_id',
+    ));
+    $this->assertEquals(2, $result['count']);
+  }
+  /**
+   * @dataProvider entities
+   * confirm that with check permissions we don't get entities
+   */
+  function testEntitiesGetCoreACLLimitingCheck($entity) {
+    $this->markTestIncomplete('this does not work in 4.4 but can be enabled in 4.5 or a security release of 4.4 including the important security fix CRM-14877');
+    $this->setupCoreACL();
+    $this->setUpEntities($entity);
+    $result = $this->callAPISuccess($entity, 'get', array(
+      'check_permissions' => 1,
+      'return' => 'contact_id',
+    ));
+    $this->assertEquals(0, $result['count']);
+  }
+
+
+  /**
+   * @dataProvider entities
+   * Function tests that an empty where hook returns no results
+   */
+  function testEntityGetNoResultsHook($entity) {
+    $this->markTestIncomplete('hook acls only work with contacts so far');
+    CRM_Core_Config::singleton()->userPermissionClass->permissions = array();
+    $this->setUpEntities($entity);
+    $this->hookClass->setHook('civicrm_aclWhereClause', array($this, 'aclWhereHookNoResults'));
+    $result = $this->callAPISuccess($entity, 'get', array(
+      'check_permission' => 1,
+    ));
+    $this->assertEquals(0, $result['count']);
+  }
+
+  /**
+   * @return array
+   */
+  public static function entities() {
+    return array(array('contribution'), array('participant'),);// @todo array('pledge' => 'pledge')
+  }
+
+  /**
+   * Create 2 entities
+   */
+  public function setUpEntities($entity) {
+    $baoObj = new CRM_Core_DAO();
+    $baoObj->createTestObject( _civicrm_api3_get_BAO($entity), array(), 2, 0);
+    CRM_Core_Config::singleton()->userPermissionClass->permissions = array(
+      'access CiviCRM',
+      'access CiviContribute',
+      'access CiviEvent',
+      'view event participants',
+    );
+  }
+
   /**
    * no results returned
    */
@@ -255,4 +351,3 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase {
     $where = " contact_a.id > 1";
   }
 }
-
index bdf8f60d9abd5bd8d07e0393c01c6d8ce7366eed..ff46898e4022e20272376a0d44be1f4591c7155c 100644 (file)
@@ -871,7 +871,7 @@ class api_v3_ContactTest extends CiviUnitTestCase {
     //  Insert a row in civicrm_contact creating individual contact
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+      $this->createXMLDataSet(
         dirname(__FILE__) . '/dataset/contact_ind.xml'
       )
     );
@@ -902,10 +902,10 @@ class api_v3_ContactTest extends CiviUnitTestCase {
       $this->assertEquals($value, $getResult['values'][23][$key]);
     }
     //  Check updated civicrm_contact against expected
-    $expected = new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+    $expected = $this->createXMLDataSet(
       dirname(__FILE__) . '/dataset/contact_ind_upd.xml'
     );
-    $actual = new PHPUnit_Extensions_Database_DataSet_QueryDataset(
+    $actual = new PHPUnit_Extensions_Database_DataSet_QueryDataSet(
       $this->_dbconn
     );
     $actual->addTable('civicrm_contact');
@@ -919,7 +919,7 @@ class api_v3_ContactTest extends CiviUnitTestCase {
     //  Insert a row in civicrm_contact creating organization contact
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+      $this->createXMLDataSet(
         dirname(__FILE__) . '/dataset/contact_org.xml'
       )
     );
@@ -935,10 +935,10 @@ class api_v3_ContactTest extends CiviUnitTestCase {
     $this->callAPISuccess('Contact', 'Update', $params);
 
     //  Check updated civicrm_contact against expected
-    $expected = new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+    $expected = $this->createXMLDataSet(
       dirname(__FILE__) . '/dataset/contact_org_upd.xml'
     );
-    $actual = new PHPUnit_Extensions_Database_DataSet_QueryDataset(
+    $actual = new PHPUnit_Extensions_Database_DataSet_QueryDataSet(
       $this->_dbconn
     );
     $actual->addTable('civicrm_contact');
@@ -952,7 +952,7 @@ class api_v3_ContactTest extends CiviUnitTestCase {
     //  Insert a row in civicrm_contact creating household contact
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+      $this->createXMLDataSet(
         dirname(__FILE__) . '/dataset/contact_hld.xml'
       )
     );
@@ -985,7 +985,7 @@ class api_v3_ContactTest extends CiviUnitTestCase {
     //  Insert a row in civicrm_contact creating individual contact
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+      $this->createXMLDataSet(
         dirname(__FILE__) . '/dataset/contact_ind.xml'
       )
     );
@@ -1109,12 +1109,12 @@ class api_v3_ContactTest extends CiviUnitTestCase {
     //  Insert a row in civicrm_contact creating individual contact
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+      $this->createXMLDataSet(
         dirname(__FILE__) . '/dataset/contact_17.xml'
       )
     );
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+      $this->createXMLDataSet(
         dirname(__FILE__) . '/dataset/email_contact_17.xml'
       )
     );
@@ -1140,7 +1140,7 @@ class api_v3_ContactTest extends CiviUnitTestCase {
     //  Insert a row in civicrm_contact creating contact 17
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+      $this->createXMLDataSet(
         dirname(__FILE__) . '/dataset/contact_17.xml'
       )
     );
@@ -1159,7 +1159,7 @@ class api_v3_ContactTest extends CiviUnitTestCase {
     //  Insert a row in civicrm_contact creating contact 17
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(dirname(__FILE__) . '/dataset/contact_17.xml'
+      $this->createXMLDataSet(dirname(__FILE__) . '/dataset/contact_17.xml'
       )
     );
 
@@ -1683,7 +1683,7 @@ class api_v3_ContactTest extends CiviUnitTestCase {
     //  Insert a row in civicrm_contact creating contact 17
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+      $this->createXMLDataSet(
         dirname(__FILE__) . '/dataset/contact_17.xml'
       )
     );
index dd95b8ddb10edc6cac10f24a0bcf5b04cb3f8742..018afe0da63eb91a713a1d18c63906a12c905bcc 100644 (file)
@@ -478,7 +478,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->assertArrayHasKey('payment_instrument', $contribution['values'][0]);
     $this->assertEquals('EFT', $contribution['values'][0]['payment_instrument']);
     $this->assertEquals(1, $contribution['count']);
-    $contribution = $this->callAPISuccess('contribution', 'update', array('id' => $contribution['id'], 'payment_instrument' => 'Credit Card'));
+    $contribution = $this->callAPISuccess('contribution', 'create', array('id' => $contribution['id'], 'payment_instrument' => 'Credit Card'));
     $contribution = $this->callAPISuccess('contribution','get',array( 'sequential' => 1, 'id' => $contribution['id'], ));
     $this->assertArrayHasKey('payment_instrument', $contribution['values'][0]);
     $this->assertEquals('Credit Card',$contribution['values'][0]['payment_instrument']);
@@ -840,7 +840,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
 
       'id' => $contribution['id'],
       'total_amount' => '125');
-    $contribution = $this->callAPISuccess('contribution', 'update', $newParams);
+    $contribution = $this->callAPISuccess('contribution', 'create', $newParams);
 
     $lineItems = $this->callAPISuccess('line_item','getvalue',array(
 
@@ -878,7 +878,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
       'id' => $contribution['id'],
       'contribution_status_id' => 1,)
     );
-    $contribution = $this->callAPISuccess('contribution', 'update', $newParams);
+    $contribution = $this->callAPISuccess('contribution', 'create', $newParams);
     $contribution = $contribution['values'][$contribution['id']];
     $this->assertEquals($contribution['contribution_status_id'],'1');
     $this->_checkFinancialItem($contribution['id'], 'paylater');
@@ -904,7 +904,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
      'id' => $contribution['id'],
      'payment_instrument_id' => $instrumentId,)
     );
-    $contribution = $this->callAPISuccess('contribution', 'update', $newParams);
+    $contribution = $this->callAPISuccess('contribution', 'create', $newParams);
     $this->assertAPISuccess($contribution);
     $this->_checkFinancialTrxn($contribution, 'paymentInstrument', $instrumentId);
   }
@@ -929,7 +929,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
       )
     );
 
-    $contribution = $this->callAPISuccess('contribution', 'update', $newParams);
+    $contribution = $this->callAPISuccess('contribution', 'create', $newParams);
     $this->_checkFinancialTrxn($contribution, 'refund');
     $this->_checkFinancialItem($contribution['id'], 'refund');
   }
@@ -952,7 +952,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
      'contribution_status_id' => 2,
       )
     );
-    $contribution = $this->callAPIFailure('contribution', 'update', $newParams,
+    $contribution = $this->callAPIFailure('contribution', 'create', $newParams,
       ts('Cannot change contribution status from Completed to Pending.')
     );
 
@@ -978,7 +978,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
      'contribution_status_id' => 3,
       )
     );
-    $contribution = $this->callAPISuccess('contribution', 'update', $newParams);
+    $contribution = $this->callAPISuccess('contribution', 'create', $newParams);
     $this->_checkFinancialTrxn($contribution, 'cancelPending');
     $this->_checkFinancialItem($contribution['id'], 'cancelPending');
   }
@@ -1002,11 +1002,20 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
      'financial_type_id' => 3,
       )
     );
-    $contribution = $this->callAPISuccess('contribution', 'update', $newParams);
+    $contribution = $this->callAPISuccess('contribution', 'create', $newParams);
     $this->_checkFinancialTrxn($contribution, 'changeFinancial');
     $this->_checkFinancialItem($contribution['id'], 'changeFinancial');
   }
 
+  /**
+   * test that update does not change status id CRM-15105
+   */
+  function testCreateUpdateWithoutChangingPendingStatus() {
+    $contribution = $this->callAPISuccess('contribution', 'create', array_merge($this->_params, array('contribution_status_id' => 2)));
+    $this->callAPISuccess('contribution', 'create', array('id' => $contribution['id'], 'source' => 'new source'));
+    $contribution = $this->callAPISuccess('contribution', 'getsingle', array('id' => $contribution['id'], 'api.contribution.delete' => 1));
+    $this->assertEquals(2, $contribution['contribution_status_id']);
+  }
   //To Update Contribution
   //CHANGE: we require the API to do an incremental update
   function testCreateUpdateContribution() {
@@ -1397,6 +1406,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->callAPISuccess('line_item', 'create', array(
       'entity_id' => $contribution['id'],
       'entity_table' => 'civicrm_contribution',
+      'contribution_id' => $contribution['id'],
       'price_field_id' => $this->_ids['price_field'][0],
       'qty' => 1,
       'unit_price' => 20,
index cc43ccaa179855fe2659b0c0d1f4dfa8e3afa685..0597397e501dcb058a40693a3bb1304e5cecdfd6 100644 (file)
@@ -50,7 +50,7 @@ class api_v3_GroupNestingTest extends CiviUnitTestCase {
     //  from_email_address group
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+      $this->createXMLDataSet(
         dirname(__FILE__) . '/dataset/group_admins.xml'
       )
     );
@@ -59,7 +59,7 @@ class api_v3_GroupNestingTest extends CiviUnitTestCase {
     //  from_email_address group
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+      $this->createXMLDataSet(
         dirname(__FILE__) . '/dataset/group_subscribers.xml'
       )
     );
@@ -68,7 +68,7 @@ class api_v3_GroupNestingTest extends CiviUnitTestCase {
     //  from_email_address group
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+      $this->createXMLDataSet(
         dirname(__FILE__) . '/dataset/group_nesting.xml'
       )
     );
index 292995e0749bafa57207cf3745ac18e704770dbf..47f038e90de410d737f564e79cf0aca06ad62118 100644 (file)
@@ -133,13 +133,13 @@ class api_v3_MailingContactTest extends CiviUnitTestCase {
         $op = new PHPUnit_Extensions_Database_Operation_Insert();
         //Create the User
         $op->execute($this->_dbconn,
-          new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+          $this->createXMLDataSet(
             dirname(__FILE__) . '/dataset/mailing_contact.xml'
           )
         );
         //~ Create the Mailing and connections to the user
         $op->execute($this->_dbconn,
-          new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+          $this->createXMLDataSet(
             dirname(__FILE__) . '/dataset/mailing_delivered.xml'
           )
         );
@@ -168,13 +168,13 @@ class api_v3_MailingContactTest extends CiviUnitTestCase {
         $op = new PHPUnit_Extensions_Database_Operation_Insert();
         //Create the User
         $op->execute($this->_dbconn,
-          new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+          $this->createXMLDataSet(
             dirname(__FILE__) . '/dataset/mailing_contact.xml'
           )
         );
         //~ Create the Mailing and connections to the user
         $op->execute($this->_dbconn,
-          new PHPUnit_Extensions_Database_DataSet_XMLDataSet(
+          $this->createXMLDataSet(
             dirname(__FILE__) . '/dataset/mailing_bounced.xml'
           )
         );
index 70f6346668e41507a2eb542f52da44d9a31aa4a3..b8611d21aa76fc9557ce95a0ed9f2cfc77178627 100644 (file)
@@ -506,14 +506,13 @@ class api_v3_MembershipTest extends CiviUnitTestCase {
       'membership_type_id' => $membershipTypeId,
     );
     $result = $this->callAPISuccess('membership', 'get', $params);
-    //exit;
     // If it fails here CRM-14758 is not fixed
     $this->assertEquals(1, $result['count']);
     $result = $result['values'][$result['id']];
     $this->assertEquals($OrganizationMembershipID, $result['owner_membership_id']);
 
     // Create third employee
-    $memberContactId[2] = $this->individualCreate(array('current_employer' => $employerId[0]), 2);
+    $memberContactId[2] = $this->individualCreate(array('employer_id' => $employerId[0]), 2);
 
     // Check that employee does NOT inherit the membership (max_related = 2)
     $params = array(
index 96a1f6263549784cb96eebbb4f6ca11b2df8a5f0..91ca2e99f45efc9a210b44036f50246abf8d372d 100644 (file)
@@ -421,6 +421,100 @@ class api_v3_ParticipantTest extends CiviUnitTestCase {
 
     $this->callAPISuccess('participant', 'delete', array('id' => $participant['id']));
   }
+
+  /**
+    * Test the line items for participant fee with multiple price field values.
+    */
+  function testCreateParticipantLineItems() {
+    // Create a price set for this event.
+
+    $priceset = $this->callAPISuccess('PriceSet', 'create', array(
+      'name' => 'my_price_set',
+      'title' => 'My Price Set',
+      'is_active' => 1,
+      'extends' => 1,
+      'financial_type_id' => 4,
+      // 'entity' => array('civicrm_event' => array($this->_eventID)),
+    ));
+
+    // Add the price set to the event with another API call.
+    // I tried to do this at once, but it did not work.
+
+    $priceset = $this->callAPISuccess('PriceSet', 'create', array(
+      'entity_table' => 'civicrm_event',
+      'entity_id' => $this->_eventID,
+      'id' => $priceset['id'],
+    ));
+
+    $pricefield = $this->callAPISuccess('PriceField', 'create', array(
+      'price_set_id' => $priceset['id'],
+      'name' => 'mypricefield',
+      'label' => 'My Price Field',
+      'html_type' => 'Text',
+      'is_enter_qty' => 1,
+      'is_display_amounts' => 1,
+      'is_active' => 1,
+    ));
+
+    $pfv1 = $this->callAPISuccess('PriceFieldValue', 'create', array(
+      'price_field_id' => $pricefield['id'],
+      'name' => 'pricefieldvalue1',
+      'label' => 'pricefieldvalue1',
+      'amount' => 20,
+      'is_active' => 1,
+      'financial_type_id' => 4,
+    ));
+
+    $pfv2 = $this->callAPISuccess('PriceFieldValue', 'create', array(
+      'price_field_id' => $pricefield['id'],
+      'name' => 'pricefieldvalue2',
+      'label' => 'pricefieldvalue2',
+      'amount' => 5,
+      'is_active' => 1,
+      'financial_type_id' => 4,
+    ));
+
+    // pay 2 times price field value 1, and 2 times price field value 2.
+    $myParams = $this->_params + array('participant_fee_level' => CRM_Core_DAO::VALUE_SEPARATOR . "pricefieldvalue1 - 2" . CRM_Core_DAO::VALUE_SEPARATOR . "pricefieldvalue2 - 2" . CRM_Core_DAO::VALUE_SEPARATOR);
+    $participant = $this->callAPISuccess('participant', 'create', $myParams);
+
+    // expect 2 line items.
+    $lineItems = $this->callAPISuccess('LineItem', 'get', array(
+      'entity_id' => $participant['id'],
+      'entity_table' => 'civicrm_participant',
+    ));
+
+    $this->assertEquals(2, $lineItems['count']);
+
+    // Check quantity, label and unit price of lines.
+    // TODO: These assertions depend on the order of the line items, which is 
+    // technically incorrect.
+
+    $lineItem = array_pop($lineItems['values']);
+    $this->assertEquals(2, $lineItem['qty']);
+    $this->assertEquals(5, $lineItem['unit_price']);
+    $this->assertEquals('pricefieldvalue2', $lineItem['label']);
+
+    $lineItem = array_pop($lineItems['values']);
+    $this->assertEquals(2, $lineItem['qty']);
+    $this->assertEquals(20, $lineItem['unit_price']);
+    $this->assertEquals('pricefieldvalue1', $lineItem['label']);
+
+    // Cleanup
+    $this->callAPISuccess('participant', 'delete', array('id' => $participant['id']));
+
+    // TODO: I think the price set should be removed, but I don't know how
+    // to decouple it properly from the event. For the moment, I'll just comment
+    // out the lines below.
+
+    /*
+    $this->callAPISuccess('PriceFieldValue', 'delete', array('id' => $pfv1['id']));
+    $this->callAPISuccess('PriceFieldValue', 'delete', array('id' => $pfv2['id']));
+    $this->callAPISuccess('PriceField', 'delete', array('id' => $pricefield['id']));
+    $this->callAPISuccess('PriceSet', 'delete', array('id' => $priceset['id']));
+    */
+  }
+
   /**
    * check with complete array
    */
index 1a1e6ecb1854ffcd8b980d76a3ecc56083e11cc2..b73cbc570cde1d96b9f2d8b4e75f4406aa37e999 100644 (file)
@@ -758,7 +758,7 @@ class api_v3_ProfileTest extends CiviUnitTestCase {
     // @TODO: Create profile with custom fields
     $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute($this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(
+      $this->createFlatXMLDataSet(
         dirname(__FILE__) . '/dataset/uf_group_contact_activity_26.xml'
       )
     );
index 13dc3b441b2ee73d3a01b6c295f299e757ee2b2d..bd65c3865138121169f3d49ee61966b97bad8374 100644 (file)
@@ -159,6 +159,12 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
     return static::entities(static::toBeSkipped_delete(TRUE));
   }
 
+  /**
+   * @return array
+   */
+  public static function entities_getfields() {
+    return static::entities(static::toBeSkipped_getfields(TRUE));
+  }
   /**
    * @return array
    */
@@ -250,6 +256,23 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
     return $entities;
   }
 
+  /**
+   * @param bool $sequential
+   *
+   * @return array
+   * @todo add metadata for ALL these entities
+   */
+  public static function toBeSkipped_getfields($sequential = FALSE) {
+    $entitiesWithMetadataNotYetFixed = array('ReportTemplate', 'CustomSearch');
+    if ($sequential === TRUE) {
+      return $entitiesWithMetadataNotYetFixed ;
+    }
+    $entities = array();
+    foreach ($entitiesWithMetadataNotYetFixed as $e) {
+      $entities[] = array($e);
+    }
+    return $entities;
+  }
 /**
  * Generate list of entities to test for get by id functions
  * @param boolean $sequential
@@ -1100,6 +1123,44 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
     );
   }
 
+  /**
+   * Create two entities and make sure delete action only deletes one!
+   *
+   * @dataProvider entities_getfields
+   *
+   */
+  public function testGetfieldsHasTitle($entity) {
+    $entities = $this->getEntitiesSupportingCustomFields();
+    if (in_array($entity, $entities)) {
+      $ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, $entity . 'Test.php');
+    }
+    $fields = $this->callAPISuccess($entity, 'getfields', array('action' => 'create'));
+    if (!empty($ids)) {
+      $this->assertArrayHasKey('custom_' . $ids['custom_field_id'], $fields['values']);
+    }
+
+    foreach ($fields['values'] as $fieldName => $fieldSpec) {
+      $this->assertArrayHasKey('title', $fieldSpec, "no title for $entity - $fieldName");
+      $this->assertNotEmpty($fieldSpec['title'], "empty title for $entity - $fieldName");
+    }
+
+    if (!empty($ids)) {
+      $this->customFieldDelete($ids['custom_field_id']);
+      $this->customGroupDelete($ids['custom_group_id']);
+    }
+  }
+
+  /**
+   * @return array
+   */
+  public function getEntitiesSupportingCustomFields() {
+    $entities = self::custom_data_entities_get();
+    $returnEntities = array();
+    foreach ($entities as $entityArray) {
+      $returnEntities[] = $entityArray[0];
+    }
+    return $returnEntities;
+  }
   /**
    * @param $entityName
    * @param int $count
@@ -1274,5 +1335,4 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
       1 => array($eventId, 'Integer')
     ));
   }
-
 }
index 60d37a7146af5e9fe4008f692f1719abc18ad60a..b09f62da25b4a2038851bd583132e1a9d9aabb9b 100644 (file)
@@ -60,7 +60,7 @@ class api_v3_UFFieldTest extends CiviUnitTestCase {
     $op = new PHPUnit_Extensions_Database_Operation_Insert;
     $op->execute(
       $this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(dirname(__FILE__) . '/dataset/uf_group_test.xml')
+      $this->createFlatXMLDataSet(dirname(__FILE__) . '/dataset/uf_group_test.xml')
     );
 
     $this->callAPISuccess('uf_field', 'getfields', array('cache_clear' => 1));
index 0efbd0407af9f4205cf6d524b6bb687d5d682b6f..164827e0676f208622ec8002cd6d5f6d7336f050 100644 (file)
@@ -59,7 +59,7 @@ class api_v3_UFJoinTest extends CiviUnitTestCase {
     $op = new PHPUnit_Extensions_Database_Operation_Insert;
     $op->execute(
       $this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(dirname(__FILE__) . '/dataset/uf_group_test.xml')
+      $this->createFlatXMLDataSet(dirname(__FILE__) . '/dataset/uf_group_test.xml')
     );
   }
 
index 6f2f86985e7267536941a09fdbd24445204d560e..3849d0f85c2e046ef40b610a169e48fb8fe27949 100644 (file)
@@ -62,7 +62,7 @@ class api_v3_UFMatchTest extends CiviUnitTestCase {
     $op = new PHPUnit_Extensions_Database_Operation_Insert;
     $op->execute(
       $this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(dirname(__FILE__) . '/dataset/uf_group_test.xml')
+      $this->createFlatXMLDataSet(dirname(__FILE__) . '/dataset/uf_group_test.xml')
     );
 
     $this->_params = array(
index 473ca8b47ac4918d2be7bd0f0c4c003a1f2f0f95..f66785dbcdb17cb3b6913bfa862963780c5571e8 100644 (file)
 {/if}
 </div>
 {/if}
-{literal}
-<script type="text/javascript">
-CRM.$(function($) {
-   cj().crmaccordions(); 
-});
-</script>
-{/literal}
index 4fafd0cc3745450bfcab1f41a47ecde65fa70264..8b0d1b07b7e1c8d0ec5c54647c8e05d1f87d1817 100644 (file)
@@ -56,7 +56,7 @@ class org_civicrm_search_multivalue extends CRM_Contact_Form_Search_Custom_Basei
       NULL, -1
     );
 
-    $this->_columns = array(ts('Contact Id') => 'contact_id',
+    $this->_columns = array(ts('Contact ID') => 'contact_id',
       ts('Contact Type') => 'contact_type',
       ts('Name') => 'sort_name',
     );
diff --git a/tools/extensions/org.civicrm.sms.clickatell.zip b/tools/extensions/org.civicrm.sms.clickatell.zip
deleted file mode 100644 (file)
index b20af57..0000000
Binary files a/tools/extensions/org.civicrm.sms.clickatell.zip and /dev/null differ
diff --git a/tools/extensions/org.civicrm.sms.clickatell/clickatell.civix.php b/tools/extensions/org.civicrm.sms.clickatell/clickatell.civix.php
deleted file mode 100644 (file)
index d68aadb..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-<?php
-
-// AUTO-GENERATED FILE -- Civix may overwrite any changes made to this file
-
-/**
- * (Delegated) Implementation of hook_civicrm_config
- */
-function _clickatell_civix_civicrm_config(&$config = NULL) {
-  static $configured = FALSE;
-  if ($configured) return;
-  $configured = TRUE;
-
-  $template =& CRM_Core_Smarty::singleton();
-
-  $extRoot = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
-  $extDir = $extRoot . 'templates';
-
-  if ( is_array( $template->template_dir ) ) {
-      array_unshift( $template->template_dir, $extDir );
-  } else {
-      $template->template_dir = array( $extDir, $template->template_dir );
-  }
-
-  $include_path = $extRoot . PATH_SEPARATOR . get_include_path( );
-  set_include_path( $include_path );
-}
-
-/**
- * (Delegated) Implementation of hook_civicrm_xmlMenu
- *
- * @param $files array(string)
- */
-function _clickatell_civix_civicrm_xmlMenu(&$files) {
-  foreach (glob(__DIR__ . '/xml/Menu/*.xml') as $file) {
-    $files[] = $file;
-  }
-}
-
-/**
- * Implementation of hook_civicrm_install
- */
-function _clickatell_civix_civicrm_install() {
-  _clickatell_civix_civicrm_config();
-  if ($upgrader = _clickatell_civix_upgrader()) {
-    return $upgrader->onInstall();
-  }
-}
-
-/**
- * Implementation of hook_civicrm_uninstall
- */
-function _clickatell_civix_civicrm_uninstall() {
-  _clickatell_civix_civicrm_config();
-  if ($upgrader = _clickatell_civix_upgrader()) {
-    return $upgrader->onUninstall();
-  }
-}
-
-/**
- * (Delegated) Implementation of hook_civicrm_enable
- */
-function _clickatell_civix_civicrm_enable() {
-  _clickatell_civix_civicrm_config();
-  if ($upgrader = _clickatell_civix_upgrader()) {
-    if (is_callable(array($upgrader, 'onEnable'))) {
-      return $upgrader->onEnable();
-    }
-  }
-}
-
-/**
- * (Delegated) Implementation of hook_civicrm_disable
- */
-function _clickatell_civix_civicrm_disable() {
-  _clickatell_civix_civicrm_config();
-  if ($upgrader = _clickatell_civix_upgrader()) {
-    if (is_callable(array($upgrader, 'onDisable'))) {
-      return $upgrader->onDisable();
-    }
-  }
-}
-
-/**
- * (Delegated) Implementation of hook_civicrm_upgrade
- *
- * @param $op string, the type of operation being performed; 'check' or 'enqueue'
- * @param $queue CRM_Queue_Queue, (for 'enqueue') the modifiable list of pending up upgrade tasks
- *
- * @return mixed  based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending)
- *                for 'enqueue', returns void
- */
-function _clickatell_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) {
-  if ($upgrader = _clickatell_civix_upgrader()) {
-    return $upgrader->onUpgrade($op, $queue);
-  }
-}
-
-/**
- * @return null
- */
-function _clickatell_civix_upgrader() {
-  if (!file_exists(__DIR__.'/CRM/Clickatell/Upgrader.php')) {
-    return NULL;
-  } else {
-    return CRM_Clickatell_Upgrader_Base::instance();
-  }
-}
-
-/**
- * Search directory tree for files which match a glob pattern
- *
- * @param $dir string, base dir
- * @param $pattern string, glob pattern, eg "*.txt"
- * @return array(string)
- */
-function _clickatell_civix_find_files($dir, $pattern) {
-  $todos = array($dir);
-  $result = array();
-  while (!empty($todos)) {
-    $subdir = array_shift($todos);
-    foreach (glob("$subdir/$pattern") as $match) {
-      if (!is_dir($match)) {
-        $result[] = $match;
-      }
-    }
-    if ($dh = opendir($subdir)) {
-      while (FALSE !== ($entry = readdir($dh))) {
-        $path = $subdir . DIRECTORY_SEPARATOR . $entry;
-        if ($entry == '.' || $entry == '..') {
-        } elseif (is_dir($path)) {
-          $todos[] = $path;
-        }
-      }
-      closedir($dh);
-    }
-  }
-  return $result;
-}
-/**
- * (Delegated) Implementation of hook_civicrm_managed
- *
- * Find any *.mgd.php files, merge their content, and return.
- */
-function _clickatell_civix_civicrm_managed(&$entities) {
-  $mgdFiles = _clickatell_civix_find_files(__DIR__, '*.mgd.php');
-  foreach ($mgdFiles as $file) {
-    $es = include $file;
-    foreach ($es as $e) {
-      if (empty($e['module'])) {
-        $e['module'] = 'org.civicrm.sms.clickatell';
-      }
-      $entities[] = $e;
-    }
-  }
-}
diff --git a/tools/extensions/org.civicrm.sms.clickatell/clickatell.php b/tools/extensions/org.civicrm.sms.clickatell/clickatell.php
deleted file mode 100644 (file)
index 1ee37b1..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-
-require_once 'clickatell.civix.php';
-
-/**
- * Implementation of hook_civicrm_config
- */
-function clickatell_civicrm_config(&$config) {
-  _clickatell_civix_civicrm_config($config);
-}
-
-/**
- * Implementation of hook_civicrm_xmlMenu
- *
- * @param $files array(string)
- */
-function clickatell_civicrm_xmlMenu(&$files) {
-  _clickatell_civix_civicrm_xmlMenu($files);
-}
-
-/**
- * Implementation of hook_civicrm_install
- */
-function clickatell_civicrm_install() {
-  $groupID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup','sms_provider_name','id','name');
-  $params  = 
-    array('option_group_id' => $groupID,
-          'label' => 'Clickatell',
-          'value' => 'org.civicrm.sms.clickatell',
-          'name'  => 'clickatell',
-          'is_default' => 1,
-          'is_active'  => 1,
-          'version'    => 3,);
-  require_once 'api/api.php';
-  civicrm_api( 'option_value','create', $params );
-  
-  return _clickatell_civix_civicrm_install();
-}
-
-/**
- * Implementation of hook_civicrm_uninstall
- */
-function clickatell_civicrm_uninstall() {
-  $optionID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue','clickatell','id','name');
-  if ($optionID)
-    CRM_Core_BAO_OptionValue::del($optionID); 
-  
-  $filter    =  array('name'  => 'org.civicrm.sms.clickatell');
-  $Providers =  CRM_SMS_BAO_Provider::getProviders(False, $filter, False);
-  if ($Providers){
-    foreach($Providers as $key => $value){
-      CRM_SMS_BAO_Provider::del($value['id']);
-    }
-  }
-  return _clickatell_civix_civicrm_uninstall();
-}
-
-/**
- * Implementation of hook_civicrm_enable
- */
-function clickatell_civicrm_enable() {
-  $optionID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue','clickatell' ,'id','name');
-  if ($optionID)
-    CRM_Core_BAO_OptionValue::setIsActive($optionID, TRUE); 
-  
-  $filter    =  array('name' => 'org.civicrm.sms.clickatell');
-  $Providers =  CRM_SMS_BAO_Provider::getProviders(False, $filter, False);
-  if ($Providers){
-    foreach($Providers as $key => $value){
-      CRM_SMS_BAO_Provider::setIsActive($value['id'], TRUE); 
-    }
-  }
-  return _clickatell_civix_civicrm_enable();
-}
-
-/**
- * Implementation of hook_civicrm_disable
- */
-function clickatell_civicrm_disable() {
-  $optionID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue','clickatell','id','name');
-  if ($optionID)
-    CRM_Core_BAO_OptionValue::setIsActive($optionID, FALSE);
-  
-  $filter    =  array('name' =>  'org.civicrm.sms.clickatell');
-  $Providers =  CRM_SMS_BAO_Provider::getProviders(False, $filter, False);
-  if ($Providers){
-    foreach($Providers as $key => $value){
-      CRM_SMS_BAO_Provider::setIsActive($value['id'], FALSE); 
-    }
-  }
-  return _clickatell_civix_civicrm_disable();
-}
-
-/**
- * Implementation of hook_civicrm_upgrade
- *
- * @param $op string, the type of operation being performed; 'check' or 'enqueue'
- * @param $queue CRM_Queue_Queue, (for 'enqueue') the modifiable list of pending up upgrade tasks
- *
- * @return mixed  based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending)
- *                for 'enqueue', returns void
- */
-function clickatell_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) {
-  return _clickatell_civix_civicrm_upgrade($op, $queue);
-}
-
-/**
- * Implementation of hook_civicrm_managed
- *
- * Generate a list of entities to create/deactivate/delete when this module
- * is installed, disabled, uninstalled.
- */
-function clickatell_civicrm_managed(&$entities) {
-  return _clickatell_civix_civicrm_managed($entities);
-}
diff --git a/tools/extensions/org.civicrm.sms.clickatell/info.xml b/tools/extensions/org.civicrm.sms.clickatell/info.xml
deleted file mode 100644 (file)
index 944b0d4..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<extension key="org.civicrm.sms.clickatell" type="module">
-  <downloadUrl>https://github.com/civicrm/civicrm-core/blob/4.3/tools/extensions/org.civicrm.sms.clickatell.zip?raw=true</downloadUrl>
-  <file>clickatell</file>
-  <name>clickatell</name>
-  <description>Clickatell integration allows delivering short message service (SMS) messages through its Clickatell Gateway to mobile phone users.</description>
-  <urls>
-    <url desc="Main Extension Page">http://civicrm.org</url>
-    <url desc="Documentation">http://wiki.civicrm.org/confluence/display/CRMDOC/Setting+up+a+SMS+Provider+for+CiviSMS</url>
-    <url desc="Support">http://forum.civicrm.org</url>
-    <url desc="Licensing">http://civicrm.org/licensing</url>
-  </urls>
-  <license>AGPL</license>
-  <maintainer>
-    <author>CiviCRM LLC</author>
-    <email>info@civicrm.org</email>
-  </maintainer>
-  <releaseDate>2012-11-15</releaseDate>
-  <version>1.0</version>
-  <develStage>stable</develStage>
-  <compatibility>
-    <ver>4.3</ver>
-  </compatibility>
-  <comments>For support, please contact project team on the forums.</comments>
-</extension>
diff --git a/tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php b/tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php
deleted file mode 100644 (file)
index 926d159..0000000
+++ /dev/null
@@ -1,465 +0,0 @@
-<?php
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM.                                    |
- |                                                                    |
- | CiviCRM is free software; you can copy, modify, and distribute it  |
- | under the terms of the GNU Affero General Public License           |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
- |                                                                    |
- | CiviCRM is distributed in the hope that it will be useful, but     |
- | WITHOUT ANY WARRANTY; without even the implied warranty of         |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
- | See the GNU Affero General Public License for more details.        |
- |                                                                    |
- | You should have received a copy of the GNU Affero General Public   |
- | License and the CiviCRM Licensing Exception along                  |
- | with this program; if not, contact CiviCRM LLC                     |
- | at info[AT]civicrm[DOT]org. If you have questions about the        |
- | GNU Affero General Public License or the licensing of CiviCRM,     |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
- +--------------------------------------------------------------------+
-*/
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
- */
-class org_civicrm_sms_clickatell extends CRM_SMS_Provider {
-
-  /**
-   * api type to use to send a message
-   * @var      string
-   */
-  protected $_apiType = 'http';
-
-  /**
-   * provider details
-   * @var      string
-   */
-  protected $_providerInfo = array();
-
-  /**
-   * Clickatell API Server Session ID
-   *
-   * @var string
-   */
-  protected $_sessionID = NULL;
-
-  /**
-   * Curl handle resource id
-   *
-   */
-  protected $_ch;
-
-  /**
-   * Temporary file resource id
-   * @var      resource
-   */
-  protected $_fp;
-
-  public $_apiURL = "https://api.clickatell.com";
-
-  protected $_messageType = array(
-    'SMS_TEXT',
-    'SMS_FLASH',
-    'SMS_NOKIA_OLOGO',
-    'SMS_NOKIA_GLOGO',
-    'SMS_NOKIA_PICTURE',
-    'SMS_NOKIA_RINGTONE',
-    'SMS_NOKIA_RTTL',
-    'SMS_NOKIA_CLEAN',
-    'SMS_NOKIA_VCARD',
-    'SMS_NOKIA_VCAL',
-  );
-
-  protected $_messageStatus = array(
-    '001' => 'Message unknown',
-    '002' => 'Message queued',
-    '003' => 'Delivered',
-    '004' => 'Received by recipient',
-    '005' => 'Error with message',
-    '006' => 'User cancelled message delivery',
-    '007' => 'Error delivering message',
-    '008' => 'OK',
-    '009' => 'Routing error',
-    '010' => 'Message expired',
-    '011' => 'Message queued for later delivery',
-    '012' => 'Out of credit',
-  );
-
-  /**
-   * We only need one instance of this object. So we use the singleton
-   * pattern and cache the instance in this variable
-   *
-   * @var object
-   * @static
-   */
-  static private $_singleton = array();
-
-  /**
-   * Constructor
-   *
-   * Create and auth a Clickatell session.
-   *
-   * @param array $provider
-   * @param bool $skipAuth
-   *
-   * @return \org_civicrm_sms_clickatell
-   */
-  function __construct($provider = array( ), $skipAuth = FALSE) {
-    // initialize vars
-    $this->_apiType = CRM_Utils_Array::value('api_type', $provider, 'http');
-    $this->_providerInfo = $provider;
-
-    if ($skipAuth) {
-      return TRUE;
-    }
-
-    // first create the curl handle
-
-    /**
-     * Reuse the curl handle
-     */
-    $this->_ch = curl_init();
-    if (!$this->_ch || !is_resource($this->_ch)) {
-      return PEAR::raiseError('Cannot initialise a new curl handle.');
-    }
-
-    curl_setopt($this->_ch, CURLOPT_TIMEOUT, 20);
-    curl_setopt($this->_ch, CURLOPT_VERBOSE, 1);
-    curl_setopt($this->_ch, CURLOPT_FAILONERROR, 1);
-    if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {
-      curl_setopt($this->_ch, CURLOPT_FOLLOWLOCATION, 1);
-    }
-    curl_setopt($this->_ch, CURLOPT_COOKIEJAR, "/dev/null");
-    curl_setopt($this->_ch, CURLOPT_SSL_VERIFYHOST, 2);
-    curl_setopt($this->_ch, CURLOPT_USERAGENT, 'CiviCRM - http://civicrm.org/');
-
-    $this->authenticate();
-  }
-
-  /**
-   * singleton function used to manage this object
-   *
-   * @param array $providerParams
-   * @param bool $force
-   * @return object
-   * @static
-   */
-  static function &singleton($providerParams = array(
-    ), $force = FALSE) {
-    $providerID = CRM_Utils_Array::value('provider_id', $providerParams);
-    $skipAuth   = $providerID ? FALSE : TRUE;
-    $cacheKey   = (int) $providerID;
-
-    if (!isset(self::$_singleton[$cacheKey]) || $force) {
-      $provider = array();
-      if ($providerID) {
-        $provider = CRM_SMS_BAO_Provider::getProviderInfo($providerID);
-      }
-      self::$_singleton[$cacheKey] = new org_civicrm_sms_clickatell($provider, $skipAuth);
-    }
-    return self::$_singleton[$cacheKey];
-  }
-
-  /**
-   * Authenticate to the Clickatell API Server.
-   *
-   * @return mixed true on sucess or PEAR_Error object
-   * @access public
-   * @since 1.1
-   */
-  function authenticate() {
-    $url = $this->_providerInfo['api_url'] . "/http/auth";
-
-    $postDataArray = array(
-      'user'     => $this->_providerInfo['username'],
-      'password' => $this->_providerInfo['password'],
-      'api_id'    => $this->_providerInfo['api_params']['api_id']
-    );
-
-    if (array_key_exists('is_test', $this->_providerInfo['api_params']) &&
-        $this->_providerInfo['api_params']['is_test'] == 1 ) {
-        $response = array('data' => 'OK:' . rand());
-    } else {
-      $postData = $this->urlEncode($postDataArray);
-      $response = $this->curl($url, $postData);
-    }
-    if (PEAR::isError($response)) {
-      return $response;
-    }
-    $sess = explode(":", $response['data']);
-
-    $this->_sessionID = trim($sess[1]);
-
-    if ($sess[0] == "OK") {
-      return TRUE;
-    }
-    else {
-      return PEAR::raiseError($response['data']);
-    }
-  }
-
-  /**
-   * @param $url
-   * @param $postDataArray
-   * @param null $id
-   *
-   * @return object|string
-   */
-  function formURLPostData($url, &$postDataArray, $id = NULL) {
-    $url = $this->_providerInfo['api_url'] . $url;
-    $postDataArray['session_id'] = $this->_sessionID;
-    if ($id) {
-      if (strlen($id) < 32 || strlen($id) > 32) {
-        return PEAR::raiseError('Invalid API Message Id');
-      }
-      $postDataArray['apimsgid'] = $id;
-    }
-    return $url;
-  }
-
-  /**
-   * Send an SMS Message via the Clickatell API Server
-   *
-   * @param $recipients
-   * @param $header
-   * @param $message
-   * @param null $jobID
-   * @param null $userID
-   * @internal param \the $array message with a to/from/text
-   *
-   * @return mixed true on sucess or PEAR_Error object
-   * @access public
-   */
-  function send($recipients, $header, $message, $jobID = NULL, $userID = NULL) {
-    if ($this->_apiType == 'http') {
-      $postDataArray = array( );
-      $url = $this->formURLPostData("/http/sendmsg", $postDataArray);
-
-      if (array_key_exists('from', $this->_providerInfo['api_params'])) {
-        $postDataArray['from'] = $this->_providerInfo['api_params']['from'];
-      }
-      if (array_key_exists('concat', $this->_providerInfo['api_params'])) {
-        $postDataArray['concat'] = $this->_providerInfo['api_params']['concat'];
-      }
-      //TODO:
-      $postDataArray['to']   = $header['To'];
-      $postDataArray['text'] = utf8_decode(substr($message, 0, 460)); // max of 460 characters, is probably not multi-lingual
-      if (array_key_exists('mo', $this->_providerInfo['api_params'])) {
-        $postDataArray['mo'] = $this->_providerInfo['api_params']['mo'];
-      }
-      // sendmsg with callback request:
-      $postDataArray['callback'] = 3;
-
-      $isTest = 0;
-      if (array_key_exists('is_test', $this->_providerInfo['api_params']) &&
-        $this->_providerInfo['api_params']['is_test'] == 1
-      ) {
-        $isTest = 1;
-      }
-
-      /**
-       * Check if we are using a queue when sending as each account
-       * with Clickatell is assigned three queues namely 1, 2 and 3.
-       */
-      if (isset($header['queue']) && is_numeric($header['queue'])) {
-        if (in_array($header['queue'], range(1, 3))) {
-          $postDataArray['queue'] = $header['queue'];
-        }
-      }
-
-      /**
-       * Must we escalate message delivery if message is stuck in
-       * the queue at Clickatell?
-       */
-      if (isset($header['escalate']) && !empty($header['escalate'])) {
-        if (is_numeric($header['escalate'])) {
-          if (in_array($header['escalate'], range(1, 2))) {
-            $postDataArray['escalate'] = $header['escalate'];
-          }
-        }
-      }
-
-      if ($isTest == 1) {
-        $response = array('data' => 'ID:' . rand());
-      }
-      else {
-        $postData = $this->urlEncode($postDataArray);
-        $response = $this->curl($url, $postData);
-      }
-      if (PEAR::isError($response)) {
-        return $response;
-      }
-      $send = explode(":", $response['data']);
-
-      if ($send[0] == "ID") {
-        $this->createActivity($send[1], $message, $header, $jobID, $userID);
-        return $send[1];
-      }
-      else {
-        // TODO: Should add a failed activity instead.
-        CRM_Core_Error::debug_log_message($response['data'] . " - for phone: {$postDataArray['to']}");
-        return PEAR::raiseError($response['data'], null, PEAR_ERROR_RETURN);
-      }
-    }
-  }
-
-  /**
-   * @return bool
-   */
-  function callback() {
-    $apiMsgID = $this->retrieve('apiMsgId', 'String');
-
-    $activity = new CRM_Activity_DAO_Activity();
-    $activity->result = $apiMsgID;
-
-    if ($activity->find(TRUE)) {
-      $actStatusIDs = array_flip(CRM_Core_OptionGroup::values('activity_status'));
-
-      $status = $this->retrieve('status', 'String');
-      switch ($status) {
-        case "001":
-          $statusID = $actStatusIDs['Cancelled'];
-          $clickStat = $this->_messageStatus[$status] . " - Message Unknown";
-          break;
-
-        case "002":
-          $statusID = $actStatusIDs['Scheduled'];
-          $clickStat = $this->_messageStatus[$status] . " - Message Queued";
-          break;
-
-        case "003":
-          $statusID = $actStatusIDs['Completed'];
-          $clickStat = $this->_messageStatus[$status] . " - Delivered to Gateway";
-          break;
-
-        case "004":
-          $statusID = $actStatusIDs['Completed'];
-          $clickStat = $this->_messageStatus[$status] . " - Received by Recipient";
-          break;
-
-        case "005":
-          $statusID = $actStatusIDs['Cancelled'];
-          $clickStat = $this->_messageStatus[$status] . " - Error with Message";
-          break;
-
-        case "006":
-          $statusID = $actStatusIDs['Cancelled'];
-          $clickStat = $this->_messageStatus[$status] . " - User cancelled message";
-          break;
-
-        case "007":
-          $statusID = $actStatusIDs['Cancelled'];
-          $clickStat = $this->_messageStatus[$status] . " - Error delivering message";
-          break;
-
-        case "008":
-          $statusID = $actStatusIDs['Completed'];
-          $clickStat = $this->_messageStatus[$status] . " - Ok, Message Received by Gateway";
-          break;
-
-        case "009":
-          $statusID = $actStatusIDs['Cancelled'];
-          $clickStat = $this->_messageStatus[$status] . " - Routing Error";
-          break;
-
-        case "010":
-          $statusID = $actStatusIDs['Cancelled'];
-          $clickStat = $this->_messageStatus[$status] . " - Message Expired";
-          break;
-
-        case "011":
-          $statusID = $actStatusIDs['Scheduled'];
-          $clickStat = $this->_messageStatus[$status] . " - Message Queued for Later";
-          break;
-
-        case "012":
-          $statusID = $actStatusIDs['Cancelled'];
-          $clickStat = $this->_messageStatus[$status] . " - Out of Credit";
-          break;
-      }
-
-      if ($statusID) {
-        // update activity with status + msg in location
-        $activity->status_id = $statusID;
-        $activity->location = $clickStat;
-        $activity->activity_date_time = CRM_Utils_Date::isoToMysql($activity->activity_date_time);
-        $activity->save();
-        CRM_Core_Error::debug_log_message("SMS Response updated for apiMsgId={$apiMsgID}.");
-        return TRUE;
-      }
-    }
-
-    // if no update is done
-    CRM_Core_Error::debug_log_message("Could not update SMS Response for apiMsgId={$apiMsgID}.");
-    return FALSE;
-  }
-
-  /**
-   * @return $this|null|object
-   */
-  function inbound() {
-    $like      = "";
-    $fromPhone = $this->retrieve('from', 'String');
-    $fromPhone = $this->formatPhone($this->stripPhone($fromPhone), $like, "like");
-
-    return parent::processInbound($fromPhone, $this->retrieve('text', 'String'), NULL, $this->retrieve('moMsgId', 'String'));
-  }
-
-  /**
-   * Perform curl stuff
-   *
-   * @param   string  URL to call
-   * @param   string  HTTP Post Data
-   *
-   * @return  mixed   HTTP response body or PEAR Error Object
-   * @access   private
-   */
-  function curl($url, $postData) {
-    $this->_fp = tmpfile();
-
-    curl_setopt($this->_ch, CURLOPT_URL, $url);
-    curl_setopt($this->_ch, CURLOPT_POST, 1);
-    curl_setopt($this->_ch, CURLOPT_POSTFIELDS, $postData);
-    curl_setopt($this->_ch, CURLOPT_FILE, $this->_fp);
-
-    $status = curl_exec($this->_ch);
-    $response['http_code'] = curl_getinfo($this->_ch, CURLINFO_HTTP_CODE);
-
-    if (empty($response['http_code'])) {
-      return PEAR::raiseError('No HTTP Status Code was returned.');
-    }
-    elseif ($response['http_code'] === 0) {
-      return PEAR::raiseError('Cannot connect to the Clickatell API Server.');
-    }
-
-    if ($status) {
-      $response['error'] = curl_error($this->_ch);
-      $response['errno'] = curl_errno($this->_ch);
-    }
-
-    rewind($this->_fp);
-
-    $pairs = "";
-    while ($str = fgets($this->_fp, 4096)) {
-      $pairs .= $str;
-    }
-    fclose($this->_fp);
-
-    $response['data'] = $pairs;
-    unset($pairs);
-    asort($response);
-
-    return ($response);
-  }
-}
-
diff --git a/tools/scripts/jmat b/tools/scripts/jmat
new file mode 100755 (executable)
index 0000000..c29dcfa
--- /dev/null
@@ -0,0 +1,105 @@
+#!/bin/bash
+####################################################################
+function show_help() {
+  echo "Jeanine Matthews - Divergent Hunter"
+  echo "summary: Execute test suite in multiple ways and compare results"
+  echo "usage: env [var1=... var2=...] $0 [--bundled-full|--bf] [--bundled-indiv|--bi] [--standalone-full|--sf] [--standalone-indiv|--si] [--compare]"
+  echo "Optional variables:"
+  echo "  - CIVI: Path to Civi installation [$CIVI]"
+  echo "  - PHP: Path to PHP binary [$PHP]"
+  echo "  - PHPUNIT: Path to phpunit binary [$PHPUNIT]"
+  echo "  - TESTCLASS: PHP class name for the test case/suite [$TESTCLASS]"
+  echo "  - TESTPATH: Path for the test file/directory (Note: MUST match TESTCLASS) [$TESTPATH]"
+  echo "  - OUTDIR: Folder to which outputs are written [$OUTDIR]"
+}
+
+function reset_dir() {
+  [ -d "$1" ] && rm -rf "$1"
+  mkdir -p "$1"
+}
+
+####################################################################
+## Env
+export PHP=${PHP:-php}
+export PHPUNIT=${PHPUNIT:-phpunit}
+export TESTCLASS=${TESTCLASS:-api_v3_AllTests}
+export TESTPATH=${TESTPATH:-tests/phpunit/api/v3}
+export CIVI=$(realpath "${CIVI:-.}")
+export OUTDIR=$(realpath "${OUTDIR:-output}")
+
+####################################################################
+## Main
+if [ -z "$1" ];then
+  show_help
+  exit 1
+fi
+
+while [ -n "$1" ]; do
+  OPTION="$1"
+  shift
+
+  case "$OPTION" in
+    --bundled-full|--bf)
+      echo "[[ Prepare $OUTDIR/bundled-full ]]"
+
+      [ -d "packages/PHPUnit.bak" ] && mv "packages/PHPUnit.bak" "packages/PHPUnit"
+      if [ ! -d "$CIVI/packages/PHPUnit" ]; then
+        echo "Missing $CIVI/packages/PHPUnit"
+        exit 2
+      fi
+
+      reset_dir "$OUTDIR/bundled-full"
+
+      pushd "$CIVI/tools"
+        $PHP ./scripts/phpunit --tap --log-json "$OUTDIR/bundled-full/all.json" "$TESTCLASS"
+      popd
+      ;;
+
+    --bundled-indiv|--bi)
+      echo "[[ Prepare $OUTDIR/bundled-indiv ]]"
+
+      [ -d "packages/PHPUnit.bak" ] && mv "packages/PHPUnit.bak" "packages/PHPUnit"
+      if [ ! -d "$CIVI/packages/PHPUnit" ]; then
+        echo "Missing $CIVI/packages/PHPUnit"
+        exit 2
+      fi
+
+      reset_dir "$OUTDIR/bundled-indiv"
+
+      pushd "$CIVI/tools"
+        ./scripts/phpunit-indiv --civi --test-dir "../$TESTPATH" --json-dir "$OUTDIR/bundled-indiv"
+      popd
+
+      cat "$OUTDIR"/bundled-indiv/*-*.json > "$OUTDIR/bundled-indiv/all.json"
+      ;;
+
+    --standalone-full|--sf)
+      echo "[[ Prepare $OUTDIR/standalone-full ]]"
+      reset_dir "$OUTDIR/standalone-full"
+
+      pushd "$CIVI"
+        [ -d "packages/PHPUnit" ] && mv "packages/PHPUnit" "packages/PHPUnit.bak"
+        $PHP $(which $PHPUNIT) --tap --log-json "$OUTDIR/standalone-full/all.json" "$TESTPATH"
+        [ -d "packages/PHPUnit.bak" ] && mv "packages/PHPUnit.bak" "packages/PHPUnit"
+      popd
+      ;;
+
+    --standalone-indiv|--si)
+      echo "[[ Prepare $OUTDIR/standalone-indiv ]]"
+      reset_dir "$OUTDIR/standalone-indiv"
+
+      pushd "$CIVI"
+        [ -d "packages/PHPUnit" ] && mv "packages/PHPUnit" "packages/PHPUnit.bak"
+        ./tools/scripts/phpunit-indiv --test-dir "$TESTPATH" --json-dir "$OUTDIR/standalone-indiv"
+        [ -d "packages/PHPUnit.bak" ] && mv "packages/PHPUnit.bak" "packages/PHPUnit"
+      popd
+
+      cat "$OUTDIR"/standalone-indiv/*-*.json > "$OUTDIR/standalone-indiv/all.json"
+      ;;
+
+    --compare)
+      echo "[[ Compare all results in $OUTDIR ]]"
+      phpunit-compare "$OUTDIR"/*/all.json
+      ;;
+  esac
+done
diff --git a/tools/scripts/phpunit-antagonist b/tools/scripts/phpunit-antagonist
new file mode 100755 (executable)
index 0000000..996c553
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/env php
+<?php
+require_once dirname(dirname(__DIR__)) . '/tests/phpunit/CiviTest/bootstrap.php';
+\Civi\CiUtil\Command\AntagonistCommand::main($argv);
diff --git a/tools/scripts/phpunit-compare b/tools/scripts/phpunit-compare
new file mode 100755 (executable)
index 0000000..a04c3d7
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/env php
+<?php
+require_once dirname(dirname(__DIR__)) . '/tests/phpunit/CiviTest/bootstrap.php';
+\Civi\CiUtil\Command\CompareCommand::main($argv);
diff --git a/tools/scripts/phpunit-indiv b/tools/scripts/phpunit-indiv
new file mode 100755 (executable)
index 0000000..c681c56
--- /dev/null
@@ -0,0 +1,78 @@
+#!/bin/bash
+function absdirname() {
+  pushd $(dirname $0) >> /dev/null
+    pwd
+  popd >> /dev/null
+}
+
+BINDIR=$(absdirname "$0")
+PHP=${PHP:-php}
+PHPUNIT=${PHPUNIT:-phpunit}
+MODE=standalone
+XMLDIR=
+JSONDIR=
+
+while [ -n "$1" ]; do
+  ARG="$1"
+  shift
+
+  case "$ARG" in
+    --civi)
+      MODE=civi
+      ;;
+    --civibuild-restore)
+      CIVIBUILD_RESTORE="$1"
+      shift
+      ;;
+    --test-dir)
+      TESTSUITE="$1"
+      shift
+      ;;
+    --json-dir)
+      JSONDIR="$1"
+      [ ! -d "$JSONDIR" ] && mkdir -p "$JSONDIR"
+      shift
+      ;;
+    --xml-dir)
+      XMLDIR="$1"
+      [ ! -d "$XMLDIR" ] && mkdir -p "$XMLDIR"
+      shift
+      ;;
+    *)
+      echo "unrecognized option: $ARG"
+      ;;
+  esac
+done
+
+
+if [ -z "$TESTSUITE" ]; then
+  echo "summary: Executes all tests in a suite (individually)"
+  echo "usage: $0 --test-dir <dir> [--json-dir <dir>] [--xml-dir <dir>] [--civi] [--civibuild-restore <build-name>]"
+  exit 1
+fi
+
+
+#phpunit-ls "$TESTSUITE"
+$BINDIR/phpunit-ls "$TESTSUITE" | while read FILE CLASS METHOD ; do
+  ## Optionally reset DBs
+  if [ -n "$CIVIBUILD_RESTORE" ]; then
+    civibuild restore "$CIVIBUILD_RESTORE"
+  fi
+
+  ## Prepare test command
+  PHPUNITARGS="--tap"
+  if [ -n "$JSONDIR" ]; then
+    PHPUNITARGS="$PHPUNITARGS --log-json $JSONDIR/$CLASS-$METHOD.json"
+  fi
+  if [ -n "$XMLDIR" ]; then
+    PHPUNITARGS="$PHPUNITARGS --log-junit $XMLDIR/$CLASS-$METHOD.xml"
+  fi
+
+  ## Run the test!
+  if [ "$MODE" == "civi" ]; then
+    $PHP ./scripts/phpunit $PHPUNITARGS --filter $METHOD'( with.*)?$' "$CLASS"
+  fi
+  if [ "$MODE" == "standalone" ]; then
+    $PHP $(which $PHPUNIT) $PHPUNITARGS --filter $METHOD'( with.*)?$' "$FILE"
+  fi
+done
diff --git a/tools/scripts/phpunit-ls b/tools/scripts/phpunit-ls
new file mode 100755 (executable)
index 0000000..6d6ffc2
--- /dev/null
@@ -0,0 +1,5 @@
+#!/usr/bin/env php
+<?php
+require_once dirname(dirname(__DIR__)) . '/tests/phpunit/CiviTest/bootstrap.php';
+error_reporting(E_ALL);
+\Civi\CiUtil\Command\LsCommand::main($argv);
\ No newline at end of file
diff --git a/tools/scripts/runTests.sh.txt b/tools/scripts/runTests.sh.txt
deleted file mode 100755 (executable)
index dadf2a4..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-#!/bin/bash
-
-SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
-
-case $1 in
-
-       stable-3.4)
-
-               echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§ EXECUTING TESTS FOR STABLE
-               echo
-
-               echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§ Updating Selenium tests repository
-               echo
-        cd /var/www/drupal6.dev.civicrm.org/public/sites/devel.drupal6.tests.dev.civicrm.org/modules/civicrm/
-               find . -name *~ -delete
-               svn up
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  ...done.
-
-               echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§ Resetting Selenium tests database and template files
-               echo
-        rm -rf /tmp/templates_c/
-        cd /var/www/drupal6.dev.civicrm.org/public/sites/devel.drupal6.tests.dev.civicrm.org/modules/civicrm/bin
-               ./setup.sh
-               rm -rf /var/www/drupal6.dev.civicrm.org/public/sites/devel.drupal6.tests.dev.civicrm.org/files/civicrm/
-               chmod -R 777 /var/www/drupal6.dev.civicrm.org/public/sites/devel.drupal6.tests.dev.civicrm.org/files/
-        
-        echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  ...done.
-               echo
-        CODE_DIR="/home/tests/stable-suite"
-
-               echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  Running test suite
-               echo
-        
-        rm -rf /tmp/templates_c/
-
-         for testName in api_v2 api_v3 CRM WebTest; do 
-                 cd $CODE_DIR/tools
-          scripts/phpunit --tap --log-junit tests/reports/logfile.$testName.xml -u tests -ptests -h localhost ${testName}_AllTests
-                 cd $CODE_DIR/tools/scripts/
-
-                 echo
-                 echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  Generating test results.
-                 echo
-                 phing $testName
-                 echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  All finished.        
-      done
-
-       ;;
-
-       stable)
-
-        echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§ EXECUTING TESTS FOR TRUNK 
-               echo
-
-               echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§ Updating test suite repository
-               echo
-        cd /var/www/drupal7.dev.civicrm.org/public/sites/stable.drupal7.tests.dev.civicrm.org/modules/civicrm/
-               find . -name *~ -delete
-               svn up
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  ...done.
-
-               echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§ Resetting Selenium tests database and template files
-               echo
-        rm -rf /tmp/templates_c/
-        cd /var/www/drupal7.dev.civicrm.org/public/sites/stable.drupal7.tests.dev.civicrm.org/modules/civicrm/bin
-               ./setup.sh
-       
-        echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  ...done.
-        
-        rm -rf /var/www/drupal7.dev.civicrm.org/public/sites/stable.drupal7.tests.dev.civicrm.org/files/civicrm/
-        chmod -R 777 /var/www/drupal7.dev.civicrm.org/public/sites/stable.drupal7.tests.dev.civicrm.org/files/
-        CODE_DIR="/home/tests/stable-suite"
-
-               echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  Running test suite
-               echo
-
-#       for testName in api_v3; do 
-#       for testName in WebTest; do 
-#       for testName in api_v3 CRM; do 
-       for testName in api_v3 CRM WebTest; do 
-#        for testName in CRM; do
-                 cd $CODE_DIR/tools
-         
-          rm -rf /tmp/templates_c/
-          
-          #reset the db before running webtest
-          if [ $testName == WebTest ] ; then
-              echo 
-              echo ============== reloading db for Webtest ===============================
-              echo 
-             /var/www/drupal7.dev.civicrm.org/public/sites/stable.drupal7.tests.dev.civicrm.org/modules/civicrm/bin/setup.sh
-          fi
-
-          scripts/phpunit --tap --log-junit tests/reports/logfile.$testName.xml -u tests -ptests -bstable_drupal7_tests_dev_civicrm -h localhost ${testName}_AllTests
-                 cd $CODE_DIR/tools/scripts/
-
-                 echo
-                 echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  Generating test results.
-                 echo
-                 phing $testName
-                 echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  All finished.        
-      done
-
-    ;;
-
-       trunk)
-
-        echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§ EXECUTING TESTS FOR TRUNK 
-               echo
-
-               echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§ Updating test suite repository
-               echo
-        cd /var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/modules/civicrm/
-               find . -name *~ -delete
-               svn up
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  ...done.
-
-               echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§ Resetting Selenium tests database and template files
-               echo
-        rm -rf /tmp/templates_c/
-        cd /var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/modules/civicrm/bin
-               ./setup.sh
-       
-        echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  ...done.
-        
-        rm -rf /var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/files/civicrm/
-        chmod -R 777 /var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/files/
-        CODE_DIR="/home/tests/devel-suite"
-
-               echo
-               echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  Running test suite
-               echo
-
-#       for testName in api_v3; do 
-#       for testName in WebTest; do 
-#       for testName in api_v2 api_v3 CRM; do 
-       for testName in api_v3 CRM WebTest; do 
-#        for testName in CRM; do
-                 cd $CODE_DIR/tools
-         
-          rm -rf /tmp/templates_c/
-          
-          #reset the db before running webtest
-          if [ $testName == WebTest ] ; then
-              echo 
-              echo ============== reloading db for Webtest ===============================
-              echo 
-             /var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/modules/civicrm/bin/setup.sh
-          fi
-
-          scripts/phpunit --tap --log-junit tests/reports/logfile.$testName.xml -u tests -ptests -bdevel_drupal7_tests_dev_civicrm -h localhost ${testName}_AllTests
-                 cd $CODE_DIR/tools/scripts/
-
-                 echo
-                 echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  Generating test results.
-                 echo
-                 phing $testName
-                 echo  Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§Â§  All finished.        
-      done
-
-    ;;
-       
-       *)
-               $SELF trunk 
-       ;;
-esac
index 62fc944b6ceae38429030a32000c60b07af5a2af..af9b807ab058313748a4430554256027fc5ac4da 100644 (file)
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/ACL</base>
-    <class>ACL</class>
-    <name>civicrm_acl</name>
-    <comment>Access Control List</comment>
+  <base>CRM/ACL</base>
+  <class>ACL</class>
+  <name>civicrm_acl</name>
+  <comment>Access Control List</comment>
+  <add>1.6</add>
+  <field>
+    <name>id</name>
+    <title>ACL ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique table ID</comment>
     <add>1.6</add>
-    <field>
-        <name>id</name>
-        <title>ACL ID</title>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>Unique table ID</comment>
-        <add>1.6</add>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-       <name>name</name>
-       <title>ACL Name</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>ACL Name.</comment>
-       <html>
-         <type>Text</type>
-       </html>
-       <add>1.6</add>       
-    </field>
-    <field>
-        <name>deny</name>
-        <type>boolean</type>
-        <default>0</default>
-        <required>true</required>
-        <comment>Is this ACL entry Allow  (0) or Deny (1) ?</comment>
-        <html>
-         <type>Radio</type>
-       </html>   
-        <add>1.6</add>             
-    </field>
-    <field>
-        <name>entity_table</name>
-        <type>varchar</type>
-        <length>64</length>
-        <required>true</required>
-        <comment>Table of the object possessing this ACL entry (Contact, Group, or ACL Group)</comment>
-        <add>1.6</add>
-    </field>
-    <field>
-        <name>entity_id</name>
-        <type>int unsigned</type>
-        <comment>ID of the object possessing this ACL</comment>
-        <add>1.6</add>
-    </field>
-    <dynamicForeignKey>
-        <idColumn>entity_id</idColumn>
-        <typeColumn>entity_table</typeColumn>
-        <add>1.6</add>
-    </dynamicForeignKey>
-    <field>
-        <name>operation</name>
-        <type>varchar</type>
-        <length>8</length>
-        <required>true</required>
-        <comment>What operation does this ACL entry control?</comment>
-        <pseudoconstant>
-          <callback>CRM_ACL_BAO_ACL::operation</callback>
-        </pseudoconstant>
-        <html>
-          <type>Select</type>
-        </html>
-        <add>1.6</add>        
-    </field>
-    <field>
-        <name>object_table</name>
-        <type>varchar</type>
-        <length>64</length>
-        <comment>The table of the object controlled by this ACL entry</comment>
-        <add>1.6</add>
-    </field>
-    <field>
-        <name>object_id</name>
-        <type>int unsigned</type>
-        <comment>The ID of the object controlled by this ACL entry</comment>
-        <add>1.6</add>
-    </field>
-    <field>
-        <name>acl_table</name>
-        <type>varchar</type>
-        <length>64</length>
-        <comment>If this is a grant/revoke entry, what table are we granting?</comment>
-        <add>1.6</add>    
-    </field>
-    <field>
-        <name>acl_id</name>
-        <type>int unsigned</type>
-        <comment>ID of the ACL or ACL group being granted/revoked</comment>
-        <add>1.6</add>
-    </field>
-    <index>
-       <name>index_acl_id</name>
-       <fieldName>acl_id</fieldName>
-       <add>1.6</add>
-    </index>
-    <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this property active?</comment>
-       <add>1.6</add>
-       <html>
-         <type>Checkbox</type>
-       </html>
-    </field>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>name</name>
+    <title>ACL Name</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>ACL Name.</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>1.6</add>
+  </field>
+  <field>
+    <name>deny</name>
+    <title>Deny ACl?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <required>true</required>
+    <comment>Is this ACL entry Allow  (0) or Deny (1) ?</comment>
+    <html>
+      <type>Radio</type>
+    </html>
+    <add>1.6</add>
+  </field>
+  <field>
+    <name>entity_table</name>
+    <title>ACL Entity</title>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Table of the object possessing this ACL entry (Contact, Group, or ACL Group)</comment>
+    <add>1.6</add>
+  </field>
+  <field>
+    <name>entity_id</name>
+    <type>int unsigned</type>
+    <title>Entity ID</title>
+    <comment>ID of the object possessing this ACL</comment>
+    <add>1.6</add>
+  </field>
+  <dynamicForeignKey>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>1.6</add>
+  </dynamicForeignKey>
+  <field>
+    <name>operation</name>
+    <type>varchar</type>
+    <title>ACL Operation</title>
+    <length>8</length>
+    <required>true</required>
+    <comment>What operation does this ACL entry control?</comment>
+    <pseudoconstant>
+      <callback>CRM_ACL_BAO_ACL::operation</callback>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>1.6</add>
+  </field>
+  <field>
+    <name>object_table</name>
+    <title>ACL Object</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>The table of the object controlled by this ACL entry</comment>
+    <add>1.6</add>
+  </field>
+  <field>
+    <name>object_id</name>
+    <title>ACL Object ID</title>
+    <type>int unsigned</type>
+    <comment>The ID of the object controlled by this ACL entry</comment>
+    <add>1.6</add>
+  </field>
+  <field>
+    <name>acl_table</name>
+    <title>ACL Table</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>If this is a grant/revoke entry, what table are we granting?</comment>
+    <add>1.6</add>
+  </field>
+  <field>
+    <name>acl_id</name>
+    <title>ACL Group ID</title>
+    <type>int unsigned</type>
+    <comment>ID of the ACL or ACL group being granted/revoked</comment>
+    <add>1.6</add>
+  </field>
+  <index>
+    <name>index_acl_id</name>
+    <fieldName>acl_id</fieldName>
+    <add>1.6</add>
+  </index>
+  <field>
+    <name>is_active</name>
+    <title>ACL Is Active?</title>
+    <type>boolean</type>
+    <comment>Is this property active?</comment>
+    <add>1.6</add>
+    <html>
+      <type>Checkbox</type>
+    </html>
+  </field>
 </table>
index 810fb24afc46e7063330a2590436d6f6cdccd326..52f34f9b466ed83903d6816f20424cce59b223d2 100644 (file)
@@ -1,58 +1,58 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/ACL</base>
-    <class>Cache</class>
-    <name>civicrm_acl_cache</name>
-    <comment>Cache for acls and contacts</comment>
+  <base>CRM/ACL</base>
+  <class>Cache</class>
+  <name>civicrm_acl_cache</name>
+  <comment>Cache for acls and contacts</comment>
+  <add>1.6</add>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique table ID</comment>
     <add>1.6</add>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>Unique table ID</comment>
-        <add>1.6</add>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>contact_id</name>
-        <type>int unsigned</type>
-        <comment>Foreign Key to Contact</comment>
-        <add>1.6</add>
-    </field>
-    <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.6</add>
-       <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>acl_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>Foreign Key to ACL</comment>
-        <add>1.6</add>
-    </field>
-    <foreignKey>
-       <name>acl_id</name>
-       <table>civicrm_acl</table>
-       <key>id</key>
-       <add>1.6</add>
-       <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <index>
-       <name>index_acl_id</name>
-       <fieldName>acl_id</fieldName>
-       <add>1.6</add>
-    </index>
-    <field>
-       <name>modified_date</name>
-       <type>date</type>
-       <comment>When was this cache entry last modified</comment>
-       <add>1.6</add>
-    </field>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <comment>Foreign Key to Contact</comment>
+    <add>1.6</add>
+  </field>
+  <foreignKey>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.6</add>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>acl_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Foreign Key to ACL</comment>
+    <add>1.6</add>
+  </field>
+  <foreignKey>
+    <name>acl_id</name>
+    <table>civicrm_acl</table>
+    <key>id</key>
+    <add>1.6</add>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <index>
+    <name>index_acl_id</name>
+    <fieldName>acl_id</fieldName>
+    <add>1.6</add>
+  </index>
+  <field>
+    <name>modified_date</name>
+    <type>date</type>
+    <comment>When was this cache entry last modified</comment>
+    <add>1.6</add>
+  </field>
 </table>
index 80eaf5f10b1fd29e4da8bcabea10f06a6bad74c0..5d7958b729285ded56042edf7ebbd952abcf9d42 100644 (file)
@@ -1,64 +1,69 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/ACL</base>
-    <class>EntityRole</class>
-    <name>civicrm_acl_entity_role</name>
-    <comment>Join table for Contacts and Groups to ACL Roles</comment>
+  <base>CRM/ACL</base>
+  <class>EntityRole</class>
+  <name>civicrm_acl_entity_role</name>
+  <comment>Join table for Contacts and Groups to ACL Roles</comment>
+  <add>1.6</add>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Entity Role</title>
+    <required>true</required>
+    <comment>Unique table ID</comment>
     <add>1.6</add>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>Unique table ID</comment>
-        <add>1.6</add>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>acl_role_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>Foreign Key to ACL Role (which is an option value pair and hence an implicit FK)</comment>
-        <add>1.6</add>
-    </field>
-    <field>
-        <name>entity_table</name>
-        <type>varchar</type>
-        <length>64</length>
-        <required>true</required>
-        <comment>Table of the object joined to the ACL Role (Contact or Group)</comment>
-        <add>1.6</add>
-    </field>
-    <field>
-        <name>entity_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>ID of the group/contact object being joined</comment>
-        <add>1.6</add>
-    </field>
-    <dynamicForeignKey>
-        <idColumn>entity_id</idColumn>
-        <typeColumn>entity_table</typeColumn>
-        <add>1.6</add>
-    </dynamicForeignKey>
-    <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this property active?</comment>
-       <add>1.6</add>
-    </field>
-    <index>
-       <name>index_role</name>
-       <fieldName>acl_role_id</fieldName>
-       <add>1.6</add>
-    </index>
-    <index>
-       <name>index_entity</name>
-       <fieldName>entity_table</fieldName>
-       <fieldName>entity_id</fieldName>
-       <add>1.6</add>
-    </index>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>acl_role_id</name>
+    <title>ACL Role ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Foreign Key to ACL Role (which is an option value pair and hence an implicit FK)</comment>
+    <add>1.6</add>
+  </field>
+  <field>
+    <name>entity_table</name>
+    <title>Entity Table</title>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Table of the object joined to the ACL Role (Contact or Group)</comment>
+    <add>1.6</add>
+  </field>
+  <field>
+    <name>entity_id</name>
+    <title>ACL Entity ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>ID of the group/contact object being joined</comment>
+    <add>1.6</add>
+  </field>
+  <dynamicForeignKey>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>1.6</add>
+  </dynamicForeignKey>
+  <field>
+    <name>is_active</name>
+    <title>ACL Entity Role is Active</title>
+    <type>boolean</type>
+    <comment>Is this property active?</comment>
+    <add>1.6</add>
+  </field>
+  <index>
+    <name>index_role</name>
+    <fieldName>acl_role_id</fieldName>
+    <add>1.6</add>
+  </index>
+  <index>
+    <name>index_entity</name>
+    <fieldName>entity_table</fieldName>
+    <fieldName>entity_id</fieldName>
+    <add>1.6</add>
+  </index>
 </table>
index 063b36313a5a0dcd6fed3ae5467e24a714ac4adf..73fce03f907c35bf8f57fc72d859c5365eebecb1 100644 (file)
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <uniqueName>activity_id</uniqueName>
-      <title>Activity ID</title>
-      <import>true</import>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique  Other Activity ID</comment>
-       <add>1.1</add>
-       
+    <name>id</name>
+    <uniqueName>activity_id</uniqueName>
+    <title>Activity ID</title>
+    <import>true</import>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique  Other Activity ID</comment>
+    <add>1.1</add>
+
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>source_contact_id</name>
-      <type>int unsigned</type>
-      <title>Source Contact</title>
-      <import>true</import>
-      <headerPattern>/(activity.)?source(.contact(.id)?)?/i</headerPattern>
-      <comment>Contact ID of the person scheduling or logging this Activity. Usually the authenticated user.</comment>
-      <add>1.1</add>
-      <drop>4.4</drop>
+    <name>source_contact_id</name>
+    <type>int unsigned</type>
+    <title>Source Contact</title>
+    <import>true</import>
+    <headerPattern>/(activity.)?source(.contact(.id)?)?/i</headerPattern>
+    <comment>Contact ID of the person scheduling or logging this Activity. Usually the authenticated user.</comment>
+    <add>1.1</add>
+    <drop>4.4</drop>
   </field>
   <foreignKey>
-       <name>source_contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
-       <drop>4.4</drop>
-       <onDelete>SET NULL</onDelete>
+    <name>source_contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
+    <drop>4.4</drop>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <index>
-       <name>UI_source_contact_id</name>
-       <fieldName>source_contact_id</fieldName>
-       <add>2.0</add>
-       <drop>3.2</drop>
+    <name>UI_source_contact_id</name>
+    <fieldName>source_contact_id</fieldName>
+    <add>2.0</add>
+    <drop>3.2</drop>
   </index>
 
   <field>
-      <name>source_record_id</name>
-      <type>int unsigned</type>
-      <title>Source Record</title>
-      <comment>Artificial FK to original transaction (e.g. contribution) IF it is not an Activity. Table can be figured out through activity_type_id, and further through component registry.</comment>
-      <add>2.0</add>
+    <name>source_record_id</name>
+    <type>int unsigned</type>
+    <title>Source Record</title>
+    <comment>Artificial FK to original transaction (e.g. contribution) IF it is not an Activity. Table can be figured out through activity_type_id, and further through component registry.</comment>
+    <add>2.0</add>
   </field>
   <index>
-       <name>UI_source_record_id</name>
-       <fieldName>source_record_id</fieldName>
-       <add>3.2</add>
+    <name>UI_source_record_id</name>
+    <fieldName>source_record_id</fieldName>
+    <add>3.2</add>
   </index>
   <field>
-      <name>activity_type_id</name>
-      <title>Activity Type</title>
-      <import>true</import>
-      <type>int unsigned</type>
-      <required>true</required>
-      <export>false</export>
-      <default>1</default>
-      <headerPattern>/(activity.)?type(.id$)/i</headerPattern>
-      <comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.</comment>
-      <add>1.1</add>
-      <pseudoconstant>
-        <optionGroupName>activity_type</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>            
+    <name>activity_type_id</name>
+    <title>Activity Type</title>
+    <import>true</import>
+    <type>int unsigned</type>
+    <required>true</required>
+    <export>false</export>
+    <default>1</default>
+    <headerPattern>/(activity.)?type(.id$)/i</headerPattern>
+    <comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.</comment>
+    <add>1.1</add>
+    <pseudoconstant>
+      <optionGroupName>activity_type</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <index>
-       <name>UI_activity_type_id</name>
-       <fieldName>activity_type_id</fieldName>
-       <add>1.6</add>
+    <name>UI_activity_type_id</name>
+    <fieldName>activity_type_id</fieldName>
+    <add>1.6</add>
   </index>
 
   <field>
-       <name>target_entity_table</name>
-       <type>varchar</type>
-       <length>64</length>
-       <required>true</required>
-       <comment>Name of table where item being referenced is stored.</comment>
-       <add>1.1</add>
-       <drop>2.0</drop>
+    <name>target_entity_table</name>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Name of table where item being referenced is stored.</comment>
+    <add>1.1</add>
+    <drop>2.0</drop>
   </field>
 
   <field>
-       <name>target_entity_id</name>
-       <type>int unsigned</type>
-       <required>true</required>
-       <comment>Foreign key to the referenced item.</comment>
-       <add>1.1</add>
-       <drop>2.0</drop>
+    <name>target_entity_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Foreign key to the referenced item.</comment>
+    <add>1.1</add>
+    <drop>2.0</drop>
   </field>
 
   <field>
-       <name>subject</name>
-       <uniqueName>activity_subject</uniqueName>
-       <type>varchar</type>
-       <title>Subject</title>
-       <length>255</length>
-       <comment>The subject/purpose/short description of the activity.</comment>
-       <import>true</import>
-       <headerPattern>/(activity.)?subject/i</headerPattern>
-       <html>
-        <type>Text</type>
-       </html>
-       <add>1.1</add>
-       <modify>2.0</modify>
+    <name>subject</name>
+    <uniqueName>activity_subject</uniqueName>
+    <type>varchar</type>
+    <title>Subject</title>
+    <length>255</length>
+    <comment>The subject/purpose/short description of the activity.</comment>
+    <import>true</import>
+    <headerPattern>/(activity.)?subject/i</headerPattern>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>1.1</add>
+    <modify>2.0</modify>
   </field>
 
   <field>
-       <name>scheduled_date</name>
-       <type>datetime</type>
-       <comment>Date and time meeting is scheduled to occur.</comment>
-       <add>1.1</add>
-       <drop>2.0</drop>
+    <name>scheduled_date</name>
+    <type>datetime</type>
+    <comment>Date and time meeting is scheduled to occur.</comment>
+    <add>1.1</add>
+    <drop>2.0</drop>
   </field>
 
   <field>
-       <name>activity_date_time</name>
-       <import>true</import>
-       <title>Activity Date</title>
-       <type>datetime</type>
-       <headerPattern>/(activity.)?date(.time$)?/i</headerPattern>
-       <comment>Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.</comment>
-       <html>
-            <type>Select Date</type>
-      </html>
-       <add>2.0</add>
+    <name>activity_date_time</name>
+    <import>true</import>
+    <title>Activity Date</title>
+    <type>datetime</type>
+    <headerPattern>/(activity.)?date(.time$)?/i</headerPattern>
+    <comment>Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.</comment>
+    <html>
+      <type>Select Date</type>
+    </html>
+    <add>2.0</add>
   </field>
   <field>
-       <name>due_date_time</name>
-       <type>datetime</type>
-       <comment>Date and time this activity is due.</comment>
-       <add>2.0</add>
-       <drop>3.0</drop>
+    <name>due_date_time</name>
+    <type>datetime</type>
+    <comment>Date and time this activity is due.</comment>
+    <add>2.0</add>
+    <drop>3.0</drop>
   </field>
   <field>
-       <name>duration_hours</name>
-       <type>int unsigned</type>
-       <comment>Planned or actual duration of meeting - hours.</comment>
-       <add>1.1</add>
-       <drop>2.0</drop>
+    <name>duration_hours</name>
+    <type>int unsigned</type>
+    <comment>Planned or actual duration of meeting - hours.</comment>
+    <add>1.1</add>
+    <drop>2.0</drop>
   </field>
 
   <field>
-      <name>duration_minutes</name>
-      <type>int unsigned</type>
-      <comment>Planned or actual duration of meeting - minutes.</comment>
-      <add>1.1</add>
-      <drop>2.0</drop>
+    <name>duration_minutes</name>
+    <type>int unsigned</type>
+    <comment>Planned or actual duration of meeting - minutes.</comment>
+    <add>1.1</add>
+    <drop>2.0</drop>
   </field>
 
   <field>
-      <name>duration</name>
-      <uniqueName>activity_duration</uniqueName>
-      <title>Duration</title>
-      <import>true</import>
-      <type>int unsigned</type>
-      <headerPattern>/(activity.)?duration(s)?$/i</headerPattern>
-      <comment>Planned or actual duration of activity expressed in minutes. Conglomerate of former duration_hours and duration_minutes.</comment>
-      <add>2.0</add>
-      <html>
-            <type>Text</type>
-      </html>
+    <name>duration</name>
+    <uniqueName>activity_duration</uniqueName>
+    <title>Duration</title>
+    <import>true</import>
+    <type>int unsigned</type>
+    <headerPattern>/(activity.)?duration(s)?$/i</headerPattern>
+    <comment>Planned or actual duration of activity expressed in minutes. Conglomerate of former duration_hours and duration_minutes.</comment>
+    <add>2.0</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
 
   <field>
-      <name>location</name>
-      <uniqueName>activity_location</uniqueName>
-      <title>Location</title>
-      <import>true</import>
-      <type>varchar</type>
-      <length>255</length>
-      <headerPattern>/(activity.)?location$/i</headerPattern>
-      <comment>Location of the activity (optional, open text).</comment>
-      <html>
-            <type>Text</type>
-      </html>
-      <add>1.1</add>
+    <name>location</name>
+    <uniqueName>activity_location</uniqueName>
+    <title>Location</title>
+    <import>true</import>
+    <type>varchar</type>
+    <length>255</length>
+    <headerPattern>/(activity.)?location$/i</headerPattern>
+    <comment>Location of the activity (optional, open text).</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>1.1</add>
   </field>
 
   <field>
-      <name>phone_id</name>
-      <type>int unsigned</type>
-      <title>Phone (called) ID</title>
-      <comment>Phone ID of the number called (optional - used if an existing phone number is selected).</comment>
-      <add>2.0</add>
-      <html>
-        <type>Autocomplete-Select</type>
-      </html>
+    <name>phone_id</name>
+    <type>int unsigned</type>
+    <title>Phone (called) ID</title>
+    <comment>Phone ID of the number called (optional - used if an existing phone number is selected).</comment>
+    <add>2.0</add>
+    <html>
+      <type>Autocomplete-Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>phone_id</name>
-       <table>civicrm_phone</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>SET NULL</onDelete>
+    <name>phone_id</name>
+    <table>civicrm_phone</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
 
   <field>
-      <name>phone_number</name>
-      <title>Phone (called) Number</title>
-      <type>varchar</type>
-      <length>64</length>
-      <comment>Phone number in case the number does not exist in the civicrm_phone table.</comment>
-      <html>
-            <type>Text</type>
-      </html>
-      <add>2.0</add>
+    <name>phone_number</name>
+    <title>Phone (called) Number</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Phone number in case the number does not exist in the civicrm_phone table.</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.0</add>
   </field>
 
   <field>
-      <name>details</name>
-      <uniqueName>activity_details</uniqueName>
-      <title>Details</title>
-      <import>true</import>
-      <type>text</type>
-      <headerPattern>/(activity.)?detail(s)?$/i</headerPattern>
-      <comment>Details about the activity (agenda, notes, etc).</comment>
-      <html>
-          <type>RichTextEditor</type>
-          <rows>8</rows>
-          <cols>60</cols>
-      </html>
-      <add>1.1</add>
+    <name>details</name>
+    <uniqueName>activity_details</uniqueName>
+    <title>Details</title>
+    <import>true</import>
+    <type>text</type>
+    <headerPattern>/(activity.)?detail(s)?$/i</headerPattern>
+    <comment>Details about the activity (agenda, notes, etc).</comment>
+    <html>
+      <type>RichTextEditor</type>
+      <rows>8</rows>
+      <cols>60</cols>
+    </html>
+    <add>1.1</add>
   </field>
 
   <field>
-      <name>status</name>
-      <type>enum</type>
-      <title>Status</title>
-      <values>Scheduled, Completed</values>
-      <comment>What is the status of this meeting? Completed meeting status results in activity history entry.</comment>
-      <add>1.1</add>
-      <drop>2.0</drop>
+    <name>status</name>
+    <type>enum</type>
+    <title>Status</title>
+    <values>Scheduled, Completed</values>
+    <comment>What is the status of this meeting? Completed meeting status results in activity history entry.</comment>
+    <add>1.1</add>
+    <drop>2.0</drop>
   </field>
 
   <field>
-      <name>status_id</name>
-      <uniqueName>activity_status_id</uniqueName>
-      <title>Activity Status</title>
-      <import>true</import>
-      <export>false</export>
-      <headerPattern>/(activity.)?status(.label$)?/i</headerPattern>
-      <type>int unsigned</type>
-      <comment>ID of the status this activity is currently in. Foreign key to civicrm_option_value.</comment>
-      <add>2.0</add>
-      <pseudoconstant>
-        <optionGroupName>activity_status</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>      
-  </field>
-  <field>
-      <name>priority_id</name>
-      <type>int unsigned</type>
-      <title>Priority</title>
-      <comment>ID of the priority given to this activity. Foreign key to civicrm_option_value.</comment>
-      <add>2.0</add>
-      <pseudoconstant>
-        <optionGroupName>priority</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-  </field>
-  <field>
-      <name>parent_id</name>
-      <title>Parent Activity Id</title>
-      <type>int unsigned</type>
-      <comment>Parent meeting ID (if this is a follow-up item). This is not currently implemented</comment>
-       <add>1.1</add>
+    <name>status_id</name>
+    <uniqueName>activity_status_id</uniqueName>
+    <title>Activity Status</title>
+    <import>true</import>
+    <export>false</export>
+    <headerPattern>/(activity.)?status(.label$)?/i</headerPattern>
+    <type>int unsigned</type>
+    <comment>ID of the status this activity is currently in. Foreign key to civicrm_option_value.</comment>
+    <add>2.0</add>
+    <pseudoconstant>
+      <optionGroupName>activity_status</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>priority_id</name>
+    <type>int unsigned</type>
+    <title>Priority</title>
+    <comment>ID of the priority given to this activity. Foreign key to civicrm_option_value.</comment>
+    <add>2.0</add>
+    <pseudoconstant>
+      <optionGroupName>priority</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>parent_id</name>
+    <title>Parent Activity Id</title>
+    <type>int unsigned</type>
+    <comment>Parent meeting ID (if this is a follow-up item). This is not currently implemented</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>parent_id</name>
-       <table>civicrm_activity</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>parent_id</name>
+    <table>civicrm_activity</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
 
   <field>
-       <name>is_test</name>
-       <title>Test</title>
-       <uniqueName>activity_is_test</uniqueName>
-       <type>boolean</type>
-       <default>0</default>
-       <import>true</import>
-       <headerPattern>/(is.)?test(.activity)?/i</headerPattern>
-       <add>2.0</add>
-       <html>
-         <type>Select</type>
-       </html>
-  </field>
-  <field>
-      <name>medium_id</name>
-      <uniqueName>activity_medium_id</uniqueName>
-      <title>Activity Medium</title>
-      <type>int unsigned</type>
-      <default>NULL</default>
-      <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.</comment>
-      <pseudoconstant>
-        <optionGroupName>encounter_medium</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>2.2</add>
+    <name>is_test</name>
+    <title>Test</title>
+    <uniqueName>activity_is_test</uniqueName>
+    <type>boolean</type>
+    <default>0</default>
+    <import>true</import>
+    <headerPattern>/(is.)?test(.activity)?/i</headerPattern>
+    <add>2.0</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>medium_id</name>
+    <uniqueName>activity_medium_id</uniqueName>
+    <title>Activity Medium</title>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.</comment>
+    <pseudoconstant>
+      <optionGroupName>encounter_medium</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>2.2</add>
   </field>
   <index>
-       <name>index_medium_id</name>
-       <fieldName>medium_id</fieldName>
-       <add>2.2</add>
+    <name>index_medium_id</name>
+    <fieldName>medium_id</fieldName>
+    <add>2.2</add>
   </index>
   <field>
-       <name>is_auto</name>
-       <title>Auto</title>
-       <type>boolean</type>
-       <default>0</default>
-       <add>2.2</add>
+    <name>is_auto</name>
+    <title>Auto</title>
+    <type>boolean</type>
+    <default>0</default>
+    <add>2.2</add>
   </field>
   <field>
-       <name>relationship_id</name>
-       <title>Relationship Id</title>
-       <type>int unsigned</type>
-       <default>NULL</default>
-       <comment>FK to Relationship ID</comment>
-       <add>2.2</add>
+    <name>relationship_id</name>
+    <title>Relationship Id</title>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>FK to Relationship ID</comment>
+    <add>2.2</add>
   </field>
   <foreignKey>
-       <name>relationship_id</name>
-       <table>civicrm_relationship</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
+    <name>relationship_id</name>
+    <table>civicrm_relationship</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-       <name>is_current_revision</name>
-       <title>Is this activity a current revision in versioning chain?</title>
-       <type>boolean</type>
-       <default>1</default>
-       <import>true</import>
-       <headerPattern>/(is.)?(current.)?(revision|version(ing)?)/i</headerPattern>
-       <add>2.2</add>
-       <html>
-         <type>CheckBox</type>
-       </html>
+    <name>is_current_revision</name>
+    <title>Is this activity a current revision in versioning chain?</title>
+    <type>boolean</type>
+    <default>1</default>
+    <import>true</import>
+    <headerPattern>/(is.)?(current.)?(revision|version(ing)?)/i</headerPattern>
+    <add>2.2</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <index>
-       <name>index_is_current_revision</name>
-       <fieldName>is_current_revision</fieldName>
-       <add>2.2</add>
+    <name>index_is_current_revision</name>
+    <fieldName>is_current_revision</fieldName>
+    <add>2.2</add>
   </index>
   <field>
-      <name>original_id</name>
-      <type>int unsigned</type>
-      <title>Original Activity ID </title>
-      <comment>Activity ID of the first activity record in versioning chain.</comment>
-      <add>2.2</add>
+    <name>original_id</name>
+    <type>int unsigned</type>
+    <title>Original Activity ID </title>
+    <comment>Activity ID of the first activity record in versioning chain.</comment>
+    <add>2.2</add>
   </field>
   <foreignKey>
-       <name>original_id</name>
-       <table>civicrm_activity</table>
-       <key>id</key>
-       <add>2.2</add>
-       <onDelete>CASCADE</onDelete>
+    <name>original_id</name>
+    <table>civicrm_activity</table>
+    <key>id</key>
+    <add>2.2</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <index>
-       <name>UI_original_id</name>
-       <fieldName>original_id</fieldName>
-       <add>2.2</add>
-       <drop>3.2</drop>
+    <name>UI_original_id</name>
+    <fieldName>original_id</fieldName>
+    <add>2.2</add>
+    <drop>3.2</drop>
   </index>
   <field>
-       <name>result</name>
-       <uniqueName>activity_result</uniqueName>
-       <type>varchar</type>
-       <title>Result</title>
-       <length>255</length>
-       <comment>Currently being used to store result id for survey activity, FK to option value.</comment>
-       <html>
-            <type>Text</type>
-      </html>
-       <add>3.3</add>
-  </field>
-  <field>
-       <name>is_deleted</name>
-       <uniqueName>activity_is_deleted</uniqueName>
-       <title>Activity is in the Trash</title>
-       <type>boolean</type>
-       <default>0</default>
-       <import>true</import>
-       <headerPattern>/(activity.)?(trash|deleted)/i</headerPattern>
-       <add>2.2</add>
-       <html>
-         <type>Text</type>
-       </html>
+    <name>result</name>
+    <uniqueName>activity_result</uniqueName>
+    <type>varchar</type>
+    <title>Result</title>
+    <length>255</length>
+    <comment>Currently being used to store result id for survey activity, FK to option value.</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>3.3</add>
+  </field>
+  <field>
+    <name>is_deleted</name>
+    <uniqueName>activity_is_deleted</uniqueName>
+    <title>Activity is in the Trash</title>
+    <type>boolean</type>
+    <default>0</default>
+    <import>true</import>
+    <headerPattern>/(activity.)?(trash|deleted)/i</headerPattern>
+    <add>2.2</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <index>
-       <name>index_is_deleted</name>
-       <fieldName>is_deleted</fieldName>
-       <add>2.2</add>
+    <name>index_is_deleted</name>
+    <fieldName>is_deleted</fieldName>
+    <add>2.2</add>
   </index>
   <field>
-       <name>campaign_id</name>
-       <uniqueName>activity_campaign_id</uniqueName>
-       <type>int unsigned</type>
-       <title>Campaign</title>
-       <import>true</import>
-       <comment>The campaign for which this activity has been triggered.</comment>
-       <pseudoconstant>
-          <table>civicrm_campaign</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>title</labelColumn>
-       </pseudoconstant>
-       <add>3.4</add>
-       <html>
-         <type>CheckBox</type>
-       </html>
+    <name>campaign_id</name>
+    <uniqueName>activity_campaign_id</uniqueName>
+    <type>int unsigned</type>
+    <title>Campaign</title>
+    <import>true</import>
+    <comment>The campaign for which this activity has been triggered.</comment>
+    <pseudoconstant>
+      <table>civicrm_campaign</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>title</labelColumn>
+    </pseudoconstant>
+    <add>3.4</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <foreignKey>
-       <name>campaign_id</name>
-       <table>civicrm_campaign</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
+    <name>campaign_id</name>
+    <table>civicrm_campaign</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>engagement_level</name>
-      <uniqueName>activity_engagement_level</uniqueName>
-      <type>int unsigned</type>
-      <title>Engagement Index</title>
-      <import>true</import>
-      <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.</comment>
-      <pseudoconstant>
-        <optionGroupName>engagement_index</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>3.4</add>
-  </field>
-  <field>
-      <name>weight</name>
-      <type>int</type>
-      <add>4.1</add>
-      <html>
-         <type>Text</type>
-      </html>
+    <name>engagement_level</name>
+    <uniqueName>activity_engagement_level</uniqueName>
+    <type>int unsigned</type>
+    <title>Engagement Index</title>
+    <import>true</import>
+    <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.</comment>
+    <pseudoconstant>
+      <optionGroupName>engagement_index</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>3.4</add>
+  </field>
+  <field>
+    <name>weight</name>
+    <type>int</type>
+    <add>4.1</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
 </table>
index a8f3a17a4be3bb45d1321ead0f1cbba31118dbb4..f3df06bb54ab71d9b610e0d136af4ecccc571b0a 100644 (file)
@@ -27,7 +27,7 @@
     <comment>Name of table where item being referenced is stored (activity, phonecall or meeting).</comment>
     <add>1.8</add>
     <drop>2.0</drop>
-   </field>
+  </field>
 
   <field>
     <name>activity_entity_id</name>
     <comment>Name of table where item being referenced is stored (contact assigned to given activity).</comment>
     <add>1.8</add>
     <drop>2.0</drop>
-   </field>
+  </field>
 
-   <field>
+  <field>
     <name>target_entity_id</name>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Foreign key to the referenced item.</comment>
     <add>1.1</add>
     <drop>2.0</drop>
-   </field>
+  </field>
 
-   <dynamicForeignKey>
+  <dynamicForeignKey>
     <idColumn>target_entity_id</idColumn>
     <typeColumn>target_entity_table</typeColumn>
     <add>1.8</add>
     <drop>2.0</drop>
-   </dynamicForeignKey>
+  </dynamicForeignKey>
 
-   <field>
+  <field>
     <name>activity_id</name>
     <type>int unsigned</type>
     <title>Activity ID</title>
     <required>true</required>
     <comment>Foreign key to the activity for this assignment.</comment>
     <add>2.0</add>
-   </field>
-   <foreignKey>
+  </field>
+  <foreignKey>
     <name>activity_id</name>
     <table>civicrm_activity</table>
     <key>id</key>
     <onDelete>CASCADE</onDelete>
   </foreignKey>
 
-   <field>
+  <field>
     <name>assignee_contact_id</name>
     <type>int unsigned</type>
     <title>Assignee Contact ID</title>
     <required>true</required>
     <comment>Foreign key to the contact for this assignment.</comment>
     <add>2.0</add>
-   </field>
-   <foreignKey>
+  </field>
+  <foreignKey>
     <name>assignee_contact_id</name>
     <table>civicrm_contact</table>
     <key>id</key>
   </foreignKey>
 
   <index>
-       <name>UI_activity_assignee_contact_id</name>
-       <fieldName>assignee_contact_id</fieldName>
-       <fieldName>activity_id</fieldName>
-       <unique>true</unique>
-       <add>2.0</add>
+    <name>UI_activity_assignee_contact_id</name>
+    <fieldName>assignee_contact_id</fieldName>
+    <fieldName>activity_id</fieldName>
+    <unique>true</unique>
+    <add>2.0</add>
   </index>
 
 
index 7606115126b9f6f21816ddc04e3a323ed9c95c11..2841971a0133932f3587cc8cc8cad1def5fb232f 100644 (file)
@@ -8,6 +8,7 @@
   <add>3.3</add>
   <field>
     <name>id</name>
+    <title>Batch ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Unique Address ID</comment>
@@ -19,6 +20,7 @@
   </primaryKey>
   <field>
     <name>name</name>
+    <title>Batch Name</title>
     <type>varchar</type>
     <length>64</length>
     <comment>Variable name/programmatic handle for this batch.</comment>
@@ -44,6 +46,7 @@
   </field>
   <field>
     <name>title</name>
+    <title>Batch Title</title>
     <type>varchar</type>
     <length>64</length>
     <localizable>true</localizable>
@@ -55,6 +58,7 @@
   </field>
   <field>
     <name>description</name>
+    <title>Batch Description</title>
     <type>text</type>
     <comment>Description of this batch set.</comment>
     <localizable>true</localizable>
@@ -67,6 +71,7 @@
   </field>
   <field>
     <name>created_id</name>
+    <title>Batch Created By</title>
     <type>int unsigned</type>
     <comment>FK to Contact ID</comment>
     <add>3.3</add>
@@ -80,6 +85,7 @@
   </foreignKey>
   <field>
     <name>created_date</name>
+    <title>Batch Created Date</title>
     <type>datetime</type>
     <comment>When was this item created</comment>
     <add>3.3</add>
   </field>
   <field>
     <name>modified_id</name>
+    <title>Batch Modified By</title>
     <type>int unsigned</type>
     <comment>FK to Contact ID</comment>
     <add>3.3</add>
   </field>
   <field>
     <name>modified_date</name>
+    <title>Batch Modified Date</title>
     <type>datetime</type>
     <comment>When was this item created</comment>
     <add>3.3</add>
   </foreignKey>
   <field>
     <name>saved_search_id</name>
+    <title>Batch Smart Group</title>
     <type>int unsigned</type>
     <comment>FK to Saved Search ID</comment>
     <add>4.1</add>
   </foreignKey>
   <field>
     <name>status_id</name>
+    <title>Batch Status</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>fk to Batch Status options in civicrm_option_values</comment>
   </field>
   <field>
     <name>type_id</name>
+    <title>Batch Type</title>
     <type>int unsigned</type>
     <comment>fk to Batch Type options in civicrm_option_values</comment>
     <add>4.2</add>
   </field>
   <field>
     <name>mode_id</name>
+    <title>Batch Mode</title>
     <type>int unsigned</type>
     <comment>fk to Batch mode options in civicrm_option_values</comment>
     <add>4.2</add>
   </field>
   <field>
     <name>total</name>
+    <title>Batch Total</title>
     <type>decimal</type>
     <comment>Total amount for this batch.</comment>
     <add>4.2</add>
   </field>
   <field>
     <name>item_count</name>
+    <title>Batch Number of Items</title>
     <type>int unsigned</type>
     <comment>Number of items in a batch.</comment>
     <add>4.2</add>
   </field>
   <field>
     <name>payment_instrument_id</name>
+    <title>Batch Payment Instrument</title>
     <type>int unsigned</type>
     <comment>fk to Payment Instrument options in civicrm_option_values</comment>
     <pseudoconstant>
   </field>
   <field>
     <name>exported_date</name>
+    <title>Batch Exported Date</title>
     <type>datetime</type>
     <add>4.3</add>
   </field>
   <field>
     <name>data</name>
+    <title>Batch Data</title>
     <type>longtext</type>
     <comment>cache entered data</comment>
     <add>4.4</add>
index 46f30a553ee6ac490454a364d4ca9a1ec852fd66..14256e1f4963e9d9922a702f5013651799d0eb36 100644 (file)
@@ -7,93 +7,93 @@
   <comment>An FK table that links between drupal organic group, civicrm group and civicrm acl roles</comment>
   <add>2.0</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique table ID</comment>
-      <add>2.0</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique table ID</comment>
+    <add>2.0</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>drupal_og_id</name>
-       <type>int unsigned</type>
-       <comment>Foreign key to the organic group.</comment>
-       <add>2.0</add>
+    <name>drupal_og_id</name>
+    <type>int unsigned</type>
+    <comment>Foreign key to the organic group.</comment>
+    <add>2.0</add>
   </field>
   <index>
-       <name>index_drupal_og_id</name>
-       <fieldName>index_drupal_og_id</fieldName>
-       <add>2.0</add>
+    <name>index_drupal_og_id</name>
+    <fieldName>index_drupal_og_id</fieldName>
+    <add>2.0</add>
   </index>
   <field>
-      <name>group_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to civicrm group.</comment>
-      <add>2.0</add>
-      <pseudoconstant>
-        <table>civicrm_group</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>title</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>group_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to civicrm group.</comment>
+    <add>2.0</add>
+    <pseudoconstant>
+      <table>civicrm_group</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>title</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>group_id</name>
-       <table>civicrm_group</table>
-       <key>id</key>
-       <add>2.0</add>
+    <name>group_id</name>
+    <table>civicrm_group</table>
+    <key>id</key>
+    <add>2.0</add>
   </foreignKey>
   <field>
-      <name>acl_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to civicrm acl.</comment>
-      <add>2.0</add>
+    <name>acl_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to civicrm acl.</comment>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>acl_id</name>
-       <table>civicrm_acl</table>
-       <key>id</key>
-       <add>2.0</add>
+    <name>acl_id</name>
+    <table>civicrm_acl</table>
+    <key>id</key>
+    <add>2.0</add>
   </foreignKey>
   <field>
-      <name>admin_group_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to admin civicrm group.</comment>
-      <add>2.0</add>
-      <pseudoconstant>
-        <table>civicrm_group</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>title</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>admin_group_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to admin civicrm group.</comment>
+    <add>2.0</add>
+    <pseudoconstant>
+      <table>civicrm_group</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>title</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>admin_group_id</name>
-       <table>civicrm_group</table>
-       <key>id</key>
-       <add>2.0</add>
+    <name>admin_group_id</name>
+    <table>civicrm_group</table>
+    <key>id</key>
+    <add>2.0</add>
   </foreignKey>
   <field>
-      <name>admin_acl_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to civicrm acl.</comment>
-      <add>2.0</add>
+    <name>admin_acl_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to civicrm acl.</comment>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>admin_acl_id</name>
-       <table>civicrm_acl</table>
-       <key>id</key>
-       <add>2.0</add>
+    <name>admin_acl_id</name>
+    <table>civicrm_acl</table>
+    <key>id</key>
+    <add>2.0</add>
   </foreignKey>
 </table>
index 2b1357ddd37827ec958ae3c1a4ad56c03e0b4c8e..52f01cde2aa491a11b6502083509d46ec71e3697 100644 (file)
@@ -7,26 +7,26 @@
   <comment>An FK table that links between civicrm group and drupal roles</comment>
   <add>2.0</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique table ID</comment>
-      <add>2.0</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique table ID</comment>
+    <add>2.0</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>drupal_role_id</name>
-       <type>int unsigned</type>
-       <comment>Foreign key to the drupal role.</comment>
-       <add>2.0</add>
+    <name>drupal_role_id</name>
+    <type>int unsigned</type>
+    <comment>Foreign key to the drupal role.</comment>
+    <add>2.0</add>
   </field>
   <index>
-       <name>index_drupal_role_id</name>
-       <fieldName>index_drupal_role_id</fieldName>
-       <add>2.0</add>
+    <name>index_drupal_role_id</name>
+    <fieldName>index_drupal_role_id</fieldName>
+    <add>2.0</add>
   </index>
   <field>
     <name>group_id</name>
@@ -44,9 +44,9 @@
     </html>
   </field>
   <foreignKey>
-       <name>group_id</name>
-       <table>civicrm_group</table>
-       <key>id</key>
-       <add>2.0</add>
+    <name>group_id</name>
+    <table>civicrm_group</table>
+    <key>id</key>
+    <add>2.0</add>
   </foreignKey>
 </table>
index 0974667f1aeefb00953b2e8f769440a065c89137..01e67670619b97b1b63bae78e845e6e857497349 100644 (file)
   <add>3.3</add>
 
   <field>
-      <name>id</name>
-      <title>Campaign ID</title>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique Campaign ID.</comment>
-      <import>true</import>
-      <add>3.3</add>
+    <name>id</name>
+    <title>Campaign ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique Campaign ID.</comment>
+    <import>true</import>
+    <add>3.3</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
 
   <field>
-      <name>name</name>
-      <title>Campaign Name</title>
-      <type>varchar</type>
-      <length>255</length>
-      <required>true</required>
-      <comment>Name of the Campaign.</comment>
-      <import>true</import>
-      <html>
-        <type>Text</type>
-      </html>
-      <add>3.3</add>
+    <name>name</name>
+    <title>Campaign Name</title>
+    <type>varchar</type>
+    <length>255</length>
+    <required>true</required>
+    <comment>Name of the Campaign.</comment>
+    <import>true</import>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>3.3</add>
   </field>
 
   <field>
-       <name>title</name>
-       <title>Campaign Title</title>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Title of the Campaign.</comment>
-       <import>true</import>
-       <html>
-        <type>Text</type>
-      </html>
-       <add>3.3</add>
+    <name>title</name>
+    <title>Campaign Title</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Title of the Campaign.</comment>
+    <import>true</import>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>3.3</add>
   </field>
 
   <field>
-      <name>description</name>
-      <title>Campaign Description</title>
-      <type>text</type>
-      <html>
-        <type>TextArea</type>
-        <rows>8</rows>
-        <cols>60</cols>
-      </html>
-      <comment>Full description of Campaign.</comment>
-      <add>3.3</add>
+    <name>description</name>
+    <title>Campaign Description</title>
+    <type>text</type>
+    <html>
+      <type>TextArea</type>
+      <rows>8</rows>
+      <cols>60</cols>
+    </html>
+    <comment>Full description of Campaign.</comment>
+    <add>3.3</add>
   </field>
 
   <field>
-      <name>start_date</name>
-      <title>Campaign Start Date</title>
-      <type>datetime</type>
-      <headerPattern>/^start|(s(tart\s)?date)$/i</headerPattern>
-      <comment>Date and time that Campaign starts.</comment>
-      <import>true</import>
-      <html>
-        <type>Select Date</type>
-      </html>
-      <add>3.3</add>
+    <name>start_date</name>
+    <title>Campaign Start Date</title>
+    <type>datetime</type>
+    <headerPattern>/^start|(s(tart\s)?date)$/i</headerPattern>
+    <comment>Date and time that Campaign starts.</comment>
+    <import>true</import>
+    <html>
+      <type>Select Date</type>
+    </html>
+    <add>3.3</add>
   </field>
 
   <field>
-      <name>end_date</name>
-      <title>Campaign End Date</title>
-      <type>datetime</type>
-      <headerPattern>/^end|(e(nd\s)?date)$/i</headerPattern>
-      <comment>Date and time that Campaign ends.</comment>
-      <import>true</import>
-      <html>
-        <type>Select Date</type>
-      </html>
-      <add>3.3</add>
+    <name>end_date</name>
+    <title>Campaign End Date</title>
+    <type>datetime</type>
+    <headerPattern>/^end|(e(nd\s)?date)$/i</headerPattern>
+    <comment>Date and time that Campaign ends.</comment>
+    <import>true</import>
+    <html>
+      <type>Select Date</type>
+    </html>
+    <add>3.3</add>
   </field>
 
   <field>
-      <name>campaign_type_id</name>
-      <title>Campaign Type</title>
-      <type>int unsigned</type>
-      <default>NULL</default>
-      <comment>Campaign Type ID.Implicit FK to civicrm_option_value where option_group = campaign_type</comment>
-      <import>true</import>
-      <pseudoconstant>
-        <optionGroupName>campaign_type</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>3.3</add>
+    <name>campaign_type_id</name>
+    <title>Campaign Type</title>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>Campaign Type ID.Implicit FK to civicrm_option_value where option_group = campaign_type</comment>
+    <import>true</import>
+    <pseudoconstant>
+      <optionGroupName>campaign_type</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>3.3</add>
   </field>
   <index>
-      <name>UI_campaign_type_id</name>
-      <fieldName>campaign_type_id</fieldName>
-      <add>3.3</add>
+    <name>UI_campaign_type_id</name>
+    <fieldName>campaign_type_id</fieldName>
+    <add>3.3</add>
   </index>
 
-   <field>
-      <name>status_id</name>
-      <title>Campaign Status</title>
-      <type>int unsigned</type>
-      <default>NULL</default>
-      <comment>Campaign status ID.Implicit FK to civicrm_option_value where option_group = campaign_status</comment>
-      <import>true</import>
-      <pseudoconstant>
-        <optionGroupName>campaign_status</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>3.3</add>
+  <field>
+    <name>status_id</name>
+    <title>Campaign Status</title>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>Campaign status ID.Implicit FK to civicrm_option_value where option_group = campaign_status</comment>
+    <import>true</import>
+    <pseudoconstant>
+      <optionGroupName>campaign_status</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>3.3</add>
   </field>
   <index>
-      <name>UI_campaign_status_id</name>
-      <fieldName>status_id</fieldName>
-      <add>3.3</add>
+    <name>UI_campaign_status_id</name>
+    <fieldName>status_id</fieldName>
+    <add>3.3</add>
   </index>
 
   <field>
-       <name>external_identifier</name>
-       <type>varchar</type>
-       <title>Campaign External Identifier</title>
-       <length>32</length>
-       <headerPattern>/external\s?id/i</headerPattern>
-       <dataPattern>/^\d{11,}$/</dataPattern>
-       <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.</comment>
-       <import>true</import>
-       <add>3.3</add>
-       <html>
-         <type>Text</type>
-       </html>
+    <name>external_identifier</name>
+    <type>varchar</type>
+    <title>Campaign External ID</title>
+    <length>32</length>
+    <headerPattern>/external\s?id/i</headerPattern>
+    <dataPattern>/^\d{11,}$/</dataPattern>
+    <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.</comment>
+    <import>true</import>
+    <add>3.3</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <index>
-       <name>UI_external_identifier</name>
-       <unique>true</unique>
-       <fieldName>external_identifier</fieldName>
-       <add>3.3</add>
+    <name>UI_external_identifier</name>
+    <unique>true</unique>
+    <fieldName>external_identifier</fieldName>
+    <add>3.3</add>
   </index>
 
   <field>
-       <name>parent_id</name>
-       <title>Parent Campaign</title>
-       <type>int unsigned</type>
-       <default>NULL</default>
-       <comment>Optional parent id for this Campaign.</comment>
-       <import>true</import>
-       <add>3.3</add>
-       <html>
-         <type>Autocomplete-Select</type>
-       </html>
+    <name>parent_id</name>
+    <title>Parent Campaign</title>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>Optional parent id for this Campaign.</comment>
+    <import>true</import>
+    <add>3.3</add>
+    <html>
+      <type>Autocomplete-Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>parent_id</name>
-       <table>civicrm_campaign</table>
-       <key>id</key>
-       <add>3.3</add>
-       <onDelete>SET NULL</onDelete>
+    <name>parent_id</name>
+    <table>civicrm_campaign</table>
+    <key>id</key>
+    <add>3.3</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
 
   <field>
-      <name>is_active</name>
-      <title>Is Campaign Active?</title>
-      <type>boolean</type>
-      <default>1</default>
-      <comment>Is this Campaign enabled or disabled/cancelled?</comment>
-      <add>3.3</add>
-      <html>
-        <type>CheckBox</type>
-      </html>
+    <name>is_active</name>
+    <title>Is Campaign Active?</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this Campaign enabled or disabled/cancelled?</comment>
+    <add>3.3</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
 
   <field>
-      <name>created_id</name>
-      <type>int unsigned</type>
-      <title>Campaign Created By</title>
-      <comment>FK to civicrm_contact, who created this Campaign.</comment>
-      <add>3.3</add>
+    <name>created_id</name>
+    <type>int unsigned</type>
+    <title>Campaign Created By</title>
+    <comment>FK to civicrm_contact, who created this Campaign.</comment>
+    <add>3.3</add>
   </field>
   <foreignKey>
-      <name>created_id</name>
-      <table>civicrm_contact</table>
-      <key>id</key>
-      <add>3.3</add>
-      <onDelete>SET NULL</onDelete>
+    <name>created_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>3.3</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
 
   <field>
-      <name>created_date</name>
-      <type>datetime</type>
-      <title>Campaign Created Date</title>
-      <comment>Date and time that Campaign was created.</comment>
-      <add>3.3</add>
-      <html>
-        <type>Select Date</type>
-      </html>
+    <name>created_date</name>
+    <type>datetime</type>
+    <title>Campaign Created Date</title>
+    <comment>Date and time that Campaign was created.</comment>
+    <add>3.3</add>
+    <html>
+      <type>Select Date</type>
+    </html>
   </field>
 
   <field>
-      <name>last_modified_id</name>
-      <type>int unsigned</type>
-      <title>Campaign Modified By</title>
-      <comment>FK to civicrm_contact, who recently edited this Campaign.</comment>
-      <add>3.3</add>
+    <name>last_modified_id</name>
+    <type>int unsigned</type>
+    <title>Campaign Modified By</title>
+    <comment>FK to civicrm_contact, who recently edited this Campaign.</comment>
+    <add>3.3</add>
   </field>
   <foreignKey>
-      <name>last_modified_id</name>
-      <table>civicrm_contact</table>
-      <key>id</key>
-      <add>3.3</add>
-      <onDelete>SET NULL</onDelete>
+    <name>last_modified_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>3.3</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
 
   <field>
-      <name>last_modified_date</name>
-      <type>datetime</type>
-      <title>Campaign Modified Date</title>
-      <comment>Date and time that Campaign was edited last time.</comment>
-      <add>3.3</add>
-  </field>
-  <field>
-      <name>goal_general</name>
-      <type>text</type>
-      <title>Campaign Goals</title>
-      <comment>General goals for Campaign.</comment>
-      <add>3.4</add>
-      <html>
-        <type>RichTextEditor</type>
-      </html>
-  </field>
-  <field>
-      <name>goal_revenue</name>
-      <type>decimal</type>
-      <comment>The target revenue for this campaign.</comment>
-      <add>3.4</add>
-      <html>
-        <type>Text</type>
-      </html>
+    <name>last_modified_date</name>
+    <type>datetime</type>
+    <title>Campaign Modified Date</title>
+    <comment>Date and time that Campaign was edited last time.</comment>
+    <add>3.3</add>
+  </field>
+  <field>
+    <name>goal_general</name>
+    <type>text</type>
+    <title>Campaign Goals</title>
+    <comment>General goals for Campaign.</comment>
+    <add>3.4</add>
+    <html>
+      <type>RichTextEditor</type>
+    </html>
+  </field>
+  <field>
+    <name>goal_revenue</name>
+    <type>decimal</type>
+    <comment>The target revenue for this campaign.</comment>
+    <add>3.4</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
 </table>
index e85b1eeb13e947515f82a4a6486903f21f13549b..4e810ccb85e2937841c1960f27f7d734e2de6bbd 100644 (file)
@@ -8,6 +8,7 @@
 
   <field>
     <name>id</name>
+    <title>Survey ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Survey id.</comment>
@@ -32,6 +33,7 @@
 
   <field>
     <name>campaign_id</name>
+    <title>Survey Campaign ID</title>
     <type>int unsigned</type>
     <default>NULL</default>
     <comment>Foreign key to the Campaign.</comment>
@@ -73,6 +75,7 @@
 
   <field>
     <name>recontact_interval</name>
+    <title>Follow up Interval</title>
     <type>text</type>
     <comment>Recontact intervals for each status.</comment>
     <html>
@@ -85,6 +88,7 @@
 
   <field>
     <name>instructions</name>
+    <title>Instructions</title>
     <type>text</type>
     <localizable>true</localizable>
     <comment>Script instructions for volunteers to use for the survey.</comment>
 
   <field>
     <name>release_frequency</name>
+    <title>Survey Hold Duration</title>
     <type>int unsigned</type>
     <default>NULL</default>
     <comment>Number of days for recurrence of release.</comment>
 
   <field>
     <name>is_active</name>
+    <title>Survey Is Active</title>
     <type>boolean</type>
     <default>1</default>
     <comment>Is this survey enabled or disabled/cancelled?</comment>
 
   <field>
     <name>is_default</name>
+    <title>Is Default Survey</title>
     <type>boolean</type>
     <default>0</default>
     <comment>Is this default survey?</comment>
 
   <field>
     <name>created_id</name>
+    <title>Survey Created By</title>
     <type>int unsigned</type>
     <comment>FK to civicrm_contact, who created this Survey.</comment>
     <add>3.3</add>
   </field>
   <foreignKey>
-      <name>created_id</name>
-      <table>civicrm_contact</table>
-      <key>id</key>
-      <add>3.3</add>
-      <onDelete>SET NULL</onDelete>
+    <name>created_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>3.3</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
 
   <field>
 
   <field>
     <name>last_modified_id</name>
+    <title>Survey Modified</title>
     <type>int unsigned</type>
     <comment>FK to civicrm_contact, who recently edited this Survey.</comment>
     <add>3.3</add>
 
   <field>
     <name>last_modified_date</name>
+    <title>Survey Modified On</title>
     <type>datetime</type>
     <comment>Date and time that Survey was edited last time.</comment>
     <add>3.3</add>
 
   <field>
     <name>result_id</name>
+    <title>Survey Result</title>
     <type>int unsigned</type>
     <default>NULL</default>
     <comment>Used to store option group id.</comment>
   </field>
   <field>
     <name>bypass_confirm</name>
+    <title>No Email Verification</title>
     <type>boolean</type>
     <default>0</default>
     <comment>Bypass the email verification.</comment>
index 77b565673d87bc904180c05ab70ee4c42ffabb28..99ccfae54bfe2417bdd886ec7d382fa439b03968 100644 (file)
   <add>1.8</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <uniqueName>case_id</uniqueName>
-      <required>true</required>
-      <import>true</import>
-      <title>Case ID</title>
-      <comment>Unique Case ID</comment>
-       <add>1.8</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <uniqueName>case_id</uniqueName>
+    <required>true</required>
+    <import>true</import>
+    <title>Case ID</title>
+    <comment>Unique Case ID</comment>
+    <add>1.8</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <uniqueName>case_contact_id</uniqueName>
-      <required>true</required>
-      <comment>Contact ID of contact record given case belongs to.</comment>
-       <add>1.8</add>
-       <drop>2.1</drop>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <uniqueName>case_contact_id</uniqueName>
+    <required>true</required>
+    <comment>Contact ID of contact record given case belongs to.</comment>
+    <add>1.8</add>
+    <drop>2.1</drop>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.8</add>
-       <drop>2.1</drop>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.8</add>
+    <drop>2.1</drop>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-       <name>case_type_id</name>
-       <type>int unsigned</type>
-       <import>true</import>
-       <export>false</export>
-       <title>Case Type</title>
-       <comment>FK to civicrm_case_type.id</comment>
-       <html>
-         <type>Select</type>
-       </html>
-       <pseudoconstant>
-         <table>civicrm_case_type</table>
-         <keyColumn>id</keyColumn>
-         <labelColumn>title</labelColumn>
-       </pseudoconstant>
-       <add>2.0</add>
+    <name>case_type_id</name>
+    <type>int unsigned</type>
+    <import>true</import>
+    <export>false</export>
+    <title>Case Type</title>
+    <comment>FK to civicrm_case_type.id</comment>
+    <html>
+      <type>Select</type>
+    </html>
+    <pseudoconstant>
+      <table>civicrm_case_type</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>title</labelColumn>
+    </pseudoconstant>
+    <add>2.0</add>
   </field>
   <index>
-       <name>index_case_type_id</name>
-       <fieldName>case_type_id</fieldName>
-       <add>2.0</add>
+    <name>index_case_type_id</name>
+    <fieldName>case_type_id</fieldName>
+    <add>2.0</add>
   </index>
   <foreignKey>
-       <name>case_type_id</name>
-       <table>civicrm_case_type</table>
-       <key>id</key>
-       <add>4.5</add>
-       <onDelete>SET NULL</onDelete>
+    <name>case_type_id</name>
+    <table>civicrm_case_type</table>
+    <key>id</key>
+    <add>4.5</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-       <name>casetag1_id</name>
-       <type>varchar</type>
-       <length>128</length>
-       <required>true</required>
-       <comment>Id of first case category.</comment>
-       <add>1.8</add>
-       <drop>2.0</drop>
+    <name>casetag1_id</name>
+    <type>varchar</type>
+    <length>128</length>
+    <required>true</required>
+    <comment>Id of first case category.</comment>
+    <add>1.8</add>
+    <drop>2.0</drop>
   </field>
   <index>
-       <name>index_casetag1_id</name>
-       <fieldName>casetag1_id</fieldName>
-       <add>1.8</add>
-       <drop>2.0</drop>
+    <name>index_casetag1_id</name>
+    <fieldName>casetag1_id</fieldName>
+    <add>1.8</add>
+    <drop>2.0</drop>
   </index>
   <field>
-       <name>casetag2_id</name>
-       <type>varchar</type>
-       <length>128</length>
-       <required>true</required>
-       <comment>Id of second case category.</comment>
-       <add>1.8</add>
-       <drop>2.0</drop>
+    <name>casetag2_id</name>
+    <type>varchar</type>
+    <length>128</length>
+    <required>true</required>
+    <comment>Id of second case category.</comment>
+    <add>1.8</add>
+    <drop>2.0</drop>
   </field>
   <index>
-       <name>index_casetag2_id</name>
-       <fieldName>casetag2_id</fieldName>
-       <add>1.8</add>
-       <drop>2.0</drop>
+    <name>index_casetag2_id</name>
+    <fieldName>casetag2_id</fieldName>
+    <add>1.8</add>
+    <drop>2.0</drop>
   </index>
   <field>
-       <name>casetag3_id</name>
-       <type>varchar</type>
-       <length>128</length>
-       <required>true</required>
-       <comment>Id of third case category.</comment>
-       <add>1.8</add>
-       <drop>2.0</drop>
+    <name>casetag3_id</name>
+    <type>varchar</type>
+    <length>128</length>
+    <required>true</required>
+    <comment>Id of third case category.</comment>
+    <add>1.8</add>
+    <drop>2.0</drop>
   </field>
   <index>
-       <name>index_casetag3_id</name>
-       <fieldName>casetag3_id</fieldName>
-       <add>1.8</add>
-       <drop>2.0</drop>
+    <name>index_casetag3_id</name>
+    <fieldName>casetag3_id</fieldName>
+    <add>1.8</add>
+    <drop>2.0</drop>
   </index>
   <field>
-      <name>subject</name>
-      <type>varchar</type>
-      <length>128</length>
-      <title>Case Subject</title>
-      <import>true</import>
-      <uniqueName>case_subject</uniqueName>
-      <comment>Short name of the case.</comment>
-      <html>
-         <type>Text</type>
-      </html>
-      <add>1.8</add>
+    <name>subject</name>
+    <type>varchar</type>
+    <length>128</length>
+    <title>Case Subject</title>
+    <import>true</import>
+    <uniqueName>case_subject</uniqueName>
+    <comment>Short name of the case.</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>1.8</add>
   </field>
-    <field>
-     <name>start_date</name>
-     <uniqueName>case_start_date</uniqueName>
-     <title>Case Start Date</title>
-     <import>true</import>
-     <type>date</type>
-     <comment>Date on which given case starts.</comment>
-     <html>
-         <type>Select Date</type>
-     </html>
-     <add>1.8</add>
+  <field>
+    <name>start_date</name>
+    <uniqueName>case_start_date</uniqueName>
+    <title>Case Start Date</title>
+    <import>true</import>
+    <type>date</type>
+    <comment>Date on which given case starts.</comment>
+    <html>
+      <type>Select Date</type>
+    </html>
+    <add>1.8</add>
   </field>
   <field>
-     <name>end_date</name>
-     <uniqueName>case_end_date</uniqueName>
-     <title>Case End Date</title>
-     <import>true</import>
-     <type>date</type>
-     <comment>Date on which given case ends.</comment>
-     <html>
-         <type>Select Date</type>
-      </html>
-     <add>1.8</add>
+    <name>end_date</name>
+    <uniqueName>case_end_date</uniqueName>
+    <title>Case End Date</title>
+    <import>true</import>
+    <type>date</type>
+    <comment>Date on which given case ends.</comment>
+    <html>
+      <type>Select Date</type>
+    </html>
+    <add>1.8</add>
   </field>
   <field>
-      <name>details</name>
-      <type>text</type>
-      <html>
-        <type>TextArea</type>
-        <rows>8</rows>
-        <cols>60</cols>
-      </html>
-      <comment>Details about the meeting (agenda, notes, etc).</comment>
-      <add>1.8</add>
+    <name>details</name>
+    <type>text</type>
+    <html>
+      <type>TextArea</type>
+      <rows>8</rows>
+      <cols>60</cols>
+    </html>
+    <comment>Details about the meeting (agenda, notes, etc).</comment>
+    <add>1.8</add>
   </field>
   <field>
-       <name>status_id</name>
-       <type>int unsigned</type>
-       <uniqueName>case_status_id</uniqueName>
-       <required>true</required>
-       <import>true</import>
-       <export>false</export>
-       <title>Case Status</title>
-       <comment>Id of case status.</comment>
-       <pseudoconstant>
-         <optionGroupName>case_status</optionGroupName>
-       </pseudoconstant>
-       <html>
-         <type>Select</type>
-       </html>
-       <add>1.8</add>
+    <name>status_id</name>
+    <type>int unsigned</type>
+    <uniqueName>case_status_id</uniqueName>
+    <required>true</required>
+    <import>true</import>
+    <export>false</export>
+    <title>Case Status</title>
+    <comment>Id of case status.</comment>
+    <pseudoconstant>
+      <optionGroupName>case_status</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>1.8</add>
   </field>
   <field>
-       <name>is_deleted</name>
-       <title>Case is in the Trash</title>
-       <uniqueName>case_deleted</uniqueName>
-       <type>boolean</type>
-       <default>0</default>
-       <import>true</import>
-       <title>Case Deleted</title>
-       <add>2.2</add>
+    <name>is_deleted</name>
+    <title>Case is in the Trash</title>
+    <uniqueName>case_deleted</uniqueName>
+    <type>boolean</type>
+    <default>0</default>
+    <import>true</import>
+    <title>Case Deleted</title>
+    <add>2.2</add>
   </field>
   <index>
-       <name>index_is_deleted</name>
-       <fieldName>is_deleted</fieldName>
-       <add>2.2</add>
+    <name>index_is_deleted</name>
+    <fieldName>is_deleted</fieldName>
+    <add>2.2</add>
   </index>
 </table>
index 9fd0fc06893005b5154435a05dc823dcedd784d8..e3e18b4bddad21bff0031583de05f0d0339e7764 100644 (file)
@@ -8,6 +8,7 @@
   <log>true</log>
   <field>
     <name>id</name>
+    <title>Case Type ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Autoincremented type id</comment>
@@ -19,6 +20,7 @@
   </primaryKey>
   <field>
     <name>name</name>
+    <title>Case Type Name</title>
     <type>varchar</type>
     <length>64</length>
     <required>true</required>
@@ -33,6 +35,7 @@
   </index>
   <field>
     <name>title</name>
+    <title>Case Type Title</title>
     <type>varchar</type>
     <length>64</length>
     <required>true</required>
@@ -42,6 +45,7 @@
   </field>
   <field>
     <name>description</name>
+    <title>Case Type Description</title>
     <type>varchar</type>
     <length>255</length>
     <localizable>true</localizable>
   </field>
   <field>
     <name>is_active</name>
+    <title>Case Type Is Active</title>
     <type>boolean</type>
     <comment>Is this entry active?</comment>
     <add>4.5</add>
   </field>
   <field>
     <name>is_reserved</name>
+    <title>Case Type Is Reserved</title>
     <type>boolean</type>
     <comment>Is this case type a predefined system type?</comment>
     <add>4.5</add>
   </field>
   <field>
     <name>weight</name>
+    <title>Case Type Weight</title>
     <type>int</type>
     <required>true</required>
     <default>1</default>
@@ -70,6 +77,7 @@
   </field>
   <field>
     <name>definition</name>
+    <title>Case Type Definition</title>
     <type>blob</type>
     <comment>xml definition of case type</comment>
     <add>4.5</add>
index 32448ead05895d90fe3ef646b9bdc9dbed8cf681..f584a4de74da6b05ba5c0b3b26be58904c0ba0e0 100644 (file)
@@ -7,56 +7,56 @@
   <comment>Join table cache for contacts that a user has permission on.</comment>
   <add>3.1</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>primary key</comment>
-       <add>3.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>primary key</comment>
+    <add>3.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>user_id</name>
-      <type>int unsigned</type>
-      <comment>FK to civicrm_contact (could be null for anon user)</comment>
-       <add>3.1</add>
+    <name>user_id</name>
+    <type>int unsigned</type>
+    <comment>FK to civicrm_contact (could be null for anon user)</comment>
+    <add>3.1</add>
   </field>
   <foreignKey>
-       <name>user_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>3.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>user_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>3.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to civicrm_contact</comment>
-       <add>3.1</add>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to civicrm_contact</comment>
+    <add>3.1</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>3.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>3.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>operation</name>
-      <type>varchar</type>
-      <length>8</length>
-      <required>true</required>
-      <comment>What operation does this user have permission on?</comment>
-      <pseudoconstant>
-        <callback>CRM_ACL_BAO_ACL::operation</callback>
-      </pseudoconstant>
-      <add>1.6</add>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>operation</name>
+    <type>varchar</type>
+    <length>8</length>
+    <required>true</required>
+    <comment>What operation does this user have permission on?</comment>
+    <pseudoconstant>
+      <callback>CRM_ACL_BAO_ACL::operation</callback>
+    </pseudoconstant>
+    <add>1.6</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <index>
     <name>UI_user_contact_operation</name>
index 82bf0b532d72ef65fab044626d964030356be358..9b21b6e0d1e77f14c7860c88296387e4420a7faa 100644 (file)
   <comment>Contact objects are defined by a civicrm_contact record plus a related civicrm_contact_type record.</comment>
   <add>1.1</add>
   <log>true</log>
- <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <title>Internal Contact ID</title>
-      <import>true</import>
-      <headerPattern>/internal|contact?|id$/i</headerPattern>
-      <required>true</required>
-      <comment>Unique Contact ID</comment>
-      <add>1.1</add>
 <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Internal Contact ID</title>
+    <import>true</import>
+    <headerPattern>/internal|contact?|id$/i</headerPattern>
+    <required>true</required>
+    <comment>Unique Contact ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>contact_type</name>
-       <title>Contact Type</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Type of Contact.</comment>
-       <export>true</export>
-       <pseudoconstant>
-        <table>civicrm_contact_type</table>
-        <keyColumn>name</keyColumn>
-        <labelColumn>label</labelColumn>
-        <condition>parent_id IS NULL</condition>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-       <add>1.1</add>
-       <change>3.1</change>
+    <name>contact_type</name>
+    <title>Contact Type</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Type of Contact.</comment>
+    <export>true</export>
+    <pseudoconstant>
+      <table>civicrm_contact_type</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>label</labelColumn>
+      <condition>parent_id IS NULL</condition>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>1.1</add>
+    <change>3.1</change>
   </field>
   <index>
-       <name>index_contact_type</name>
-       <fieldName>contact_type</fieldName>
-       <add>2.1</add>
+    <name>index_contact_type</name>
+    <fieldName>contact_type</fieldName>
+    <add>2.1</add>
   </index>
   <field>
-       <name>contact_sub_type</name>
-       <title>Contact Subtype</title>
-       <type>varchar</type>
-       <length>255</length>
-       <export>true</export>
-       <import>true</import>
-       <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i</headerPattern>
-       <comment>May be used to over-ride contact view and edit templates.</comment>
-       <pseudoconstant>
-        <table>civicrm_contact_type</table>
-        <keyColumn>name</keyColumn>
-        <labelColumn>label</labelColumn>
-        <condition>parent_id IS NOT NULL</condition>
-      </pseudoconstant>
-      <html>
-        <type>Multi-Select</type>
-      </html>
-       <add>1.5</add>
+    <name>contact_sub_type</name>
+    <title>Contact Subtype</title>
+    <type>varchar</type>
+    <length>255</length>
+    <export>true</export>
+    <import>true</import>
+    <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i</headerPattern>
+    <comment>May be used to over-ride contact view and edit templates.</comment>
+    <pseudoconstant>
+      <table>civicrm_contact_type</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>label</labelColumn>
+      <condition>parent_id IS NOT NULL</condition>
+    </pseudoconstant>
+    <html>
+      <type>Multi-Select</type>
+    </html>
+    <add>1.5</add>
   </field>
   <index>
-       <name>index_contact_sub_type</name>
-       <fieldName>contact_sub_type</fieldName>
-       <html>
-        <type>Multi-Select</type>
-      </html>
-       <add>2.1</add>
+    <name>index_contact_sub_type</name>
+    <fieldName>contact_sub_type</fieldName>
+    <html>
+      <type>Multi-Select</type>
+    </html>
+    <add>2.1</add>
   </index>
   <field>
-       <name>do_not_email</name>
-       <type>boolean</type>
-       <import>true</import>
-       <headerPattern>/d(o )?(not )?(email)/i</headerPattern>
-       <dataPattern>/^\d{1,}$/</dataPattern>
-       <default>0</default>
-       <html>
-         <type>CheckBox</type>
-       </html>
-       <add>1.1</add>
-</field>
-<field>
-       <name>do_not_phone</name>
-       <type>boolean</type>
-       <default>0</default>
-       <import>true</import>
-       <headerPattern>/d(o )?(not )?(call|phone)/i</headerPattern>
-       <dataPattern>/^\d{1,}$/</dataPattern>
-       <add>1.1</add>
-       <html>
-         <type>CheckBox</type>
-       </html>
- </field>
- <field>
-       <name>do_not_mail</name>
-       <type>boolean</type>
-       <import>true</import>
-       <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i</headerPattern>
-       <dataPattern>/^\d{1,}$/</dataPattern>
-       <default>0</default>
-       <add>1.1</add>
-       <html>
-         <type>CheckBox</type>
-       </html>
-  </field>
-  <field>
-       <name>do_not_sms</name>
-       <type>boolean</type>
-       <import>true</import>
-       <headerPattern>/d(o )?(not )?(sms)/i</headerPattern>
-       <dataPattern>/^\d{1,}$/</dataPattern>
-       <default>0</default>
-       <add>3.0</add>
-       <html>
-         <type>CheckBox</type>
-       </html>
-  </field>
-  <field>
-       <name>do_not_trade</name>
-       <type>boolean</type>
-       <import>true</import>
-       <headerPattern>/d(o )?(not )?(trade)/i</headerPattern>
-       <dataPattern>/^\d{1,}$/</dataPattern>
-       <default>0</default>
-       <add>1.1</add>
-       <html>
-         <type>CheckBox</type>
-       </html>
+    <name>do_not_email</name>
+    <type>boolean</type>
+    <import>true</import>
+    <headerPattern>/d(o )?(not )?(email)/i</headerPattern>
+    <dataPattern>/^\d{1,}$/</dataPattern>
+    <default>0</default>
+    <html>
+      <type>CheckBox</type>
+    </html>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>do_not_phone</name>
+    <type>boolean</type>
+    <default>0</default>
+    <import>true</import>
+    <headerPattern>/d(o )?(not )?(call|phone)/i</headerPattern>
+    <dataPattern>/^\d{1,}$/</dataPattern>
+    <add>1.1</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
 </field>
 <field>
+    <name>do_not_mail</name>
+    <type>boolean</type>
+    <import>true</import>
+    <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i</headerPattern>
+    <dataPattern>/^\d{1,}$/</dataPattern>
+    <default>0</default>
+    <add>1.1</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
+  </field>
+  <field>
+    <name>do_not_sms</name>
+    <type>boolean</type>
+    <import>true</import>
+    <headerPattern>/d(o )?(not )?(sms)/i</headerPattern>
+    <dataPattern>/^\d{1,}$/</dataPattern>
+    <default>0</default>
+    <add>3.0</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
+  </field>
+  <field>
+    <name>do_not_trade</name>
+    <type>boolean</type>
+    <import>true</import>
+    <headerPattern>/d(o )?(not )?(trade)/i</headerPattern>
+    <dataPattern>/^\d{1,}$/</dataPattern>
+    <default>0</default>
+    <add>1.1</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <field>
     <name>is_opt_out</name>
     <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?</comment>
     <add>1.1</add>
     <html>
-         <type>CheckBox</type>
-       </html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <field>
-       <name>legal_identifier</name>
-       <type>varchar</type>
-       <length>32</length>
-       <import>true</import>
-       <headerPattern>/legal\s?id/i</headerPattern>
-       <dataPattern>/\w+?\d{5,}/</dataPattern>
-       <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.</comment>
-      <add>1.1</add>
-      <html>
-        <type>Text</type>
-      </html>
+    <name>legal_identifier</name>
+    <type>varchar</type>
+    <length>32</length>
+    <import>true</import>
+    <headerPattern>/legal\s?id/i</headerPattern>
+    <dataPattern>/\w+?\d{5,}/</dataPattern>
+    <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
+    </comment>
+    <add>1.1</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-       <name>external_identifier</name>
-       <type>varchar</type>
-       <length>32</length>
-       <html>
-         <type>Text</type>
-         <size>EIGHT</size>
-       </html>
+    <name>external_identifier</name>
+    <type>varchar</type>
+    <length>32</length>
+    <html>
+      <type>Text</type>
+      <size>EIGHT</size>
+    </html>
 
-       <import>true</import>
-       <headerPattern>/external\s?id/i</headerPattern>
-       <dataPattern>/^\d{11,}$/</dataPattern>
-       <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.</comment>
-      <add>1.1</add>
+    <import>true</import>
+    <headerPattern>/external\s?id/i</headerPattern>
+    <dataPattern>/^\d{11,}$/</dataPattern>
+    <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.</comment>
+    <add>1.1</add>
   </field>
   <index>
-       <name>UI_external_identifier</name>
-       <unique>true</unique>
-       <fieldName>external_identifier</fieldName>
-       <add>1.7</add>
+    <name>UI_external_identifier</name>
+    <unique>true</unique>
+    <fieldName>external_identifier</fieldName>
+    <add>1.7</add>
   </index>
   <field>
-       <name>sort_name</name>
-       <title>Sort Name</title>
-       <type>varchar</type>
-       <length>128</length>
-       <html>
-         <type>Text</type>
-         <size>BIG</size>
-       </html>
+    <name>sort_name</name>
+    <title>Sort Name</title>
+    <type>varchar</type>
+    <length>128</length>
+    <html>
+      <type>Text</type>
+      <size>BIG</size>
+    </html>
 
-       <export>true</export>
-       <comment>Name used for sorting different contact types</comment>
-      <add>1.1</add>
+    <export>true</export>
+    <comment>Name used for sorting different contact types</comment>
+    <add>1.1</add>
   </field>
   <index>
-       <name>index_sort_name</name>
-       <fieldName>sort_name</fieldName>
-       <add>2.1</add>
+    <name>index_sort_name</name>
+    <fieldName>sort_name</fieldName>
+    <add>2.1</add>
   </index>
   <field>
-       <name>display_name</name>
-       <title>Display Name</title>
-       <type>varchar</type>
-       <length>128</length>
-       <html>
-         <type>Text</type>
-         <size>BIG</size>
-       </html>
+    <name>display_name</name>
+    <title>Display Name</title>
+    <type>varchar</type>
+    <length>128</length>
+    <html>
+      <type>Text</type>
+      <size>BIG</size>
+    </html>
 
-       <export>true</export>
-       <comment>Formatted name representing preferred format for display/print/other output.</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>nick_name</name>
-       <title>Nickname</title>
-       <type>varchar</type>
-       <length>128</length>
-       <html>
-         <type>Text</type>
-         <size>BIG</size>
-       </html>
+    <export>true</export>
+    <comment>Formatted name representing preferred format for display/print/other output.</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>nick_name</name>
+    <title>Nickname</title>
+    <type>varchar</type>
+    <length>128</length>
+    <html>
+      <type>Text</type>
+      <size>BIG</size>
+    </html>
 
-       <import>true</import>
-       <headerPattern>/n(ick\s)name|nick$/i</headerPattern>
-       <dataPattern>/^\w+$/</dataPattern>
-       <comment>Nickname.</comment>
-       <fulltext/>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>legal_name</name>
-       <type>varchar</type>
-       <length>128</length>
-       <html>
-         <type>Text</type>
-         <size>BIG</size>
-       </html>
+    <import>true</import>
+    <headerPattern>/n(ick\s)name|nick$/i</headerPattern>
+    <dataPattern>/^\w+$/</dataPattern>
+    <comment>Nickname.</comment>
+    <fulltext/>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>legal_name</name>
+    <type>varchar</type>
+    <length>128</length>
+    <html>
+      <type>Text</type>
+      <size>BIG</size>
+    </html>
 
-       <import>true</import>
-       <headerPattern>/^legal|(l(egal\s)?name)$/i</headerPattern>
-       <comment>Legal Name.</comment>
-       <fulltext/>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>home_URL</name>
-       <rule>url</rule>
-       <title>Website</title>
-       <type>varchar</type>
-       <length>128</length>
-       <html>
-         <type>Text</type>
-         <size>BIG</size>
-       </html>
+    <import>true</import>
+    <headerPattern>/^legal|(l(egal\s)?name)$/i</headerPattern>
+    <comment>Legal Name.</comment>
+    <fulltext/>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>home_URL</name>
+    <rule>url</rule>
+    <title>Website</title>
+    <type>varchar</type>
+    <length>128</length>
+    <html>
+      <type>Text</type>
+      <size>BIG</size>
+    </html>
 
-       <import>true</import>
-       <headerPattern>/^(home\sURL)|URL|web|site/i</headerPattern>
-       <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
-       <comment>optional "home page" URL for this contact.</comment>
-       <add>1.1</add>
-       <drop>3.2</drop>
-  </field>
-  <field>
-       <name>image_URL</name>
-       <type>varchar</type>
-       <length>255</length>
-       <import>true</import>
-       <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.</comment>
-       <add>1.1</add>
-       <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-      <name>preferred_communication_method</name>
-      <title>Preferred Communication Method</title>
-      <type>varchar</type>
-      <length>255</length>
-      <import>true</import>
-      <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i</headerPattern>
-      <dataPattern>/^\w+$/</dataPattern>
-      <comment>What is the preferred mode of communication.</comment>
-      <add>1.1</add>
-      <pseudoconstant>
-        <optionGroupName>preferred_communication_method</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <import>true</import>
+    <headerPattern>/^(home\sURL)|URL|web|site/i</headerPattern>
+    <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
+    <comment>optional "home page" URL for this contact.</comment>
+    <add>1.1</add>
+    <drop>3.2</drop>
+  </field>
+  <field>
+    <name>image_URL</name>
+    <type>varchar</type>
+    <length>255</length>
+    <import>true</import>
+    <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.</comment>
+    <add>1.1</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>preferred_communication_method</name>
+    <title>Preferred Communication Method</title>
+    <type>varchar</type>
+    <length>255</length>
+    <import>true</import>
+    <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i</headerPattern>
+    <dataPattern>/^\w+$/</dataPattern>
+    <comment>What is the preferred mode of communication.</comment>
+    <add>1.1</add>
+    <pseudoconstant>
+      <optionGroupName>preferred_communication_method</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <index>
-       <name>index_preferred_communication_method</name>
-       <fieldName>preferred_communication_method</fieldName>
-       <add>1.6</add>
+    <name>index_preferred_communication_method</name>
+    <fieldName>preferred_communication_method</fieldName>
+    <add>1.6</add>
   </index>
   <field>
-      <name>preferred_language</name>
-      <title>Preferred Language</title>
-      <type>varchar</type>
-      <length>5</length>
-      <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.</comment>
-      <headerPattern>/^lang/i</headerPattern>
-      <import>true</import>
-      <pseudoconstant>
-        <optionGroupName>languages</optionGroupName>
-        <keyColumn>name</keyColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>3.2</add>
-  </field>
-  <field>
-       <name>preferred_mail_format</name>
-       <type>varchar</type>
-       <length>8</length>
-       <default>"Both"</default>
-       <import>true</import>
-       <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i</headerPattern>
-       <comment>What is the preferred mode of sending an email.</comment>
-       <add>1.1</add>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::pmf</callback>
-       </pseudoconstant>
-       <html>
-         <type>Select</type>
-       </html>
-  </field>
-  <field>
-      <name>hash</name>
-      <title>Contact Hash</title>
-      <type>varchar</type>
-      <length>32</length>
-      <comment>Key for validating requests related to this contact.</comment>
-      <add>1.1</add>
-      <change>1.5</change>
-       <export>true</export>
+    <name>preferred_language</name>
+    <title>Preferred Language</title>
+    <type>varchar</type>
+    <length>5</length>
+    <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.</comment>
+    <headerPattern>/^lang/i</headerPattern>
+    <import>true</import>
+    <pseudoconstant>
+      <optionGroupName>languages</optionGroupName>
+      <keyColumn>name</keyColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>3.2</add>
+  </field>
+  <field>
+    <name>preferred_mail_format</name>
+    <type>varchar</type>
+    <length>8</length>
+    <default>"Both"</default>
+    <import>true</import>
+    <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i</headerPattern>
+    <comment>What is the preferred mode of sending an email.</comment>
+    <add>1.1</add>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::pmf</callback>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>hash</name>
+    <title>Contact Hash</title>
+    <type>varchar</type>
+    <length>32</length>
+    <comment>Key for validating requests related to this contact.</comment>
+    <add>1.1</add>
+    <change>1.5</change>
+    <export>true</export>
   </field>
   <index>
-       <name>index_hash</name>
-       <fieldName>hash</fieldName>
-       <add>2.1</add>
+    <name>index_hash</name>
+    <fieldName>hash</fieldName>
+    <add>2.1</add>
   </index>
   <field>
-      <name>api_key</name>
-      <type>varchar</type>
-      <length>32</length>
-      <comment>API Key for validating requests related to this contact.</comment>
-      <add>2.2</add>
+    <name>api_key</name>
+    <type>varchar</type>
+    <length>32</length>
+    <comment>API Key for validating requests related to this contact.</comment>
+    <add>2.2</add>
   </field>
   <index>
-       <name>index_api_key</name>
-       <fieldName>api_key</fieldName>
-       <add>2.1</add>
+    <name>index_api_key</name>
+    <fieldName>api_key</fieldName>
+    <add>2.1</add>
   </index>
   <field>
-       <name>source</name>
-       <title>Source of Contact Data</title>
-       <uniqueName>contact_source</uniqueName>
-       <type>varchar</type>
-       <length>255</length>
-       <html>
-         <type>Text</type>
-         <size>BIG</size>
-       </html>
+    <name>source</name>
+    <title>Source of Contact Data</title>
+    <uniqueName>contact_source</uniqueName>
+    <type>varchar</type>
+    <length>255</length>
+    <html>
+      <type>Text</type>
+      <size>BIG</size>
+    </html>
 
-       <import>true</import>
-       <headerPattern>/(S(ource\s)?o(f\s)?C(ontact\s)?Data)$/i</headerPattern>
-       <comment>where contact come from, e.g. import, donate module insert...</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>first_name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <html>
-         <type>Text</type>
-         <size>BIG</size>
-       </html>
-       <import>true</import>
-       <headerPattern>/^first|(f(irst\s)?name)$/i</headerPattern>
-       <dataPattern>/^\w+$/</dataPattern>
-       <fulltext/>
-       <comment>First Name.</comment>
-      <add>1.1</add>
+    <import>true</import>
+    <headerPattern>/(S(ource\s)?o(f\s)?C(ontact\s)?Data)$/i</headerPattern>
+    <comment>where contact come from, e.g. import, donate module insert...</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>first_name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <html>
+      <type>Text</type>
+      <size>BIG</size>
+    </html>
+    <import>true</import>
+    <headerPattern>/^first|(f(irst\s)?name)$/i</headerPattern>
+    <dataPattern>/^\w+$/</dataPattern>
+    <fulltext/>
+    <comment>First Name.</comment>
+    <add>1.1</add>
   </field>
   <index>
-      <name>index_first_name</name>
-      <fieldName>first_name</fieldName>
-      <add>1.8</add>
+    <name>index_first_name</name>
+    <fieldName>first_name</fieldName>
+    <add>1.8</add>
   </index>
   <field>
-       <name>middle_name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <html>
-         <type>Text</type>
-         <size>MEDIUM</size>
-       </html>
-       <import>true</import>
-       <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern>
-       <dataPattern>/^\w+$/</dataPattern>
-       <fulltext/>
-       <comment>Middle Name.</comment>
-      <add>1.1</add>
-  </field>
-  <field>
-       <name>last_name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <html>
-         <type>Text</type>
-         <size>BIG</size>
-       </html>
-       <import>true</import>
-       <headerPattern>/^last|(l(ast\s)?name)$/i</headerPattern>
-       <dataPattern>/^\w+(\s\w+)?+$/</dataPattern>
-       <comment>Last Name.</comment>
-       <fulltext/>
-      <add>1.1</add>
+    <name>middle_name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <html>
+      <type>Text</type>
+      <size>MEDIUM</size>
+    </html>
+    <import>true</import>
+    <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern>
+    <dataPattern>/^\w+$/</dataPattern>
+    <fulltext/>
+    <comment>Middle Name.</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>last_name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <html>
+      <type>Text</type>
+      <size>BIG</size>
+    </html>
+    <import>true</import>
+    <headerPattern>/^last|(l(ast\s)?name)$/i</headerPattern>
+    <dataPattern>/^\w+(\s\w+)?+$/</dataPattern>
+    <comment>Last Name.</comment>
+    <fulltext/>
+    <add>1.1</add>
   </field>
   <index>
-      <name>index_last_name</name>
-      <fieldName>last_name</fieldName>
-      <add>1.8</add>
-      <html>
-        <type>Text</type>
-      </html>
+    <name>index_last_name</name>
+    <fieldName>last_name</fieldName>
+    <add>1.8</add>
+    <html>
+      <type>Text</type>
+    </html>
   </index>
   <field>
-      <name>prefix_id</name>
-      <title>Individual Prefix</title>
-      <type>int unsigned</type>
-      <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID</comment>
-      <pseudoconstant>
-        <optionGroupName>individual_prefix</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <headerPattern>/^(prefix|title)/i</headerPattern>
-      <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i</dataPattern>
-      <import>true</import>
-      <add>1.2</add>
+    <name>prefix_id</name>
+    <title>Individual Prefix</title>
+    <type>int unsigned</type>
+    <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID</comment>
+    <pseudoconstant>
+      <optionGroupName>individual_prefix</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <headerPattern>/^(prefix|title)/i</headerPattern>
+    <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i</dataPattern>
+    <import>true</import>
+    <add>1.2</add>
   </field>
   <index>
-      <name>UI_prefix</name>
-      <fieldName>prefix_id</fieldName>
-      <add>1.6</add>
+    <name>UI_prefix</name>
+    <fieldName>prefix_id</fieldName>
+    <add>1.6</add>
   </index>
   <field>
-      <name>suffix_id</name>
-      <title>Individual Suffix</title>
-      <type>int unsigned</type>
-      <pseudoconstant>
-        <optionGroupName>individual_suffix</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <import>true</import>
-      <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment>
-      <headerPattern>/^suffix$/i</headerPattern>
-      <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern>
-      <add>1.2</add>
+    <name>suffix_id</name>
+    <title>Individual Suffix</title>
+    <type>int unsigned</type>
+    <pseudoconstant>
+      <optionGroupName>individual_suffix</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <import>true</import>
+    <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment>
+    <headerPattern>/^suffix$/i</headerPattern>
+    <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern>
+    <add>1.2</add>
   </field>
   <index>
-      <name>UI_suffix</name>
-      <fieldName>suffix_id</fieldName>
-      <add>1.6</add>
+    <name>UI_suffix</name>
+    <fieldName>suffix_id</fieldName>
+    <add>1.6</add>
   </index>
   <field>
-      <name>formal_title</name>
-      <type>varchar</type>
-      <length>64</length>
-      <import>true</import>
-      <headerPattern>/^title/i</headerPattern>
-      <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)</comment>
-      <add>4.5</add>
-  </field>
-  <field>
-      <name>communication_style_id</name>
-      <title>Communication Style</title>
-      <type>int unsigned</type>
-      <pseudoconstant>
-        <optionGroupName>communication_style</optionGroupName>
-      </pseudoconstant>
-      <export>true</export>
-      <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.</comment>
-      <add>4.4</add>
+    <name>formal_title</name>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <headerPattern>/^title/i</headerPattern>
+    <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)</comment>
+    <add>4.5</add>
+  </field>
+  <field>
+    <name>communication_style_id</name>
+    <title>Communication Style</title>
+    <type>int unsigned</type>
+    <pseudoconstant>
+      <optionGroupName>communication_style</optionGroupName>
+    </pseudoconstant>
+    <export>true</export>
+    <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.</comment>
+    <add>4.4</add>
   </field>
   <index>
-      <name>index_communication_style_id</name>
-      <fieldName>communication_style_id</fieldName>
-      <add>4.4</add>
+    <name>index_communication_style_id</name>
+    <fieldName>communication_style_id</fieldName>
+    <add>4.4</add>
   </index>
   <field>
-       <name>greeting_type</name>
-       <type>varchar</type>
-       <length>128</length>
-       <import>true</import>
-       <comment>Preferred greeting format.</comment>
-       <add>1.1</add>
-       <drop>2.2</drop>
-  </field>
-  <field>
-       <name>greeting_type_id</name>
-       <title>Greeting Type</title>
-       <type>int unsigned</type>
-       <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.</comment>
-       <add>2.2</add>
-       <drop>3.0</drop>
-  </field>
-  <field>
-       <name>custom_greeting</name>
-       <type>varchar</type>
-       <length>128</length>
-       <import>true</import>
-       <comment>Custom greeting message.</comment>
-       <add>1.1</add>
-       <drop>3.0</drop>
-  </field>
-  <field>
-       <name>email_greeting_id</name>
-       <type>int unsigned</type>
-       <title>Email Greeting ID</title>
-       <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.</comment>
-       <add>3.0</add>
-  </field>
-  <field>
-       <name>email_greeting_custom</name>
-       <type>varchar</type>
-       <length>128</length>
-       <import>true</import>
-       <export>false</export>
-       <comment>Custom Email Greeting.</comment>
-       <add>3.0</add>
-       <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-       <name>email_greeting_display</name>
-       <title>Email Greeting</title>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Cache Email Greeting.</comment>
-       <add>3.0</add>
-       <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-       <name>postal_greeting_id</name>
-       <type>int unsigned</type>
-       <title>Postal Greeting ID</title>
-       <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
-       <add>3.0</add>
-       <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-       <name>postal_greeting_custom</name>
-       <type>varchar</type>
-       <length>128</length>
-       <import>true</import>
-       <export>false</export>
-       <comment>Custom Postal greeting.</comment>
-       <add>3.0</add>
-       <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-       <name>postal_greeting_display</name>
-       <title>Postal Greeting</title>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Cache Postal greeting.</comment>
-       <add>3.0</add>
-       <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-       <name>addressee_id</name>
-       <type>int unsigned</type>
-       <title>Addressee ID</title>
-       <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.</comment>
-       <add>3.0</add>
-  </field>
-  <field>
-       <name>addressee_custom</name>
-       <type>varchar</type>
-       <length>128</length>
-       <import>true</import>
-       <export>false</export>
-       <comment>Custom Addressee.</comment>
-       <add>3.0</add>
-       <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-       <name>addressee_display</name>
-       <title>Addressee</title>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Cache Addressee.</comment>
-       <add>3.0</add>
-       <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-       <name>job_title</name>
-       <type>varchar</type>
-       <length>255</length>
-       <html>
-         <type>Text</type>
-         <size>MEDIUM</size>
-       </html>
-       <import>true</import>
-       <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
-       <dataPattern>//</dataPattern>
-       <comment>Job Title</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-      <name>gender_id</name>
-      <title>Gender</title>
-      <type>int unsigned</type>
-      <pseudoconstant>
-        <optionGroupName>gender</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <headerPattern>/^gender$/i</headerPattern>
-      <comment>FK to gender ID</comment>
-      <import>true</import>
-      <add>1.2</add>
+    <name>greeting_type</name>
+    <type>varchar</type>
+    <length>128</length>
+    <import>true</import>
+    <comment>Preferred greeting format.</comment>
+    <add>1.1</add>
+    <drop>2.2</drop>
+  </field>
+  <field>
+    <name>greeting_type_id</name>
+    <title>Greeting Type</title>
+    <type>int unsigned</type>
+    <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.</comment>
+    <add>2.2</add>
+    <drop>3.0</drop>
+  </field>
+  <field>
+    <name>custom_greeting</name>
+    <type>varchar</type>
+    <length>128</length>
+    <import>true</import>
+    <comment>Custom greeting message.</comment>
+    <add>1.1</add>
+    <drop>3.0</drop>
+  </field>
+  <field>
+    <name>email_greeting_id</name>
+    <type>int unsigned</type>
+    <title>Email Greeting ID</title>
+    <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.</comment>
+    <add>3.0</add>
+  </field>
+  <field>
+    <name>email_greeting_custom</name>
+    <type>varchar</type>
+    <length>128</length>
+    <import>true</import>
+    <export>false</export>
+    <comment>Custom Email Greeting.</comment>
+    <add>3.0</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>email_greeting_display</name>
+    <title>Email Greeting</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Cache Email Greeting.</comment>
+    <add>3.0</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>postal_greeting_id</name>
+    <type>int unsigned</type>
+    <title>Postal Greeting ID</title>
+    <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
+    <add>3.0</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>postal_greeting_custom</name>
+    <type>varchar</type>
+    <length>128</length>
+    <import>true</import>
+    <export>false</export>
+    <comment>Custom Postal greeting.</comment>
+    <add>3.0</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>postal_greeting_display</name>
+    <title>Postal Greeting</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Cache Postal greeting.</comment>
+    <add>3.0</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>addressee_id</name>
+    <type>int unsigned</type>
+    <title>Addressee ID</title>
+    <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.</comment>
+    <add>3.0</add>
+  </field>
+  <field>
+    <name>addressee_custom</name>
+    <type>varchar</type>
+    <length>128</length>
+    <import>true</import>
+    <export>false</export>
+    <comment>Custom Addressee.</comment>
+    <add>3.0</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>addressee_display</name>
+    <title>Addressee</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Cache Addressee.</comment>
+    <add>3.0</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>job_title</name>
+    <type>varchar</type>
+    <length>255</length>
+    <html>
+      <type>Text</type>
+      <size>MEDIUM</size>
+    </html>
+    <import>true</import>
+    <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
+    <dataPattern>//</dataPattern>
+    <comment>Job Title</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>gender_id</name>
+    <title>Gender</title>
+    <type>int unsigned</type>
+    <pseudoconstant>
+      <optionGroupName>gender</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <headerPattern>/^gender$/i</headerPattern>
+    <comment>FK to gender ID</comment>
+    <import>true</import>
+    <add>1.2</add>
   </field>
   <index>
-     <name>UI_gender</name>
-     <fieldName>gender_id</fieldName>
-     <add>1.6</add>
-     <html>
-       <type>Select</type>
-     </html>
+    <name>UI_gender</name>
+    <fieldName>gender_id</fieldName>
+    <add>1.6</add>
+    <html>
+      <type>Select</type>
+    </html>
   </index>
   <field>
-       <name>birth_date</name>
-       <type>date</type>
-       <import>true</import>
-       <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
-       <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
-       <comment>Date of birth</comment>
-       <add>1.1</add>
-       <html>
-         <type>Select Date</type>
-       </html>
-  </field>
-  <field>
-       <name>is_deceased</name>
-       <title>Is Deceased</title>
-       <import>true</import>
-       <export>true</export>
-       <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
-       <type>boolean</type>
-       <default>0</default>
-       <add>1.1</add>
-       <html>
-         <type>CheckBox</type>
-       </html>
-  </field>
-  <field>
-       <name>deceased_date</name>
-       <type>date</type>
-       <import>true</import>
-       <export>true</export>
-       <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
-       <comment>Date of deceased</comment>
-       <add>1.5</add>
-       <html>
-         <type>Select Date</type>
-       </html>
-  </field>
-  <field>
-      <name>mail_to_household_id</name>
-      <title>Mail to Household ID</title>
-      <type>int unsigned</type>
-      <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.</comment>
-      <export>true</export>
-      <add>1.1</add>
-      <drop>3.3</drop>
+    <name>birth_date</name>
+    <type>date</type>
+    <import>true</import>
+    <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
+    <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
+    <comment>Date of birth</comment>
+    <add>1.1</add>
+    <html>
+      <type>Select Date</type>
+    </html>
+  </field>
+  <field>
+    <name>is_deceased</name>
+    <title>Is Deceased</title>
+    <import>true</import>
+    <export>true</export>
+    <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
+    <type>boolean</type>
+    <default>0</default>
+    <add>1.1</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
+  </field>
+  <field>
+    <name>deceased_date</name>
+    <type>date</type>
+    <import>true</import>
+    <export>true</export>
+    <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
+    <comment>Date of deceased</comment>
+    <add>1.5</add>
+    <html>
+      <type>Select Date</type>
+    </html>
+  </field>
+  <field>
+    <name>mail_to_household_id</name>
+    <title>Mail to Household ID</title>
+    <type>int unsigned</type>
+    <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location. </comment>
+    <export>true</export>
+    <add>1.1</add>
+    <drop>3.3</drop>
   </field>
   <foreignKey>
-       <name>mail_to_household_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>2.1</add>
-       <onDelete>SET NULL</onDelete>
-       <drop>3.3</drop>
+    <name>mail_to_household_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>2.1</add>
+    <onDelete>SET NULL</onDelete>
+    <drop>3.3</drop>
   </foreignKey>
   <field>
-       <name>household_name</name>
-       <type>varchar</type>
-       <length>128</length>
-       <html>
-         <type>Text</type>
-         <size>BIG</size>
-       </html>
-       <import>true</import>
-       <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
-       <dataPattern>/^\w+$/</dataPattern>
-       <comment>Household Name.</comment>
-       <fulltext/>
-       <add>1.1</add>
+    <name>household_name</name>
+    <type>varchar</type>
+    <length>128</length>
+    <html>
+      <type>Text</type>
+      <size>BIG</size>
+    </html>
+    <import>true</import>
+    <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
+    <dataPattern>/^\w+$/</dataPattern>
+    <comment>Household Name.</comment>
+    <fulltext/>
+    <add>1.1</add>
   </field>
   <index>
-      <name>index_household_name</name>
-      <fieldName>household_name</fieldName>
-      <add>1.8</add>
+    <name>index_household_name</name>
+    <fieldName>household_name</fieldName>
+    <add>1.8</add>
   </index>
   <field>
-      <name>primary_contact_id</name>
-      <type>int unsigned</type>
-      <title>Household Primary Contact ID</title>
-      <comment>Optional FK to Primary Contact for this household.</comment>
-       <add>1.1</add>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>primary_contact_id</name>
+    <type>int unsigned</type>
+    <title>Household Primary Contact ID</title>
+    <comment>Optional FK to Primary Contact for this household.</comment>
+    <add>1.1</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>primary_contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>SET NULL</onDelete>
+    <name>primary_contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-       <name>organization_name</name>
-       <type>varchar</type>
-       <length>128</length>
-       <html>
-         <type>Text</type>
-         <size>BIG</size>
-       </html>
-       <import>true</import>
-       <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
-       <dataPattern>/^\w+$/</dataPattern>
-       <comment>Organization Name.</comment>
-       <fulltext/>
-       <add>1.1</add>
+    <name>organization_name</name>
+    <type>varchar</type>
+    <length>128</length>
+    <html>
+      <type>Text</type>
+      <size>BIG</size>
+    </html>
+    <import>true</import>
+    <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
+    <dataPattern>/^\w+$/</dataPattern>
+    <comment>Organization Name.</comment>
+    <fulltext/>
+    <add>1.1</add>
   </field>
   <index>
-      <name>index_organization_name</name>
-      <fieldName>organization_name</fieldName>
-      <add>1.8</add>
+    <name>index_organization_name</name>
+    <fieldName>organization_name</fieldName>
+    <add>1.8</add>
   </index>
   <field>
-       <name>sic_code</name>
-       <type>varchar</type>
-       <length>8</length>
-       <import>true</import>
-       <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
-       <comment>Standard Industry Classification Code.</comment>
-       <add>1.1</add>
-       <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-       <name>user_unique_id</name>
-       <rule>url</rule>
-       <title>Unique ID (OpenID)</title>
-       <type>varchar</type>
-       <length>255</length>
-       <import>true</import>
-       <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i</headerPattern>
-       <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
-       <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
-       <add>2.0</add>
-       <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-      <name>employer_id</name>
-      <title>Current Employer ID</title>
-      <uniqueName>current_employer_id</uniqueName>
-      <type>int unsigned</type>
-      <comment>OPTIONAL FK to civicrm_contact record.</comment>
-      <export>true</export>
-      <add>2.1</add>
-      <html>
-       <type>Autocomplete-Select</type>
-     </html>
+    <name>sic_code</name>
+    <type>varchar</type>
+    <length>8</length>
+    <import>true</import>
+    <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
+    <comment>Standard Industry Classification Code.</comment>
+    <add>1.1</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>user_unique_id</name>
+    <rule>url</rule>
+    <title>Unique ID (OpenID)</title>
+    <type>varchar</type>
+    <length>255</length>
+    <import>true</import>
+    <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i</headerPattern>
+    <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
+    <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
+    <add>2.0</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>employer_id</name>
+    <title>Current Employer ID</title>
+    <uniqueName>current_employer_id</uniqueName>
+    <type>int unsigned</type>
+    <comment>OPTIONAL FK to civicrm_contact record.</comment>
+    <export>true</export>
+    <add>2.1</add>
+    <html>
+      <type>Autocomplete-Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>employer_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>2.1</add>
-       <onDelete>SET NULL</onDelete>
+    <name>employer_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>2.1</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
     <name>is_deleted</name>
index 79582abbf2510468315bb1bc8fbbcb8d7be7ce75..f5b98b40bffcda00a209514833424cced69f6ed4 100644 (file)
@@ -7,22 +7,23 @@
   <comment>Provide type information for contacts</comment>
   <add>3.1</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Contact Type ID</comment>
-      <add>1.1</add>
+    <name>id</name>
+    <title>Contact Type ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Contact Type ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Internal name of Contact Type (or Subtype).</comment>
-       <add>3.1</add>
+    <name>name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Internal name of Contact Type (or Subtype).</comment>
+    <add>3.1</add>
   </field>
   <index>
     <name>contact_type</name>
     <add>3.1</add>
   </index>
   <field>
-       <name>label</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>localized Name of Contact Type.</comment>
-       <localizable>true</localizable>
-       <add>3.1</add>
+    <name>label</name>
+    <title>Contact Type Label</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>localized Name of Contact Type.</comment>
+    <localizable>true</localizable>
+    <add>3.1</add>
   </field>
   <field>
-       <name>description</name>
-       <type>text</type>
-       <html>
-         <type>TextArea</type>
-         <rows>2</rows>
-         <cols>60</cols>
-       </html>
-       <comment>localized Optional verbose description of the type.</comment>
-       <localizable>true</localizable>
-       <add>3.1</add>
+    <name>description</name>
+    <title>Contact Type Description</title>
+    <type>text</type>
+    <html>
+      <type>TextArea</type>
+      <rows>2</rows>
+      <cols>60</cols>
+    </html>
+    <comment>localized Optional verbose description of the type.</comment>
+    <localizable>true</localizable>
+    <add>3.1</add>
   </field>
   <field>
-       <name>image_URL</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>URL of image if any.</comment>
-       <add>3.1</add>
+    <name>image_URL</name>
+    <title>Contact Type Image URL</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>URL of image if any.</comment>
+    <add>3.1</add>
   </field>
   <field>
-      <name>parent_id</name>
-      <type>int unsigned</type>
-      <comment>Optional FK to parent contact type.</comment>
-       <add>3.1</add>
+    <name>parent_id</name>
+    <title>Contact Type Parent</title>
+    <type>int unsigned</type>
+    <comment>Optional FK to parent contact type.</comment>
+    <add>3.1</add>
   </field>
   <foreignKey>
-       <name>parent_id</name>
-       <table>civicrm_contact_type</table>
-       <key>id</key>
-       <add>3.1</add>
+    <name>parent_id</name>
+    <table>civicrm_contact_type</table>
+    <key>id</key>
+    <add>3.1</add>
   </foreignKey>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this entry active?</comment>
-       <add>3.1</add>
+    <name>is_active</name>
+    <title>Contact Type Is Active?</title>
+    <type>boolean</type>
+    <comment>Is this entry active?</comment>
+    <add>3.1</add>
   </field>
   <field>
     <name>is_reserved</name>
+    <title>Contact Type is Reserved?</title>
     <type>boolean</type>
     <comment>Is this contact type a predefined system type</comment>
     <add>3.1</add>
   </field>
-  </table>
+</table>
index b09b4ea2069700f4512009b0b4a4be94e4ad97c5..cc653ccacc313bde847d80693e1ec2e3e6c86ca0 100644 (file)
@@ -7,70 +7,76 @@
   <comment>Table to store dashboard for each contact.</comment>
   <add>3.1</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>3.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Dashboard Contact ID</title>
+    <required>true</required>
+    <add>3.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>dashboard_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Dashboard ID</comment>
-      <add>3.1</add>
+    <name>dashboard_id</name>
+    <type>int unsigned</type>
+    <title>Dashboard</title>
+    <required>true</required>
+    <comment>Dashboard ID</comment>
+    <add>3.1</add>
   </field>
   <foreignKey>
-       <name>dashboard_id</name>
-       <table>civicrm_dashboard</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
-       <add>3.1</add>
+    <name>dashboard_id</name>
+    <table>civicrm_dashboard</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+    <add>3.1</add>
   </foreignKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Contact ID</comment>
-      <add>3.1</add>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <title>Dashboard Contact</title>
+    <required>true</required>
+    <comment>Contact ID</comment>
+    <add>3.1</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
-       <add>3.1</add>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+    <add>3.1</add>
   </foreignKey>
   <field>
-       <name>column_no</name>
-       <type>boolean</type>
-       <comment>column no for this widget</comment>
-       <default>0</default>
-       <add>3.1</add>
+    <name>column_no</name>
+    <type>boolean</type>
+    <comment>column no for this widget</comment>
+    <default>0</default>
+    <add>3.1</add>
   </field>
   <field>
-       <name>is_minimized</name>
-       <type>boolean</type>
-       <comment>Is Minimized?</comment>
-       <default>0</default>
-       <add>3.1</add>
+    <name>is_minimized</name>
+    <type>boolean</type>
+    <title>Dashlet is Minimized?</title>
+    <comment>Is Minimized?</comment>
+    <default>0</default>
+    <add>3.1</add>
   </field>
   <field>
-      <name>is_fullscreen</name>
-      <type>boolean</type>
-      <comment>Is Fullscreen?</comment>
-      <default>1</default>
-      <add>3.1</add>
+    <name>is_fullscreen</name>
+    <type>boolean</type>
+    <title>Dashlet is FullScreen?</title>
+    <comment>Is Fullscreen?</comment>
+    <default>1</default>
+    <add>3.1</add>
   </field>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this widget active?</comment>
-       <default>0</default>
-       <add>3.1</add>
+    <name>is_active</name>
+    <type>boolean</type>
+    <title>Dashlet is Active?</title>
+    <comment>Is this widget active?</comment>
+    <default>0</default>
+    <add>3.1</add>
   </field>
   <field>
     <name>weight</name>
     <add>3.1</add>
   </field>
   <field>
-     <name>content</name>
-     <type>longtext</type>
-     <comment>dashlet content</comment>
-     <add>3.3</add>
+    <name>content</name>
+    <type>longtext</type>
+    <comment>dashlet content</comment>
+    <add>3.3</add>
   </field>
   <field>
-      <name>created_date</name>
-      <type>datetime</type>
-      <comment>When was content populated</comment>
-      <add>3.3</add>
+    <name>created_date</name>
+    <type>datetime</type>
+    <title>Dashlet Created On</title>
+    <comment>When was content populated</comment>
+    <add>3.3</add>
   </field>
 </table>
index 5cab0e21b0120f40ea3fdfb3c73b4b97fc79cb55..6f68023e738a90d31f2fe2d8cc1df84205bb5596 100644 (file)
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-       <title>Group ID</title>
-      <required>true</required>
-      <comment>Group ID</comment>
-      <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Group ID</title>
+    <required>true</required>
+    <comment>Group ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <title>Group Name</title>
-       <length>64</length>
-       <comment>Internal name of Group.</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>title</name>
-       <type>varchar</type>
-       <title>Group Title</title>
-       <length>64</length>
-       <localizable>true</localizable>
-       <comment>Name of Group.</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>description</name>
-       <type>text</type>
-       <title>Group Description</title>
-       <html>
-         <type>TextArea</type>
-         <rows>2</rows>
-         <cols>60</cols>
-       </html>
-       <comment>Optional verbose description of the group.</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>source</name>
-       <type>varchar</type>
-       <title>Group Source</title>
-       <length>64</length>
-       <comment>Module or process which created this group.</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-      <name>saved_search_id</name>
-      <type>int unsigned</type>
-      <title>Saved Search ID</title>
-      <comment>FK to saved search table.</comment>
-       <add>1.1</add>
+    <name>name</name>
+    <type>varchar</type>
+    <title>Group Name</title>
+    <length>64</length>
+    <comment>Internal name of Group.</comment>
+    <add>1.1</add>
   </field>
-  <foreignKey>
-       <name>saved_search_id</name>
-       <table>civicrm_saved_search</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>SET NULL</onDelete>
-  </foreignKey>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <title>Group Enabled</title>
-       <comment>Is this entry active?</comment>
-       <add>1.1</add>
+    <name>title</name>
+    <type>varchar</type>
+    <title>Group Title</title>
+    <length>64</length>
+    <localizable>true</localizable>
+    <comment>Name of Group.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>visibility</name>
-       <type>varchar</type>
-       <length>24</length>
-       <title>Group Visibility Setting</title>
-       <default>'User and User Admin Only'</default>
-       <comment>In what context(s) is this field visible.</comment>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::groupVisibility</callback>
-       </pseudoconstant>
-       <add>1.2</add>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>description</name>
+    <type>text</type>
+    <title>Group Description</title>
+    <html>
+      <type>TextArea</type>
+      <rows>2</rows>
+      <cols>60</cols>
+    </html>
+    <comment>Optional verbose description of the group.</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>source</name>
+    <type>varchar</type>
+    <title>Group Source</title>
+    <length>64</length>
+    <comment>Module or process which created this group.</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>saved_search_id</name>
+    <type>int unsigned</type>
+    <title>Saved Search ID</title>
+    <comment>FK to saved search table.</comment>
+    <add>1.1</add>
   </field>
+  <foreignKey>
+    <name>saved_search_id</name>
+    <table>civicrm_saved_search</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>SET NULL</onDelete>
+  </foreignKey>
   <field>
-       <name>where_clause</name>
-       <type>text</type>
-       <title>Group Where Clause</title>
-       <comment>the sql where clause if a saved search acl</comment>
-       <add>1.6</add>
+    <name>is_active</name>
+    <type>boolean</type>
+    <title>Group Enabled</title>
+    <comment>Is this entry active?</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>visibility</name>
+    <type>varchar</type>
+    <length>24</length>
+    <title>Group Visibility Setting</title>
+    <default>'User and User Admin Only'</default>
+    <comment>In what context(s) is this field visible.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::groupVisibility</callback>
+    </pseudoconstant>
+    <add>1.2</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>where_clause</name>
+    <type>text</type>
+    <title>Group Where Clause</title>
+    <comment>the sql where clause if a saved search acl</comment>
+    <add>1.6</add>
   </field>
   <field>
-       <name>select_tables</name>
-       <type>text</type>
-       <title>Tables For Select Clause</title>
-       <comment>the tables to be included in a select data</comment>
-       <add>1.6</add>
+    <name>select_tables</name>
+    <type>text</type>
+    <title>Tables For Select Clause</title>
+    <comment>the tables to be included in a select data</comment>
+    <add>1.6</add>
   </field>
   <field>
-       <name>where_tables</name>
-       <type>text</type>
-       <title>Tables For Where Clause</title>
-       <comment>the tables to be included in the count statement</comment>
-       <add>1.6</add>
+    <name>where_tables</name>
+    <type>text</type>
+    <title>Tables For Where Clause</title>
+    <comment>the tables to be included in the count statement</comment>
+    <add>1.6</add>
   </field>
   <field>
-      <name>group_type</name>
-      <type>varchar</type>
-      <title>Group Type</title>
-      <length>128</length>
-      <comment>FK to group type</comment>
-      <add>1.9</add>
+    <name>group_type</name>
+    <type>varchar</type>
+    <title>Group Type</title>
+    <length>128</length>
+    <comment>FK to group type</comment>
+    <add>1.9</add>
   </field>
   <field>
-      <name>cache_date</name>
-      <type>datetime</type>
-      <title>Group Cache Date</title>
-      <comment>Date when we created the cache for a smart group</comment>
-      <add>2.1</add>
+    <name>cache_date</name>
+    <type>datetime</type>
+    <title>Group Cache Date</title>
+    <comment>Date when we created the cache for a smart group</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>refresh_date</name>
-      <type>datetime</type>
-      <title>Next Group Refresh Time</title>
-      <comment>Date and time when we need to refresh the cache next.</comment>
-      <add>4.3</add>
+    <name>refresh_date</name>
+    <type>datetime</type>
+    <title>Next Group Refresh Time</title>
+    <comment>Date and time when we need to refresh the cache next.</comment>
+    <add>4.3</add>
   </field>
   <field>
     <name>parents</name>
     <add>2.1</add>
   </index>
   <field>
-      <name>created_id</name>
-      <type>int unsigned</type>
-      <title>Group Created By</title>
-      <comment>FK to contact table.</comment>
-       <add>4.3</add>
+    <name>created_id</name>
+    <type>int unsigned</type>
+    <title>Group Created By</title>
+    <comment>FK to contact table.</comment>
+    <add>4.3</add>
   </field>
   <foreignKey>
-       <name>created_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>4.3</add>
-       <onDelete>SET NULL</onDelete>
+    <name>created_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>4.3</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>modified_id</name>
-      <type>int unsigned</type>
-      <title>Group Modified By</title>
-      <comment>FK to contact table.</comment>
-      <add>4.5</add>
+    <name>modified_id</name>
+    <type>int unsigned</type>
+    <title>Group Modified By</title>
+    <comment>FK to contact table.</comment>
+    <add>4.5</add>
   </field>
   <foreignKey>
-       <name>modified_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>4.5</add>
-       <onDelete>SET NULL</onDelete>
+    <name>modified_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>4.5</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
 </table>
index 014b2b028c7ea06f2af53f5bd2f5d2aeba7c424e..304be14a0a513e128c7c85903ba5859bfe856a50 100644 (file)
@@ -4,20 +4,20 @@
   <base>CRM/Contact</base>
   <class>GroupContact</class>
   <name>civicrm_group_contact</name>
-  <comment>Join table sets membership for 'static' groups. Also used to store 'opt-out' entries for 'query' type groups (status = 'OUT')</comment>
+  <comment>Join table sets membership for 'static' groups. Also used to store 'opt-out' entries for 'query' type groups (status = 'OUT') </comment>
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <title>Group Contact ID</title>
-      <required>true</required>
-      <comment>primary key</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Group Contact ID</title>
+    <required>true</required>
+    <comment>primary key</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
     <name>group_id</name>
     </html>
   </field>
   <foreignKey>
-       <name>group_id</name>
-       <table>civicrm_group</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>group_id</name>
+    <table>civicrm_group</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <title>Contact ID</title>
-      <required>true</required>
-      <comment>FK to civicrm_contact</comment>
-       <add>1.1</add>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <title>Contact ID</title>
+    <required>true</required>
+    <comment>FK to civicrm_contact</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-       <name>status</name>
-       <type>varchar</type>
-       <length>8</length>
-       <title>Group Contact Status</title>
-       <comment>status of contact relative to membership in group</comment>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::groupContactStatus</callback>
-       </pseudoconstant>
-       <add>1.1</add>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>status</name>
+    <type>varchar</type>
+    <length>8</length>
+    <title>Group Contact Status</title>
+    <comment>status of contact relative to membership in group</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::groupContactStatus</callback>
+    </pseudoconstant>
+    <add>1.1</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>location_id</name>
-       <type>int unsigned</type>
-       <title>Group Contact Location</title>
-       <comment>Optional location to associate with this membership</comment>
-       <add>1.1</add>
+    <name>location_id</name>
+    <type>int unsigned</type>
+    <title>Group Contact Location</title>
+    <comment>Optional location to associate with this membership</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
     <name>location_id</name>
     <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>email_id</name>
-      <type>int unsigned</type>
-      <title>Group Contact Email</title>
-      <comment>Optional email to associate with this membership</comment>
-      <add>1.1</add>
+    <name>email_id</name>
+    <type>int unsigned</type>
+    <title>Group Contact Email</title>
+    <comment>Optional email to associate with this membership</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
     <name>email_id</name>
index 7be337fca37854634b76ec7509764a3d33b69de5..f14894a0e35c3cddcb43c0a93a787c2ed11242ab 100644 (file)
@@ -7,15 +7,15 @@
   <comment>Join table cache for 'static' groups.</comment>
   <add>2.1</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>primary key</comment>
-       <add>2.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>primary key</comment>
+    <add>2.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
     <name>group_id</name>
     </html>
   </field>
   <foreignKey>
-       <name>group_id</name>
-       <table>civicrm_group</table>
-       <key>id</key>
-       <add>2.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>group_id</name>
+    <table>civicrm_group</table>
+    <key>id</key>
+    <add>2.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to civicrm_contact</comment>
-       <add>2.1</add>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to civicrm_contact</comment>
+    <add>2.1</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>2.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>2.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <index>
     <name>UI_contact_group</name>
index b09923ebeb3e55a37f23c07fb73e2f3611510984..cad890eb273621b1065ad90ffe4c34a408543821 100644 (file)
@@ -9,6 +9,7 @@
   <log>true</log>
   <field>
     <name>id</name>
+    <title>Group Nesting ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Relationship ID</comment>
@@ -20,6 +21,7 @@
   </primaryKey>
   <field>
     <name>child_group_id</name>
+    <title>Child Group</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>ID of the child group</comment>
@@ -34,6 +36,7 @@
   </foreignKey>
   <field>
     <name>parent_group_id</name>
+    <title>Parent Group</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>ID of the parent group</comment>
index 7d6cfca11d5e4b4279c813f8261151eb2e25a022..938717148faa3eb5084da2ae83abf0c65268deef 100644 (file)
@@ -9,6 +9,7 @@
   <log>true</log>
   <field>
     <name>id</name>
+    <title>Group Organization ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Relationship ID</comment>
@@ -20,6 +21,7 @@
   </primaryKey>
   <field>
     <name>group_id</name>
+    <title>Group</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>ID of the group</comment>
@@ -42,6 +44,7 @@
   </foreignKey>
   <field>
     <name>organization_id</name>
+    <title>Organization</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>ID of the Organization Contact</comment>
index 827312783a34c6939b69c7e37f6b9f5a55194279..89f4216792a40e20baffc749c07e9231aa0957e8 100644 (file)
@@ -8,56 +8,56 @@
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique Household ID</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique Household ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to Contact ID</comment>
-       <add>1.1</add>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Contact ID</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
   </foreignKey>
   <field>
-       <name>household_name</name>
-       <type>varchar</type>
-       <length>128</length>
-       <import>true</import>
-       <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
-       <dataPattern>/^\w+$/</dataPattern>
-       <comment>Household Name.</comment>
-       <fulltext/>
-       <add>1.1</add>
+    <name>household_name</name>
+    <type>varchar</type>
+    <length>128</length>
+    <import>true</import>
+    <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
+    <dataPattern>/^\w+$/</dataPattern>
+    <comment>Household Name.</comment>
+    <fulltext/>
+    <add>1.1</add>
   </field>
   <index>
-      <name>index_household_name</name>
-      <fieldName>household_name</fieldName>
-      <add>1.8</add>
+    <name>index_household_name</name>
+    <fieldName>household_name</fieldName>
+    <add>1.8</add>
   </index>
   <field>
-      <name>primary_contact_id</name>
-      <type>int unsigned</type>
-      <comment>Optional FK to Primary Contact for this household.</comment>
-       <add>1.1</add>
+    <name>primary_contact_id</name>
+    <type>int unsigned</type>
+    <comment>Optional FK to Primary Contact for this household.</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>primary_contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
+    <name>primary_contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
   </foreignKey>
   <index>
     <name>UI_contact</name>
index c361dc46ced3d620be738e4f2523383bce790cfb..552d46f11a6800ec4a869d70b844eada74139745 100644 (file)
   <log>true</log>
   <add>1.1</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique Individual ID</comment>
-      <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique Individual ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to Contact ID</comment>
-      <add>1.1</add>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Contact ID</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
   </foreignKey>
   <field>
-       <name>first_name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <headerPattern>/^first|(f(irst\s)?name)$/i</headerPattern>
-       <dataPattern>/^\w+$/</dataPattern>
-       <fulltext/>
-       <comment>First Name.</comment>
-      <add>1.1</add>
+    <name>first_name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <headerPattern>/^first|(f(irst\s)?name)$/i</headerPattern>
+    <dataPattern>/^\w+$/</dataPattern>
+    <fulltext/>
+    <comment>First Name.</comment>
+    <add>1.1</add>
   </field>
   <index>
-      <name>index_first_name</name>
-      <fieldName>first_name</fieldName>
-      <add>1.8</add>
+    <name>index_first_name</name>
+    <fieldName>first_name</fieldName>
+    <add>1.8</add>
   </index>
   <field>
-       <name>middle_name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern>
-       <dataPattern>/^\w+$/</dataPattern>
-       <fulltext/>
-       <comment>Middle Name.</comment>
-      <add>1.1</add>
-  </field>
-  <field>
-       <name>last_name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <headerPattern>/^(l(ast\s)?name)$/i</headerPattern>
-       <dataPattern>/^\w+(\s\w+)?+$/</dataPattern>
-       <comment>Last Name.</comment>
-       <fulltext/>
-      <add>1.1</add>
+    <name>middle_name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern>
+    <dataPattern>/^\w+$/</dataPattern>
+    <fulltext/>
+    <comment>Middle Name.</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>last_name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <headerPattern>/^(l(ast\s)?name)$/i</headerPattern>
+    <dataPattern>/^\w+(\s\w+)?+$/</dataPattern>
+    <comment>Last Name.</comment>
+    <fulltext/>
+    <add>1.1</add>
   </field>
   <index>
-      <name>index_last_name</name>
-      <fieldName>last_name</fieldName>
-      <add>1.8</add>
+    <name>index_last_name</name>
+    <fieldName>last_name</fieldName>
+    <add>1.8</add>
   </index>
   <field>
-       <name>gender</name>
-       <type>enum</type>
-       <import>true</import>
-       <values>Female, Male, Transgender</values>
-       <add>1.1</add>
-       <drop>1.2</drop>
+    <name>gender</name>
+    <type>enum</type>
+    <import>true</import>
+    <values>Female, Male, Transgender</values>
+    <add>1.1</add>
+    <drop>1.2</drop>
   </field>
   <field>
-      <name>prefix_id</name>
-      <type>int unsigned</type>
-      <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID</comment>
-      <headerPattern>/^(prefix|title)/i</headerPattern>
-      <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i</dataPattern>
-      <add>1.2</add>
+    <name>prefix_id</name>
+    <type>int unsigned</type>
+    <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID</comment>
+    <headerPattern>/^(prefix|title)/i</headerPattern>
+    <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i</dataPattern>
+    <add>1.2</add>
   </field>
   <index>
-      <name>UI_prefix</name>
-      <fieldName>prefix_id</fieldName>
-      <add>1.6</add>
+    <name>UI_prefix</name>
+    <fieldName>prefix_id</fieldName>
+    <add>1.6</add>
   </index>
   <field>
-      <name>suffix_id</name>
-      <type>int unsigned</type>
-      <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment>
-      <headerPattern>/^suffix$/i</headerPattern>
-      <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern>
-      <add>1.2</add>
+    <name>suffix_id</name>
+    <type>int unsigned</type>
+    <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment>
+    <headerPattern>/^suffix$/i</headerPattern>
+    <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern>
+    <add>1.2</add>
   </field>
   <index>
-      <name>UI_suffix</name>
-      <fieldName>suffix_id</fieldName>
-      <add>1.6</add>
+    <name>UI_suffix</name>
+    <fieldName>suffix_id</fieldName>
+    <add>1.6</add>
   </index>
   <field>
-       <name>prefix</name>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <comment>Prefix to Name.</comment>
-       <add>1.1</add>
-       <drop>1.2</drop>
+    <name>prefix</name>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <comment>Prefix to Name.</comment>
+    <add>1.1</add>
+    <drop>1.2</drop>
   </field>
   <field>
-       <name>suffix</name>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <comment>Suffix to Name.</comment>
-       <add>1.1</add>
-       <drop>1.2</drop>
+    <name>suffix</name>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <comment>Suffix to Name.</comment>
+    <add>1.1</add>
+    <drop>1.2</drop>
   </field>
   <field>
-       <name>greeting_type</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>Preferred greeting format.</comment>
-      <add>1.1</add>
-      <drop>2.2</drop>
+    <name>greeting_type</name>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>Preferred greeting format.</comment>
+    <add>1.1</add>
+    <drop>2.2</drop>
   </field>
   <field>
-       <name>greeting_type_id</name>
-       <title>Greeting Type</title>
-       <type>int unsigned</type>
-       <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.</comment>
-       <add>2.2</add>
+    <name>greeting_type_id</name>
+    <title>Greeting Type</title>
+    <type>int unsigned</type>
+    <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.</comment>
+    <add>2.2</add>
   </field>
   <field>
-       <name>custom_greeting</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>Custom greeting message.</comment>
-      <add>1.1</add>
+    <name>custom_greeting</name>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>Custom greeting message.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>job_title</name>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
-       <dataPattern>//</dataPattern>
-       <comment>Job Title</comment>
-      <add>1.1</add>
+    <name>job_title</name>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
+    <dataPattern>//</dataPattern>
+    <comment>Job Title</comment>
+    <add>1.1</add>
   </field>
   <field>
-      <name>gender_id</name>
-      <type>int unsigned</type>
-      <headerPattern>/^gender$/i</headerPattern>
-      <comment>FK to gender ID</comment>
-      <add>1.2</add>
+    <name>gender_id</name>
+    <type>int unsigned</type>
+    <headerPattern>/^gender$/i</headerPattern>
+    <comment>FK to gender ID</comment>
+    <add>1.2</add>
   </field>
   <index>
-     <name>UI_gender</name>
-     <fieldName>gender_id</fieldName>
-     <add>1.6</add>
+    <name>UI_gender</name>
+    <fieldName>gender_id</fieldName>
+    <add>1.6</add>
   </index>
   <field>
-       <name>birth_date</name>
-       <type>date</type>
-       <import>true</import>
-       <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
-       <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
-       <comment>Date of birth</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>is_deceased</name>
-       <title>Is Deceased</title>
-       <import>true</import>
-       <export>true</export>
-       <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
-       <type>boolean</type>
-       <default>0</default>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>deceased_date</name>
-       <type>date</type>
-       <import>true</import>
-       <export>true</export>
-       <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
-       <comment>Date of deceased</comment>
-       <add>1.5</add>
-  </field>
-  <field>
-      <name>phone_to_household_id</name>
-      <type>int unsigned</type>
-      <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household rather than individual location.</comment>
-      <add>1.1</add>
-  </field>
-  <field>
-      <name>email_to_household_id</name>
-      <type>int unsigned</type>
-      <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household rather than individual location.</comment>
-      <add>1.1</add>
-  </field>
-  <field>
-      <name>mail_to_household_id</name>
-      <type>int unsigned</type>
-      <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.</comment>
-      <add>1.1</add>
+    <name>birth_date</name>
+    <type>date</type>
+    <import>true</import>
+    <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
+    <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
+    <comment>Date of birth</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>is_deceased</name>
+    <title>Is Deceased</title>
+    <import>true</import>
+    <export>true</export>
+    <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
+    <type>boolean</type>
+    <default>0</default>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>deceased_date</name>
+    <type>date</type>
+    <import>true</import>
+    <export>true</export>
+    <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
+    <comment>Date of deceased</comment>
+    <add>1.5</add>
+  </field>
+  <field>
+    <name>phone_to_household_id</name>
+    <type>int unsigned</type>
+    <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household
+      rather than individual location.
+    </comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>email_to_household_id</name>
+    <type>int unsigned</type>
+    <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct phone communications to household
+      rather than individual location.
+    </comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>mail_to_household_id</name>
+    <type>int unsigned</type>
+    <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household
+      rather than individual location.
+    </comment>
+    <add>1.1</add>
   </field>
   <index>
     <name>UI_contact</name>
index c5836fb0fe50a85f92facf46119ff14b5b2b96e5..bb5c88b82715f04e867b266c0a16181742ba2f4b 100644 (file)
@@ -8,75 +8,75 @@
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique Organization ID</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique Organization ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to Contact ID</comment>
-       <add>1.1</add>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Contact ID</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
   </foreignKey>
   <field>
-       <name>organization_name</name>
-       <type>varchar</type>
-       <length>128</length>
-       <import>true</import>
-       <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
-       <dataPattern>/^\w+$/</dataPattern>
-       <comment>Organization Name.</comment>
-       <fulltext/>
-       <add>1.1</add>
+    <name>organization_name</name>
+    <type>varchar</type>
+    <length>128</length>
+    <import>true</import>
+    <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
+    <dataPattern>/^\w+$/</dataPattern>
+    <comment>Organization Name.</comment>
+    <fulltext/>
+    <add>1.1</add>
   </field>
   <index>
-      <name>index_organization_name</name>
-      <fieldName>organization_name</fieldName>
-      <add>1.8</add>
+    <name>index_organization_name</name>
+    <fieldName>organization_name</fieldName>
+    <add>1.8</add>
   </index>
   <field>
-       <name>legal_name</name>
-       <type>varchar</type>
-       <length>128</length>
-       <import>true</import>
-       <headerPattern>/^legal|(l(egal\s)?name)$/i</headerPattern>
-       <comment>Legal Name.</comment>
-       <fulltext/>
-       <add>1.1</add>
+    <name>legal_name</name>
+    <type>varchar</type>
+    <length>128</length>
+    <import>true</import>
+    <headerPattern>/^legal|(l(egal\s)?name)$/i</headerPattern>
+    <comment>Legal Name.</comment>
+    <fulltext/>
+    <add>1.1</add>
   </field>
   <field>
-       <name>sic_code</name>
-       <type>varchar</type>
-       <length>8</length>
-       <import>true</import>
-       <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
-       <comment>Standard Industry Classification Code.</comment>
-       <add>1.1</add>
+    <name>sic_code</name>
+    <type>varchar</type>
+    <length>8</length>
+    <import>true</import>
+    <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
+    <comment>Standard Industry Classification Code.</comment>
+    <add>1.1</add>
   </field>
   <field>
-      <name>primary_contact_id</name>
-      <type>int unsigned</type>
-      <comment>Optional FK to Primary Contact for this organization.</comment>
-       <add>1.1</add>
+    <name>primary_contact_id</name>
+    <type>int unsigned</type>
+    <comment>Optional FK to Primary Contact for this organization.</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>primary_contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
+    <name>primary_contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
   </foreignKey>
   <index>
     <name>UI_contact</name>
index 20f3362b832818a3815f4f042cb798fcddaea97c..b3be05c34d50a36d3d722006fdb4efe0c56283fa 100644 (file)
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <title>Relationship ID</title>
-      <required>true</required>
-      <comment>Relationship ID</comment>
-      <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Relationship ID</title>
+    <required>true</required>
+    <comment>Relationship ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id_a</name>
-      <type>int unsigned</type>
-      <title>Contact A</title>
-      <required>true</required>
-      <comment>id of the first contact</comment>
-       <add>1.1</add>
+    <name>contact_id_a</name>
+    <type>int unsigned</type>
+    <title>Contact A</title>
+    <required>true</required>
+    <comment>id of the first contact</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>contact_id_a</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id_a</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>contact_id_b</name>
-      <type>int unsigned</type>
-      <title>Contact B</title>
-      <required>true</required>
-      <comment>id of the second contact</comment>
-       <add>1.1</add>
+    <name>contact_id_b</name>
+    <type>int unsigned</type>
+    <title>Contact B</title>
+    <required>true</required>
+    <comment>id of the second contact</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>contact_id_b</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id_b</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>relationship_type_id</name>
-      <type>int unsigned</type>
-      <title>Relationship Type</title>
-      <required>true</required>
-      <comment>id of the relationship</comment>
-      <add>1.1</add>
+    <name>relationship_type_id</name>
+    <type>int unsigned</type>
+    <title>Relationship Type</title>
+    <required>true</required>
+    <comment>id of the relationship</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>relationship_type_id</name>
-       <table>civicrm_relationship_type</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>relationship_type_id</name>
+    <table>civicrm_relationship_type</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-       <name>start_date</name>
-       <type>date</type>
-       <title>Relationship Start Date</title>
-       <comment>date when the relationship started</comment>
-       <add>1.1</add>
+    <name>start_date</name>
+    <type>date</type>
+    <title>Relationship Start Date</title>
+    <comment>date when the relationship started</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>end_date</name>
-       <type>date</type>
-       <title>Relationship End Date</title>
-       <comment>date when the relationship ended</comment>
-       <add>1.1</add>
+    <name>end_date</name>
+    <type>date</type>
+    <title>Relationship End Date</title>
+    <comment>date when the relationship ended</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <title>Relationship Is Active</title>
-       <default>1</default>
-       <comment>is the relationship active ?</comment>
-       <add>1.1</add>
+    <name>is_active</name>
+    <type>boolean</type>
+    <title>Relationship Is Active</title>
+    <default>1</default>
+    <comment>is the relationship active ?</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>description</name>
-       <type>varchar</type>
-       <title>Relationship Description</title>
-       <length>255</length>
-       <comment>Optional verbose description for the relationship.</comment>
-       <add>1.5</add>
+    <name>description</name>
+    <type>varchar</type>
+    <title>Relationship Description</title>
+    <length>255</length>
+    <comment>Optional verbose description for the relationship.</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>is_permission_a_b</name>
-       <type>boolean</type>
-       <title>Contact A has Permission Over Contact B</title>
-       <default>0</default>
-       <comment>is contact a has permission to view / edit contact and
-  related data for contact b ?</comment>
-       <add>2.1</add>
+    <name>is_permission_a_b</name>
+    <type>boolean</type>
+    <title>Contact A has Permission Over Contact B</title>
+    <default>0</default>
+    <comment>is contact a has permission to view / edit contact and
+      related data for contact b ?
+    </comment>
+    <add>2.1</add>
   </field>
   <field>
-       <name>is_permission_b_a</name>
-       <type>boolean</type>
-       <title>Contact B has Permission Over Contact A</title>
-       <default>0</default>
-       <comment>is contact b has permission to view / edit contact and
-  related data for contact a ?</comment>
-       <add>2.1</add>
+    <name>is_permission_b_a</name>
+    <type>boolean</type>
+    <title>Contact B has Permission Over Contact A</title>
+    <default>0</default>
+    <comment>is contact b has permission to view / edit contact and
+      related data for contact a ?
+    </comment>
+    <add>2.1</add>
   </field>
   <field>
-       <name>case_id</name>
-       <type>int unsigned</type>
-       <title>Relationship Case</title>
-       <default>NULL</default>
-       <comment>FK to civicrm_case</comment>
-       <add>2.2</add>
+    <name>case_id</name>
+    <type>int unsigned</type>
+    <title>Relationship Case</title>
+    <default>NULL</default>
+    <comment>FK to civicrm_case</comment>
+    <add>2.2</add>
   </field>
   <foreignKey>
-       <name>case_id</name>
-       <table>civicrm_case</table>
-       <key>id</key>
-       <add>2.2</add>
-       <onDelete>CASCADE</onDelete>
+    <name>case_id</name>
+    <table>civicrm_case</table>
+    <key>id</key>
+    <add>2.2</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
 </table>
index 1416a1da8841a3ebbbab671e7d98929c4061dc15..21d2e768b83bb32d89e97bb81a8578375f868a2b 100644 (file)
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <title>Relationship Type ID</title>
-      <required>true</required>
-      <comment>Primary key</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Relationship Type ID</title>
+    <required>true</required>
+    <comment>Primary key</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name_a_b</name>
-       <type>varchar</type>
-       <title>Relationship Type Name A to B</title>
-       <length>64</length>
-       <comment>name for relationship of contact_a to contact_b.</comment>
-       <add>1.1</add>
+    <name>name_a_b</name>
+    <type>varchar</type>
+    <title>Relationship Type Name A to B</title>
+    <length>64</length>
+    <comment>name for relationship of contact_a to contact_b.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>label_a_b</name>
-       <type>varchar</type>
-       <title>Relationship Type Label A to B</title>
-       <length>64</length>
-       <comment>label for relationship of contact_a to contact_b.</comment>
-       <add>3.0</add>
+    <name>label_a_b</name>
+    <type>varchar</type>
+    <title>Relationship Type Label A to B</title>
+    <length>64</length>
+    <comment>label for relationship of contact_a to contact_b.</comment>
+    <add>3.0</add>
   </field>
   <field>
-       <name>name_b_a</name>
-       <type>varchar</type>
-       <title>Relationship Type Name B to A</title>
-       <length>64</length>
-       <comment>Optional name for relationship of contact_b to contact_a.</comment>
-       <add>1.1</add>
+    <name>name_b_a</name>
+    <type>varchar</type>
+    <title>Relationship Type Name B to A</title>
+    <length>64</length>
+    <comment>Optional name for relationship of contact_b to contact_a.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>label_b_a</name>
-       <type>varchar</type>
-       <title>Relationship Type Label B to A</title>
-       <length>64</length>
-       <comment>Optional label for relationship of contact_b to contact_a.</comment>
-       <add>3.0</add>
+    <name>label_b_a</name>
+    <type>varchar</type>
+    <title>Relationship Type Label B to A</title>
+    <length>64</length>
+    <comment>Optional label for relationship of contact_b to contact_a.</comment>
+    <add>3.0</add>
   </field>
   <field>
-       <name>description</name>
-       <type>varchar</type>
-       <title>Relationship Description</title>
-       <length>255</length>
-       <comment>Optional verbose description of the relationship type.</comment>
-       <add>1.1</add>
+    <name>description</name>
+    <type>varchar</type>
+    <title>Relationship Description</title>
+    <length>255</length>
+    <comment>Optional verbose description of the relationship type.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>contact_type_a</name>
-       <title>Contact Type for Contact A</title>
-       <type>varchar</type>
-       <length>12</length>
-       <comment>If defined, contact_a in a relationship of this type must be a specific contact_type.</comment>
-       <pseudoconstant>
-         <callback>CRM_Contact_BAO_ContactType::getSelectElements</callback>
-       </pseudoconstant>
-       <add>1.1</add>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>contact_type_a</name>
+    <title>Contact Type for Contact A</title>
+    <type>varchar</type>
+    <length>12</length>
+    <comment>If defined, contact_a in a relationship of this type must be a specific contact_type.</comment>
+    <pseudoconstant>
+      <callback>CRM_Contact_BAO_ContactType::getSelectElements</callback>
+    </pseudoconstant>
+    <add>1.1</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>contact_type_b</name>
-       <title>Contact Type for Contact B</title>
-       <type>varchar</type>
-       <length>12</length>
-       <comment>If defined, contact_b in a relationship of this type must be a specific contact_type.</comment>
-       <pseudoconstant>
-         <callback>CRM_Contact_BAO_ContactType::getSelectElements</callback>
-       </pseudoconstant>
-       <add>1.1</add>
-       <html>
-        <type>Select</type>
-      </html>
+    <name>contact_type_b</name>
+    <title>Contact Type for Contact B</title>
+    <type>varchar</type>
+    <length>12</length>
+    <comment>If defined, contact_b in a relationship of this type must be a specific contact_type.</comment>
+    <pseudoconstant>
+      <callback>CRM_Contact_BAO_ContactType::getSelectElements</callback>
+    </pseudoconstant>
+    <add>1.1</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>contact_sub_type_a</name>
-       <title>Contact Subtype A</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>If defined, contact_sub_type_a in a relationship of this type must be a specific contact_sub_type.</comment>
-       <add>3.1</add>
-       <html>
-        <type>Select</type>
-      </html>
+    <name>contact_sub_type_a</name>
+    <title>Contact Subtype A</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>If defined, contact_sub_type_a in a relationship of this type must be a specific contact_sub_type.
+    </comment>
+    <add>3.1</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>contact_sub_type_b</name>
-       <title>Contact Subtype B</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>If defined, contact_sub_type_b in a relationship of this type must be a specific contact_sub_type.</comment>
-       <add>3.1</add>
-       <html>
-        <type>Select</type>
-      </html>
+    <name>contact_sub_type_b</name>
+    <title>Contact Subtype B</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>If defined, contact_sub_type_b in a relationship of this type must be a specific contact_sub_type.
+    </comment>
+    <add>3.1</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>is_reserved</name>
-       <type>boolean</type>
-        <title>Relationship Type is Reserved</title>
-       <comment>Is this relationship type a predefined system type (can not be changed or de-activated)?</comment>
-       <add>1.1</add>
+    <name>is_reserved</name>
+    <type>boolean</type>
+    <title>Relationship Type is Reserved</title>
+    <comment>Is this relationship type a predefined system type (can not be changed or de-activated)?</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_active</name>
-       <title>Relationship Type is Active</title>
-       <type>boolean</type>
-       <default>1</default>
-       <comment>Is this relationship type currently active (i.e. can be used when creating or editing relationships)?</comment>
-       <add>1.1</add>
+    <name>is_active</name>
+    <title>Relationship Type is Active</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this relationship type currently active (i.e. can be used when creating or editing relationships)?
+    </comment>
+    <add>1.1</add>
   </field>
   <index>
     <name>UI_name_a_b</name>
index 680ccbac872e2e8378740f8ce2201d003d2f008f..5ac148e228c13cf4d06eea2c1a5187a697f2db78 100644 (file)
@@ -7,74 +7,74 @@
   <comment>Users can save their complex SQL queries and use them later.</comment>
   <add>1.1</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Saved search ID</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Saved search ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>false</autoincrement>
+    <name>id</name>
+    <autoincrement>false</autoincrement>
   </primaryKey>
   <field>
-       <name>query</name>
-       <title>SQL Query</title>
-       <type>text</type>
-       <import>true</import>
-       <comment>SQL query for this search</comment>
-       <add>1.1</add>
-       <drop>1.5</drop>
+    <name>query</name>
+    <title>SQL Query</title>
+    <type>text</type>
+    <import>true</import>
+    <comment>SQL query for this search</comment>
+    <add>1.1</add>
+    <drop>1.5</drop>
   </field>
   <field>
-       <name>form_values</name>
-       <title>Submitted Form Values</title>
-       <type>text</type>
-       <import>true</import>
-       <comment>Submitted form values for this search</comment>
-       <add>1.1</add>
+    <name>form_values</name>
+    <title>Submitted Form Values</title>
+    <type>text</type>
+    <import>true</import>
+    <comment>Submitted form values for this search</comment>
+    <add>1.1</add>
   </field>
-<field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this entry active?</comment>
-       <add>1.1</add>
-       <drop>1.5</drop>
+  <field>
+    <name>is_active</name>
+    <type>boolean</type>
+    <comment>Is this entry active?</comment>
+    <add>1.1</add>
+    <drop>1.5</drop>
   </field>
   <field>
-       <name>mapping_id</name>
-       <type>int unsigned</type>
-       <comment>Foreign key to civicrm_mapping used for saved search-builder searches.</comment>
-       <add>1.5</add>
+    <name>mapping_id</name>
+    <type>int unsigned</type>
+    <comment>Foreign key to civicrm_mapping used for saved search-builder searches.</comment>
+    <add>1.5</add>
   </field>
   <foreignKey>
-       <name>mapping_id</name>
-       <table>civicrm_mapping</table>
-       <key>id</key>
-       <add>1.5</add>
+    <name>mapping_id</name>
+    <table>civicrm_mapping</table>
+    <key>id</key>
+    <add>1.5</add>
   </foreignKey>
   <field>
-       <name>search_custom_id</name>
-       <type>int unsigned</type>
-       <comment>Foreign key to civicrm_option value table used for saved custom searches.</comment>
-       <add>2.0</add>
+    <name>search_custom_id</name>
+    <type>int unsigned</type>
+    <comment>Foreign key to civicrm_option value table used for saved custom searches.</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>where_clause</name>
-       <type>text</type>
-       <comment>the sql where clause if a saved search acl</comment>
-       <add>1.6</add>
+    <name>where_clause</name>
+    <type>text</type>
+    <comment>the sql where clause if a saved search acl</comment>
+    <add>1.6</add>
   </field>
   <field>
-       <name>select_tables</name>
-       <type>text</type>
-       <comment>the tables to be included in a select data</comment>
-       <add>1.6</add>
+    <name>select_tables</name>
+    <type>text</type>
+    <comment>the tables to be included in a select data</comment>
+    <add>1.6</add>
   </field>
   <field>
-       <name>where_tables</name>
-       <type>text</type>
-       <comment>the tables to be included in the count statement</comment>
-       <add>1.6</add>
+    <name>where_tables</name>
+    <type>text</type>
+    <comment>the tables to be included in the count statement</comment>
+    <add>1.6</add>
   </field>
 </table>
index af7dacdce06571c7ba0ecf3dc8b4addb2acf64c0..83f55d9db8a38ee9c27492075f56683d91f2f285 100644 (file)
@@ -1,93 +1,93 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Contact</base>
-    <class>SubscriptionHistory</class>
-    <name>civicrm_subscription_history</name>
-    <comment>History information of subscribe/unsubscribe actions</comment>
+  <base>CRM/Contact</base>
+  <class>SubscriptionHistory</class>
+  <name>civicrm_subscription_history</name>
+  <comment>History information of subscribe/unsubscribe actions</comment>
+  <add>1.1</add>
+  <log>true</log>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Internal Id</comment>
     <add>1.1</add>
-    <log>true</log>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>Internal Id</comment>
-       <add>1.1</add>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>contact_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>Contact Id</comment>
-       <add>1.1</add>
-    </field>
-    <foreignKey>
-        <name>contact_id</name>
-        <table>civicrm_contact</table>
-        <key>id</key>
-        <add>1.1</add>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-      <name>group_id</name>
-      <type>int unsigned</type>
-      <comment>Group Id</comment>
-      <add>1.1</add>
-      <pseudoconstant>
-        <table>civicrm_group</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>title</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-    </field>
-    <foreignKey>
-       <name>group_id</name>
-       <table>civicrm_group</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>date</name>
-        <type>datetime</type>
-        <required>true</required>
-        <comment>Date of the (un)subscription</comment>
-       <add>1.1</add>
-    </field>
-    <field>
-        <name>method</name>
-        <type>varchar</type>
-        <length>8</length>
-        <comment>How the (un)subscription was triggered</comment>
-        <pseudoconstant>
-          <callback>CRM_Core_SelectValues::getSubscriptionHistoryMethods</callback>
-        </pseudoconstant>
-       <add>1.1</add>
-       <html>
-         <type>Select</type>
-       </html>
-    </field>
-    <field>
-        <name>status</name>
-        <type>varchar</type>
-        <length>8</length>
-        <comment>The state of the contact within the group</comment>
-        <pseudoconstant>
-          <callback>CRM_Core_SelectValues::groupContactStatus</callback>
-        </pseudoconstant>
-       <add>1.1</add>
-    </field>
-    <field>
-        <name>tracking</name>
-        <type>varchar</type>
-        <length>255</length>
-        <comment>IP address or other tracking info</comment>
-       <add>1.1</add>
-    </field>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Contact Id</comment>
+    <add>1.1</add>
+  </field>
+  <foreignKey>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>group_id</name>
+    <type>int unsigned</type>
+    <comment>Group Id</comment>
+    <add>1.1</add>
+    <pseudoconstant>
+      <table>civicrm_group</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>title</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <foreignKey>
+    <name>group_id</name>
+    <table>civicrm_group</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>date</name>
+    <type>datetime</type>
+    <required>true</required>
+    <comment>Date of the (un)subscription</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>method</name>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>How the (un)subscription was triggered</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::getSubscriptionHistoryMethods</callback>
+    </pseudoconstant>
+    <add>1.1</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>status</name>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>The state of the contact within the group</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::groupContactStatus</callback>
+    </pseudoconstant>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>tracking</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>IP address or other tracking info</comment>
+    <add>1.1</add>
+  </field>
 </table>
index e5e5772f1c4800e2ef621621b86d85bfc5695af1..e44876f0190ea9f8541b2902ec498df6b09dbf5e 100644 (file)
     <comment>unique invoice id, system generated or passed in</comment>
     <html>
       <type>Text</type>
-    </html>  
+    </html>
     <add>1.3</add>
     </field>
   <field>
     <html>
       <type>Text</type>
     </html>
-    <add>1.3</add>    
+    <add>1.3</add>
   </field>
   <field>
     <name>receipt_date</name>
     <html>
       <type>Select Date</type>
     </html>
-    <add>1.3</add>    
+    <add>1.3</add>
   </field>
   <field>
     <name>thankyou_date</name>
   </index>
   <field>
     <name>contribution_recur_id</name>
+    <title>Recurring Contribution ID</title>
     <type>int unsigned</type>
     <comment>Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.</comment>
     <add>1.4</add>
   </index>
   <field>
     <name>address_id</name>
+    <title>Contribution Address</title>
     <type>int unsigned</type>
     <comment>Conditional foreign key to civicrm_address.id. We insert an address record for each contribution when we have associated billing name and address data.</comment>
     <add>2.2</add>
index 57d5a9aeb882f9a50771912f8a6a22de7ea1a356..1fd7ee174811bf77f2834bd8062796f36175f6db 100644 (file)
@@ -9,6 +9,7 @@
   <log>true</log>
   <field>
     <name>id</name>
+    <title>Contribution Page ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Contribution Id</comment>
@@ -92,6 +93,7 @@
   </field>
   <field>
     <name>is_credit_card_only</name>
+    <title>Is Credit Card Only?</title>
     <type>boolean</type>
     <comment>if true - processing logic must reject transaction at confirmation stage if pay method != credit card</comment>
     <default>0</default>
   </field>
   <field>
     <name>is_monetary</name>
+    <title>Is Monetary</title>
     <type>boolean</type>
     <default>1</default>
     <comment>if true - allows real-time monetary transactions otherwise non-monetary transactions</comment>
   </field>
   <field>
     <name>is_recur</name>
+    <title>Is Recurring</title>
     <type>boolean</type>
     <default>0</default>
     <comment>if true - allows recurring contributions, valid only for PayPal_Standard</comment>
   </field>
   <field>
     <name>is_confirm_enabled</name>
+    <title>Confirmation Page?</title>
     <type>boolean</type>
     <default>1</default>
     <comment>if false, the confirm page in contribution pages gets skipped</comment>
   </field>
   <field>
     <name>recur_frequency_unit</name>
+    <title>Recurring Frequency</title>
     <type>varchar</type>
     <length>128</length>
     <comment>Supported recurring frequency units.</comment>
   </field>
   <field>
     <name>is_recur_interval</name>
+    <title>Support Recurring Intervals</title>
     <type>boolean</type>
     <default>0</default>
     <comment>if true - supports recurring intervals</comment>
   </field>
   <field>
     <name>is_recur_installments</name>
+    <title>Recurring Installments?</title>
     <type>boolean</type>
     <default>0</default>
     <comment>if true - asks user for recurring installments</comment>
   </field>
   <field>
     <name>is_pay_later</name>
+    <title>Pay Later</title>
     <type>boolean</type>
     <default>0</default>
     <comment>if true - allows the user to send payment directly to the org later</comment>
   </field>
   <field>
     <name>pay_later_text</name>
+    <title>Pay Later Text</title>
     <type>text</type>
     <localizable>true</localizable>
     <comment>The text displayed to the user in the main form</comment>
   </field>
   <field>
     <name>pay_later_receipt</name>
+    <title>Pay Later Receipt</title>
     <type>text</type>
     <localizable>true</localizable>
     <comment>The receipt sent to the user instead of the normal receipt text</comment>
   </field>
   <field>
     <name>is_partial_payment</name>
+    <title>Allow Partial Payment</title>
     <type>boolean</type>
     <default>0</default>
     <comment>is partial payment enabled for this online contribution page</comment>
   </field>
   <field>
     <name>is_allow_other_amount</name>
+    <title>Allow Other Amounts</title>
     <type>boolean</type>
     <comment>if true, page will include an input text field where user can enter their own amount</comment>
     <default>0</default>
   </field>
   <field>
     <name>default_amount_id</name>
+    <title>Default Amount</title>
     <type>int unsigned</type>
     <comment>FK to civicrm_option_value.</comment>
     <add>1.7</add>
   </field>
   <field>
     <name>min_amount</name>
+    <title>Minimum Amount</title>
     <type>decimal</type>
     <comment>if other amounts allowed, user can configure minimum allowed.</comment>
     <add>1.3</add>
   </field>
   <field>
     <name>max_amount</name>
+    <title>Maximum Amount</title>
     <type>decimal</type>
     <comment>if other amounts allowed, user can configure maximum allowed.</comment>
     <add>1.3</add>
   </field>
   <field>
     <name>is_for_organization</name>
+    <title>Allow For Organization</title>
     <type>boolean</type>
     <comment>if true, signup is done on behalf of an organization</comment>
     <default>0</default>
   </field>
   <field>
     <name>is_email_receipt</name>
+    <title>Send email Receipt</title>
     <type>boolean</type>
     <comment>if true, receipt is automatically emailed to contact on success</comment>
     <default>0</default>
   </field>
   <field>
     <name>receipt_from_name</name>
+    <title>Receipt From</title>
     <type>varchar</type>
     <length>255</length>
     <localizable>true</localizable>
   </field>
   <field>
     <name>receipt_from_email</name>
+    <title>Receipt From email</title>
     <type>varchar</type>
     <length>255</length>
     <comment>FROM email address used for receipts generated by contributions to this contribution page.</comment>
   </field>
   <field>
     <name>cc_receipt</name>
+    <title>Receipt cc</title>
     <type>varchar</type>
     <length>255</length>
     <comment>comma-separated list of email addresses to cc each time a receipt is sent</comment>
   </field>
   <field>
     <name>bcc_receipt</name>
+    <title>Receipt bcc</title>
     <type>varchar</type>
     <length>255</length>
     <comment>comma-separated list of email addresses to bcc each time a receipt is sent</comment>
   </field>
   <field>
     <name>receipt_text</name>
+    <title>Receipt Text</title>
     <type>text</type>
     <html>
       <type>TextArea</type>
   </field>
   <field>
     <name>is_active</name>
+    <title>Is Page Active?</title>
     <type>boolean</type>
     <comment>Is this property active?</comment>
     <add>1.3</add>
   </field>
   <field>
     <name>footer_text</name>
+    <title>Footer Text</title>
     <type>text</type>
     <html>
       <type>TextArea</type>
   </field>
   <field>
     <name>amount_block_is_active</name>
+    <title>Is Amount Block Active?</title>
     <type>boolean</type>
     <comment>Is this property active?</comment>
     <default>1</default>
   </field>
   <field>
     <name>start_date</name>
+    <title>Contribution Page Start Date</title>
     <type>datetime</type>
     <title>Contribution Page Start Date</title>
     <comment>Date and time that this page starts.</comment>
index 46590049957a7a98df2c592997dd24b4ea5149ad..311f4512f393b9cb3020609bc0b480b8b6e3ef6d 100644 (file)
   <add>2.2</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <uniqueName>contribution_soft_id</uniqueName>
-      <type>int unsigned</type>
-      <required>true</required>
-      <import>true</import>
-      <title>Soft Contribution ID</title>
-      <comment>Soft Contribution ID</comment>
-      <add>2.2</add>
+    <name>id</name>
+    <uniqueName>contribution_soft_id</uniqueName>
+    <title>Soft Contribution ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <import>true</import>
+    <title>Soft Contribution ID</title>
+    <comment>Soft Contribution ID</comment>
+    <add>2.2</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contribution_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to contribution table.</comment>
-      <add>2.2</add>
+    <name>contribution_id</name>
+    <title>Soft Contribution - Contribution</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to contribution table.</comment>
+    <add>2.2</add>
   </field>
   <foreignKey>
-       <name>contribution_id</name>
-       <table>civicrm_contribution</table>
-       <key>id</key>
-       <add>2.2</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contribution_id</name>
+    <table>civicrm_contribution</table>
+    <key>id</key>
+    <add>2.2</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>contact_id</name>
-      <uniqueName>contribution_soft_contact_id</uniqueName>
-      <title>Contact ID</title>
-      <type>int unsigned</type>
-      <required>true</required>
-      <import>true</import>
-      <headerPattern>/contact(.?id)?/i</headerPattern>
-      <dataPattern>/^\d+$/</dataPattern>
-      <comment>FK to Contact ID</comment>
-      <add>2.2</add>
+    <name>contact_id</name>
+    <uniqueName>contribution_soft_contact_id</uniqueName>
+    <title>Contact ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <import>true</import>
+    <headerPattern>/contact(.?id)?/i</headerPattern>
+    <dataPattern>/^\d+$/</dataPattern>
+    <comment>FK to Contact ID</comment>
+    <add>2.2</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>2.2</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>2.2</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>amount</name>
-      <type>decimal</type>
-      <required>true</required>
-      <import>true</import>
-      <headerPattern>/total(.?am(ou)?nt)?/i</headerPattern>
-      <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
-      <comment>Amount of this soft contribution.</comment>
-      <add>2.2</add>
+    <name>amount</name>
+    <title>Soft Contribution Amount</title>
+    <type>decimal</type>
+    <required>true</required>
+    <import>true</import>
+    <headerPattern>/total(.?am(ou)?nt)?/i</headerPattern>
+    <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
+    <comment>Amount of this soft contribution.</comment>
+    <add>2.2</add>
   </field>
   <field>
-      <name>currency</name>
-      <type>varchar</type>
-      <length>3</length>
-      <default>NULL</default>
-      <comment>3 character string, value from config setting or input via user.</comment>
-      <add>3.2</add>
-      <pseudoconstant>
-        <table>civicrm_currency</table>
-        <keyColumn>name</keyColumn>
-        <labelColumn>full_name</labelColumn>
-        <nameColumn>numeric_code</nameColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>currency</name>
+    <type>varchar</type>
+    <title>Soft Contribution Currency</title>
+    <length>3</length>
+    <default>NULL</default>
+    <comment>3 character string, value from config setting or input via user.</comment>
+    <add>3.2</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>full_name</labelColumn>
+      <nameColumn>numeric_code</nameColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-      <name>pcp_id</name>
-      <type>int unsigned</type>
-      <default>NULL</default>
-      <comment>FK to civicrm_pcp.id</comment>
-      <add>2.2</add>
+    <name>pcp_id</name>
+    <type>int unsigned</type>
+    <title>Soft Contribution PCP</title>
+    <default>NULL</default>
+    <comment>FK to civicrm_pcp.id</comment>
+    <add>2.2</add>
   </field>
   <foreignKey>
-      <name>pcp_id</name>
-      <table>civicrm_pcp</table>
-      <key>id</key>
-      <add>3.1</add>
-      <onDelete>SET NULL</onDelete>
+    <name>pcp_id</name>
+    <table>civicrm_pcp</table>
+    <key>id</key>
+    <add>3.1</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <index>
-      <name>index_id</name>
-      <fieldName>pcp_id</fieldName>
-      <add>2.2</add>
-   </index>
-   <field>
-      <name>pcp_display_in_roll</name>
-      <type>boolean</type>
-      <default>0</default>
-      <add>2.2</add>
+    <name>index_id</name>
+    <fieldName>pcp_id</fieldName>
+    <add>2.2</add>
+  </index>
+  <field>
+    <name>pcp_display_in_roll</name>
+    <type>boolean</type>
+    <title>Soft Contribution Display on PCP</title>
+    <default>0</default>
+    <add>2.2</add>
   </field>
   <field>
-       <name>pcp_roll_nickname</name>
-       <type>varchar</type>
-       <length>255</length>
-       <default>NULL</default>
-       <add>2.2</add>
+    <name>pcp_roll_nickname</name>
+    <type>varchar</type>
+    <title>Soft Contribution PCP Nickname</title>
+    <length>255</length>
+    <default>NULL</default>
+    <add>2.2</add>
   </field>
   <field>
-       <name>pcp_personal_note</name>
-       <type>varchar</type>
-       <length>255</length>
-       <default>NULL</default>
-       <add>2.2</add>
+    <name>pcp_personal_note</name>
+    <type>varchar</type>
+    <title>Soft Contribution PCP Note</title>
+    <length>255</length>
+    <default>NULL</default>
+    <add>2.2</add>
   </field>
   <field>
-       <name>soft_credit_type_id</name>
-       <type>int unsigned</type>
-       <default>NULL</default>
-       <title>Soft Credit Type</title>
-       <pseudoconstant>
-         <optionGroupName>soft_credit_type</optionGroupName>
-       </pseudoconstant>
-       <comment>Soft Credit Type ID.Implicit FK to civicrm_option_value where option_group = soft_credit_type.</comment>
-       <add>2.2</add>
+    <name>soft_credit_type_id</name>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <title>Soft Credit Type</title>
+    <pseudoconstant>
+      <optionGroupName>soft_credit_type</optionGroupName>
+    </pseudoconstant>
+    <comment>Soft Credit Type ID.Implicit FK to civicrm_option_value where option_group = soft_credit_type.</comment>
+    <add>2.2</add>
   </field>
 </table>
index b5c5b980deb17ecfb39a4492ef3f21bed2502dc3..039d1921a90f3e7be6344f80fd4d467724d286dc 100644 (file)
   <add>1.4</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>1.4</add>
+    <name>id</name>
+    <title>Premium ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>1.4</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <length>64</length>
-       <required>true</required>
-       <comment>Joins these premium settings to another object. Always civicrm_contribution_page for now.</comment>
-       <add>1.4</add>
+    <name>entity_table</name>
+    <title>Premium Entity</title>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Joins these premium settings to another object. Always civicrm_contribution_page for now.</comment>
+    <add>1.4</add>
   </field>
   <field>
-      <name>entity_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>1.4</add>
+    <name>entity_id</name>
+    <title>Premium entity ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>1.4</add>
   </field>
   <dynamicForeignKey>
-      <idColumn>entity_id</idColumn>
-      <typeColumn>entity_table</typeColumn>
-      <add>1.4</add>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>1.4</add>
   </dynamicForeignKey>
   <field>
-      <name>premiums_active </name>
-      <type>boolean</type>
-      <default>0</default>
-      <required>true</required>
-      <comment>Is the Premiums feature enabled for this page?</comment>
-      <add>1.4</add>
+    <name>premiums_active </name>
+    <title>Is Premium Active?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <required>true</required>
+    <comment>Is the Premiums feature enabled for this page?</comment>
+    <add>1.4</add>
   </field>
   <field>
-      <name>premiums_intro_title</name>
-      <type>varchar</type>
-      <title>Title for Premiums section</title>
-      <length>255</length>
-      <localizable>true</localizable>
-      <comment>Title for Premiums section.</comment>
-      <add>1.4</add>
+    <name>premiums_intro_title</name>
+    <type>varchar</type>
+    <title>Title for Premiums section</title>
+    <length>255</length>
+    <localizable>true</localizable>
+    <comment>Title for Premiums section.</comment>
+    <add>1.4</add>
   </field>
   <field>
-      <name>premiums_intro_text</name>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>Displayed in &lt;div&gt; at top of Premiums section of page. Text and HTML allowed.</comment>
-      <add>1.4</add>
+    <name>premiums_intro_text</name>
+    <title>Premium Introductory Text</title>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Displayed in &lt;div&gt; at top of Premiums section of page. Text and HTML allowed.</comment>
+    <add>1.4</add>
   </field>
-   <field>
-      <name>premiums_contact_email</name>
-      <type>varchar</type>
-      <length>100</length>
-      <comment>This email address is included in receipts if it is populated and a premium has been selected.</comment>
-      <add>1.4</add>
+  <field>
+    <name>premiums_contact_email</name>
+    <title>Premium Contact Email</title>
+    <type>varchar</type>
+    <length>100</length>
+    <comment>This email address is included in receipts if it is populated and a premium has been selected.</comment>
+    <add>1.4</add>
   </field>
   <field>
-      <name>premiums_contact_phone</name>
-      <title>Premiums Contact Phone</title>
-      <type>varchar</type>
-      <length>50</length>
-      <comment>This phone number is included in receipts if it is populated and a premium has been selected.</comment>
-      <add>1.4</add>
+    <name>premiums_contact_phone</name>
+    <title>Premiums Contact Phone</title>
+    <type>varchar</type>
+    <length>50</length>
+    <comment>This phone number is included in receipts if it is populated and a premium has been selected.</comment>
+    <add>1.4</add>
   </field>
   <field>
-      <name>premiums_display_min_contribution</name>
-      <type>boolean</type>
-      <required>true</required>
-      <comment>Boolean. Should we automatically display minimum contribution amount text after the premium descriptions.</comment>
-      <add>1.4</add>
+    <name>premiums_display_min_contribution</name>
+    <title>Display Minimum Contribution?</title>
+    <type>boolean</type>
+    <required>true</required>
+    <comment>Boolean. Should we automatically display minimum contribution amount text after the premium descriptions.</comment>
+    <add>1.4</add>
   </field>
   <field>
-      <name>premiums_nothankyou_label</name>
-      <title>No Thank-you Text</title>
-      <type>varchar</type>
-      <length>255</length>
-      <localizable>true</localizable>
-      <comment>Label displayed for No Thank-you option in premiums block (e.g. No thank you)</comment>
-      <add>4.3</add>
+    <name>premiums_nothankyou_label</name>
+    <title>No Thank-you Text</title>
+    <type>varchar</type>
+    <length>255</length>
+    <localizable>true</localizable>
+    <comment>Label displayed for No Thank-you option in premiums block (e.g. No thank you)</comment>
+    <add>4.3</add>
   </field>
   <field>
-      <name>premiums_nothankyou_position</name>
-      <title>No Thank-you Position</title>
-      <type>int unsigned</type>
-      <default>1</default>
-      <add>4.3</add>
+    <name>premiums_nothankyou_position</name>
+    <title>No Thank-you Position</title>
+    <type>int unsigned</type>
+    <default>1</default>
+    <add>4.3</add>
   </field>
 </table>
index 93c401305cc30485ca3a39cc7f0573fe5f9c8297..2f3ec72ec3771ca5197b3ce25867b7141263aeb3 100644 (file)
   <add>1.4</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>1.4</add>
+    <name>id</name>
+    <title>Product ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>1.4</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <uniqueName>product_name</uniqueName>
-       <title>Product Name</title>
-       <type>varchar</type>
-       <length>255</length>
-       <required>true</required>
-       <export>true</export>
-       <localizable>true</localizable>
-       <comment>Required product/premium name</comment>
-       <add>1.4</add>
-  </field>
-  <field>
-      <name>description</name>
-      <title>Description</title>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>Optional description of the product/premium.</comment>
-      <add>1.4</add>
-  </field>
-  <field>
-      <name>sku</name>
-      <title>SKU</title>
-      <type>varchar</type>
-      <length>50</length>
-      <export>true</export>
-      <comment>Optional product sku or code.</comment>
-      <add>1.4</add>
-  </field>
-  <field>
-      <name>options</name>
-      <title>Options</title>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>Store comma-delimited list of color, size, etc. options for the product.</comment>
-      <add>1.4</add>
-  </field>
-  <field>
-      <name>image</name>
-      <title>Image</title>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>Full or relative URL to uploaded image - fullsize.</comment>
-      <add>1.4</add>
-  </field>
-   <field>
-      <name>thumbnail</name>
-      <title>Thumbnail</title>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>Full or relative URL to image thumbnail.</comment>
-      <add>1.4</add>
-  </field>
-  <field>
-      <name>price</name>
-      <title>Price</title>
-      <type>decimal</type>
-      <comment>Sell price or market value for premiums. For tax-deductible contributions, this will be stored as non_deductible_amount in the contribution record.</comment>
-      <add>1.4</add>
-  </field>
-  <field>
-      <name>currency</name>
-      <type>varchar</type>
-      <length>3</length>
-      <default>NULL</default>
-      <comment>3 character string, value from config setting or input via user.</comment>
-      <add>3.2</add>
-      <pseudoconstant>
-        <table>civicrm_currency</table>
-        <keyColumn>name</keyColumn>
-        <labelColumn>full_name</labelColumn>
-        <nameColumn>numeric_code</nameColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-  </field>
-  <field>
-      <name>financial_type_id</name>
-      <title>Financial Type</title>
-      <type>int unsigned</type>
-      <default>NULL</default>
-      <pseudoconstant>
-        <table>civicrm_financial_type</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <comment>FK to Financial Type.</comment>
-      <add>4.3</add>
+    <name>name</name>
+    <uniqueName>product_name</uniqueName>
+    <title>Product Name</title>
+    <type>varchar</type>
+    <length>255</length>
+    <required>true</required>
+    <export>true</export>
+    <localizable>true</localizable>
+    <comment>Required product/premium name</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>description</name>
+    <title>Description</title>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Optional description of the product/premium.</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>sku</name>
+    <title>SKU</title>
+    <type>varchar</type>
+    <length>50</length>
+    <export>true</export>
+    <comment>Optional product sku or code.</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>options</name>
+    <title>Options</title>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Store comma-delimited list of color, size, etc. options for the product.</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>image</name>
+    <title>Image</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Full or relative URL to uploaded image - fullsize.</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>thumbnail</name>
+    <title>Thumbnail</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Full or relative URL to image thumbnail.</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>price</name>
+    <title>Price</title>
+    <type>decimal</type>
+    <comment>Sell price or market value for premiums. For tax-deductible contributions, this will be stored as non_deductible_amount in the contribution record.</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>currency</name>
+    <type>varchar</type>
+    <length>3</length>
+    <default>NULL</default>
+    <comment>3 character string, value from config setting or input via user.</comment>
+    <add>3.2</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>full_name</labelColumn>
+      <nameColumn>numeric_code</nameColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>financial_type_id</name>
+    <title>Financial Type</title>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <pseudoconstant>
+      <table>civicrm_financial_type</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <comment>FK to Financial Type.</comment>
+    <add>4.3</add>
   </field>
   <foreignKey>
-       <name>financial_type_id</name>
-       <table>civicrm_financial_type</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
-       <add>4.3</add>
+    <name>financial_type_id</name>
+    <table>civicrm_financial_type</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
+    <add>4.3</add>
   </foreignKey>
 
   <field>
-      <name>min_contribution</name>
-      <title>Minimum Contribution</title>
-      <type>decimal</type>
-      <comment>Minimum contribution required to be eligible to select this premium.</comment>
-      <add>1.4</add>
-  </field>
-  <field>
-      <name>cost</name>
-      <title>Cost</title>
-      <type>decimal</type>
-      <comment>Actual cost of this product. Useful to determine net return from sale or using this as an incentive.</comment>
-      <add>1.4</add>
-  </field>
-  <field>
-      <name>is_active</name>
-      <title>Is Active</title>
-      <type>boolean</type>
-      <required>true</required>
-      <comment>Disabling premium removes it from the premiums_premium join table below.</comment>
-      <add>1.4</add>
-  </field>
-  <field>
-      <name>period_type</name>
-      <title>Period Type</title>
-      <type>varchar</type>
-      <length>8</length>
-      <default>'rolling'</default>
-      <comment>Rolling means we set start/end based on current day, fixed means we set start/end for current year or month
-(e.g. 1 year + fixed -> we would set start/end for 1/1/06 thru 12/31/06 for any premium chosen in 2006) </comment>
-      <pseudoconstant>
-        <callback>CRM_Core_SelectValues::periodType</callback>
-      </pseudoconstant>
-      <add>1.4</add>
-      <html>
-        <type>Select</type>
-      </html>
-  </field>
-  <field>
-      <name>fixed_period_start_day</name>
-      <title>Fixed Period Start Day</title>
-      <type>int</type>
-      <default>0101</default>
-      <comment>Month and day (MMDD) that fixed period type subscription or membership starts.</comment>
-      <add>1.4</add>
-  </field>
-  <field>
-      <name>duration_unit</name>
-      <title>Duration Unit</title>
-      <type>varchar</type>
-      <length>8</length>
-      <default>'year'</default>
-      <pseudoconstant>
-        <callback>CRM_Core_SelectValues::getPremiumUnits</callback>
-      </pseudoconstant>
-      <add>1.4</add>
-      <html>
-        <type>Select</type>
-      </html>
-  </field>
-  <field>
-      <name>duration_interval</name>
-      <title>Duration Interval</title>
-      <type>int</type>
-      <comment>Number of units for total duration of subscription, service, membership (e.g. 12 Months).</comment>
-      <add>1.4</add>
-  </field>
-  <field>
-      <name>frequency_unit</name>
-      <title>Frequency Unit</title>
-      <type>varchar</type>
-      <length>8</length>
-      <default>'month'</default>
-      <comment>Frequency unit and interval allow option to store actual delivery frequency for a subscription or service.</comment>
-      <pseudoconstant>
-        <callback>CRM_Core_SelectValues::getPremiumUnits</callback>
-      </pseudoconstant>
-      <add>1.4</add>
-      <html>
-        <type>Select</type>
-      </html>
-  </field>
-  <field>
-      <name>frequency_interval</name>
-      <title>Frequency Interval</title>
-      <type>int</type>
-      <comment>Number of units for delivery frequency of subscription, service, membership (e.g. every 3 Months).</comment>
-      <add>1.4</add>
+    <name>min_contribution</name>
+    <title>Minimum Contribution</title>
+    <type>decimal</type>
+    <comment>Minimum contribution required to be eligible to select this premium.</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>cost</name>
+    <title>Cost</title>
+    <type>decimal</type>
+    <comment>Actual cost of this product. Useful to determine net return from sale or using this as an incentive.</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>is_active</name>
+    <title>Is Active</title>
+    <type>boolean</type>
+    <required>true</required>
+    <comment>Disabling premium removes it from the premiums_premium join table below.</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>period_type</name>
+    <title>Period Type</title>
+    <type>varchar</type>
+    <length>8</length>
+    <default>'rolling'</default>
+    <comment>Rolling means we set start/end based on current day, fixed means we set start/end for current year or month
+      (e.g. 1 year + fixed -> we would set start/end for 1/1/06 thru 12/31/06 for any premium chosen in 2006) </comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::periodType</callback>
+    </pseudoconstant>
+    <add>1.4</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>fixed_period_start_day</name>
+    <title>Fixed Period Start Day</title>
+    <type>int</type>
+    <default>0101</default>
+    <comment>Month and day (MMDD) that fixed period type subscription or membership starts.</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>duration_unit</name>
+    <title>Duration Unit</title>
+    <type>varchar</type>
+    <length>8</length>
+    <default>'year'</default>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::getPremiumUnits</callback>
+    </pseudoconstant>
+    <add>1.4</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>duration_interval</name>
+    <title>Duration Interval</title>
+    <type>int</type>
+    <comment>Number of units for total duration of subscription, service, membership (e.g. 12 Months).</comment>
+    <add>1.4</add>
+  </field>
+  <field>
+    <name>frequency_unit</name>
+    <title>Frequency Unit</title>
+    <type>varchar</type>
+    <length>8</length>
+    <default>'month'</default>
+    <comment>Frequency unit and interval allow option to store actual delivery frequency for a subscription or service.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::getPremiumUnits</callback>
+    </pseudoconstant>
+    <add>1.4</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>frequency_interval</name>
+    <title>Frequency Interval</title>
+    <type>int</type>
+    <comment>Number of units for delivery frequency of subscription, service, membership (e.g. every 3 Months).</comment>
+    <add>1.4</add>
   </field>
 </table>
index bee97aa25094d74b40458c50a76fab5cb05a2081..14fc88e2471fc1e054036be0516cf58bddcd8ed8 100644 (file)
   <add>2.0</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Contribution Id</comment>
-      <add>2.0</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Contribution Id</comment>
+    <add>2.0</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contribution_page_id</name>
-      <type>int unsigned</type>
-      <comment>The Contribution Page which triggered this contribution</comment>
-      <add>1.5</add>
+    <name>contribution_page_id</name>
+    <type>int unsigned</type>
+    <comment>The Contribution Page which triggered this contribution</comment>
+    <add>1.5</add>
   </field>
   <foreignKey>
-       <name>contribution_page_id</name>
-       <table>civicrm_contribution_page</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
+    <name>contribution_page_id</name>
+    <table>civicrm_contribution_page</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this property active?</comment>
-       <add>2.0</add>
+    <name>is_active</name>
+    <type>boolean</type>
+    <comment>Is this property active?</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>title</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Widget title.</comment>
-       <add>2.0</add>
+    <name>title</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Widget title.</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>url_logo</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>URL to Widget logo</comment>
-       <add>2.0</add>
+    <name>url_logo</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>URL to Widget logo</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>button_title</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Button title.</comment>
-       <add>2.0</add>
+    <name>button_title</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Button title.</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>about</name>
-       <type>text</type>
-       <comment>About description.</comment>
-       <add>2.0</add>
+    <name>about</name>
+    <type>text</type>
+    <comment>About description.</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>url_homepage</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>URL to Homepage.</comment>
-       <add>2.0</add>
+    <name>url_homepage</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>URL to Homepage.</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>color_title</name>
-       <type>varchar</type>
-       <length>10</length>
-       <add>2.0</add>
+    <name>color_title</name>
+    <type>varchar</type>
+    <length>10</length>
+    <add>2.0</add>
   </field>
   <field>
-       <name>color_button</name>
-       <type>varchar</type>
-       <length>10</length>
-       <add>2.0</add>
+    <name>color_button</name>
+    <type>varchar</type>
+    <length>10</length>
+    <add>2.0</add>
   </field>
   <field>
-       <name>color_bar</name>
-       <type>varchar</type>
-       <length>10</length>
-       <add>2.0</add>
+    <name>color_bar</name>
+    <type>varchar</type>
+    <length>10</length>
+    <add>2.0</add>
   </field>
   <field>
-       <name>color_main_text</name>
-       <type>varchar</type>
-       <length>10</length>
-       <add>2.0</add>
+    <name>color_main_text</name>
+    <type>varchar</type>
+    <length>10</length>
+    <add>2.0</add>
   </field>
   <field>
-       <name>color_main</name>
-       <type>varchar</type>
-       <length>10</length>
-       <add>2.0</add>
+    <name>color_main</name>
+    <type>varchar</type>
+    <length>10</length>
+    <add>2.0</add>
   </field>
   <field>
-       <name>color_main_bg</name>
-       <type>varchar</type>
-       <length>10</length>
-       <add>2.0</add>
+    <name>color_main_bg</name>
+    <type>varchar</type>
+    <length>10</length>
+    <add>2.0</add>
   </field>
   <field>
-       <name>color_bg</name>
-       <type>varchar</type>
-       <length>10</length>
-       <add>2.0</add>
+    <name>color_bg</name>
+    <type>varchar</type>
+    <length>10</length>
+    <add>2.0</add>
   </field>
   <field>
-       <name>color_about_link</name>
-       <type>varchar</type>
-       <length>10</length>
-       <add>2.0</add>
+    <name>color_about_link</name>
+    <type>varchar</type>
+    <length>10</length>
+    <add>2.0</add>
   </field>
   <field>
-       <name>color_homepage_link</name>
-       <type>varchar</type>
-       <length>10</length>
-       <add>2.0</add>
+    <name>color_homepage_link</name>
+    <type>varchar</type>
+    <length>10</length>
+    <add>2.0</add>
   </field>
 </table>
index 09f05039b227feb03c0256470eedc06f1682be53..17c7aa0da15290fe3ed9b18058655940a36162bd 100644 (file)
@@ -7,84 +7,84 @@
   <comment>Table to store log for the reminder.</comment>
   <add>3.4</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>3.4</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>3.4</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID</comment>
-      <add>3.4</add>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID</comment>
+    <add>3.4</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>3.4</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>3.4</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>entity_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to id of the entity that the action was performed on. Pseudo - FK.</comment>
-      <add>3.4</add>
+    <name>entity_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to id of the entity that the action was performed on. Pseudo - FK.</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>name of the entity table for the above id, e.g. civicrm_activity, civicrm_participant</comment>
-       <add>3.4</add>
+    <name>entity_table</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>name of the entity table for the above id, e.g. civicrm_activity, civicrm_participant</comment>
+    <add>3.4</add>
   </field>
   <dynamicForeignKey>
-       <idColumn>entity_id</idColumn>
-       <typeColumn>entity_table</typeColumn>
-       <add>3.4</add>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>3.4</add>
   </dynamicForeignKey>
   <field>
-      <name>action_schedule_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to the action schedule that this action originated from.</comment>
-      <add>3.4</add>
+    <name>action_schedule_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to the action schedule that this action originated from.</comment>
+    <add>3.4</add>
   </field>
   <foreignKey>
-       <name>action_schedule_id</name>
-       <table>civicrm_action_schedule</table>
-       <key>id</key>
-       <add>3.4</add>
-       <onDelete>CASCADE</onDelete>
+    <name>action_schedule_id</name>
+    <table>civicrm_action_schedule</table>
+    <key>id</key>
+    <add>3.4</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>action_date_time</name>
-      <type>datetime</type>
-      <comment>date time that the action was performed on.</comment>
-      <add>3.4</add>
+    <name>action_date_time</name>
+    <type>datetime</type>
+    <comment>date time that the action was performed on.</comment>
+    <add>3.4</add>
   </field>
   <field>
-      <name>is_error</name>
-      <type>boolean</type>
-      <default>0</default>
-      <comment>Was there any error sending the reminder?</comment>
-      <add>3.4</add>
+    <name>is_error</name>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Was there any error sending the reminder?</comment>
+    <add>3.4</add>
   </field>
   <field>
-     <name>message</name>
-     <type>text</type>
-     <comment>Description / text in case there was an error encountered.</comment>
-     <add>3.4</add>
+    <name>message</name>
+    <type>text</type>
+    <comment>Description / text in case there was an error encountered.</comment>
+    <add>3.4</add>
   </field>
   <field>
-      <name>repetition_number</name>
-      <type>int unsigned</type>
-      <comment>Keeps track of the sequence number of this repetition.</comment>
-      <add>3.4</add>
+    <name>repetition_number</name>
+    <type>int unsigned</type>
+    <comment>Keeps track of the sequence number of this repetition.</comment>
+    <add>3.4</add>
   </field>
 </table>
index f4efcfdb774df95bf30c60f3ab82d2edda89def7..e889c3bc3dfd545bd8e5bf1f538958e8e31656d3 100644 (file)
@@ -7,69 +7,69 @@
   <comment>Table to store mapping for the reminder.</comment>
   <add>3.4</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>3.4</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>3.4</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>entity</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity for which the reminder is created</comment>
-       <add>3.4</add>
+    <name>entity</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity for which the reminder is created</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>entity_value</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity value</comment>
-       <add>3.4</add>
+    <name>entity_value</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity value</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>entity_value_label</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity value label</comment>
-       <add>3.4</add>
+    <name>entity_value_label</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity value label</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>entity_status</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity status</comment>
-       <add>3.4</add>
+    <name>entity_status</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity status</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>entity_status_label</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity status label</comment>
-       <add>3.4</add>
+    <name>entity_status_label</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity status label</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>entity_date_start</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity date</comment>
-       <add>3.4</add>
+    <name>entity_date_start</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity date</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>entity_date_end</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity date</comment>
-       <add>3.4</add>
+    <name>entity_date_end</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity date</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>entity_recipient</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity recipient</comment>
-       <add>3.4</add>
+    <name>entity_recipient</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity recipient</comment>
+    <add>3.4</add>
   </field>
 </table>
index bdb9bc9b9c30e536e764e0ef6090b4b27b41f92d..c519fa89f6818f815ed7f1bc5191bacfd6a5a030 100644 (file)
   <comment>Table to store the reminders.</comment>
   <add>3.4</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>3.4</add>
+    <name>id</name>
+    <title>Action Schedule ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>3.4</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <title>Name</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Name of the action(reminder)</comment>
-       <add>3.4</add>
+    <name>name</name>
+    <title>Name</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Name of the action(reminder)</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>title</name>
-       <title>Title</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Title of the action(reminder)</comment>
-       <add>3.4</add>
-  </field>
+    <name>title</name>
+    <title>Title</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Title of the action(reminder)</comment>
+    <add>3.4</add>
+  </field>
   <field>
-       <name>recipient</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Recipient</comment>
-       <add>3.4</add>
+    <name>recipient</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Recipient</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>limit_to</name>
-       <type>boolean</type>
-       <default>1</default>
-       <comment>Is this the recipient criteria limited to OR in addition to?</comment>
-       <add>4.4</add>
+    <name>limit_to</name>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this the recipient criteria limited to OR in addition to?</comment>
+    <add>4.4</add>
   </field>
   <field>
-       <name>entity_value</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity value</comment>
-       <add>3.4</add>
+    <name>entity_value</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity value</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>entity_status</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity status</comment>
-       <add>3.4</add>
+    <name>entity_status</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity status</comment>
+    <add>3.4</add>
+  </field>
+  <field>
+    <name>start_action_offset</name>
+    <type>int unsigned</type>
+    <comment>Reminder Interval.</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>start_action_offset</name>
-       <type>int unsigned</type>
-       <comment>Reminder Interval.</comment>
-       <add>3.4</add>
-  </field>
+    <name>start_action_unit</name>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>Time units for reminder.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::getScheduleReminderFrequencyUnits</callback>
+    </pseudoconstant>
+    <add>3.4</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
   <field>
-       <name>start_action_unit</name>
-       <type>varchar</type>
-       <length>8</length>
-       <comment>Time units for reminder.</comment>
-       <pseudoconstant>
-        <callback>CRM_Core_SelectValues::getScheduleReminderFrequencyUnits</callback>
-       </pseudoconstant>
-       <add>3.4</add>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>start_action_condition</name>
+    <type>varchar</type>
+    <length>32</length>
+    <comment>Reminder Action</comment>
+    <add>3.4</add>
   </field>
-  <field>
-       <name>start_action_condition</name>
-       <type>varchar</type>
-       <length>32</length>
-       <comment>Reminder Action</comment>
-       <add>3.4</add>
+  <field>
+    <name>start_action_date</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity date</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>start_action_date</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity date</comment>
-       <add>3.4</add>
+    <name>is_repeat</name>
+    <title>Repeat?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <add>3.4</add>
   </field>
   <field>
-       <name>is_repeat</name>
-       <title>Repeat?</title>
-       <type>boolean</type>
-       <default>0</default>
-       <add>3.4</add>
-  </field>
+    <name>repetition_frequency_unit</name>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>Time units for repetition of reminder.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::getScheduleReminderFrequencyUnits</callback>
+    </pseudoconstant>
+    <add>3.4</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
   <field>
-       <name>repetition_frequency_unit</name>
-       <type>varchar</type>
-       <length>8</length>
-       <comment>Time units for repetition of reminder.</comment>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::getScheduleReminderFrequencyUnits</callback>
-       </pseudoconstant>
-       <add>3.4</add>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>repetition_frequency_interval</name>
+    <type>int unsigned</type>
+    <comment>Time interval for repeating the reminder.</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>repetition_frequency_interval</name>
-       <type>int unsigned</type>
-       <comment>Time interval for repeating the reminder.</comment>
-       <add>3.4</add>
+    <name>end_frequency_unit</name>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>Time units till repetition of reminder.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::getScheduleReminderFrequencyUnits</callback>
+    </pseudoconstant>
+    <add>3.4</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>end_frequency_unit</name>
-       <type>varchar</type>
-       <length>8</length>
-       <comment>Time units till repetition of reminder.</comment>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::getScheduleReminderFrequencyUnits</callback>
-       </pseudoconstant>
-       <add>3.4</add>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>end_frequency_interval</name>
+    <type>int unsigned</type>
+    <comment>Time interval till repeating the reminder.</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>end_frequency_interval</name>
-       <type>int unsigned</type>
-       <comment>Time interval till repeating the reminder.</comment>
-       <add>3.4</add>
+    <name>end_action</name>
+    <type>varchar</type>
+    <length>32</length>
+    <comment>Reminder Action till repeating the reminder.</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>end_action</name>
-       <type>varchar</type>
-       <length>32</length>
-       <comment>Reminder Action till repeating the reminder.</comment>
-       <add>3.4</add>
+    <name>end_date</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Entity end date</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>end_date</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Entity end date</comment>
-       <add>3.4</add>
+    <name>is_active</name>
+    <title>Schedule is Active?</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this option active?</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <default>1</default>
-       <comment>Is this option active?</comment>
-       <add>3.4</add>
+    <name>recipient_manual</name>
+    <title>Recipient Manual</title>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>Contact IDs to which reminder should be sent.</comment>
+    <add>3.4</add>
   </field>
- <field>
-      <name>recipient_manual</name>
-      <title>Recipient Manual</title>
-      <type>varchar</type>
-      <length>128</length>
-      <comment>Contact IDs to which reminder should be sent.</comment>
-      <add>3.4</add>
-  </field>
-  <field>
-      <name>recipient_listing</name>
-      <title>Recipient Listing</title>
-      <type>varchar</type>
-      <length>128</length>
-      <comment>listing based on recipient field.</comment>
-      <add>4.1</add>
+  <field>
+    <name>recipient_listing</name>
+    <title>Recipient Listing</title>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>listing based on recipient field.</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>body_text</name>
-       <type>longtext</type>
-       <comment>Body of the mailing in text format.</comment>
-       <add>3.4</add>
+    <name>body_text</name>
+    <title>Reminder Text</title>
+    <type>longtext</type>
+    <comment>Body of the mailing in text format.</comment>
+    <add>3.4</add>
   </field>
   <field>
-       <name>body_html</name>
-       <type>longtext</type>
-       <comment>Body of the mailing in html format.</comment>
-       <add>3.4</add>
+    <name>body_html</name>
+    <title>Reminder HTML</title>
+    <type>longtext</type>
+    <comment>Body of the mailing in html format.</comment>
+    <add>3.4</add>
   </field>
-  <field>
-       <name>subject</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>Subject of mailing</comment>
-       <add>3.4</add>
+  <field>
+    <name>subject</name>
+    <title>Reminder Subject</title>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>Subject of mailing</comment>
+    <add>3.4</add>
   </field>
- <field>
-       <name>record_activity</name>
-       <type>boolean</type>
-       <default>NULL</default>
-       <comment>Record Activity for this reminder?</comment>
-       <add>3.4</add>
+  <field>
+    <name>record_activity</name>
+    <title>Record Activity for Reminder?</title>
+    <type>boolean</type>
+    <default>NULL</default>
+    <comment>Record Activity for this reminder?</comment>
+    <add>3.4</add>
   </field>
-  <field>
-      <name>mapping_id</name>
-      <type>int unsigned</type>
-      <comment>FK to mapping which is being used by this reminder</comment>
-      <add>3.4</add>
+  <field>
+    <name>mapping_id</name>
+    <title>Reminder Mapping</title>
+    <type>int unsigned</type>
+    <comment>FK to mapping which is being used by this reminder</comment>
+    <add>3.4</add>
   </field>
   <foreignKey>
-       <name>mapping_id</name>
-       <table>civicrm_action_mapping</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
+    <name>mapping_id</name>
+    <table>civicrm_action_mapping</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
     <name>group_id</name>
+    <title>Reminder Group</title>
     <type>int unsigned</type>
     <comment>FK to Group</comment>
     <pseudoconstant>
     </html>
     <add>3.4</add>
   </field>
-    <foreignKey>
-        <name>group_id</name>
-        <table>civicrm_group</table>
-        <key>id</key>
-        <onDelete>SET NULL</onDelete>
-    </foreignKey>
-    <field>
-          <name>msg_template_id</name>
+  <foreignKey>
+    <name>group_id</name>
+    <table>civicrm_group</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
+  </foreignKey>
+  <field>
+    <name>msg_template_id</name>
+    <title>Reminder Template</title>
     <type>int unsigned</type>
     <comment>FK to the message template.</comment>
-    </field>
-    <foreignKey>
-          <name>msg_template_id</name>
+  </field>
+  <foreignKey>
+    <name>msg_template_id</name>
     <table>civicrm_msg_template</table>
     <key>id</key>
     <onDelete>SET NULL</onDelete>
-    </foreignKey>
-    <field>
-       <name>absolute_date</name>
-       <type>date</type>
-       <comment>Date on which the reminder be sent.</comment>
-       <add>4.1</add>
+  </foreignKey>
+  <field>
+    <name>absolute_date</name>
+    <title>Fixed Date for Reminder</title>
+    <type>date</type>
+    <comment>Date on which the reminder be sent.</comment>
+    <add>4.1</add>
   </field>
   <field>
     <name>from_name</name>
+    <title>Reminder from Name</title>
     <type>varchar</type>
     <length>255</length>
     <comment>Name in "from" field</comment>
   </field>
   <field>
     <name>from_email</name>
+    <title>Reminder From Email</title>
     <type>varchar</type>
     <length>255</length>
     <comment>Email address in "from" field</comment>
   </field>
   <field>
     <name>sms_provider_id</name>
+    <title>SMS Provider</title>
     <type>int unsigned</type>
     <add>4.5</add>
     <html>
index 25cb447f232895887a8ee1c1d1944239afdf19e0..cc6af4895bc9b7af929c95d9f5942e4d76df1c4d 100644 (file)
@@ -8,43 +8,45 @@
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique Address ID</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Address ID</title>
+    <required>true</required>
+    <comment>Unique Address ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID</comment>
-      <add>2.0</add>
+    <name>contact_id</name>
+    <title>Contact ID</title>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID</comment>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>location_type_id</name>
-      <title>Address Location Type</title>
-      <type>int unsigned</type>
-      <comment>Which Location does this address belong to.</comment>
-      <add>2.0</add>
-      <pseudoconstant>
-        <table>civicrm_location_type</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>display_name</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>location_type_id</name>
+    <title>Address Location Type</title>
+    <type>int unsigned</type>
+    <comment>Which Location does this address belong to.</comment>
+    <add>2.0</add>
+    <pseudoconstant>
+      <table>civicrm_location_type</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>display_name</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <index>
     <name>index_location_type</name>
     <add>2.0</add>
   </index>
   <field>
-       <name>is_primary</name>
-       <title>Is Address Primary?</title>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the primary address.</comment>
-       <add>2.0</add>
+    <name>is_primary</name>
+    <title>Is Address Primary?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the primary address.</comment>
+    <add>2.0</add>
   </field>
   <index>
     <name>index_is_primary</name>
     <add>2.0</add>
   </index>
   <field>
-       <name>is_billing</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the billing address.</comment>
-       <add>2.0</add>
+    <name>is_billing</name>
+    <title>Is Billing Address</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the billing address.</comment>
+    <add>2.0</add>
   </field>
   <index>
     <name>index_is_billing</name>
     <add>2.0</add>
   </index>
   <field>
-       <name>street_address</name>
-       <title>Street Address</title>
-       <type>varchar</type>
-       <length>96</length>
-       <import>true</import>
-       <headerPattern>/(street|address)/i</headerPattern>
-       <dataPattern>/^(\d{1,5}( [0-9A-Za-z]+)+)$|^(P\.?O\.\? Box \d{1,5})$/i</dataPattern>
-       <comment>Concatenation of all routable street address components (prefix, street number, street name, suffix, unit number OR P.O. Box). Apps should be able to determine physical location with this data (for mapping, mail delivery, etc.).</comment>
-       <add>1.1</add>
+    <name>street_address</name>
+    <title>Street Address</title>
+    <type>varchar</type>
+    <length>96</length>
+    <import>true</import>
+    <headerPattern>/(street|address)/i</headerPattern>
+    <dataPattern>/^(\d{1,5}( [0-9A-Za-z]+)+)$|^(P\.?O\.\? Box \d{1,5})$/i</dataPattern>
+    <comment>Concatenation of all routable street address components (prefix, street number, street name, suffix, unit
+      number OR P.O. Box). Apps should be able to determine physical location with this data (for mapping, mail
+      delivery, etc.).
+    </comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>street_number</name>
-       <type>int</type>
-       <export>true</export>
-       <comment>Numeric portion of address number on the street, e.g. For 112A Main St, the street_number = 112.</comment>
-       <add>1.1</add>
+    <name>street_number</name>
+    <title>Street Number</title>
+    <type>int</type>
+    <export>true</export>
+    <comment>Numeric portion of address number on the street, e.g. For 112A Main St, the street_number = 112.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>street_number_suffix</name>
-       <type>varchar</type>
-       <length>8</length>
-       <export>true</export>
-       <comment>Non-numeric portion of address number on the street, e.g. For 112A Main St, the street_number_suffix = A</comment>
-       <add>1.1</add>
+    <name>street_number_suffix</name>
+    <title>Street Number Suffix</title>
+    <type>varchar</type>
+    <length>8</length>
+    <export>true</export>
+    <comment>Non-numeric portion of address number on the street, e.g. For 112A Main St, the street_number_suffix = A
+    </comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>street_number_predirectional</name>
-       <type>varchar</type>
-       <length>8</length>
-       <comment>Directional prefix, e.g. SE Main St, SE is the prefix.</comment>
-       <add>1.1</add>
+    <name>street_number_predirectional</name>
+    <title>Street Direction Prefix</title>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>Directional prefix, e.g. SE Main St, SE is the prefix.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>street_name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <export>true</export>
-       <comment>Actual street name, excluding St, Dr, Rd, Ave, e.g. For 112 Main St, the street_name = Main.</comment>
-       <add>1.1</add>
+    <name>street_name</name>
+    <type>varchar</type>
+    <title>Street Name</title>
+    <length>64</length>
+    <export>true</export>
+    <comment>Actual street name, excluding St, Dr, Rd, Ave, e.g. For 112 Main St, the street_name = Main.</comment>
+    <add>1.1</add>
   </field>
   <index>
-       <name>index_street_name</name>
-       <fieldName>street_name</fieldName>
-       <add>1.1</add>
+    <name>index_street_name</name>
+    <fieldName>street_name</fieldName>
+    <add>1.1</add>
   </index>
   <field>
-       <name>street_type</name>
-       <type>varchar</type>
-       <length>8</length>
-       <comment>St, Rd, Dr, etc.</comment>
-       <add>1.1</add>
+    <name>street_type</name>
+    <title>Street Type</title>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>St, Rd, Dr, etc.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>street_number_postdirectional</name>
-       <type>varchar</type>
-       <length>8</length>
-       <comment>Directional prefix, e.g. Main St S, S is the suffix.</comment>
-       <add>1.1</add>
+    <name>street_number_postdirectional</name>
+    <title>Street Direction Suffix</title>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>Directional prefix, e.g. Main St S, S is the suffix.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>street_unit</name>
-       <type>varchar</type>
-       <length>16</length>
-       <export>true</export>
-       <comment>Secondary unit designator, e.g. Apt 3 or Unit # 14, or Bldg 1200</comment>
-       <add>1.1</add>
+    <name>street_unit</name>
+    <title>Street Unit</title>
+    <type>varchar</type>
+    <length>16</length>
+    <export>true</export>
+    <comment>Secondary unit designator, e.g. Apt 3 or Unit # 14, or Bldg 1200</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>supplemental_address_1</name>
-       <title>Supplemental Address 1</title>
-       <type>varchar</type>
-       <length>96</length>
-       <import>true</import>
-       <headerPattern>/(supplemental(\s)?)?address(\s\d+)?/i</headerPattern>
-       <dataPattern>/unit|ap(ar)?t(ment)?\s(\d|\w)+/i</dataPattern>
-       <comment>Supplemental Address Information, Line 1</comment>
-       <add>1.1</add>
+    <name>supplemental_address_1</name>
+    <title>Supplemental Address 1</title>
+    <type>varchar</type>
+    <length>96</length>
+    <import>true</import>
+    <headerPattern>/(supplemental(\s)?)?address(\s\d+)?/i</headerPattern>
+    <dataPattern>/unit|ap(ar)?t(ment)?\s(\d|\w)+/i</dataPattern>
+    <comment>Supplemental Address Information, Line 1</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>supplemental_address_2</name>
-       <title>Supplemental Address 2</title>
-       <type>varchar</type>
-       <length>96</length>
-       <import>true</import>
-       <headerPattern>/(supplemental(\s)?)?address(\s\d+)?/i</headerPattern>
-       <dataPattern>/unit|ap(ar)?t(ment)?\s(\d|\w)+/i</dataPattern>
-       <comment>Supplemental Address Information, Line 2</comment>
-       <add>1.1</add>
+    <name>supplemental_address_2</name>
+    <title>Supplemental Address 2</title>
+    <type>varchar</type>
+    <length>96</length>
+    <import>true</import>
+    <headerPattern>/(supplemental(\s)?)?address(\s\d+)?/i</headerPattern>
+    <dataPattern>/unit|ap(ar)?t(ment)?\s(\d|\w)+/i</dataPattern>
+    <comment>Supplemental Address Information, Line 2</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>supplemental_address_3</name>
-       <type>varchar</type>
-       <length>96</length>
-       <comment>Supplemental Address Information, Line 3</comment>
-       <add>1.1</add>
+    <name>supplemental_address_3</name>
+    <title>Supplemental Address 3</title>
+    <type>varchar</type>
+    <length>96</length>
+    <comment>Supplemental Address Information, Line 3</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>city</name>
-       <title>City</title>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <headerPattern>/city/i</headerPattern>
-       <dataPattern>/^[A-Za-z]+(\.?)(\s?[A-Za-z]+){0,2}$/</dataPattern>
-       <comment>City, Town or Village Name.</comment>
-       <add>1.1</add>
+    <name>city</name>
+    <title>City</title>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <headerPattern>/city/i</headerPattern>
+    <dataPattern>/^[A-Za-z]+(\.?)(\s?[A-Za-z]+){0,2}$/</dataPattern>
+    <comment>City, Town or Village Name.</comment>
+    <add>1.1</add>
   </field>
   <index>
-       <name>index_city</name>
-       <fieldName>city</fieldName>
-       <add>1.1</add>
+    <name>index_city</name>
+    <fieldName>city</fieldName>
+    <add>1.1</add>
   </index>
   <field>
-      <name>county_id</name>
-      <type>int unsigned</type>
-      <comment>Which County does this address belong to.</comment>
-      <pseudoconstant>
-        <table>civicrm_county</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>1.1</add>
+    <name>county_id</name>
+    <type>int unsigned</type>
+    <title>County</title>
+    <comment>Which County does this address belong to.</comment>
+    <pseudoconstant>
+      <table>civicrm_county</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>county_id</name>
-       <table>civicrm_county</table>
-       <key>id</key>
-       <import>true</import>
-       <headerPattern>/county/i</headerPattern>
-       <dataPattern>/[A-Z]{2}/</dataPattern>
-       <add>1.1</add>
-       <onDelete>SET NULL</onDelete>
+    <name>county_id</name>
+    <table>civicrm_county</table>
+    <key>id</key>
+    <import>true</import>
+    <headerPattern>/county/i</headerPattern>
+    <dataPattern>/[A-Z]{2}/</dataPattern>
+    <add>1.1</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>state_province_id</name>
-      <title>State</title>
-      <type>int unsigned</type>
-      <comment>Which State_Province does this address belong to.</comment>
-      <pseudoconstant>
-        <table>civicrm_state_province</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>1.1</add>
+    <name>state_province_id</name>
+    <title>State</title>
+    <type>int unsigned</type>
+    <comment>Which State_Province does this address belong to.</comment>
+    <pseudoconstant>
+      <table>civicrm_state_province</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>state_province_id</name>
-       <table>civicrm_state_province</table>
-       <key>id</key>
-       <import>true</import>
-       <headerPattern>/state|prov(ince)?/i</headerPattern>
-       <dataPattern>/A[LKSZRAP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY]/i</dataPattern>
-       <add>1.1</add>
-       <onDelete>SET NULL</onDelete>
+    <name>state_province_id</name>
+    <table>civicrm_state_province</table>
+    <key>id</key>
+    <import>true</import>
+    <headerPattern>/state|prov(ince)?/i</headerPattern>
+    <dataPattern>
+      /A[LKSZRAP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY]/i
+    </dataPattern>
+    <add>1.1</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
- <field>
-       <name>postal_code_suffix</name>
-       <title>Postal Code Suffix</title>
-       <type>varchar</type>
-       <length>12</length>
-       <import>true</import>
-       <headerPattern>/p(ostal)\sc(ode)\ss(uffix)/i</headerPattern>
-       <dataPattern>/\d?\d{4}(-\d{4})?/</dataPattern>
-       <comment>Store the suffix, like the +4 part in the USPS system.</comment>
-       <add>1.1</add>
 <field>
+    <name>postal_code_suffix</name>
+    <title>Postal Code Suffix</title>
+    <type>varchar</type>
+    <length>12</length>
+    <import>true</import>
+    <headerPattern>/p(ostal)\sc(ode)\ss(uffix)/i</headerPattern>
+    <dataPattern>/\d?\d{4}(-\d{4})?/</dataPattern>
+    <comment>Store the suffix, like the +4 part in the USPS system.</comment>
+    <add>1.1</add>
   </field>
- <field>
-       <name>postal_code</name>
-       <title>Postal Code</title>
-       <type>varchar</type>
-       <length>12</length>
-       <import>true</import>
-       <headerPattern>/postal|zip/i</headerPattern>
-       <dataPattern>/\d?\d{4}(-\d{4})?/</dataPattern>
-       <comment>Store both US (zip5) AND international postal codes. App is responsible for country/region appropriate validation.</comment>
-       <add>1.1</add>
+  <field>
+    <name>postal_code</name>
+    <title>Postal Code</title>
+    <type>varchar</type>
+    <length>12</length>
+    <import>true</import>
+    <headerPattern>/postal|zip/i</headerPattern>
+    <dataPattern>/\d?\d{4}(-\d{4})?/</dataPattern>
+    <comment>Store both US (zip5) AND international postal codes. App is responsible for country/region appropriate
+      validation.
+    </comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>usps_adc</name>
-       <type>varchar</type>
-       <length>32</length>
-       <comment>USPS Bulk mailing code.</comment>
-       <add>1.1</add>
+    <name>usps_adc</name>
+    <title>USPS Code</title>
+    <type>varchar</type>
+    <length>32</length>
+    <comment>USPS Bulk mailing code.</comment>
+    <add>1.1</add>
   </field>
   <field>
-      <name>country_id</name>
-      <title>Country</title>
-      <type>int unsigned</type>
-      <comment>Which Country does this address belong to.</comment>
-      <pseudoconstant>
-        <table>civicrm_country</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>name</labelColumn>
-        <nameColumn>iso_code</nameColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>1.1</add>
+    <name>country_id</name>
+    <title>Country</title>
+    <type>int unsigned</type>
+    <comment>Which Country does this address belong to.</comment>
+    <pseudoconstant>
+      <table>civicrm_country</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+      <nameColumn>iso_code</nameColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>country_id</name>
-       <table>civicrm_country</table>
-       <key>id</key>
-       <import>true</import>
-       <headerPattern>/country/i</headerPattern>
-       <dataPattern>/\w+(\s\w+)?/</dataPattern>
-       <add>1.1</add>
-       <onDelete>SET NULL</onDelete>
+    <name>country_id</name>
+    <table>civicrm_country</table>
+    <key>id</key>
+    <import>true</import>
+    <headerPattern>/country/i</headerPattern>
+    <dataPattern>/\w+(\s\w+)?/</dataPattern>
+    <add>1.1</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-       <name>geo_code_1</name>
-       <type>float</type>
-       <import>true</import>
-       <headerPattern>/geo/i</headerPattern>
-       <comment>Latitude</comment>
-       <add>1.1</add>
+    <name>geo_code_1</name>
+    <title>Latitude</title>
+    <type>float</type>
+    <import>true</import>
+    <headerPattern>/geo/i</headerPattern>
+    <comment>Latitude</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>geo_code_2</name>
-       <type>float</type>
-       <comment>Longitude</comment>
-       <import>true</import>
-       <headerPattern>/geo/i</headerPattern>
-       <add>1.1</add>
+    <name>geo_code_2</name>
+    <title>Longitude</title>
+    <type>float</type>
+    <comment>Longitude</comment>
+    <import>true</import>
+    <headerPattern>/geo/i</headerPattern>
+    <add>1.1</add>
   </field>
   <field>
-       <name>manual_geo_code</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this a manually entered geo code</comment>
-       <add>4.3</add>
+    <name>manual_geo_code</name>
+    <title>Is manually geocoded</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this a manually entered geo code</comment>
+    <add>4.3</add>
   </field>
   <field>
-       <name>timezone</name>
-       <type>varchar</type>
-       <length>8</length>
-       <comment>Timezone expressed as a UTC offset - e.g. United States CST would be written as "UTC-6".</comment>
-       <add>1.1</add>
+    <name>timezone</name>
+    <title>Timezone</title>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>Timezone expressed as a UTC offset - e.g. United States CST would be written as "UTC-6".</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>name</name>
-       <uniqueName>address_name</uniqueName>
-       <title>Address Name</title>
-       <type>varchar</type>
-       <length>255</length>
-       <import>true</import>
-       <headerPattern>/^location|(l(ocation\s)?name)$/i</headerPattern>
-       <dataPattern>/^\w+$/</dataPattern>
-       <add>2.1</add>
+    <name>name</name>
+    <uniqueName>address_name</uniqueName>
+    <title>Address Name</title>
+    <type>varchar</type>
+    <length>255</length>
+    <import>true</import>
+    <headerPattern>/^location|(l(ocation\s)?name)$/i</headerPattern>
+    <dataPattern>/^\w+$/</dataPattern>
+    <add>2.1</add>
   </field>
   <field>
-      <name>master_id</name>
-      <title>Master Address Belongs To</title>
-      <type>int unsigned</type>
-      <import>true</import>
-      <comment>FK to Address ID</comment>
-      <add>3.3</add>
+    <name>master_id</name>
+    <title>Master Address Belongs To</title>
+    <type>int unsigned</type>
+    <import>true</import>
+    <comment>FK to Address ID</comment>
+    <add>3.3</add>
   </field>
   <foreignKey>
-       <name>master_id</name>
-       <table>civicrm_address</table>
-       <key>id</key>
-       <add>3.3</add>
-       <onDelete>SET NULL</onDelete>
+    <name>master_id</name>
+    <table>civicrm_address</table>
+    <key>id</key>
+    <add>3.3</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
 </table>
index 773665fcbce083dda02925ef0ff39fa4ab970ddb..6222cb262c8fb68f0107d1e5876fc0f813ffbd25 100644 (file)
@@ -6,21 +6,21 @@
   <name>civicrm_address_format</name>
   <add>3.2</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Address Format Id</comment>
-       <add>3.2</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Address Format Id</comment>
+    <add>3.2</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>format</name>
-       <title>Address Format</title>
-       <type>text</type>
-       <comment>The format of an address</comment>
-       <add>3.2</add>
+    <name>format</name>
+    <title>Address Format</title>
+    <type>text</type>
+    <comment>The format of an address</comment>
+    <add>3.2</add>
   </field>
 </table>
index 611070f5240eb10203ca5b2ab71661390f52ceb6..de80e3da7d8ed016149b04b84627b26b1cf72674 100644 (file)
@@ -7,29 +7,29 @@
   <comment>Table to cache items for civicrm components.</comment>
   <add>2.1</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>2.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>2.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>group_name</name>
-       <type>varchar</type>
-       <length>32</length>
-       <required>true</required>
-       <comment>group name for cache element, useful in cleaning cache elements</comment>
-       <add>2.1</add>
+    <name>group_name</name>
+    <type>varchar</type>
+    <length>32</length>
+    <required>true</required>
+    <comment>group name for cache element, useful in cleaning cache elements</comment>
+    <add>2.1</add>
   </field>
   <field>
-       <name>path</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Unique path name for cache element</comment>
-       <add>2.1</add>
+    <name>path</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Unique path name for cache element</comment>
+    <add>2.1</add>
   </field>
   <index>
     <name>UI_group_path</name>
     </html>
   </field>
   <foreignKey>
-       <name>component_id</name>
-       <table>civicrm_component</table>
-       <key>id</key>
-       <add>2.1</add>
+    <name>component_id</name>
+    <table>civicrm_component</table>
+    <key>id</key>
+    <add>2.1</add>
   </foreignKey>
   <field>
     <name>created_date</name>
index c773dbe5af1bcff67135e60c528b7fc2913305f1..0a9f7e13f28a6cf5eefb45077776fae2f6cb7670 100644 (file)
@@ -6,32 +6,33 @@
   <name>civicrm_component</name>
   <add>2.0</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Component ID</comment>
-       <add>2.0</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Component ID</comment>
+    <add>2.0</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <title>Component name</title>
-       <type>varchar</type>
-       <required>true</required>
-       <length>64</length>
-       <comment>Name of the component.</comment>
-       <add>2.0</add>
+    <name>name</name>
+    <title>Component name</title>
+    <type>varchar</type>
+    <required>true</required>
+    <length>64</length>
+    <comment>Name of the component.</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>namespace</name>
-       <title>Namespace reserved for component.</title>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>Path to components main directory in a form of a class
-namespace.</comment>
-       <add>2.0</add>
+    <name>namespace</name>
+    <title>Namespace reserved for component.</title>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>Path to components main directory in a form of a class
+      namespace.
+    </comment>
+    <add>2.0</add>
   </field>
 </table>
index 907405126bf4a6a367665c310aa2084440b18ada..bdfac28f1180775ea52a3656cc96e07aa9d504f0 100644 (file)
@@ -6,86 +6,94 @@
   <name>civicrm_country</name>
   <add>1.1</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Country Id</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <title>Country ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Country Id</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <title>Country</title>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <headerPattern>/country/i</headerPattern>
-       <dataPattern>/^[A-Z][a-z]+\.?(\s+[A-Z][a-z]+){0,3}$/</dataPattern>
-       <comment>Country Name</comment>
-       <add>1.1</add>
+    <name>name</name>
+    <title>Country</title>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <headerPattern>/country/i</headerPattern>
+    <dataPattern>/^[A-Z][a-z]+\.?(\s+[A-Z][a-z]+){0,3}$/</dataPattern>
+    <comment>Country Name</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>iso_code</name>
-       <type>char</type>
-       <length>2</length>
-       <comment>ISO Code</comment>
-       <add>1.1</add>
+    <name>iso_code</name>
+    <title>Country ISO Code</title>
+    <type>char</type>
+    <length>2</length>
+    <comment>ISO Code</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>country_code</name>
-       <type>varchar</type>
-       <length>4</length>
-       <comment>National prefix to be used when dialing TO this country.</comment>
-       <add>1.1</add>
+    <name>country_code</name>
+    <title>Country Phone Prefix</title>
+    <type>varchar</type>
+    <length>4</length>
+    <comment>National prefix to be used when dialing TO this country.</comment>
+    <add>1.1</add>
   </field>
   <field>
-      <name>address_format_id</name>
-      <type>int unsigned</type>
-      <comment>Foreign key to civicrm_address_format.id.</comment>
-       <add>3.2</add>
+    <name>address_format_id</name>
+    <title>Address Format</title>
+    <type>int unsigned</type>
+    <comment>Foreign key to civicrm_address_format.id.</comment>
+    <add>3.2</add>
   </field>
   <foreignKey>
-      <name>address_format_id</name>
-      <table>civicrm_address_format</table>
-      <key>id</key>
-      <add>3.2</add>
+    <name>address_format_id</name>
+    <table>civicrm_address_format</table>
+    <key>id</key>
+    <add>3.2</add>
   </foreignKey>
   <field>
-       <name>idd_prefix</name>
-       <type>varchar</type>
-       <length>4</length>
-       <comment>International direct dialing prefix from within the country TO another country</comment>
-       <add>1.1</add>
+    <name>idd_prefix</name>
+    <title>Outgoing Phone Prefix</title>
+    <type>varchar</type>
+    <length>4</length>
+    <comment>International direct dialing prefix from within the country TO another country</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>ndd_prefix</name>
-       <type>varchar</type>
-       <length>4</length>
-       <comment>Access prefix to call within a country to a different area</comment>
-       <add>1.1</add>
+    <name>ndd_prefix</name>
+    <title>Area Code</title>
+    <type>varchar</type>
+    <length>4</length>
+    <comment>Access prefix to call within a country to a different area</comment>
+    <add>1.1</add>
   </field>
   <field>
-      <name>region_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Foreign key to civicrm_worldregion.id.</comment>
-       <add>1.8</add>
+    <name>region_id</name>
+    <title>Region</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Foreign key to civicrm_worldregion.id.</comment>
+    <add>1.8</add>
   </field>
   <foreignKey>
-      <name>region_id</name>
-      <table>civicrm_worldregion</table>
-      <key>id</key>
-      <add>1.8</add>
+    <name>region_id</name>
+    <table>civicrm_worldregion</table>
+    <key>id</key>
+    <add>1.8</add>
   </foreignKey>
   <field>
-       <name>is_province_abbreviated</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Should state/province be displayed as abbreviation for contacts from this country?</comment>
-       <add>3.1</add>
+    <name>is_province_abbreviated</name>
+    <title>Abbreviate Province?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Should state/province be displayed as abbreviation for contacts from this country?</comment>
+    <add>3.1</add>
   </field>
   <index>
     <name>UI_name_iso_code</name>
index c1333e497f8a48518c223c9b535ecc470dc8843c..9b1fa5646662d185e1b488ac8a2364d2ad4e4d46 100644 (file)
@@ -6,47 +6,47 @@
   <name>civicrm_county</name>
   <add>1.1</add>
   <field>
-       <name>id</name>
-       <type>int unsigned</type>
-       <required>true</required>
-       <comment>County ID</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>County ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>false</autoincrement>
+    <name>id</name>
+    <autoincrement>false</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <title>County</title>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <headerPattern>/county/i</headerPattern>
-       <dataPattern>/[A-Z]{2}/</dataPattern>
-       <comment>Name of County</comment>
-       <add>1.1</add>
+    <name>name</name>
+    <title>County</title>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <headerPattern>/county/i</headerPattern>
+    <dataPattern>/[A-Z]{2}/</dataPattern>
+    <comment>Name of County</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>abbreviation</name>
-       <title>County Abbreviation</title>
-       <type>varchar</type>
-       <length>4</length>
-       <comment>2-4 Character Abbreviation of County</comment>
-       <add>1.1</add>
+    <name>abbreviation</name>
+    <title>County Abbreviation</title>
+    <type>varchar</type>
+    <length>4</length>
+    <comment>2-4 Character Abbreviation of County</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>state_province_id</name>
-       <type>int unsigned</type>
-       <required>true</required>
-       <comment>ID of State / Province that County belongs</comment>
-       <add>1.1</add>
+    <name>state_province_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>ID of State / Province that County belongs</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>state_province_id</name>
-       <table>civicrm_state_province</table>
-       <key>id</key>
-       <add>1.1</add>
+    <name>state_province_id</name>
+    <table>civicrm_state_province</table>
+    <key>id</key>
+    <add>1.1</add>
   </foreignKey>
   <index>
     <name>UI_name_state_id</name>
index 1064d58ffba94522a88dc855b6fcdd66142c9e4e..52b8d51756c73b261b844cfd7bdf334bedad7bbf 100644 (file)
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique Custom Field ID</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Custom Field ID</title>
+    <required>true</required>
+    <comment>Unique Custom Field ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>custom_group_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to civicrm_custom_group.</comment>
-      <add>1.1</add>
-      <pseudoconstant>
-        <table>civicrm_custom_group</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>title</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>custom_group_id</name>
+    <type>int unsigned</type>
+    <title>Custom Group</title>
+    <required>true</required>
+    <comment>FK to civicrm_custom_group.</comment>
+    <add>1.1</add>
+    <pseudoconstant>
+      <table>civicrm_custom_group</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>title</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>custom_group_id</name>
-       <table>civicrm_custom_group</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>custom_group_id</name>
+    <table>civicrm_custom_group</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-     <name>name</name>
-     <type>varchar</type>
-     <length>64</length>
-     <comment>Variable name/programmatic handle for this group.</comment>
-     <add>3.3</add>
+    <name>name</name>
+    <type>varchar</type>
+    <title>Custom Field Name</title>
+    <length>64</length>
+    <comment>Variable name/programmatic handle for this group.</comment>
+    <add>3.3</add>
   </field>
   <field>
-     <name>label</name>
-     <type>varchar</type>
-     <length>255</length>
-     <required>true</required>
-     <localizable>true</localizable>
-     <comment>Text for form field label (also friendly name for administering this custom property).</comment>
-     <add>1.1</add>
+    <name>label</name>
+    <type>varchar</type>
+    <title>Custom Field Label</title>
+    <length>255</length>
+    <required>true</required>
+    <localizable>true</localizable>
+    <comment>Text for form field label (also friendly name for administering this custom property).</comment>
+    <add>1.1</add>
   </field>
   <field>
-     <name>data_type</name>
-     <type>varchar</type>
-     <length>16</length>
-     <required>true</required>
-     <comment>Controls location of data storage in extended_data table.</comment>
-     <pseudoconstant>
-       <callback>CRM_Core_BAO_CustomField::dataType</callback>
-     </pseudoconstant>
-     <add>1.1</add>
-     <html>
-       <type>Select</type>
-     </html>
+    <name>data_type</name>
+    <type>varchar</type>
+    <title>Custom Field Data Type</title>
+    <length>16</length>
+    <required>true</required>
+    <comment>Controls location of data storage in extended_data table.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_BAO_CustomField::dataType</callback>
+    </pseudoconstant>
+    <add>1.1</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-     <name>html_type</name>
-     <type>varchar</type>
-     <length>32</length>
-     <required>true</required>
-     <comment>HTML types plus several built-in extended types.</comment>
-     <pseudoconstant>
-       <callback>CRM_Core_SelectValues::customHtmlType</callback>
-     </pseudoconstant>
-     <add>1.1</add>
+    <name>html_type</name>
+    <type>varchar</type>
+    <title>Custom Field HTMl Type</title>
+    <length>32</length>
+    <required>true</required>
+    <comment>HTML types plus several built-in extended types.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::customHtmlType</callback>
+    </pseudoconstant>
+    <add>1.1</add>
   </field>
   <field>
-     <name>default_value</name>
-     <type>varchar</type>
-     <length>255</length>
-     <comment>Use form_options.is_default for field_types which use options.</comment>
-       <add>1.1</add>
+    <name>default_value</name>
+    <type>varchar</type>
+    <title>Custom Field Default</title>
+    <length>255</length>
+    <comment>Use form_options.is_default for field_types which use options.</comment>
+    <add>1.1</add>
   </field>
   <field>
-     <name>is_required</name>
-     <type>boolean</type>
-     <comment>Is a value required for this property.</comment>
-       <add>1.1</add>
+    <name>is_required</name>
+    <title>Custom Field Is Required?</title>
+    <type>boolean</type>
+    <comment>Is a value required for this property.</comment>
+    <add>1.1</add>
   </field>
   <field>
-     <name>is_searchable</name>
-     <type>boolean</type>
-     <comment>Is this property searchable.</comment>
-       <add>1.1</add>
+    <name>is_searchable</name>
+    <title>Allow Searching on Field?</title>
+    <type>boolean</type>
+    <comment>Is this property searchable.</comment>
+    <add>1.1</add>
   </field>
   <field>
-     <name>is_search_range</name>
-     <type>boolean</type>
-     <comment>Is this property range searchable.</comment>
-       <add>1.4</add>
-     <default>0</default>
+    <name>is_search_range</name>
+    <type>boolean</type>
+    <title>Search as a Range</title>
+    <comment>Is this property range searchable.</comment>
+    <add>1.4</add>
+    <default>0</default>
   </field>
   <field>
-      <name>weight</name>
-      <type>int</type>
-      <required>true</required>
-      <default>1</default>
-      <comment>Controls field display order within an extended property group.</comment>
-       <add>1.1</add>
+    <name>weight</name>
+    <type>int</type>
+    <title>Custom Field Weight</title>
+    <required>true</required>
+    <default>1</default>
+    <comment>Controls field display order within an extended property group.</comment>
+    <add>1.1</add>
   </field>
   <field>
-     <name>help_pre</name>
-     <type>text</type>
-     <localizable>true</localizable>
-     <comment>Description and/or help text to display before this field.</comment>
-       <add>1.1</add>
+    <name>help_pre</name>
+    <type>text</type>
+    <title>Custom Field Pre Text</title>
+    <localizable>true</localizable>
+    <comment>Description and/or help text to display before this field.</comment>
+    <add>1.1</add>
   </field>
   <field>
-     <name>help_post</name>
-     <type>text</type>
-     <localizable>true</localizable>
-     <comment>Description and/or help text to display after this field.</comment>
-       <add>1.1</add>
+    <name>help_post</name>
+    <type>text</type>
+    <title>Custom Field Post Text</title>
+    <localizable>true</localizable>
+    <comment>Description and/or help text to display after this field.</comment>
+    <add>1.1</add>
   </field>
   <field>
-     <name>mask</name>
-     <type>varchar</type>
-     <length>64</length>
-     <comment>Optional format instructions for specific field types, like date types.</comment>
-       <add>1.1</add>
+    <name>mask</name>
+    <type>varchar</type>
+    <title>Custom Field Formatting</title>
+    <length>64</length>
+    <comment>Optional format instructions for specific field types, like date types.</comment>
+    <add>1.1</add>
   </field>
   <field>
-     <name>attributes</name>
-     <type>varchar</type>
-     <length>255</length>
-     <comment>Store collection of type-appropriate attributes, e.g. textarea  needs rows/cols attributes</comment>
-       <add>1.1</add>
+    <name>attributes</name>
+    <type>varchar</type>
+    <title>Custom Field Attributes</title>
+    <length>255</length>
+    <comment>Store collection of type-appropriate attributes, e.g. textarea  needs rows/cols attributes</comment>
+    <add>1.1</add>
   </field>
   <field>
-     <name>javascript</name>
-     <type>varchar</type>
-     <length>255</length>
-     <comment>Optional scripting attributes for field.</comment>
-       <add>1.1</add>
+    <name>javascript</name>
+    <type>varchar</type>
+    <title>Custom Field Javascript</title>
+    <length>255</length>
+    <comment>Optional scripting attributes for field.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this property active?</comment>
-       <add>1.1</add>
+    <name>is_active</name>
+    <type>boolean</type>
+    <title>Custom Field Is Active?</title>
+    <comment>Is this property active?</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_view</name>
-       <type>boolean</type>
-       <comment>Is this property set by PHP Code? A code field is viewable but not editable</comment>
-       <add>1.1</add>
+    <name>is_view</name>
+    <type>boolean</type>
+    <title>Field is Viewable</title>
+    <comment>Is this property set by PHP Code? A code field is viewable but not editable</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>options_per_line</name>
-       <type>int unsigned</type>
-       <comment>number of options per line for checkbox and radio</comment>
+    <name>options_per_line</name>
+    <type>int unsigned</type>
+    <title>Field Options Per Line</title>
+    <comment>number of options per line for checkbox and radio</comment>
   </field>
   <field>
-       <name>text_length</name>
-       <type>int unsigned</type>
-       <comment>field length if alphanumeric</comment>
-       <add>2.2</add>
+    <name>text_length</name>
+    <type>int unsigned</type>
+    <title>Field Length</title>
+    <comment>field length if alphanumeric</comment>
+    <add>2.2</add>
   </field>
   <field>
-       <name>start_date_years</name>
-       <type>int</type>
-       <comment>Date may be up to start_date_years years prior to the current date.</comment>
-       <add>1.4</add>
+    <name>start_date_years</name>
+    <type>int</type>
+    <title>Field Start Date</title>
+    <comment>Date may be up to start_date_years years prior to the current date.</comment>
+    <add>1.4</add>
   </field>
   <field>
-       <name>end_date_years</name>
-       <type>int</type>
-       <comment>Date may be up to end_date_years years after the current date.</comment>
-       <add>1.4</add>
+    <name>end_date_years</name>
+    <type>int</type>
+    <title>Field End Date</title>
+    <comment>Date may be up to end_date_years years after the current date.</comment>
+    <add>1.4</add>
   </field>
   <field>
-       <name>date_parts</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>which date part included in display </comment>
-       <add>1.4</add>
-       <drop>3.1</drop>
+    <name>date_parts</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>which date part included in display </comment>
+    <add>1.4</add>
+    <drop>3.1</drop>
   </field>
   <field>
-       <name>date_format</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>date format for custom date</comment>
-       <add>3.1</add>
+    <name>date_format</name>
+    <type>varchar</type>
+    <title>Field Data Format</title>
+    <length>64</length>
+    <comment>date format for custom date</comment>
+    <add>3.1</add>
   </field>
   <field>
-       <name>time_format</name>
-       <type>int unsigned</type>
-       <comment>time format for custom date</comment>
-       <add>3.1</add>
+    <name>time_format</name>
+    <type>int unsigned</type>
+    <title>Field Time Format</title>
+    <comment>time format for custom date</comment>
+    <add>3.1</add>
   </field>
   <field>
-       <name>note_columns</name>
-       <type>int unsigned</type>
-       <comment> Number of columns in Note Field </comment>
-       <add>1.4</add>
+    <name>note_columns</name>
+    <type>int unsigned</type>
+    <title>Field Note Columns</title>
+    <comment> Number of columns in Note Field </comment>
+    <add>1.4</add>
   </field>
   <field>
-       <name>note_rows</name>
-       <type>int unsigned</type>
-       <comment> Number of rows in Note Field </comment>
-       <add>1.4</add>
+    <name>note_rows</name>
+    <type>int unsigned</type>
+    <title>Field Note Rows</title>
+    <comment> Number of rows in Note Field </comment>
+    <add>1.4</add>
   </field>
   <field>
-     <name>column_name</name>
-     <type>varchar</type>
-     <length>255</length>
-     <comment>Name of the column that holds the values for this field.</comment>
-     <add>2.0</add>
+    <name>column_name</name>
+    <type>varchar</type>
+    <title>Field Column Name</title>
+    <length>255</length>
+    <comment>Name of the column that holds the values for this field.</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>option_group_id</name>
-       <type>int unsigned</type>
-       <comment>For elements with options, the option group id that is used</comment>
-       <add>1.4</add>
+    <name>option_group_id</name>
+    <type>int unsigned</type>
+    <title>Field Option Group</title>
+    <comment>For elements with options, the option group id that is used</comment>
+    <add>1.4</add>
   </field>
   <field>
-       <name>filter</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Stores Contact Get API params contact reference custom fields. May be used for other filters in the future.</comment>
-       <add>4.1</add>
+    <name>filter</name>
+    <type>varchar</type>
+    <title>Field Filter</title>
+    <length>255</length>
+    <comment>Stores Contact Get API params contact reference custom fields. May be used for other filters in the future.</comment>
+    <add>4.1</add>
   </field>
   <field>
     <name>in_selector</name>
     <type>boolean</type>
+    <title>Field Display</title>
     <default>0</default>
     <comment>Should the multi-record custom field values be displayed in tab table listing</comment>
     <add>4.5</add>
index 91ac025f22f6aee1e2a2d4961eb252a2a618f769..b0c4be0beee3b6f0d178e527fb799852cf5ed13d 100644 (file)
   <base>CRM/Core</base>
   <class>CustomGroup</class>
   <name>civicrm_custom_group</name>
-  <comment>All extended (custom) properties are associated with a group. These are logical sets of related data.</comment>
+  <comment>All extended (custom) properties are associated with a group. These are logical sets of related data.
+  </comment>
   <add>1.1</add>
   <log>true</log>
-    <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique Custom Group ID</comment>
-      <add>1.1</add>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Custom Group ID</title>
+    <required>true</required>
+    <comment>Unique Custom Group ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-     <name>name</name>
-     <type>varchar</type>
-     <length>64</length>
-     <comment>Variable name/programmatic handle for this group.</comment>
-     <add>1.1</add>
-  </field>
-  <field>
-     <name>title</name>
-     <type>varchar</type>
-     <length>64</length>
-     <required>true</required>
-     <localizable>true</localizable>
-     <comment>Friendly Name.</comment>
-     <add>1.1</add>
-  </field>
-  <field>
-     <name>extends</name>
-     <type>varchar</type>
-     <length>255</length>
-     <default>'Contact'</default>
-     <comment>Type of object this group extends (can add other options later e.g. contact_address, etc.).</comment>
-     <add>1.1</add>
-  </field>
-  <field>
-     <name>extends_entity_column_name</name>
-     <type>varchar</type>
-     <length>64</length>
-     <comment>linking custom group for dynamic object</comment>
-     <add>1.6</add>
-     <drop>2.2</drop>
-  </field>
-  <field>
-     <name>extends_entity_column_id</name>
-     <type>int unsigned</type>
-     <default>NULL</default>
-     <comment>FK to civicrm_option_value.id (for option group custom_data_type.)</comment>
-     <add>2.2</add>
-  </field>
-   <field>
-     <name>extends_entity_column_value</name>
-     <type>varchar</type>
-     <length>255</length>
-     <comment>linking custom group for dynamic object</comment>
-     <add>1.6</add>
-  </field>
-  <field>
-     <name>style</name>
-     <type>varchar</type>
-     <length>15</length>
-     <comment>Visual relationship between this form and its parent.</comment>
-     <pseudoconstant>
-       <callback>CRM_Core_SelectValues::customGroupStyle</callback>
-     </pseudoconstant>
-       <add>1.1</add>
-       <html>
-         <type>Select</type>
-       </html>
-  </field>
-  <field>
-     <name>collapse_display</name>
-     <type>int unsigned</type>
-     <default>0</default>
-     <comment>Will this group be in collapsed or expanded mode on initial display ?</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-     <name>help_pre</name>
-     <type>text</type>
-     <localizable>true</localizable>
-     <comment>Description and/or help text to display before fields in form.</comment>
-     <html>
-       <type>TextArea</type>
-       <rows>4</rows>
-       <cols>80</cols>
-     </html>
-     <add>1.1</add>
-  </field>
-  <field>
-     <name>help_post</name>
-     <type>text</type>
-     <localizable>true</localizable>
-     <comment>Description and/or help text to display after fields in form.</comment>
-     <html>
-       <type>TextArea</type>
-       <rows>4</rows>
-       <cols>80</cols>
-     </html>
-     <add>1.1</add>
-  </field>
-  <field>
-      <name>weight</name>
-      <type>int</type>
-      <required>true</required>
-      <default>1</default>
-      <comment>Controls display order when multiple extended property groups are setup for the same class.</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this property active?</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-     <name>table_name</name>
-     <type>varchar</type>
-     <length>255</length>
-     <comment>Name of the table that holds the values for this group.</comment>
-     <add>2.0</add>
-  </field>
-  <field>
-       <name>is_multiple</name>
-       <type>boolean</type>
-       <comment>Does this group hold multiple values?</comment>
-       <add>2.0</add>
-  </field>
-  <field>
-       <name>min_multiple</name>
-       <type>int unsigned</type>
-       <comment>minimum number of multiple records (typically 0?)</comment>
-       <add>2.2</add>
+    <name>name</name>
+    <type>varchar</type>
+    <title>Custom Group Name</title>
+    <length>64</length>
+    <comment>Variable name/programmatic handle for this group.</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>title</name>
+    <type>varchar</type>
+    <title>Custom Group Title</title>
+    <length>64</length>
+    <required>true</required>
+    <localizable>true</localizable>
+    <comment>Friendly Name.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>max_multiple</name>
-       <type>int unsigned</type>
-       <comment>maximum number of multiple records, if 0 - no max</comment>
-       <add>2.2</add>
-  </field>
+    <name>extends</name>
+    <type>varchar</type>
+    <title>Custom Group Extends</title>
+    <length>255</length>
+    <default>'Contact'</default>
+    <comment>Type of object this group extends (can add other options later e.g. contact_address, etc.).</comment>
+    <add>1.1</add>
+  </field>
   <field>
-     <name>collapse_adv_display</name>
-     <type>int unsigned</type>
-     <default>0</default>
-     <comment>Will this group be in collapsed or expanded mode on advanced search display ?</comment>
-       <add>3.0</add>
+    <name>extends_entity_column_name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>linking custom group for dynamic object</comment>
+    <add>1.6</add>
+    <drop>2.2</drop>
+  </field>
+  <field>
+    <name>extends_entity_column_id</name>
+    <type>int unsigned</type>
+    <title>Custom Group Subtype List</title>
+    <default>NULL</default>
+    <comment>FK to civicrm_option_value.id (for option group custom_data_type.)</comment>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>extends_entity_column_value</name>
+    <type>varchar</type>
+    <title>Custom Group Subtype</title>
+    <length>255</length>
+    <comment>linking custom group for dynamic object</comment>
+    <add>1.6</add>
+  </field>
+  <field>
+    <name>style</name>
+    <type>varchar</type>
+    <title>Custom Group Style</title>
+    <length>15</length>
+    <comment>Visual relationship between this form and its parent.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::customGroupStyle</callback>
+    </pseudoconstant>
+    <add>1.1</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>collapse_display</name>
+    <type>int unsigned</type>
+    <title>Collapse Custom Group?</title>
+    <default>0</default>
+    <comment>Will this group be in collapsed or expanded mode on initial display ?</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>help_pre</name>
+    <type>text</type>
+    <title>Custom Group Pre Text</title>
+    <localizable>true</localizable>
+    <comment>Description and/or help text to display before fields in form.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>4</rows>
+      <cols>80</cols>
+    </html>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>help_post</name>
+    <type>text</type>
+    <title>Custom Group Post Text</title>
+    <localizable>true</localizable>
+    <comment>Description and/or help text to display after fields in form.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>4</rows>
+      <cols>80</cols>
+    </html>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>weight</name>
+    <type>int</type>
+    <title>Custom Group Weight</title>
+    <required>true</required>
+    <default>1</default>
+    <comment>Controls display order when multiple extended property groups are setup for the same class.</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>is_active</name>
+    <type>boolean</type>
+    <title>Custom Group Is Active?</title>
+    <comment>Is this property active?</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>table_name</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Name of the table that holds the values for this group.</comment>
+    <add>2.0</add>
+  </field>
+  <field>
+    <name>is_multiple</name>
+    <type>boolean</type>
+    <title>Supports Multiple Records</title>
+    <comment>Does this group hold multiple values?</comment>
+    <add>2.0</add>
+  </field>
+  <field>
+    <name>min_multiple</name>
+    <type>int unsigned</type>
+    <title>Minimum Multiple Records</title>
+    <comment>minimum number of multiple records (typically 0?)</comment>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>max_multiple</name>
+    <type>int unsigned</type>
+    <title>Maximum Multiple Records</title>
+    <comment>maximum number of multiple records, if 0 - no max</comment>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>collapse_adv_display</name>
+    <type>int unsigned</type>
+    <title>Collapse Group Display</title>
+    <default>0</default>
+    <comment>Will this group be in collapsed or expanded mode on advanced search display ?</comment>
+    <add>3.0</add>
   </field>
   <index>
     <name>UI_title_extends</name>
   <field>
     <name>created_id</name>
     <type>int unsigned</type>
+    <title>Custom Group Created By</title>
     <comment>FK to civicrm_contact, who created this custom group</comment>
     <add>3.0</add>
   </field>
   <field>
     <name>is_reserved</name>
     <type>boolean</type>
+    <title>Reserved Group?</title>
     <default>0</default>
     <comment>Is this a reserved Custom Group?</comment>
     <add>4.4</add>
   </field>
 </table>
-
-
index a26178cdeab91aa44dc392254280fe52ee1e0c38..676549b25ceee35b4dd1e4150eadf664fdef2d5e 100644 (file)
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Core</base>
-    <class>Dashboard</class>
-    <name>civicrm_dashboard</name>
-    <comment>Table to store dashboard.</comment>
+  <base>CRM/Core</base>
+  <class>Dashboard</class>
+  <name>civicrm_dashboard</name>
+  <comment>Table to store dashboard.</comment>
+  <add>3.1</add>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>DashletID</title>
+    <required>true</required>
     <add>3.1</add>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <add>3.1</add>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>domain_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <pseudoconstant>
-            <table>civicrm_domain</table>
-            <keyColumn>id</keyColumn>
-            <labelColumn>name</labelColumn>
-        </pseudoconstant>
-        <comment>Domain for dashboard</comment>
-        <add>3.1</add>
-    </field>
-    <foreignKey>
-        <name>domain_id</name>
-        <table>civicrm_domain</table>
-        <key>id</key>
-        <add>3.1</add>
-    </foreignKey>
-    <field>
-      <name>name</name>
-      <type>varchar</type>
-      <title>Dashlet Name</title>
-      <length>64</length>
-      <comment>Internal name of dashlet.</comment>
-      <add>4.4</add>
-    </field>
-    <field>
-        <name>label</name>
-        <type>varchar</type>
-        <length>255</length>
-        <comment>dashlet title</comment>
-        <localizable>true</localizable>
-        <add>3.1</add>
-    </field>
-    <field>
-        <name>url</name>
-        <type>varchar</type>
-        <length>255</length>
-        <comment>url in case of external dashlet</comment>
-        <add>3.1</add>
-    </field>
-    <field>
-        <name>content</name>
-        <type>text</type>
-        <comment>dashlet content</comment>
-        <add>3.1</add>
-        <drop>3.3</drop>
-    </field>
-    <field>
-        <name>permission</name>
-        <type>varchar</type>
-        <length>255</length>
-        <comment>Permission for the dashlet</comment>
-        <add>3.1</add>
-    </field>
-    <field>
-        <name>permission_operator</name>
-        <type>varchar</type>
-        <length>3</length>
-        <comment>Permission Operator</comment>
-        <add>3.1</add>
-    </field>
-    <field>
-        <name>column_no</name>
-        <type>boolean</type>
-        <comment>column no for this dashlet</comment>
-        <default>0</default>
-        <add>3.1</add>
-    </field>
-    <field>
-        <name>is_minimized</name>
-        <type>boolean</type>
-        <comment>Is Minimized?</comment>
-        <default>0</default>
-        <add>3.1</add>
-    </field>
-    <field>
-        <name>fullscreen_url</name>
-        <type>varchar</type>
-        <length>255</length>
-        <comment>fullscreen url for dashlet</comment>
-        <add>3.4</add>
-    </field>
-    <field>
-        <name>is_fullscreen</name>
-        <type>boolean</type>
-        <comment>Is Fullscreen?</comment>
-        <default>1</default>
-        <add>3.1</add>
-    </field>
-    <field>
-        <name>is_active</name>
-        <type>boolean</type>
-        <comment>Is this dashlet active?</comment>
-        <default>0</default>
-        <add>3.1</add>
-    </field>
-    <field>
-        <name>is_reserved</name>
-        <type>boolean</type>
-        <comment>Is this dashlet reserved?</comment>
-        <default>0</default>
-        <add>3.1</add>
-    </field>
-    <field>
-        <name>weight</name>
-        <type>int</type>
-        <comment>Ordering of the dashlets.</comment>
-        <default>0</default>
-        <add>3.1</add>
-    </field>
-    <field>
-        <name>created_date</name>
-        <type>datetime</type>
-        <comment>When was content populated</comment>
-        <add>3.1</add>
-        <drop>3.3</drop>
-    </field>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>domain_id</name>
+    <type>int unsigned</type>
+    <title>Dashlet Domain</title>
+    <required>true</required>
+    <pseudoconstant>
+      <table>civicrm_domain</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <comment>Domain for dashboard</comment>
+    <add>3.1</add>
+  </field>
+  <foreignKey>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <add>3.1</add>
+  </foreignKey>
+  <field>
+    <name>name</name>
+    <type>varchar</type>
+    <title>Dashlet Name</title>
+    <length>64</length>
+    <comment>Internal name of dashlet.</comment>
+    <add>4.4</add>
+  </field>
+  <field>
+    <name>label</name>
+    <type>varchar</type>
+    <title>Dashlet Title</title>
+    <length>255</length>
+    <comment>dashlet title</comment>
+    <localizable>true</localizable>
+    <add>3.1</add>
+  </field>
+  <field>
+    <name>url</name>
+    <type>varchar</type>
+    <title>Dashlet URL</title>
+    <length>255</length>
+    <comment>url in case of external dashlet</comment>
+    <add>3.1</add>
+  </field>
+  <field>
+    <name>content</name>
+    <type>text</type>
+    <comment>dashlet content</comment>
+    <add>3.1</add>
+    <drop>3.3</drop>
+  </field>
+  <field>
+    <name>permission</name>
+    <type>varchar</type>
+    <title>Dashlet Permission</title>
+    <length>255</length>
+    <comment>Permission for the dashlet</comment>
+    <add>3.1</add>
+  </field>
+  <field>
+    <name>permission_operator</name>
+    <type>varchar</type>
+    <title>Dashlet Permission Operator</title>
+    <length>3</length>
+    <comment>Permission Operator</comment>
+    <add>3.1</add>
+  </field>
+  <field>
+    <name>column_no</name>
+    <type>boolean</type>
+    <title>Dashlet Column</title>
+    <comment>column no for this dashlet</comment>
+    <default>0</default>
+    <add>3.1</add>
+  </field>
+  <field>
+    <name>is_minimized</name>
+    <type>boolean</type>
+    <title>Minimize Dashlet?</title>
+    <comment>Is Minimized?</comment>
+    <default>0</default>
+    <add>3.1</add>
+  </field>
+  <field>
+    <name>fullscreen_url</name>
+    <type>varchar</type>
+    <title>Fullscreen URL</title>
+    <length>255</length>
+    <comment>fullscreen url for dashlet</comment>
+    <add>3.4</add>
+  </field>
+  <field>
+    <name>is_fullscreen</name>
+    <type>boolean</type>
+    <title>Is Fullscreen?</title>
+    <comment>Is Fullscreen?</comment>
+    <default>1</default>
+    <add>3.1</add>
+  </field>
+  <field>
+    <name>is_active</name>
+    <type>boolean</type>
+    <title>Is Dashlet Active?</title>
+    <comment>Is this dashlet active?</comment>
+    <default>0</default>
+    <add>3.1</add>
+  </field>
+  <field>
+    <name>is_reserved</name>
+    <type>boolean</type>
+    <title>Is Dashlet Reserved?</title>
+    <comment>Is this dashlet reserved?</comment>
+    <default>0</default>
+    <add>3.1</add>
+  </field>
+  <field>
+    <name>weight</name>
+    <type>int</type>
+    <title>Dashlet Weight</title>
+    <comment>Ordering of the dashlets.</comment>
+    <default>0</default>
+    <add>3.1</add>
+  </field>
+  <field>
+    <name>created_date</name>
+    <type>datetime</type>
+    <title>Dashlet Created Date</title>
+    <comment>When was content populated</comment>
+    <add>3.1</add>
+    <drop>3.3</drop>
+  </field>
 </table>
index 0c835ac6058373e3b354c4a9ea6ed74c638cbe64..d9ed287d56745a0e09e5a064fdb2d8cadc58e8d3 100644 (file)
@@ -8,6 +8,7 @@
   <add>1.1</add>
   <field>
     <name>id</name>
+    <title>Domain ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Domain ID</comment>
@@ -20,6 +21,7 @@
   <field>
     <name>name</name>
     <type>varchar</type>
+    <title>Domain Name</title>
     <length>64</length>
     <comment>Name of Domain / Organization</comment>
     <add>1.1</add>
@@ -27,6 +29,7 @@
   <field>
     <name>description</name>
     <type>varchar</type>
+    <title>Domain Description</title>
     <length>255</length>
     <comment>Description of Domain.</comment>
     <add>1.1</add>
@@ -80,6 +83,7 @@
   <field>
     <name>config_backend</name>
     <type>text</type>
+    <title>Domain Configuration</title>
     <comment>Backend configuration.</comment>
     <html>
       <type>TextArea</type>
@@ -91,6 +95,7 @@
   <field>
     <name>version</name>
     <type>varchar</type>
+    <title>CiviCRM Version</title>
     <length>32</length>
     <comment>The civicrm version this instance is running</comment>
     <add>2.0</add>
   <field>
     <name>contact_id</name>
     <type>int unsigned</type>
+    <title>Domain Contact</title>
     <comment>FK to Contact ID. This is specifically not an FK to avoid circular constraints</comment>
     <add>4.3</add>
   </field>
   <field>
     <name>locales</name>
     <type>text</type>
+    <title>Supported Languages</title>
     <comment>list of locales supported by the current db state (NULL for single-lang install)</comment>
     <add>2.1</add>
   </field>
   <field>
     <name>locale_custom_strings</name>
     <type>text</type>
+    <title>Language Customizations</title>
     <comment>Locale specific string overrides</comment>
     <html>
       <type>TextArea</type>
index df0340cab5ab0b87949cc22324dbb1df52d9ee96..a731fae3cc5ca5ee72a7ae7de52c08492a94dc4f 100644 (file)
@@ -8,43 +8,45 @@
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique Email ID</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <title>Email ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique Email ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID</comment>
-      <add>2.0</add>
+    <name>contact_id</name>
+    <title>Email Contact</title>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID</comment>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>location_type_id</name>
-      <title>Email Location Type</title>
-      <type>int unsigned</type>
-      <comment>Which Location does this email belong to.</comment>
-      <add>2.0</add>
-      <pseudoconstant>
-        <table>civicrm_location_type</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>display_name</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>location_type_id</name>
+    <title>Email Location Type</title>
+    <type>int unsigned</type>
+    <comment>Which Location does this email belong to.</comment>
+    <add>2.0</add>
+    <pseudoconstant>
+      <table>civicrm_location_type</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>display_name</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <index>
     <name>index_location_type</name>
     <add>2.0</add>
   </index>
   <field>
-       <name>email</name>
-       <type>varchar</type>
-       <length>254</length>
-       <html>
-         <type>Text</type>
-         <size>MEDIUM</size>
-       </html>
-       <import>true</import>
-       <headerPattern>/e.?mail/i</headerPattern>
-       <dataPattern>/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/</dataPattern>
-       <rule>email</rule>
-       <comment>Email address</comment>
-       <add>1.1</add>
+    <name>email</name>
+    <title>Email</title>
+    <type>varchar</type>
+    <length>254</length>
+    <html>
+      <type>Text</type>
+      <size>MEDIUM</size>
+    </html>
+    <import>true</import>
+    <headerPattern>/e.?mail/i</headerPattern>
+    <dataPattern>/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/</dataPattern>
+    <rule>email</rule>
+    <comment>Email address</comment>
+    <add>1.1</add>
   </field>
   <index>
-     <name>UI_email</name>
-     <fieldName>email</fieldName>
-     <add>1.5</add>
+    <name>UI_email</name>
+    <fieldName>email</fieldName>
+    <add>1.5</add>
   </index>
   <field>
-       <name>is_primary</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the primary email for this contact and location.</comment>
-       <add>1.1</add>
+    <name>is_primary</name>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the primary email for this contact and location.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_primary</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the primary?</comment>
-       <add>2.0</add>
+    <name>is_primary</name>
+    <title>Is Primary email</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the primary?</comment>
+    <add>2.0</add>
   </field>
   <index>
     <name>index_is_primary</name>
     <add>2.0</add>
   </index>
   <field>
-       <name>is_billing</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the billing?</comment>
-       <add>2.0</add>
+    <name>is_billing</name>
+    <title>Is Billing Email?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the billing?</comment>
+    <add>2.0</add>
   </field>
   <index>
     <name>index_is_billing</name>
index bfd82606011ce59cbf3ccdb3f3f556118f36bce1..373f230f6ea0ad0044653f91c1d7281cca3f73a7 100644 (file)
@@ -4,62 +4,62 @@
   <base>CRM/Core</base>
   <class>EntityFile</class>
   <name>civicrm_entity_file</name>
-  <comment>Attaches (joins)  uploaded files (images, documents, etc.) to entities (Contacts, Groups, Actions).</comment>
+  <comment>Attaches (joins) uploaded files (images, documents, etc.) to entities (Contacts, Groups, Actions).</comment>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>primary key</comment>
-       <add>1.5</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>primary key</comment>
+    <add>1.5</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>physical tablename for entity being joined to file, e.g. civicrm_contact</comment>
-       <add>1.5</add>
+    <name>entity_table</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>physical tablename for entity being joined to file, e.g. civicrm_contact</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>entity_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to entity table specified in entity_table column.</comment>
-      <add>1.5</add>
+    <name>entity_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to entity table specified in entity_table column.</comment>
+    <add>1.5</add>
   </field>
   <dynamicForeignKey>
-      <idColumn>entity_id</idColumn>
-      <typeColumn>entity_table</typeColumn>
-      <add>1.5</add>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>1.5</add>
   </dynamicForeignKey>
   <index>
-       <name>index_entity</name>
-       <fieldName>entity_table</fieldName>
-       <fieldName>entity_id</fieldName>
-       <add>1.5</add>
+    <name>index_entity</name>
+    <fieldName>entity_table</fieldName>
+    <fieldName>entity_id</fieldName>
+    <add>1.5</add>
   </index>
   <field>
-      <name>file_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to civicrm_file</comment>
-       <add>1.5</add>
+    <name>file_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to civicrm_file</comment>
+    <add>1.5</add>
   </field>
   <foreignKey>
-       <name>file_id</name>
-       <table>civicrm_file</table>
-       <key>id</key>
-       <add>1.5</add>
+    <name>file_id</name>
+    <table>civicrm_file</table>
+    <key>id</key>
+    <add>1.5</add>
   </foreignKey>
   <index>
-       <name>index_entity_file_id</name>
-       <fieldName>entity_table</fieldName>
-       <fieldName>entity_id</fieldName>
-       <fieldName>file_id</fieldName>
-       <add>1.1</add>
+    <name>index_entity_file_id</name>
+    <fieldName>entity_table</fieldName>
+    <fieldName>entity_id</fieldName>
+    <fieldName>file_id</fieldName>
+    <add>1.1</add>
   </index>
 </table>
index c40a2ebf041eab5e702a2e85690c50c2d1cc244e..f0c2b04d21df09aca3fd6f7a98d100d04e23390d 100644 (file)
@@ -7,83 +7,83 @@
   <comment>Tag entities (Contacts, Groups, Actions) to categories.</comment>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <title>Entity Tag ID</title>
-      <required>true</required>
-      <comment>primary key</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Entity Tag ID</title>
+    <required>true</required>
+    <comment>primary key</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to contact table.</comment>
-      <add>2.0</add>
-      <drop>3.2</drop>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to contact table.</comment>
+    <add>2.0</add>
+    <drop>3.2</drop>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>2.0</add>
-       <drop>3.2</drop>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>2.0</add>
+    <drop>3.2</drop>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <title>Entity Table</title>
-       <length>64</length>
-       <comment>physical tablename for entity being joined to file, e.g. civicrm_contact</comment>
-       <add>3.2</add>
+    <name>entity_table</name>
+    <type>varchar</type>
+    <title>Entity Table</title>
+    <length>64</length>
+    <comment>physical tablename for entity being joined to file, e.g. civicrm_contact</comment>
+    <add>3.2</add>
   </field>
   <field>
-      <name>entity_id</name>
-      <type>int unsigned</type>
-      <title>Entity ID</title>
-      <required>true</required>
-      <comment>FK to entity table specified in entity_table column.</comment>
-      <add>3.2</add>
+    <name>entity_id</name>
+    <type>int unsigned</type>
+    <title>Entity ID</title>
+    <required>true</required>
+    <comment>FK to entity table specified in entity_table column.</comment>
+    <add>3.2</add>
   </field>
   <dynamicForeignKey>
-      <idColumn>entity_id</idColumn>
-      <typeColumn>entity_table</typeColumn>
-      <add>3.2</add>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>3.2</add>
   </dynamicForeignKey>
   <index>
-       <name>index_entity</name>
-       <fieldName>entity_table</fieldName>
-       <fieldName>entity_id</fieldName>
-       <add>3.2</add>
-       <drop>3.4</drop>
+    <name>index_entity</name>
+    <fieldName>entity_table</fieldName>
+    <fieldName>entity_id</fieldName>
+    <add>3.2</add>
+    <drop>3.4</drop>
   </index>
   <field>
-      <name>tag_id</name>
-      <type>int unsigned</type>
-      <title>Tag ID</title>
-      <required>true</required>
-      <comment>FK to civicrm_tag</comment>
-      <add>1.1</add>
-      <pseudoconstant>
-        <table>civicrm_tag</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>tag_id</name>
+    <type>int unsigned</type>
+    <title>Tag ID</title>
+    <required>true</required>
+    <comment>FK to civicrm_tag</comment>
+    <add>1.1</add>
+    <pseudoconstant>
+      <table>civicrm_tag</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>tag_id</name>
-       <table>civicrm_tag</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>tag_id</name>
+    <table>civicrm_tag</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <index>
     <name>UI_entity_id_entity_table_tag_id</name>
index 573ae549f346b0edf60631c6341e8cf610032dbf..673b379291f161051af1c395ab1ce5f0bebe80b2 100644 (file)
@@ -9,6 +9,7 @@
   <field>
     <name>id</name>
     <type>int unsigned</type>
+    <title>Extension ID</title>
     <required>true</required>
     <comment>Local Extension ID</comment>
     <add>4.2</add>
@@ -92,6 +93,7 @@
   <field>
     <name>is_active</name>
     <type>boolean</type>
+    <title>Extension is Active?</title>
     <default>1</default>
     <comment>Is this extension active?</comment>
     <add>4.2</add>
index d8beb0ef5580c2fd8113510b2fa77dd028557df5..b11c3da0f600a0a7c6efc809550c96d75ff057c6 100644 (file)
@@ -8,53 +8,60 @@
   <add>1.5</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique ID</comment>
-      <add>1.5</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>File ID</title>
+    <required>true</required>
+    <comment>Unique ID</comment>
+    <add>1.5</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>file_type_id</name>
-      <type>int unsigned</type>
-      <comment>Type of file (e.g. Transcript, Income Tax Return, etc). FK to civicrm_option_value.</comment>
-      <add>1.5</add>
+    <name>file_type_id</name>
+    <type>int unsigned</type>
+    <title>File Type</title>
+    <comment>Type of file (e.g. Transcript, Income Tax Return, etc). FK to civicrm_option_value.</comment>
+    <add>1.5</add>
   </field>
   <field>
-     <name>mime_type</name>
-     <type>varchar</type>
-     <length>255</length>
-     <comment>mime type of the document</comment>
-     <add>1.5</add>
+    <name>mime_type</name>
+    <type>varchar</type>
+    <title>Mime Type</title>
+    <length>255</length>
+    <comment>mime type of the document</comment>
+    <add>1.5</add>
   </field>
   <field>
-     <name>uri</name>
-     <type>varchar</type>
-     <length>255</length>
-     <comment>uri of the file on disk</comment>
-     <add>1.5</add>
+    <name>uri</name>
+    <type>varchar</type>
+    <title>Path</title>
+    <length>255</length>
+    <comment>uri of the file on disk</comment>
+    <add>1.5</add>
   </field>
   <field>
-     <name>document</name>
-     <type>mediumblob</type>
-     <comment>contents of the document</comment>
-     <add>1.5</add>
+    <name>document</name>
+    <type>mediumblob</type>
+    <title>File Contents</title>
+    <comment>contents of the document</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>description</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Additional descriptive text regarding this attachment (optional).</comment>
-      <add>1.5</add>
+    <name>description</name>
+    <type>varchar</type>
+    <title>File Description</title>
+    <length>255</length>
+    <comment>Additional descriptive text regarding this attachment (optional).</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>upload_date</name>
-       <type>datetime</type>
-       <comment>Date and time that this attachment was uploaded or written to server.</comment>
-       <add>1.5</add>
+    <name>upload_date</name>
+    <type>datetime</type>
+    <title>File Upload Date</title>
+    <comment>Date and time that this attachment was uploaded or written to server.</comment>
+    <add>1.5</add>
   </field>
 </table>
index 036c9556fff3ac86ad49398564ed562d2aa2b3b3..0b2675395b985a0dbfd8c8e4253e661fca7668c5 100644 (file)
@@ -8,40 +8,42 @@
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique IM ID</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <title>Instant Messenger ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique IM ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID</comment>
-      <add>2.0</add>
+    <name>contact_id</name>
+    <title>IM Contact</title>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID</comment>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>location_type_id</name>
-      <title>IM Location Type</title>
-      <type>int unsigned</type>
-      <comment>Which Location does this email belong to.</comment>
-      <pseudoconstant>
-          <table>civicrm_location_type</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>display_name</labelColumn>
-      </pseudoconstant>
-       <add>2.0</add>
+    <name>location_type_id</name>
+    <title>IM Location Type</title>
+    <type>int unsigned</type>
+    <comment>Which Location does this email belong to.</comment>
+    <pseudoconstant>
+      <table>civicrm_location_type</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>display_name</labelColumn>
+    </pseudoconstant>
+    <add>2.0</add>
   </field>
   <index>
     <name>index_location_type</name>
     <add>2.0</add>
   </index>
   <field>
-       <name>name</name>
-       <title>IM Screen Name</title>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <headerPattern>/I(nstant )?M(ess.*)?|screen(\s+)?name/i</headerPattern>
-       <dataPattern>/^[A-Za-z][0-9A-Za-z]{20,}$/</dataPattern>
-       <comment>IM screen name</comment>
-       <add>1.1</add>
+    <name>name</name>
+    <title>IM Screen Name</title>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <headerPattern>/I(nstant )?M(ess.*)?|screen(\s+)?name/i</headerPattern>
+    <dataPattern>/^[A-Za-z][0-9A-Za-z]{20,}$/</dataPattern>
+    <comment>IM screen name</comment>
+    <add>1.1</add>
   </field>
   <field>
-      <name>provider_id</name>
-      <title>IM Provider</title>
-      <type>int unsigned</type>
-      <comment>Which IM Provider does this screen name belong to.</comment>
-      <add>1.1</add>
-      <pseudoconstant>
-        <optionGroupName>instant_messenger_service</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>provider_id</name>
+    <title>IM Provider</title>
+    <type>int unsigned</type>
+    <comment>Which IM Provider does this screen name belong to.</comment>
+    <add>1.1</add>
+    <pseudoconstant>
+      <optionGroupName>instant_messenger_service</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <index>
     <name>UI_provider_id</name>
     <add>1.6</add>
   </index>
   <field>
-       <name>is_primary</name>
-       <title>Is IM Primary?</title>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the primary IM for this contact and location.</comment>
-       <add>1.1</add>
+    <name>is_primary</name>
+    <title>Is IM Primary?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the primary IM for this contact and location.</comment>
+    <add>1.1</add>
   </field>
   <index>
     <name>index_is_primary</name>
     <add>2.0</add>
   </index>
   <field>
-       <name>is_billing</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the billing?</comment>
-       <add>2.0</add>
+    <name>is_billing</name>
+    <title>Is IM Billing?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the billing?</comment>
+    <add>2.0</add>
   </field>
   <index>
     <name>index_is_billing</name>
index a14a271d8d86c483e123acdd2cb75e93d706be69..b897731cbfb7aef32a262179fd9fca39fcc253d3 100644 (file)
   <add>4.1</add>
   <log>false</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Job Id</comment>
-       <add>4.1</add>
+    <name>id</name>
+    <title>Job ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Job Id</comment>
+    <add>4.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>domain_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <pseudoconstant>
-          <table>civicrm_domain</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <comment>Which Domain is this scheduled job for</comment>
-      <add>4.1</add>
+    <name>domain_id</name>
+    <title>Job Domain</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <pseudoconstant>
+      <table>civicrm_domain</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <comment>Which Domain is this scheduled job for</comment>
+    <add>4.1</add>
   </field>
   <foreignKey>
-       <name>domain_id</name>
-       <table>civicrm_domain</table>
-       <key>id</key>
-       <add>4.1</add>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <add>4.1</add>
   </foreignKey>
   <field>
-       <name>run_frequency</name>
-       <type>varchar</type>
-       <length>8</length>
-       <default>"Daily"</default>
-       <comment>Scheduled job run frequency.</comment>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::getJobFrequency</callback>
-       </pseudoconstant>
-       <add>4.1</add>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>run_frequency</name>
+    <title>Job Frequency</title>
+    <type>varchar</type>
+    <length>8</length>
+    <default>"Daily"</default>
+    <comment>Scheduled job run frequency.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::getJobFrequency</callback>
+    </pseudoconstant>
+    <add>4.1</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>last_run</name>
-       <type>datetime</type>
-       <default>NULL</default>
-       <comment>When was this cron entry last run</comment>
-       <add>4.1</add>
+    <name>last_run</name>
+    <type>datetime</type>
+    <default>NULL</default>
+    <comment>When was this cron entry last run</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Title of the job</comment>
-       <add>4.1</add>
+    <name>name</name>
+    <title>Job Name</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Title of the job</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>description</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Description of the job</comment>
-       <add>4.1</add>
+    <name>description</name>
+    <title>Job Description</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Description of the job</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>api_prefix</name>
-       <type>varchar</type>
-       <length>255</length>
-       <default>"civicrm_api3"</default>
-       <comment>Prefix of the job api call</comment>
-       <add>4.1</add>
-       <drop>4.3</drop>
+    <name>api_prefix</name>
+    <type>varchar</type>
+    <length>255</length>
+    <default>"civicrm_api3"</default>
+    <comment>Prefix of the job api call</comment>
+    <add>4.1</add>
+    <drop>4.3</drop>
   </field>
   <field>
-       <name>api_entity</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Entity of the job api call</comment>
-       <add>4.1</add>
+    <name>api_entity</name>
+    <title>API Entity</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Entity of the job api call</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>api_action</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Action of the job api call</comment>
-       <add>4.1</add>
+    <name>api_action</name>
+    <title>API Action</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Action of the job api call</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>parameters</name>
-       <type>text</type>
-       <comment>List of parameters to the command.</comment>
-       <html>
-         <type>TextArea</type>
-         <rows>4</rows>
-         <cols>60</cols>
-       </html>
-       <add>4.1</add>
+    <name>parameters</name>
+    <title>API Parameters</title>
+    <type>text</type>
+    <comment>List of parameters to the command.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>4</rows>
+      <cols>60</cols>
+    </html>
+    <add>4.1</add>
   </field>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this job active?</comment>
-       <add>4.1</add>
+    <name>is_active</name>
+    <title>Job Is Active?</title>
+    <type>boolean</type>
+    <comment>Is this job active?</comment>
+    <add>4.1</add>
   </field>
 </table>
index 4917b91c3fe64a0a945e1bf9fe07cbb72c4e26c7..b4383fa5d22eb305c46420181dd2d8a1859e3f32 100644 (file)
@@ -8,71 +8,71 @@
   <add>4.1</add>
   <log>false</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Job log entry Id</comment>
-       <add>4.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Job log entry Id</comment>
+    <add>4.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>domain_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <pseudoconstant>
-          <table>civicrm_domain</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <comment>Which Domain is this scheduled job for</comment>
-      <add>4.1</add>
+    <name>domain_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <pseudoconstant>
+      <table>civicrm_domain</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <comment>Which Domain is this scheduled job for</comment>
+    <add>4.1</add>
   </field>
   <foreignKey>
-       <name>domain_id</name>
-       <table>civicrm_domain</table>
-       <key>id</key>
-       <add>4.1</add>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <add>4.1</add>
   </foreignKey>
   <field>
-       <name>run_time</name>
-       <type>timestamp</type>
-       <comment>Log entry date</comment>
-       <add>4.1</add>
+    <name>run_time</name>
+    <type>timestamp</type>
+    <comment>Log entry date</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>job_id</name>
-       <type>int unsigned</type>
-       <comment>Pointer to job id - not a FK though, just for logging purposes</comment>
-       <add>4.1</add>
+    <name>job_id</name>
+    <type>int unsigned</type>
+    <comment>Pointer to job id - not a FK though, just for logging purposes</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Title of the job</comment>
-       <add>4.1</add>
+    <name>name</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Title of the job</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>command</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Full path to file containing job script</comment>
-       <add>4.1</add>
+    <name>command</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Full path to file containing job script</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>description</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Title line of log entry</comment>
-       <add>4.1</add>
+    <name>description</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Title line of log entry</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>data</name>
-       <type>text</type>
-       <comment>Potential extended data for specific job run (e.g. tracebacks).</comment>
-       <add>4.1</add>
+    <name>data</name>
+    <type>text</type>
+    <comment>Potential extended data for specific job run (e.g. tracebacks).</comment>
+    <add>4.1</add>
   </field>
 </table>
index 740875bd7123dcecf5e2f64bc64a2fa76a39062d..75a80185d50c969c0aea6c23ea711c5997811d0f 100644 (file)
   <add>2.0</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique ID</comment>
-      <add>2.0</add>
+    <name>id</name>
+    <title>Location Block ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique ID</comment>
+    <add>2.0</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>address_id</name>
-      <type>int unsigned</type>
-      <add>2.0</add>
+    <name>address_id</name>
+    <title>Location Block Address</title>
+    <type>int unsigned</type>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>address_id</name>
-       <table>civicrm_address</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>SET NULL</onDelete>
+    <name>address_id</name>
+    <table>civicrm_address</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>email_id</name>
-      <type>int unsigned</type>
-      <add>2.0</add>
+    <name>email_id</name>
+    <title>Location Block Email</title>
+    <type>int unsigned</type>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>email_id</name>
-       <table>civicrm_email</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>SET NULL</onDelete>
+    <name>email_id</name>
+    <table>civicrm_email</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>phone_id</name>
-      <type>int unsigned</type>
-      <add>2.0</add>
+    <name>phone_id</name>
+    <title>Location Block Phone</title>
+    <type>int unsigned</type>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>phone_id</name>
-       <table>civicrm_phone</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>SET NULL</onDelete>
+    <name>phone_id</name>
+    <table>civicrm_phone</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>im_id</name>
-      <type>int unsigned</type>
-      <add>2.0</add>
+    <name>im_id</name>
+    <title>Location Block IM</title>
+    <type>int unsigned</type>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>im_id</name>
-       <table>civicrm_im</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>SET NULL</onDelete>
+    <name>im_id</name>
+    <table>civicrm_im</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>address_2_id</name>
-      <type>int unsigned</type>
-      <add>2.0</add>
+    <name>address_2_id</name>
+    <title>Location Block IM 2</title>
+    <type>int unsigned</type>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>address_2_id</name>
-       <table>civicrm_address</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>SET NULL</onDelete>
+    <name>address_2_id</name>
+    <table>civicrm_address</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>email_2_id</name>
-      <type>int unsigned</type>
-      <add>2.0</add>
+    <name>email_2_id</name>
+    <type>int unsigned</type>
+    <title>Email 2</title>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>email_2_id</name>
-       <table>civicrm_email</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>SET NULL</onDelete>
+    <name>email_2_id</name>
+    <table>civicrm_email</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>phone_2_id</name>
-      <type>int unsigned</type>
-      <add>2.0</add>
+    <name>phone_2_id</name>
+    <type>int unsigned</type>
+    <title>Phone 2</title>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>phone_2_id</name>
-       <table>civicrm_phone</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>SET NULL</onDelete>
+    <name>phone_2_id</name>
+    <table>civicrm_phone</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>im_2_id</name>
-      <type>int unsigned</type>
-      <add>2.0</add>
+    <name>im_2_id</name>
+    <type>int unsigned</type>
+    <title>Instant Messenger 2</title>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>im_2_id</name>
-       <table>civicrm_im</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>SET NULL</onDelete>
+    <name>im_2_id</name>
+    <table>civicrm_im</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
 </table>
index d22454612bffab4862bd07d409216a7ac61f5124..83caa4802fc7b7f409cad23920f51913872055e7 100644 (file)
@@ -7,65 +7,69 @@
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Location Type ID</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <title>Location Type ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Location Type ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <title>Location Type</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Location Type Name.</comment>
-       <add>1.1</add>
+    <name>name</name>
+    <title>Location Type</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Location Type Name.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>display_name</name>
-       <title>Display Name</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Location Type Display Name.</comment>
-       <localizable>true</localizable>
-       <add>4.1</add>
+    <name>display_name</name>
+    <title>Display Name</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Location Type Display Name.</comment>
+    <localizable>true</localizable>
+    <add>4.1</add>
   </field>
   <field>
-       <name>vcard_name</name>
-       <title>vCard Location Type</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>vCard Location Type Name.</comment>
-       <add>1.1</add>
+    <name>vcard_name</name>
+    <title>vCard Location Type</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>vCard Location Type Name.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>description</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Location Type Description.</comment>
-       <add>1.1</add>
+    <name>description</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Location Type Description.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_reserved</name>
-       <type>boolean</type>
-       <comment>Is this location type a predefined system location?</comment>
-       <add>1.1</add>
+    <name>is_reserved</name>
+    <title>Location Type is Reserved?</title>
+    <type>boolean</type>
+    <comment>Is this location type a predefined system location?</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this property active?</comment>
-       <add>1.1</add>
+    <name>is_active</name>
+    <title>Location Type is Active?</title>
+    <type>boolean</type>
+    <comment>Is this property active?</comment>
+    <add>1.1</add>
   </field>
   <field>
-        <name>is_default</name>
-        <type>boolean</type>
-        <comment>Is this location type the default?</comment>
-       <add>1.1</add>
+    <name>is_default</name>
+    <title>Default Location Type?</title>
+    <type>boolean</type>
+    <comment>Is this location type the default?</comment>
+    <add>1.1</add>
   </field>
   <index>
     <name>UI_name</name>
index fccbe8ac37641d41e6a96defd1ef46ab3c1a05c9..ef6efc31f46461493b2b9bdfaae293ccb3b58569 100644 (file)
@@ -7,66 +7,66 @@
   <comment>Log can be linked to any object in the application.</comment>
   <add>1.5</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Log ID</comment>
-       <add>1.5</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Log ID</comment>
+    <add>1.5</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <length>64</length>
-       <required>true</required>
-       <comment>Name of table where item being referenced is stored.</comment>
-       <add>1.5</add>
+    <name>entity_table</name>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Name of table where item being referenced is stored.</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>entity_id</name>
-       <type>int unsigned</type>
-       <required>true</required>
-       <comment>Foreign key to the referenced item.</comment>
-       <add>1.5</add>
+    <name>entity_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Foreign key to the referenced item.</comment>
+    <add>1.5</add>
   </field>
   <dynamicForeignKey>
-       <idColumn>entity_id</idColumn>
-       <typeColumn>entity_table</typeColumn>
-       <add>1.5</add>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>1.5</add>
   </dynamicForeignKey>
   <index>
-       <name>index_entity</name>
-       <add>1.5</add>
-       <fieldName>entity_table</fieldName>
-       <fieldName>entity_id</fieldName>
-       <add>1.5</add>
+    <name>index_entity</name>
+    <add>1.5</add>
+    <fieldName>entity_table</fieldName>
+    <fieldName>entity_id</fieldName>
+    <add>1.5</add>
   </index>
   <field>
-      <name>data</name>
-       <type>text</type>
-       <comment>Updates does to this object if any.</comment>
-       <add>1.5</add>
+    <name>data</name>
+    <type>text</type>
+    <comment>Updates does to this object if any.</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>modified_id</name>
-       <type>int unsigned</type>
-       <comment>FK to Contact ID of person under whose credentials this data modification was made.</comment>
-       <add>1.5</add>
+    <name>modified_id</name>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID of person under whose credentials this data modification was made.</comment>
+    <add>1.5</add>
   </field>
   <foreignKey>
-       <name>modified_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.5</add>
-       <onDelete>CASCADE</onDelete>
+    <name>modified_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.5</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-       <name>modified_date</name>
-       <type>datetime</type>
-       <comment>When was the referenced entity created or modified or deleted.</comment>
-       <add>1.5</add>
+    <name>modified_date</name>
+    <type>datetime</type>
+    <comment>When was the referenced entity created or modified or deleted.</comment>
+    <add>1.5</add>
   </field>
 </table>
index f887cfbc9ed5b875eb9123eb39a2201e754c1ba2..03e5ca10b0179cdf12254d2bcb3ce863ff6bc8a8 100644 (file)
@@ -6,6 +6,7 @@
   <add>2.2</add>
   <field>
     <name>id</name>
+    <title>Mail Settings ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>primary key</comment>
     <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>domain_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <pseudoconstant>
-          <table>civicrm_domain</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <comment>Which Domain is this match entry for</comment>
-      <add>3.1</add>
+    <name>domain_id</name>
+    <title>Mail Settings Domain</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <pseudoconstant>
+      <table>civicrm_domain</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <comment>Which Domain is this match entry for</comment>
+    <add>3.1</add>
   </field>
   <foreignKey>
-       <name>domain_id</name>
-       <table>civicrm_domain</table>
-       <key>id</key>
-       <add>4.5</add>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <add>4.5</add>
   </foreignKey>
   <field>
     <name>name</name>
+    <title>Mail Settings Name</title>
     <type>varchar</type>
     <length>255</length>
     <comment>name of this group of settings</comment>
   </field>
   <field>
     <name>is_default</name>
+    <title>Is Default Mail Settings?</title>
     <type>boolean</type>
     <comment>whether this is the default set of settings for this domain</comment>
     <add>2.2</add>
   </field>
   <field>
     <name>domain</name>
+    <title>email Domain</title>
     <type>varchar</type>
     <length>255</length>
     <comment>email address domain (the part after @)</comment>
@@ -55,6 +60,7 @@
   </field>
   <field>
     <name>localpart</name>
+    <title>email Local Part</title>
     <type>varchar</type>
     <length>255</length>
     <comment>optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)</comment>
@@ -62,6 +68,7 @@
   </field>
   <field>
     <name>return_path</name>
+    <title>Return Path</title>
     <type>varchar</type>
     <length>255</length>
     <comment>contents of the Return-Path header</comment>
@@ -69,6 +76,7 @@
   </field>
   <field>
     <name>protocol</name>
+    <title>Protocol</title>
     <type>varchar</type>
     <length>255</length>
     <comment>name of the protocol to use for polling (like IMAP, POP3 or Maildir)</comment>
@@ -82,6 +90,7 @@
   </field>
   <field>
     <name>server</name>
+    <title>Mail Server</title>
     <type>varchar</type>
     <length>255</length>
     <comment>server to use when polling</comment>
   </field>
   <field>
     <name>port</name>
+    <title>Mail Port</title>
     <type>int unsigned</type>
     <comment>port to use when polling</comment>
     <add>2.2</add>
   </field>
   <field>
     <name>username</name>
+    <title>Mail Account Username</title>
     <type>varchar</type>
     <length>255</length>
     <comment>username to use when polling</comment>
   </field>
   <field>
     <name>password</name>
+    <title>Mail Account Password</title>
     <type>varchar</type>
     <length>255</length>
     <comment>password to use when polling</comment>
   </field>
   <field>
     <name>is_ssl</name>
+    <title>Mail Account Uses SSL</title>
     <type>boolean</type>
     <comment>whether to use SSL or not</comment>
     <add>2.2</add>
   </field>
   <field>
     <name>source</name>
+    <title>Mail Folder</title>
     <type>varchar</type>
     <length>255</length>
     <comment>folder to poll from when using IMAP, path to poll from when using Maildir, etc.</comment>
index 9d25fca1132f644ffe2054f8f6662f80379781f1..692f6b4534adc131d0cd8685565278601c7347fa 100644 (file)
@@ -7,54 +7,56 @@
   <comment>Store field mappings in import or export for reuse</comment>
   <add>1.2</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Mapping ID</comment>
-      <add>1.2</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Mapping ID</comment>
+    <add>1.2</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
-      <add>1.2</add>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+    <add>1.2</add>
   </primaryKey>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Name of Mapping</comment>
-      <add>1.2</add>
+    <name>name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Name of Mapping</comment>
+    <add>1.2</add>
   </field>
   <field>
-       <name>description</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Description of Mapping.</comment>
-      <add>1.2</add>
+    <name>description</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Description of Mapping.</comment>
+    <add>1.2</add>
   </field>
   <field>
-       <name>mapping_type</name>
-       <type>enum</type>
-       <values>Export, Import, Export Contributions, Import Contributions, Import Activity, Search Builder, Import Memberships, Import Participants</values>
-       <comment>Type of Mapping.</comment>
-      <add>1.2</add>
-      <drop>2.1</drop>
+    <name>mapping_type</name>
+    <type>enum</type>
+    <values>Export, Import, Export Contributions, Import Contributions, Import Activity, Search Builder, Import
+      Memberships, Import Participants
+    </values>
+    <comment>Type of Mapping.</comment>
+    <add>1.2</add>
+    <drop>2.1</drop>
   </field>
   <field>
-      <name>mapping_type_id</name>
-      <type>int unsigned</type>
-      <comment>Mapping Type</comment>
-      <add>2.1</add>
-      <pseudoconstant>
-        <optionGroupName>mapping_type</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>mapping_type_id</name>
+    <type>int unsigned</type>
+    <comment>Mapping Type</comment>
+    <add>2.1</add>
+    <pseudoconstant>
+      <optionGroupName>mapping_type</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <index>
     <name>UI_name</name>
     <fieldName>name</fieldName>
-      <add>1.2</add>
+    <add>1.2</add>
   </index>
 </table>
index 5c136763ee69faa0be686b179cb2689b25dde646..1f1eb51d5ba25cbd05750843e00cc1dbdff2e69d 100644 (file)
   <comment>Individual field mappings for Mapping</comment>
   <add>1.2</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Mapping Field ID</comment>
-      <add>1.2</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Mapping Field ID</comment>
+    <add>1.2</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
-      <add>1.2</add>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+    <add>1.2</add>
   </primaryKey>
   <field>
-        <name>mapping_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>Mapping to which this field belongs</comment>
-      <add>1.2</add>
+    <name>mapping_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Mapping to which this field belongs</comment>
+    <add>1.2</add>
   </field>
   <foreignKey>
-        <name>mapping_id</name>
-        <table>civicrm_mapping</table>
-        <key>id</key>
-      <add>1.2</add>
+    <name>mapping_id</name>
+    <table>civicrm_mapping</table>
+    <key>id</key>
+    <add>1.2</add>
   </foreignKey>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Mapping field key</comment>
-      <add>1.2</add>
+    <name>name</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Mapping field key</comment>
+    <add>1.2</add>
   </field>
   <field>
-       <name>contact_type</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Contact Type in mapping</comment>
-       <pseudoconstant>
-         <table>civicrm_contact_type</table>
-         <keyColumn>name</keyColumn>
-         <labelColumn>label</labelColumn>
-       </pseudoconstant>
-       <html>
-         <type>Select</type>
-       </html>
-      <add>1.2</add>
+    <name>contact_type</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Contact Type in mapping</comment>
+    <pseudoconstant>
+      <table>civicrm_contact_type</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>label</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>1.2</add>
   </field>
   <field>
-        <name>column_number</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>Column number for mapping set</comment>
-      <add>1.2</add>
+    <name>column_number</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Column number for mapping set</comment>
+    <add>1.2</add>
   </field>
   <field>
-       <name>location_type_id</name>
-       <type>int unsigned</type>
-       <comment>Location type of this mapping, if required</comment>
-      <add>1.2</add>
+    <name>location_type_id</name>
+    <type>int unsigned</type>
+    <comment>Location type of this mapping, if required</comment>
+    <add>1.2</add>
   </field>
   <foreignKey>
-       <name>location_type_id</name>
-       <table>civicrm_location_type</table>
-       <key>id</key>
-      <add>1.2</add>
+    <name>location_type_id</name>
+    <table>civicrm_location_type</table>
+    <key>id</key>
+    <add>1.2</add>
   </foreignKey>
   <field>
-       <name>phone_type</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Phone type, if required</comment>
-      <add>1.2</add>
-      <drop>2.2</drop>
+    <name>phone_type</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Phone type, if required</comment>
+    <add>1.2</add>
+    <drop>2.2</drop>
   </field>
   <field>
-       <name>phone_type_id</name>
-       <type>int unsigned</type>
-       <comment>Which type of phone does this number belongs.</comment>
-       <add>2.2</add>
+    <name>phone_type_id</name>
+    <type>int unsigned</type>
+    <comment>Which type of phone does this number belongs.</comment>
+    <add>2.2</add>
   </field>
-   <field>
-      <name>im_provider_id</name>
-      <type>int unsigned</type>
-      <comment>Which type of IM Provider does this name belong.</comment>
-      <add>3.0</add>
-      <pseudoconstant>
-        <optionGroupName>instant_messenger_service</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+  <field>
+    <name>im_provider_id</name>
+    <type>int unsigned</type>
+    <comment>Which type of IM Provider does this name belong.</comment>
+    <add>3.0</add>
+    <pseudoconstant>
+      <optionGroupName>instant_messenger_service</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>website_type_id</name>
-       <type>int unsigned</type>
-       <comment>Which type of website does this site belong</comment>
-       <add>3.2</add>
-       <pseudoconstant>
-         <optionGroupName>website_type</optionGroupName>
-       </pseudoconstant>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>website_type_id</name>
+    <type>int unsigned</type>
+    <comment>Which type of website does this site belong</comment>
+    <add>3.2</add>
+    <pseudoconstant>
+      <optionGroupName>website_type</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>relationship_type_id</name>
-       <type>int unsigned</type>
-       <comment>Relationship type, if required</comment>
-      <add>1.2</add>
+    <name>relationship_type_id</name>
+    <type>int unsigned</type>
+    <comment>Relationship type, if required</comment>
+    <add>1.2</add>
   </field>
   <foreignKey>
-       <name>relationship_type_id</name>
-       <table>civicrm_relationship_type</table>
-       <key>id</key>
-      <add>1.2</add>
+    <name>relationship_type_id</name>
+    <table>civicrm_relationship_type</table>
+    <key>id</key>
+    <add>1.2</add>
   </foreignKey>
   <field>
-      <name>relationship_direction</name>
-      <type>varchar</type>
-      <length>6</length>
-      <add>1.7</add>
+    <name>relationship_direction</name>
+    <type>varchar</type>
+    <length>6</length>
+    <add>1.7</add>
   </field>
   <field>
-        <name>grouping</name>
-        <type>int unsigned</type>
-        <default>1</default>
-        <comment>Used to group mapping_field records into related sets (e.g. for criteria sets in search builder mappings).</comment>
-      <add>1.5</add>
+    <name>grouping</name>
+    <type>int unsigned</type>
+    <default>1</default>
+    <comment>Used to group mapping_field records into related sets (e.g. for criteria sets in search builder
+      mappings).
+    </comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>operator</name>
-       <type>varchar</type>
-       <length>16</length>
-       <type>enum</type>
-       <comment>SQL WHERE operator for search-builder mapping fields (search criteria).</comment>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::getSearchBuilderOperators</callback>
-       </pseudoconstant>
-      <add>1.5</add>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>operator</name>
+    <type>varchar</type>
+    <length>16</length>
+    <type>enum</type>
+    <comment>SQL WHERE operator for search-builder mapping fields (search criteria).</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::getSearchBuilderOperators</callback>
+    </pseudoconstant>
+    <add>1.5</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>value</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>SQL WHERE value for search-builder mapping fields.</comment>
-      <add>1.5</add>
+    <name>value</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>SQL WHERE value for search-builder mapping fields.</comment>
+    <add>1.5</add>
   </field>
 </table>
index 3f983d4ab87606631ec0d4b283dee03320e7afbf..a3adb4adc2fbdbe4f1c083098796e3479b1e124e 100644 (file)
@@ -7,39 +7,39 @@
   <comment>Table to store menu items for all civicrm components.</comment>
   <add>1.1</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>2.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>2.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>domain_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <pseudoconstant>
-          <table>civicrm_domain</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <comment>Which Domain is this menu item for</comment>
-      <add>3.0</add>
+    <name>domain_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <pseudoconstant>
+      <table>civicrm_domain</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <comment>Which Domain is this menu item for</comment>
+    <add>3.0</add>
   </field>
   <foreignKey>
-       <name>domain_id</name>
-       <table>civicrm_domain</table>
-       <key>id</key>
-       <add>3.0</add>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <add>3.0</add>
   </foreignKey>
   <field>
-       <name>path</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Path Name</comment>
-       <add>2.1</add>
+    <name>path</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Path Name</comment>
+    <add>2.1</add>
   </field>
   <index>
     <name>UI_path_domain_id</name>
     <add>2.1</add>
   </field>
   <field>
-       <name>title</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Menu Title</comment>
-       <add>2.1</add>
+    <name>title</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Menu Title</comment>
+    <add>2.1</add>
   </field>
   <field>
     <name>access_callback</name>
     </html>
   </field>
   <foreignKey>
-       <name>component_id</name>
-       <table>civicrm_component</table>
-       <key>id</key>
-       <add>2.1</add>
+    <name>component_id</name>
+    <table>civicrm_component</table>
+    <key>id</key>
+    <add>2.1</add>
   </foreignKey>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this menu item active?</comment>
-       <add>2.1</add>
+    <name>is_active</name>
+    <type>boolean</type>
+    <comment>Is this menu item active?</comment>
+    <add>2.1</add>
   </field>
   <field>
-       <name>is_public</name>
-       <type>boolean</type>
-       <comment>Is this menu accessible to the public?</comment>
-       <add>2.1</add>
+    <name>is_public</name>
+    <type>boolean</type>
+    <comment>Is this menu accessible to the public?</comment>
+    <add>2.1</add>
   </field>
   <field>
-       <name>is_exposed</name>
-       <type>boolean</type>
-       <comment>Is this menu exposed to the navigation system?</comment>
-       <add>2.1</add>
+    <name>is_exposed</name>
+    <type>boolean</type>
+    <comment>Is this menu exposed to the navigation system?</comment>
+    <add>2.1</add>
   </field>
   <field>
-       <name>is_ssl</name>
-       <type>boolean</type>
-       <comment>Should this menu be exposed via SSL if enabled?</comment>
-       <add>2.1</add>
+    <name>is_ssl</name>
+    <type>boolean</type>
+    <comment>Should this menu be exposed via SSL if enabled?</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>weight</name>
-      <type>int</type>
-      <required>true</required>
-      <default>1</default>
-      <comment>Ordering of the menu items in various blocks.</comment>
-      <add>2.1</add>
+    <name>weight</name>
+    <type>int</type>
+    <required>true</required>
+    <default>1</default>
+    <comment>Ordering of the menu items in various blocks.</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>type</name>
-      <type>int</type>
-      <required>true</required>
-      <default>1</default>
-      <comment>Drupal menu type.</comment>
-      <add>2.1</add>
+    <name>type</name>
+    <type>int</type>
+    <required>true</required>
+    <default>1</default>
+    <comment>Drupal menu type.</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>page_type</name>
-      <type>int</type>
-      <required>true</required>
-      <default>1</default>
-      <comment>CiviCRM menu type.</comment>
-      <add>2.1</add>
+    <name>page_type</name>
+    <type>int</type>
+    <required>true</required>
+    <default>1</default>
+    <comment>CiviCRM menu type.</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>skipBreadcrumb</name>
-      <type>boolean</type>
-      <comment>skip this url being exposed to breadcrumb</comment>
-      <add>2.2</add>
+    <name>skipBreadcrumb</name>
+    <type>boolean</type>
+    <comment>skip this url being exposed to breadcrumb</comment>
+    <add>2.2</add>
   </field>
 </table>
index d83bcbc3d7913fa07f331465507c43517778aaf4..bfc64f8740520e8bd33bcac7b70869d457d238e0 100644 (file)
@@ -7,87 +7,96 @@
   <comment>Users will need a way to save and retrieve templates with tokens for use in recurring email communication tasks</comment>
   <add>1.6</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Message Template ID</comment>
-      <add>1.6</add>
+    <name>id</name>
+    <title>Message Template ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Message Template ID</comment>
+    <add>1.6</add>
   </field>
   <primaryKey>
-      <name>id</name>
-      <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>msg_title</name>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>Descriptive title of message</comment>
-      <add>1.6</add>
+    <name>msg_title</name>
+    <title>Message Template Title</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Descriptive title of message</comment>
+    <add>1.6</add>
   </field>
   <field>
-      <name>msg_subject</name>
-      <type>text</type>
-      <comment>Subject for email message.</comment>
-      <add>1.6</add>
-      <!-- type changed from VARCHAR(255) to TEXT in 3.1 -->
+    <name>msg_subject</name>
+    <title>Message Template Subject</title>
+    <type>text</type>
+    <comment>Subject for email message.</comment>
+    <add>1.6</add>
+    <!-- type changed from VARCHAR(255) to TEXT in 3.1 -->
   </field>
   <field>
-      <name>msg_text</name>
-      <type>longtext</type>
-      <html>
-          <type>TextArea</type>
-          <rows>10</rows>
-          <cols>75</cols>
-      </html>
-      <comment>Text formatted message</comment>
-      <add>1.6</add>
-      <!-- type changed from TEXT to LONGTEXT in 4.3 -->
+    <name>msg_text</name>
+    <title>Message Template Text</title>
+    <type>longtext</type>
+    <html>
+      <type>TextArea</type>
+      <rows>10</rows>
+      <cols>75</cols>
+    </html>
+    <comment>Text formatted message</comment>
+    <add>1.6</add>
+    <!-- type changed from TEXT to LONGTEXT in 4.3 -->
   </field>
   <field>
-      <name>msg_html</name>
-      <type>longtext</type>
-      <html>
-          <type>RichTextEditor</type>
-          <rows>10</rows>
-          <cols>75</cols>
-      </html>
-      <comment>HTML formatted message</comment>
-      <add>1.6</add>
-      <!-- type changed from TEXT to LONGTEXT in 4.3 -->
+    <name>msg_html</name>
+    <title>Message Template HTML</title>
+    <type>longtext</type>
+    <html>
+      <type>RichTextEditor</type>
+      <rows>10</rows>
+      <cols>75</cols>
+    </html>
+    <comment>HTML formatted message</comment>
+    <add>1.6</add>
+    <!-- type changed from TEXT to LONGTEXT in 4.3 -->
   </field>
   <field>
-      <name>is_active</name>
-      <title>Is Active</title>
-      <type>boolean</type>
-      <default>1</default>
-      <add>1.6</add>
+    <name>is_active</name>
+    <title>Is Active</title>
+    <type>boolean</type>
+    <default>1</default>
+    <add>1.6</add>
   </field>
   <field>
-      <name>workflow_id</name>
-      <type>int unsigned</type>
-      <comment>a pseudo-FK to civicrm_option_value</comment>
-      <add>3.1</add>
+    <name>workflow_id</name>
+    <title>Message Template Workflow</title>
+    <type>int unsigned</type>
+    <comment>a pseudo-FK to civicrm_option_value</comment>
+    <add>3.1</add>
   </field>
   <field>
-      <name>is_default</name>
-      <type>boolean</type>
-      <default>1</default>
-      <comment>is this the default message template for the workflow referenced by workflow_id?</comment>
-      <add>3.1</add>
+    <name>is_default</name>
+    <title>Message Template Is Default?</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>is this the default message template for the workflow referenced by workflow_id?</comment>
+    <add>3.1</add>
   </field>
   <field>
-      <name>is_reserved</name>
-      <type>boolean</type>
-      <comment>is this the reserved message template which we ship for the workflow referenced by workflow_id?</comment>
-      <add>3.1</add>
+    <name>is_reserved</name>
+    <title>Message Template Is Reserved?</title>
+    <type>boolean</type>
+    <comment>is this the reserved message template which we ship for the workflow referenced by workflow_id?</comment>
+    <add>3.1</add>
   </field>
   <field>
-      <name>pdf_format_id</name>
-      <type>int unsigned</type>
-      <comment>a pseudo-FK to civicrm_option_value containing PDF Page Format.</comment>
-      <pseudoconstant>
-        <optionGroupName>pdf_format</optionGroupName>
-      </pseudoconstant>
-      <add>3.4</add>
+    <name>pdf_format_id</name>
+    <title>Message Template Format</title>
+    <type>int unsigned</type>
+    <comment>a pseudo-FK to civicrm_option_value containing PDF Page Format.</comment>
+    <pseudoconstant>
+      <optionGroupName>pdf_format</optionGroupName>
+    </pseudoconstant>
+    <add>3.4</add>
   </field>
 </table>
index 8efe8f555c332209f1b193922dd8da9115d1e2a3..74a5573daa45fa099ac8613b06ab918832d298de 100644 (file)
@@ -7,46 +7,46 @@
   <comment>Table to store navigation.</comment>
   <add>3.0</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>3.0</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>3.0</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>domain_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <pseudoconstant>
-          <table>civicrm_domain</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <comment>Which Domain is this navigation item for</comment>
-      <add>3.0</add>
+    <name>domain_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <pseudoconstant>
+      <table>civicrm_domain</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <comment>Which Domain is this navigation item for</comment>
+    <add>3.0</add>
   </field>
   <foreignKey>
-       <name>domain_id</name>
-       <table>civicrm_domain</table>
-       <key>id</key>
-       <add>3.0</add>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <add>3.0</add>
   </foreignKey>
   <field>
-       <name>label</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Navigation Title</comment>
-       <add>3.0</add>
+    <name>label</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Navigation Title</comment>
+    <add>3.0</add>
   </field>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Internal Name</comment>
-       <add>3.0</add>
+    <name>name</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Internal Name</comment>
+    <add>3.0</add>
   </field>
   <field>
     <name>url</name>
     <add>3.0</add>
   </field>
   <field>
-       <name>permission</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Permission for menu item</comment>
-       <add>3.0</add>
+    <name>permission</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Permission for menu item</comment>
+    <add>3.0</add>
   </field>
   <field>
-       <name>permission_operator</name>
-       <type>varchar</type>
-       <length>3</length>
-       <comment>Permission Operator</comment>
-       <add>3.0</add>
+    <name>permission_operator</name>
+    <type>varchar</type>
+    <length>3</length>
+    <comment>Permission Operator</comment>
+    <add>3.0</add>
   </field>
   <field>
-       <name>parent_id</name>
-       <type>int unsigned</type>
-       <comment>Parent navigation item, used for grouping</comment>
-       <add>3.0</add>
+    <name>parent_id</name>
+    <type>int unsigned</type>
+    <comment>Parent navigation item, used for grouping</comment>
+    <add>3.0</add>
   </field>
   <foreignKey>
-       <name>parent_id</name>
-       <table>civicrm_navigation</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
-       <add>3.0</add>
+    <name>parent_id</name>
+    <table>civicrm_navigation</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+    <add>3.0</add>
   </foreignKey>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this navigation item active?</comment>
-       <add>3.0</add>
+    <name>is_active</name>
+    <type>boolean</type>
+    <comment>Is this navigation item active?</comment>
+    <add>3.0</add>
   </field>
   <field>
-       <name>has_separator</name>
-       <type>boolean</type>
-       <comment>If separator needs to be added after this menu item</comment>
-       <add>3.0</add>
+    <name>has_separator</name>
+    <type>boolean</type>
+    <comment>If separator needs to be added after this menu item</comment>
+    <add>3.0</add>
   </field>
   <field>
     <name>weight</name>
index 9b6e0dba3582f012f59dc88a780a51e8324eb710..cb3740e01ce7ff5ea793daa449a222688e163eab 100644 (file)
@@ -8,87 +8,95 @@
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Note ID</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <title>Note ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Note ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <length>64</length>
-       <required>true</required>
-       <comment>Name of table where item being referenced is stored.</comment>
-       <add>1.1</add>
+    <name>entity_table</name>
+    <title>Note Entity</title>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Name of table where item being referenced is stored.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>entity_id</name>
-       <type>int unsigned</type>
-       <required>true</required>
-       <comment>Foreign key to the referenced item.</comment>
-       <add>1.1</add>
+    <name>entity_id</name>
+    <title>Note Entity ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Foreign key to the referenced item.</comment>
+    <add>1.1</add>
   </field>
   <dynamicForeignKey>
-       <idColumn>entity_id</idColumn>
-       <typeColumn>entity_table</typeColumn>
-       <add>1.1</add>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>1.1</add>
   </dynamicForeignKey>
   <index>
-       <name>index_entity</name>
-       <fieldName>entity_table</fieldName>
-       <fieldName>entity_id</fieldName>
-       <add>1.1</add>
+    <name>index_entity</name>
+    <fieldName>entity_table</fieldName>
+    <fieldName>entity_id</fieldName>
+    <add>1.1</add>
   </index>
   <field>
-       <name>note</name>
-       <type>text</type>
-       <comment>Note and/or Comment.</comment>
-       <html>
-         <type>TextArea</type>
-         <rows>4</rows>
-         <cols>60</cols>
-       </html>
-       <import>true</import>
-       <headerPattern>/Note|Comment/i</headerPattern>
-       <dataPattern>//</dataPattern>
-       <add>1.1</add>
+    <name>note</name>
+    <title>Note</title>
+    <type>text</type>
+    <comment>Note and/or Comment.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>4</rows>
+      <cols>60</cols>
+    </html>
+    <import>true</import>
+    <headerPattern>/Note|Comment/i</headerPattern>
+    <dataPattern>//</dataPattern>
+    <add>1.1</add>
   </field>
   <field>
-       <name>contact_id</name>
-       <type>int unsigned</type>
-       <comment>FK to Contact ID creator</comment>
-       <add>1.1</add>
+    <name>contact_id</name>
+    <title>Note Created By</title>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID creator</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>SET NULL</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-       <name>modified_date</name>
-       <type>date</type>
-       <comment>When was this note last modified/edited</comment>
-       <add>1.1</add>
+    <name>modified_date</name>
+    <title>Note Modified By</title>
+    <type>date</type>
+    <comment>When was this note last modified/edited</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>subject</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>subject of note description</comment>
-       <add>1.5</add>
+    <name>subject</name>
+    <title>Subject</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>subject of note description</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>privacy</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Foreign Key to Note Privacy Level (which is an option value pair and hence an implicit FK)</comment>
-       <add>3.3</add>
+    <name>privacy</name>
+    <title>Privacy</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Foreign Key to Note Privacy Level (which is an option value pair and hence an implicit FK)</comment>
+    <add>3.3</add>
   </field>
 </table>
index 607ea3ca1883d48ae3993b527a1673018882fcf8..027167344c22194ce1cfcb73204f5a5e6c65436f 100644 (file)
@@ -6,35 +6,35 @@
   <comment>OpenID information for a specific location.</comment>
   <add>2.0</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique OpenID ID</comment>
-       <add>2.0</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique OpenID ID</comment>
+    <add>2.0</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID</comment>
-      <add>2.0</add>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID</comment>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>location_type_id</name>
-      <title>OpenID Location Type</title>
-      <type>int unsigned</type>
-      <comment>Which Location does this email belong to.</comment>
-       <add>2.0</add>
+    <name>location_type_id</name>
+    <title>OpenID Location Type</title>
+    <type>int unsigned</type>
+    <comment>Which Location does this email belong to.</comment>
+    <add>2.0</add>
   </field>
   <index>
     <name>index_location_type</name>
     <add>2.0</add>
   </index>
   <field>
-       <name>openid</name>
-       <title>OpenID</title>
-       <type>varchar</type>
-       <length>255</length>
-       <import>true</import>
-       <headerPattern>/^Open.?ID|u(niq\w*)?.?ID/i</headerPattern>
-        <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
-        <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
-       <rule>url</rule>
-       <comment>OpenID</comment>
-       <add>2.0</add>
+    <name>openid</name>
+    <title>OpenID</title>
+    <type>varchar</type>
+    <length>255</length>
+    <import>true</import>
+    <headerPattern>/^Open.?ID|u(niq\w*)?.?ID/i</headerPattern>
+    <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
+    <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
+    <rule>url</rule>
+    <comment>OpenID</comment>
+    <add>2.0</add>
   </field>
   <index>
-     <name>UI_openid</name>
-     <fieldName>openid</fieldName>
-     <unique>true</unique>
-     <add>2.0</add>
+    <name>UI_openid</name>
+    <fieldName>openid</fieldName>
+    <unique>true</unique>
+    <add>2.0</add>
   </index>
   <field>
-      <name>allowed_to_login</name>
-      <type>boolean</type>
-      <required>true</required>
-      <default>0</default>
-      <comment>Whether or not this user is allowed to login</comment>
-      <add>2.0</add>
+    <name>allowed_to_login</name>
+    <type>boolean</type>
+    <required>true</required>
+    <default>0</default>
+    <comment>Whether or not this user is allowed to login</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>is_primary</name>
-       <title>Is OpenID Primary?</title>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the primary email for this contact and location.</comment>
-       <add>2.0</add>
+    <name>is_primary</name>
+    <title>Is OpenID Primary?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the primary email for this contact and location.</comment>
+    <add>2.0</add>
   </field>
 </table>
index 2a998c97cc21a4375827e2d0edb9b79e4b6b89f8..1da22f5b5cfa73b065c6a1c934bf2c3f209500fd 100644 (file)
@@ -7,59 +7,65 @@
   <add>1.5</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Option Group ID</comment>
-       <add>1.5</add>
+    <name>id</name>
+    <title>Option Group ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Option Group ID</comment>
+    <add>1.5</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <title>Option Group Name</title>
-       <type>varchar</type>
-       <length>64</length>
-       <required>true</required>
-       <comment>Option group name. Used as selection key by class properties which lookup options in civicrm_option_value.</comment>
-       <add>1.5</add>
+    <name>name</name>
+    <title>Option Group Name</title>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Option group name. Used as selection key by class properties which lookup options in civicrm_option_value.</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>title</name>
-       <type>varchar</type>
-       <length>255</length>
-       <localizable>true</localizable>
-       <comment>Option Group title.</comment>
-       <add>1.5</add>
+    <name>title</name>
+    <title>Option Group title</title>
+    <type>varchar</type>
+    <length>255</length>
+    <localizable>true</localizable>
+    <comment>Option Group title.</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>description</name>
-       <type>varchar</type>
-       <length>255</length>
-       <localizable>true</localizable>
-       <comment>Option group description.</comment>
-       <add>1.5</add>
+    <name>description</name>
+    <title>Option Group Description</title>
+    <type>varchar</type>
+    <length>255</length>
+    <localizable>true</localizable>
+    <comment>Option group description.</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>is_reserved</name>
-       <type>boolean</type>
-       <default>1</default>
-       <comment>Is this a predefined system option group (i.e. it can not be deleted)?</comment>
-       <add>1.5</add>
+    <name>is_reserved</name>
+    <title>Option Group Is Reserved?</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this a predefined system option group (i.e. it can not be deleted)?</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this option group active?</comment>
-       <add>1.5</add>
+    <name>is_active</name>
+    <title>Option Group Is Active?</title>
+    <type>boolean</type>
+    <comment>Is this option group active?</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>is_locked</name>
-       <type>boolean</type>
-       <comment>A lock to remove the ability to add new options via the UI.</comment>
-       <add>4.5</add>
+    <name>is_locked</name>
+    <title>Option Group Is Locked</title>
+    <type>boolean</type>
+    <comment>A lock to remove the ability to add new options via the UI.</comment>
+    <add>4.5</add>
   </field>
   <index>
     <name>UI_name</name>
index f18a8022d072e72428b6d6fbfb44d1b08abafc11..0d54ef7a925ae4a894fa706db786338f6419b64a 100644 (file)
   <add>1.5</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Option ID</comment>
-       <add>1.5</add>
+    <name>id</name>
+    <title>Option Value ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Option ID</comment>
+    <add>1.5</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>option_group_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Group which this option belongs to.</comment>
-       <add>1.5</add>
-      <pseudoconstant>
-        <table>civicrm_option_group</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>option_group_id</name>
+    <title>Option Group ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Group which this option belongs to.</comment>
+    <add>1.5</add>
+    <pseudoconstant>
+      <table>civicrm_option_group</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>option_group_id</name>
-       <table>civicrm_option_group</table>
-       <key>id</key>
-       <add>1.5</add>
-       <onDelete>CASCADE</onDelete>
+    <name>option_group_id</name>
+    <table>civicrm_option_group</table>
+    <key>id</key>
+    <add>1.5</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-       <name>label</name>
-       <title>Option Label</title>
-       <type>varchar</type>
-       <required>true</required>
-       <length>255</length>
-       <localizable>true</localizable>
-       <comment>Option string as displayed to users - e.g. the label in an HTML OPTION tag.</comment>
-       <add>1.5</add>
-  </field>
-  <field>
-      <name>value</name>
-      <title>Option Value</title>
-      <type>varchar</type>
-      <length>512</length>
-      <required>true</required>
-      <comment>The actual value stored (as a foreign key) in the data record. Functions which need lookup option_value.title should use civicrm_option_value.option_group_id plus civicrm_option_value.value as the key.</comment>
-       <add>1.5</add>
-       <change>3.3</change>
-  </field>
-  <field>
-       <name>name</name>
-       <title>Option Name</title>
-       <type>varchar</type>
-       <length>255</length>
-       <import>true</import>
-       <comment>Stores a fixed (non-translated) name for this option value. Lookup functions should use the name as the key for the option value row.</comment>
-       <add>1.5</add>
-   </field>
-  <field>
-       <name>grouping</name>
-       <title>Option Grouping Name</title>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Use to sort and/or set display properties for sub-set(s) of options within an option group. EXAMPLE: Use for college_interest field, to differentiate partners from non-partners.</comment>
-       <add>1.5</add>
-  </field>
-  <field>
-      <name>filter</name>
-      <type>int unsigned</type>
-      <comment>Bitwise logic can be used to create subsets of options within an option_group for different uses.</comment>
-      <add>1.5</add>
-  </field>
-  <field>
-       <name>is_default</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the default option for the group?</comment>
-       <add>1.5</add>
-  </field>
-  <field>
-      <name>weight</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Controls display sort order.</comment>
-       <add>1.5</add>
-  </field>
-  <field>
-       <name>description</name>
-       <type>text</type>
-       <html>
-         <type>TextArea</type>
-         <rows>8</rows>
-         <cols>60</cols>
-       </html>
-       <localizable>true</localizable>
-       <comment>Optional description.</comment>
-       <add>1.5</add>
-  </field>
-  <field>
-       <name>is_optgroup</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this row simply a display header? Expected usage is to render these as OPTGROUP tags within a SELECT field list of options?</comment>
-       <add>1.5</add>
-  </field>
-  <field>
-       <name>is_reserved</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this a predefined system object?</comment>
-       <add>1.5</add>
-  </field>
-  <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <default>1</default>
-       <comment>Is this option active?</comment>
-       <add>1.5</add>
-  </field>
-  <field>
-      <name>component_id</name>
-      <type>int unsigned</type>
-      <comment>Component that this option value belongs/caters to.</comment>
-      <add>2.0</add>
-      <pseudoconstant>
-        <table>civicrm_component</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>label</name>
+    <title>Option Label</title>
+    <type>varchar</type>
+    <required>true</required>
+    <length>255</length>
+    <localizable>true</localizable>
+    <comment>Option string as displayed to users - e.g. the label in an HTML OPTION tag.</comment>
+    <add>1.5</add>
+  </field>
+  <field>
+    <name>value</name>
+    <title>Option Value</title>
+    <type>varchar</type>
+    <length>512</length>
+    <required>true</required>
+    <comment>The actual value stored (as a foreign key) in the data record. Functions which need lookup option_value.title should use civicrm_option_value.option_group_id plus civicrm_option_value.value as the key.</comment>
+    <add>1.5</add>
+    <change>3.3</change>
+  </field>
+  <field>
+    <name>name</name>
+    <title>Option Name</title>
+    <type>varchar</type>
+    <length>255</length>
+    <import>true</import>
+    <comment>Stores a fixed (non-translated) name for this option value. Lookup functions should use the name as the key for the option value row.</comment>
+    <add>1.5</add>
+  </field>
+  <field>
+    <name>grouping</name>
+    <title>Option Grouping Name</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Use to sort and/or set display properties for sub-set(s) of options within an option group. EXAMPLE: Use for college_interest field, to differentiate partners from non-partners.</comment>
+    <add>1.5</add>
+  </field>
+  <field>
+    <name>filter</name>
+    <type>int unsigned</type>
+    <comment>Bitwise logic can be used to create subsets of options within an option_group for different uses.</comment>
+    <add>1.5</add>
+  </field>
+  <field>
+    <name>is_default</name>
+    <title>Option is Default?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the default option for the group?</comment>
+    <add>1.5</add>
+  </field>
+  <field>
+    <name>weight</name>
+    <title>Option Weight</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Controls display sort order.</comment>
+    <add>1.5</add>
+  </field>
+  <field>
+    <name>description</name>
+    <title>Option Description</title>
+    <type>text</type>
+    <html>
+      <type>TextArea</type>
+      <rows>8</rows>
+      <cols>60</cols>
+    </html>
+    <localizable>true</localizable>
+    <comment>Optional description.</comment>
+    <add>1.5</add>
+  </field>
+  <field>
+    <name>is_optgroup</name>
+    <title>Option is Header?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this row simply a display header? Expected usage is to render these as OPTGROUP tags within a SELECT field list of options?</comment>
+    <add>1.5</add>
+  </field>
+  <field>
+    <name>is_reserved</name>
+    <title>Option Is Reserved?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this a predefined system object?</comment>
+    <add>1.5</add>
+  </field>
+  <field>
+    <name>is_active</name>
+    <title>Option Is Active</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this option active?</comment>
+    <add>1.5</add>
+  </field>
+  <field>
+    <name>component_id</name>
+    <title>Option Component</title>
+    <type>int unsigned</type>
+    <comment>Component that this option value belongs/caters to.</comment>
+    <add>2.0</add>
+    <pseudoconstant>
+      <table>civicrm_component</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>component_id</name>
-       <table>civicrm_component</table>
-       <key>id</key>
-       <add>2.0</add>
+    <name>component_id</name>
+    <table>civicrm_component</table>
+    <key>id</key>
+    <add>2.0</add>
   </foreignKey>
   <field>
-      <name>domain_id</name>
-      <type>int unsigned</type>
-      <pseudoconstant>
-          <table>civicrm_domain</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <comment>Which Domain is this option value for</comment>
-      <add>3.1</add>
+    <name>domain_id</name>
+    <title>Option Domain</title>
+    <type>int unsigned</type>
+    <pseudoconstant>
+      <table>civicrm_domain</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <comment>Which Domain is this option value for</comment>
+    <add>3.1</add>
   </field>
   <foreignKey>
-       <name>domain_id</name>
-       <table>civicrm_domain</table>
-       <key>id</key>
-       <add>3.1</add>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <add>3.1</add>
   </foreignKey>
   <field>
-       <name>visibility_id</name>
-       <type>int unsigned</type>
-       <default>NULL</default>
-       <add>2.2</add>
+    <name>visibility_id</name>
+    <title>Option Visibility</title>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <add>2.2</add>
   </field>
   <index>
-       <name>index_option_group_id_value</name>
-       <fieldName length="128">value</fieldName>
-       <fieldName>option_group_id</fieldName>
-       <add>1.5</add>
+    <name>index_option_group_id_value</name>
+    <fieldName length="128">value</fieldName>
+    <fieldName>option_group_id</fieldName>
+    <add>1.5</add>
   </index>
   <index>
     <name>index_option_group_id_name</name>
index 710215140e7330e38f176cec9475fecbb18eae09..801bdbfbe538f8ba2715b884c5807db0435abc0d 100644 (file)
@@ -6,44 +6,44 @@
   <comment>DB Template Customization strings</comment>
   <add>3.2</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Persistent Record Id</comment>
-       <add>3.2</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Persistent Record Id</comment>
+    <add>3.2</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>false</autoincrement>
+    <name>id</name>
+    <autoincrement>false</autoincrement>
   </primaryKey>
   <field>
-      <name>context</name>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>Context for which name data pair is to be stored</comment>
-      <required>true</required>
-      <add>3.2</add>
+    <name>context</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Context for which name data pair is to be stored</comment>
+    <required>true</required>
+    <add>3.2</add>
   </field>
   <field>
-      <name>name</name>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>Name of Context</comment>
-      <required>true</required>
-      <add>3.2</add>
+    <name>name</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Name of Context</comment>
+    <required>true</required>
+    <add>3.2</add>
   </field>
   <field>
-      <name>data</name>
-      <type>longtext</type>
-      <comment>data associated with name</comment>
-      <add>3.2</add>
+    <name>data</name>
+    <type>longtext</type>
+    <comment>data associated with name</comment>
+    <add>3.2</add>
   </field>
   <field>
-      <name>is_config</name>
-      <type>boolean</type>
-      <default>0</default>
-      <comment>Config Settings</comment>
-      <required>true</required>
-      <add>3.2</add>
+    <name>is_config</name>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Config Settings</comment>
+    <required>true</required>
+    <add>3.2</add>
   </field>
 </table>
index ed2625d9480ce753e85c3512175418d8499f8e47..dd854ec11d5104cb3d2e3788cd7908dd8ce94100 100644 (file)
@@ -8,43 +8,45 @@
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique Phone ID</comment>
-      <add>1.1</add>
+    <name>id</name>
+    <title>Phone ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique Phone ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID</comment>
-      <add>2.0</add>
+    <name>contact_id</name>
+    <title>Phone Contact</title>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID</comment>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>location_type_id</name>
-      <title>Phone Location Type</title>
-      <type>int unsigned</type>
-      <comment>Which Location does this phone belong to.</comment>
-      <pseudoconstant>
-        <table>civicrm_location_type</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>display_name</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>2.0</add>
+    <name>location_type_id</name>
+    <title>Phone Location Type</title>
+    <type>int unsigned</type>
+    <comment>Which Location does this phone belong to.</comment>
+    <pseudoconstant>
+      <table>civicrm_location_type</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>display_name</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>2.0</add>
   </field>
   <index>
     <name>index_location_type</name>
     <add>2.0</add>
   </index>
   <field>
-       <name>is_primary</name>
-       <title>Is Phone Primary?</title>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the primary phone for this contact and location.</comment>
-       <add>1.1</add>
+    <name>is_primary</name>
+    <title>Is Phone Primary?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the primary phone for this contact and location.</comment>
+    <add>1.1</add>
   </field>
   <index>
     <name>index_is_primary</name>
     <add>2.0</add>
   </index>
   <field>
-       <name>is_billing</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the billing?</comment>
-       <add>2.0</add>
+    <name>is_billing</name>
+    <title>Is Billing Phone</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the billing?</comment>
+    <add>2.0</add>
   </field>
   <index>
     <name>index_is_billing</name>
     <add>2.0</add>
   </index>
   <field>
-      <name>mobile_provider_id</name>
-      <type>int unsigned</type>
-      <comment>Which Mobile Provider does this phone belong to.</comment>
-       <add>1.1</add>
+    <name>mobile_provider_id</name>
+    <title>Mobile Provider</title>
+    <type>int unsigned</type>
+    <comment>Which Mobile Provider does this phone belong to.</comment>
+    <add>1.1</add>
   </field>
   <index>
-      <name>UI_mobile_provider_id</name>
-      <fieldName>mobile_provider_id</fieldName>
-      <add>1.6</add>
+    <name>UI_mobile_provider_id</name>
+    <fieldName>mobile_provider_id</fieldName>
+    <add>1.6</add>
   </index>
   <field>
-       <name>phone</name>
-       <type>varchar</type>
-       <length>32</length>
-       <import>true</import>
-       <headerPattern>/phone/i</headerPattern>
-       <dataPattern>/^[\d\(\)\-\.\s]+$/</dataPattern>
-       <comment>Complete phone number.</comment>
-       <add>1.1</add>
+    <name>phone</name>
+    <type>varchar</type>
+    <length>32</length>
+    <import>true</import>
+    <headerPattern>/phone/i</headerPattern>
+    <dataPattern>/^[\d\(\)\-\.\s]+$/</dataPattern>
+    <comment>Complete phone number.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>phone_ext</name>
-       <title>Phone Extension</title>
-       <type>varchar</type>
-       <length>16</length>
-       <html>
-         <type>Text</type>
-         <size>FOUR</size>
-       </html>
-       <import>true</import>
-       <export>true</export>
-       <headerPattern>/extension/i</headerPattern>
-       <dataPattern>/^\d+$/</dataPattern>
-       <comment>Optional extension for a phone number.</comment>
-       <add>3.3</add>
+    <name>phone_ext</name>
+    <title>Phone Extension</title>
+    <type>varchar</type>
+    <length>16</length>
+    <html>
+      <type>Text</type>
+      <size>FOUR</size>
+    </html>
+    <import>true</import>
+    <export>true</export>
+    <headerPattern>/extension/i</headerPattern>
+    <dataPattern>/^\d+$/</dataPattern>
+    <comment>Optional extension for a phone number.</comment>
+    <add>3.3</add>
   </field>
   <field>
-       <name>phone_numeric</name>
-       <type>varchar</type>
-       <length>32</length>
-       <comment>Phone number stripped of all whitespace, letters, and punctuation.</comment>
-       <add>4.3</add>
+    <name>phone_numeric</name>
+    <type>varchar</type>
+    <length>32</length>
+    <comment>Phone number stripped of all whitespace, letters, and punctuation.</comment>
+    <add>4.3</add>
   </field>
   <index>
     <name>index_phone_numeric</name>
     <add>4.3</add>
   </index>
   <field>
-       <name>phone_type</name>
-       <type>enum</type>
-       <values>Phone, Mobile, Fax, Pager</values>
-       <headerPattern>/phone\s+type/i</headerPattern>
-       <dataPattern>/phone|mobile|fax|pager/i</dataPattern>
-       <comment>What type of telecom device is this.</comment>
-       <add>1.1</add>
-       <drop>2.2</drop>
+    <name>phone_type</name>
+    <type>enum</type>
+    <values>Phone, Mobile, Fax, Pager</values>
+    <headerPattern>/phone\s+type/i</headerPattern>
+    <dataPattern>/phone|mobile|fax|pager/i</dataPattern>
+    <comment>What type of telecom device is this.</comment>
+    <add>1.1</add>
+    <drop>2.2</drop>
   </field>
   <field>
-      <name>phone_type_id</name>
-      <title>Phone Type</title>
-      <type>int unsigned</type>
-      <comment>Which type of phone does this number belongs.</comment>
-      <pseudoconstant>
-        <optionGroupName>phone_type</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>2.2</add>
+    <name>phone_type_id</name>
+    <title>Phone Type</title>
+    <type>int unsigned</type>
+    <comment>Which type of phone does this number belongs.</comment>
+    <pseudoconstant>
+      <optionGroupName>phone_type</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>2.2</add>
   </field>
 </table>
index 22e3b055f9a1dbc22caddff8b2b9d03903840195..985b71ab3c1eecd458b9f5bd7fbed2bcd31a510a 100644 (file)
@@ -9,61 +9,61 @@
   <drop>4.1</drop>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-       <add>1.8</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>1.8</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>domain_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Which Domain is this menu item for</comment>
-      <add>3.0</add>
+    <name>domain_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Which Domain is this menu item for</comment>
+    <add>3.0</add>
   </field>
   <foreignKey>
-       <name>domain_id</name>
-       <table>civicrm_domain</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
-       <add>3.0</add>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+    <add>3.0</add>
   </foreignKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID</comment>
-      <add>1.8</add>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID</comment>
+    <add>1.8</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
-       <add>1.8</add>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+    <add>1.8</add>
   </foreignKey>
   <field>
-       <name>is_domain</name>
-       <type>boolean</type>
-       <comment>Is this the record for the domain setting?</comment>
-       <add>1.8</add>
+    <name>is_domain</name>
+    <type>boolean</type>
+    <comment>Is this the record for the domain setting?</comment>
+    <add>1.8</add>
   </field>
   <field>
-       <name>location_count</name>
-       <type>int unsigned</type>
-       <comment>Number of locations to be displayed on edit page?</comment>
-       <add>1.8</add>
-       <drop>3.0</drop>
+    <name>location_count</name>
+    <type>int unsigned</type>
+    <comment>Number of locations to be displayed on edit page?</comment>
+    <add>1.8</add>
+    <drop>3.0</drop>
   </field>
   <field>
-       <name>contact_view_options</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>What tabs are displayed in the contact summary</comment>
-       <add>1.8</add>
+    <name>contact_view_options</name>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>What tabs are displayed in the contact summary</comment>
+    <add>1.8</add>
   </field>
   <index>
     <name>index_contact_view_options</name>
     <add>1.8</add>
   </index>
   <field>
-       <name>contact_edit_options</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>What tabs are displayed in the contact edit</comment>
-       <add>1.8</add>
+    <name>contact_edit_options</name>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>What tabs are displayed in the contact edit</comment>
+    <add>1.8</add>
   </field>
   <index>
     <name>index_contact_edit_options</name>
     <add>1.8</add>
   </index>
   <field>
-       <name>advanced_search_options</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>What tabs are displayed in the advanced search screen</comment>
-       <add>1.8</add>
+    <name>advanced_search_options</name>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>What tabs are displayed in the advanced search screen</comment>
+    <add>1.8</add>
   </field>
   <index>
     <name>index_advanced_search_options</name>
     <add>1.8</add>
   </index>
   <field>
-       <name>user_dashboard_options</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>What tabs are displayed in the contact edit</comment>
-       <add>1.8</add>
+    <name>user_dashboard_options</name>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>What tabs are displayed in the contact edit</comment>
+    <add>1.8</add>
   </field>
   <index>
     <name>index_user_dashboard_options</name>
     <add>1.8</add>
   </index>
   <field>
-       <name>address_options</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>What fields are displayed from the address table</comment>
-       <add>1.8</add>
+    <name>address_options</name>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>What fields are displayed from the address table</comment>
+    <add>1.8</add>
   </field>
- <index>
 <index>
     <name>index_address_options</name>
     <fieldName>address_options</fieldName>
     <add>1.8</add>
   </index>
   <field>
-       <name>address_format</name>
-       <type>text</type>
-       <comment>Format to display the address</comment>
-       <add>1.8</add>
+    <name>address_format</name>
+    <type>text</type>
+    <comment>Format to display the address</comment>
+    <add>1.8</add>
   </field>
   <field>
-       <name>mailing_format</name>
-       <type>text</type>
-       <comment>Format to display a mailing label</comment>
-       <add>1.8</add>
+    <name>mailing_format</name>
+    <type>text</type>
+    <comment>Format to display a mailing label</comment>
+    <add>1.8</add>
   </field>
   <field>
-       <name>display_name_format</name>
-       <type>text</type>
-       <comment>Format to display contact display name</comment>
-       <add>3.2</add>
+    <name>display_name_format</name>
+    <type>text</type>
+    <comment>Format to display contact display name</comment>
+    <add>3.2</add>
   </field>
   <field>
-       <name>sort_name_format</name>
-       <type>text</type>
-       <comment>Format to display contact sort name</comment>
-       <add>3.2</add>
+    <name>sort_name_format</name>
+    <type>text</type>
+    <comment>Format to display contact sort name</comment>
+    <add>3.2</add>
   </field>
   <field>
-       <name>individual_name_format</name>
-       <type>text</type>
-       <comment>Format to display a individual name</comment>
-       <add>1.8</add>
-       <drop>3.0</drop>
+    <name>individual_name_format</name>
+    <type>text</type>
+    <comment>Format to display a individual name</comment>
+    <add>1.8</add>
+    <drop>3.0</drop>
   </field>
   <field>
-       <name>address_standardization_provider</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>object name of provider for address standarization</comment>
-       <add>1.8</add>
+    <name>address_standardization_provider</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>object name of provider for address standarization</comment>
+    <add>1.8</add>
   </field>
   <field>
-       <name>address_standardization_userid</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>user id for provider login</comment>
-       <add>1.8</add>
+    <name>address_standardization_userid</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>user id for provider login</comment>
+    <add>1.8</add>
   </field>
   <field>
-       <name>address_standardization_url</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>url of address standardization service</comment>
-       <add>1.8</add>
+    <name>address_standardization_url</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>url of address standardization service</comment>
+    <add>1.8</add>
   </field>
- <field>
-       <name>editor_id</name>
-       <type>int unsigned</type>
-       <length>4</length>
-       <comment>ID of the editor</comment>
-       <add>2.1</add>
 <field>
+    <name>editor_id</name>
+    <type>int unsigned</type>
+    <length>4</length>
+    <comment>ID of the editor</comment>
+    <add>2.1</add>
   </field>
- <field>
-       <name>mailing_backend</name>
-       <type>text</type>
-       <comment>Smtp Backend configuration.</comment>
-       <html>
-         <type>TextArea</type>
-         <rows>20</rows>
-         <cols>80</cols>
-       </html>
-       <add>2.2</add>
 <field>
+    <name>mailing_backend</name>
+    <type>text</type>
+    <comment>Smtp Backend configuration.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>20</rows>
+      <cols>80</cols>
+    </html>
+    <add>2.2</add>
   </field>
   <field>
-       <name>navigation</name>
-       <type>text</type>
-       <comment>Store navigation for the Contact</comment>
-       <add>3.0</add>
+    <name>navigation</name>
+    <type>text</type>
+    <comment>Store navigation for the Contact</comment>
+    <add>3.0</add>
   </field>
   <field>
-       <name>contact_autocomplete_options</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>What Autocomplete has to return</comment>
-       <add>3.1</add>
+    <name>contact_autocomplete_options</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>What Autocomplete has to return</comment>
+    <add>3.1</add>
   </field>
 </table>
index 383509a271bc3ca3e5981693fd9f1297eb8d5762..8aa1ed7ed860fa00f49a27854b2d137e3ccaa7e8 100644 (file)
@@ -8,22 +8,22 @@
   <add>2.0</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-       <add>2.0</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>2.0</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <required>true</required>
-       <comment>The meta name for this date (fixed in code)</comment>
-       <add>2.0</add>
+    <name>name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>The meta name for this date (fixed in code)</comment>
+    <add>2.0</add>
   </field>
   <index>
     <name>index_name</name>
     <add>2.0</add>
   </index>
   <field>
-       <name>description</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Description of this date type.</comment>
-       <add>2.0</add>
+    <name>description</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Description of this date type.</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>start</name>
-       <type>int</type>
-       <required>true</required>
-       <comment>The start offset relative to current year</comment>
-       <add>2.0</add>
+    <name>start</name>
+    <type>int</type>
+    <required>true</required>
+    <comment>The start offset relative to current year</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>end</name>
-       <type>int</type>
-       <required>true</required>
-       <comment>The end offset relative to current year, can be negative</comment>
-       <add>2.0</add>
+    <name>end</name>
+    <type>int</type>
+    <required>true</required>
+    <comment>The end offset relative to current year, can be negative</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>minute_increment</name>
-       <type>int</type>
-       <comment>The minute increment number</comment>
-       <add>2.0</add>
-       <drop>3.1</drop>
+    <name>minute_increment</name>
+    <type>int</type>
+    <comment>The minute increment number</comment>
+    <add>2.0</add>
+    <drop>3.1</drop>
   </field>
   <field>
-       <name>date_format</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>The date type</comment>
-       <add>2.0</add>
+    <name>date_format</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>The date type</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>time_format</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>time format</comment>
-       <add>3.1</add>
+    <name>time_format</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>time format</comment>
+    <add>3.1</add>
   </field>
 </table>
index 45b0455ca9589dbe4799d5eb9b6d6eb2728721c9..5db686e6532e372e94a0074803bec8a0c9d36698 100644 (file)
@@ -7,35 +7,35 @@
   <comment>Table to cache items for navigation on civicrm searched results.</comment>
   <add>3.4</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>3.4</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>3.4</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>physical tablename for entity being joined to discount, e.g. civicrm_event</comment>
-       <add>3.4</add>
+    <name>entity_table</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>physical tablename for entity being joined to discount, e.g. civicrm_event</comment>
+    <add>3.4</add>
   </field>
   <field>
-      <name>entity_id1</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to entity table specified in entity_table column.</comment>
-       <add>3.4</add>
+    <name>entity_id1</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to entity table specified in entity_table column.</comment>
+    <add>3.4</add>
   </field>
   <field>
-      <name>entity_id2</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to entity table specified in entity_table column.</comment>
-       <add>3.4</add>
+    <name>entity_id2</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to entity table specified in entity_table column.</comment>
+    <add>3.4</add>
   </field>
   <field>
     <name>cacheKey</name>
     <add>4.2</add>
   </field>
   <index>
-     <name>index_all</name>
-     <fieldName>cacheKey</fieldName>
-     <fieldName>entity_id1</fieldName>
-     <fieldName>entity_id2</fieldName>
-     <fieldName>entity_table</fieldName>
-     <fieldName>is_selected</fieldName>
+    <name>index_all</name>
+    <fieldName>cacheKey</fieldName>
+    <fieldName>entity_id1</fieldName>
+    <fieldName>entity_id2</fieldName>
+    <fieldName>entity_table</fieldName>
+    <fieldName>is_selected</fieldName>
   </index>
 </table>
index 95bf92e4886edf5c9b6953b6e81c69df34c523ca..b5e2ee0ec52e772c54cfa6fd2f2e13c21d380f4d 100644 (file)
@@ -8,6 +8,7 @@
   <add>4.4</add>
   <field>
     <name>id</name>
+    <title>Print Label ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <add>4.4</add>
@@ -40,6 +41,7 @@
   </field>
   <field>
     <name>label_format_name</name>
+    <title>Label Format</title>
     <type>varchar</type>
     <length>255</length>
     <pseudoconstant>
@@ -53,6 +55,7 @@
   </field>
   <field>
     <name>label_type_id</name>
+    <title>Label Type</title>
     <type>int unsigned</type>
     <pseudoconstant>
       <optionGroupName>label_type</optionGroupName>
@@ -71,6 +74,7 @@
   </field>
   <field>
     <name>is_default</name>
+    <title>Label is Default?</title>
     <type>boolean</type>
     <default>1</default>
     <comment>Is this default?</comment>
@@ -78,6 +82,7 @@
   </field>
   <field>
     <name>is_active</name>
+    <title>Label Is Active?</title>
     <type>boolean</type>
     <default>1</default>
     <comment>Is this option active?</comment>
@@ -85,6 +90,7 @@
   </field>
   <field>
     <name>is_reserved</name>
+    <title>Is Label Reserved?</title>
     <type>boolean</type>
     <default>1</default>
     <comment>Is this reserved label?</comment>
@@ -92,6 +98,7 @@
   </field>
   <field>
     <name>created_id</name>
+    <title>Label Created By</title>
     <type>int unsigned</type>
     <title>Created By Contact ID</title>
     <comment>FK to civicrm_contact, who created this label layout</comment>
index fdd016e64d383ce6073cb07c3550e15b1d487ec8..e50318fa556bab248583affb555a2a07908c0b36 100644 (file)
@@ -7,29 +7,32 @@
   <comment>Table to store civicrm settings for civicrm core and components.</comment>
   <add>4.1</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>4.1</add>
+    <name>id</name>
+    <title>Setting ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>4.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>group_name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <required>true</required>
-       <comment>group name for setting element, useful in caching setting elements</comment>
-       <add>4.1</add>
+    <name>group_name</name>
+    <title>Setting Group</title>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>group name for setting element, useful in caching setting elements</comment>
+    <add>4.1</add>
   </field>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Unique name for setting</comment>
-       <add>4.1</add>
+    <name>name</name>
+    <title>Setting Name</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Unique name for setting</comment>
+    <add>4.1</add>
   </field>
   <index>
     <name>index_group_name</name>
     <add>4.1</add>
   </field>
   <field>
-      <name>domain_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <pseudoconstant>
-          <table>civicrm_domain</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <comment>Which Domain is this menu item for</comment>
-      <add>4.1</add>
+    <name>domain_id</name>
+    <title>Setting Domain</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <pseudoconstant>
+      <table>civicrm_domain</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <comment>Which Domain is this menu item for</comment>
+    <add>4.1</add>
   </field>
   <foreignKey>
-       <name>domain_id</name>
-       <table>civicrm_domain</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
-       <add>4.1</add>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+    <add>4.1</add>
   </foreignKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID if the setting is localized to a contact</comment>
-      <add>4.1</add>
+    <name>contact_id</name>
+    <title>Setting Contact</title>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID if the setting is localized to a contact</comment>
+    <add>4.1</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
-       <add>4.1</add>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+    <add>4.1</add>
   </foreignKey>
   <field>
-       <name>is_domain</name>
-       <type>boolean</type>
-       <comment>Is this setting a contact specific or site wide setting?</comment>
-       <add>4.1</add>
+    <name>is_domain</name>
+    <title>Is Domain Setting?</title>
+    <type>boolean</type>
+    <comment>Is this setting a contact specific or site wide setting?</comment>
+    <add>4.1</add>
   </field>
   <field>
     <name>component_id</name>
+    <title>Setting Component</title>
     <type>int unsigned</type>
     <comment>Component that this menu item belongs to</comment>
     <add>4.1</add>
     </html>
   </field>
   <foreignKey>
-       <name>component_id</name>
-       <table>civicrm_component</table>
-       <key>id</key>
-       <add>4.1</add>
+    <name>component_id</name>
+    <table>civicrm_component</table>
+    <key>id</key>
+    <add>4.1</add>
   </foreignKey>
   <field>
     <name>created_date</name>
+    <title>Setting Created Date</title>
     <type>datetime</type>
     <comment>When was the setting created</comment>
     <add>4.1</add>
   </field>
   <field>
     <name>created_id</name>
+    <title>Setting Created By</title>
     <type>int unsigned</type>
     <comment>FK to civicrm_contact, who created this setting</comment>
     <add>4.1</add>
index 83b1857500306c5da3109b9d1446f4faf3804f7c..daa60c48719a768692e94de3dd5840c475e4abd0 100644 (file)
@@ -6,47 +6,47 @@
   <name>civicrm_state_province</name>
   <add>1.1</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-       <comment>State / Province ID</comment>
-       <add>1.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>State / Province ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>false</autoincrement>
+    <name>id</name>
+    <autoincrement>false</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <title>State</title>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <headerPattern>/state|prov(ince)?/i</headerPattern>
-       <dataPattern>/[A-Z]{2}/</dataPattern>
-       <comment>Name of State / Province</comment>
-       <add>1.1</add>
+    <name>name</name>
+    <title>State</title>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <headerPattern>/state|prov(ince)?/i</headerPattern>
+    <dataPattern>/[A-Z]{2}/</dataPattern>
+    <comment>Name of State / Province</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>abbreviation</name>
-       <title>State Abbreviation</title>
-       <type>varchar</type>
-       <length>4</length>
-       <comment>2-4 Character Abbreviation of State / Province</comment>
-       <add>1.1</add>
+    <name>abbreviation</name>
+    <title>State Abbreviation</title>
+    <type>varchar</type>
+    <length>4</length>
+    <comment>2-4 Character Abbreviation of State / Province</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>country_id</name>
-       <type>int unsigned</type>
-       <required>true</required>
-       <comment>ID of Country that State / Province belong</comment>
-       <add>1.1</add>
+    <name>country_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>ID of Country that State / Province belong</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>country_id</name>
-       <table>civicrm_country</table>
-       <key>id</key>
-       <add>1.1</add>
+    <name>country_id</name>
+    <table>civicrm_country</table>
+    <key>id</key>
+    <add>1.1</add>
   </foreignKey>
   <index>
     <name>UI_name_country_id</name>
index 7ca3b058d88a773de4e22b7adccafc8829ef4919..13fd3869df34f2ba382fd3b4106ec737c7ca32a5 100644 (file)
@@ -8,53 +8,55 @@
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Tag ID</comment>
-      <add>1.1</add>
+    <name>id</name>
+    <title>Tag ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Tag ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <title>Tag Name</title>
-       <type>varchar</type>
-       <required>true</required>
-       <length>64</length>
-       <comment>Name of Tag.</comment>
-       <add>1.1</add>
+    <name>name</name>
+    <title>Tag Name</title>
+    <type>varchar</type>
+    <required>true</required>
+    <length>64</length>
+    <comment>Name of Tag.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>description</name>
-       <title>Description</title>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Optional verbose description of the tag.</comment>
-       <add>1.1</add>
+    <name>description</name>
+    <title>Description</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Optional verbose description of the tag.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>parent_id</name>
-       <title>Parent Tag</title>
-       <type>int unsigned</type>
-       <default>NULL</default>
-       <comment>Optional parent id for this tag.</comment>
-       <add>1.1</add>
+    <name>parent_id</name>
+    <title>Parent Tag</title>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>Optional parent id for this tag.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_selectable</name>
-       <type>boolean</type>
-       <default>1</default>
-       <comment>Is this tag selectable / displayed</comment>
-       <add>2.1</add>
+    <name>is_selectable</name>
+    <title>Display Tag?</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this tag selectable / displayed</comment>
+    <add>2.1</add>
   </field>
   <foreignKey>
-       <name>parent_id</name>
-       <table>civicrm_tag</table>
-       <key>id</key>
-       <add>1.1</add>
+    <name>parent_id</name>
+    <table>civicrm_tag</table>
+    <key>id</key>
+    <add>1.1</add>
   </foreignKey>
   <index>
     <name>UI_name</name>
     <add>3.2</add>
   </field>
   <field>
-      <name>created_id</name>
-      <type>int unsigned</type>
-      <comment>FK to civicrm_contact, who created this tag</comment>
-      <add>3.4</add>
+    <name>created_id</name>
+    <title>Tag Created By</title>
+    <type>int unsigned</type>
+    <comment>FK to civicrm_contact, who created this tag</comment>
+    <add>3.4</add>
   </field>
   <foreignKey>
-      <name>created_id</name>
-      <table>civicrm_contact</table>
-      <key>id</key>
-      <add>3.4</add>
-      <onDelete>SET NULL</onDelete>
+    <name>created_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>3.4</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>created_date</name>
-      <type>datetime</type>
-      <title>Tag Created Date</title>
-      <comment>Date and time that tag was created.</comment>
-      <add>3.4</add>
+    <name>created_date</name>
+    <type>datetime</type>
+    <title>Tag Created Date</title>
+    <comment>Date and time that tag was created.</comment>
+    <add>3.4</add>
   </field>
 </table>
index a42c81566ee1f5246f48931829e5b5656fa9da28..edccd0778c9526c44a565fd18a1755ff6181e810 100644 (file)
@@ -6,55 +6,55 @@
   <name>civicrm_timezone</name>
   <add>1.8</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Timezone Id</comment>
-       <add>1.8</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Timezone Id</comment>
+    <add>1.8</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Timezone full name</comment>
-       <add>1.8</add>
+    <name>name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Timezone full name</comment>
+    <add>1.8</add>
   </field>
   <field>
-       <name>abbreviation</name>
-       <type>char</type>
-       <length>3</length>
-       <comment>ISO Code for timezone abbreviation</comment>
-       <add>1.8</add>
+    <name>abbreviation</name>
+    <type>char</type>
+    <length>3</length>
+    <comment>ISO Code for timezone abbreviation</comment>
+    <add>1.8</add>
   </field>
   <field>
-      <name>gmt</name>
-      <type>varchar</type>
-       <length>64</length>
-      <comment>GMT name of the timezone</comment>
-       <add>1.8</add>
+    <name>gmt</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>GMT name of the timezone</comment>
+    <add>1.8</add>
   </field>
   <field>
-      <name>offset</name>
-      <type>int</type>
-      <comment></comment>
-       <add>1.8</add>
+    <name>offset</name>
+    <type>int</type>
+    <comment></comment>
+    <add>1.8</add>
   </field>
   <field>
-      <name>country_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Country Id</comment>
-       <add>1.8</add>
+    <name>country_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Country Id</comment>
+    <add>1.8</add>
   </field>
   <foreignKey>
-      <name>country_id</name>
-      <table>civicrm_country</table>
-      <key>id</key>
-      <add>1.8</add>
+    <name>country_id</name>
+    <table>civicrm_country</table>
+    <key>id</key>
+    <add>1.8</add>
   </foreignKey>
 </table>
 
index 6fd2c438bb2b31a597190911eb44ce30d150857d..702fee07bad05909e6212c3be74670a150c46e9f 100644 (file)
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique table ID</comment>
-      <add>1.1</add>
+    <name>id</name>
+    <title>Profile Field ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique table ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>uf_group_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Which form does this field belong to.</comment>
-      <add>1.1</add>
-      <pseudoconstant>
-        <table>civicrm_uf_group</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>title</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>uf_group_id</name>
+    <title>Profile ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Which form does this field belong to.</comment>
+    <add>1.1</add>
+    <pseudoconstant>
+      <table>civicrm_uf_group</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>title</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>uf_group_id</name>
-       <table>civicrm_uf_group</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>uf_group_id</name>
+    <table>civicrm_uf_group</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-       <name>field_name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <required>true</required>
-       <comment>Name for CiviCRM field which is being exposed for sharing.</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <default>1</default>
-       <comment>Is this field currently shareable? If false, hide the field for all sharing contexts.</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>is_view</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>the field is view only and not editable in user forms.</comment>
-       <add>1.1</add>
+    <name>field_name</name>
+    <title>Profile Field Name</title>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Name for CiviCRM field which is being exposed for sharing.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_required</name>
-       <type>boolean</type>
-        <default>0</default>
-       <comment>Is this field required when included in a user or registration form?</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-      <name>weight</name>
-      <type>int</type>
-      <required>true</required>
-      <default>1</default>
-      <comment>Controls field display order when user framework fields are displayed in registration and account editing forms.</comment>
-      <add>1.1</add>
+    <name>is_active</name>
+    <title>Profile Field Is Active</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this field currently shareable? If false, hide the field for all sharing contexts.</comment>
+    <add>1.1</add>
   </field>
   <field>
-     <name>help_post</name>
-     <type>text</type>
-     <localizable>true</localizable>
-     <comment>Description and/or help text to display after this field.</comment>
-     <add>1.1</add>
+    <name>is_view</name>
+    <title>Profile Is View Only</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>the field is view only and not editable in user forms.</comment>
+    <add>1.1</add>
   </field>
   <field>
-     <name>help_pre</name>
-     <type>text</type>
-     <localizable>true</localizable>
-     <comment>Description and/or help text to display before this field.</comment>
-     <add>3.2</add>
+    <name>is_required</name>
+    <title>Profile Field Is Required</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this field required when included in a user or registration form?</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_registration</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this field included in new user registration forms?</comment>
-       <add>1.1</add>
-       <drop>1.3</drop>
+    <name>weight</name>
+    <title>Profile Field Weight</title>
+    <type>int</type>
+    <required>true</required>
+    <default>1</default>
+    <comment>Controls field display order when user framework fields are displayed in registration and account editing forms.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_match</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this field part of the key for matching users to contacts?</comment>
-       <add>1.1</add>
-       <drop>1.3</drop>
+    <name>help_post</name>
+    <title>Profile Field Post Help</title>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Description and/or help text to display after this field.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>visibility</name>
-       <type>varchar</type>
-       <length>32</length>
-       <default>'User and User Admin Only'</default>
-       <comment>In what context(s) is this field visible.</comment>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::ufVisibility</callback>
-       </pseudoconstant>
-       <add>1.1</add>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>help_pre</name>
+    <title>Profile Field Pre Help</title>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Description and/or help text to display before this field.</comment>
+    <add>3.2</add>
   </field>
   <field>
-       <name>listings_title</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Page title for listings page (users who share a common value for this property).</comment>
-       <add>1.1</add>
-       <drop>1.2</drop>
+    <name>is_registration</name>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this field included in new user registration forms?</comment>
+    <add>1.1</add>
+    <drop>1.3</drop>
   </field>
   <field>
-       <name>in_selector</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this field included as a column in the selector table?</comment>
-       <add>1.2</add>
+    <name>is_match</name>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this field part of the key for matching users to contacts?</comment>
+    <add>1.1</add>
+    <drop>1.3</drop>
+  </field>
+  <field>
+    <name>visibility</name>
+    <title>Profile Field Visibility</title>
+    <type>varchar</type>
+    <length>32</length>
+    <default>'User and User Admin Only'</default>
+    <comment>In what context(s) is this field visible.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::ufVisibility</callback>
+    </pseudoconstant>
+    <add>1.1</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>listings_title</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Page title for listings page (users who share a common value for this property).</comment>
+    <add>1.1</add>
+    <drop>1.2</drop>
+  </field>
+  <field>
+    <name>in_selector</name>
+    <title>Profile Field Is a Filter</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this field included as a column in the selector table?</comment>
+    <add>1.2</add>
   </field>
   <field>
-       <name>is_searchable</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this field included search form of profile?</comment>
-       <add>1.4</add>
+    <name>is_searchable</name>
+    <title>Profile Field Is Searchable</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this field included search form of profile?</comment>
+    <add>1.4</add>
   </field>
   <field>
-       <name>location_type_id</name>
-       <type>int unsigned</type>
-       <comment>Location type of this mapping, if required</comment>
-      <add>1.3</add>
+    <name>location_type_id</name>
+    <title>Profile Field Location Type</title>
+    <type>int unsigned</type>
+    <comment>Location type of this mapping, if required</comment>
+    <add>1.3</add>
   </field>
   <foreignKey>
-       <name>location_type_id</name>
-       <table>civicrm_location_type</table>
-       <key>id</key>
-       <add>1.3</add>
-       <onDelete>SET NULL</onDelete>
+    <name>location_type_id</name>
+    <table>civicrm_location_type</table>
+    <key>id</key>
+    <add>1.3</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-       <name>phone_type</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Phone type, if required</comment>
-       <add>1.3</add>
-       <drop>2.2</drop>
+    <name>phone_type</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Phone type, if required</comment>
+    <add>1.3</add>
+    <drop>2.2</drop>
   </field>
   <field>
-       <name>phone_type_id</name>
-       <type>int unsigned</type>
-       <comment>Phone Type Id, if required</comment>
-       <add>2.2</add>
+    <name>phone_type_id</name>
+    <title>Profile Field Phone Type</title>
+    <type>int unsigned</type>
+    <comment>Phone Type Id, if required</comment>
+    <add>2.2</add>
   </field>
   <field>
     <name>website_type_id</name>
+    <title>Profile Field Website Type</title>
     <type>int unsigned</type>
     <comment>Website Type Id, if required</comment>
     <add>4.5</add>
   </field>
   <field>
-       <name>label</name>
-       <type>varchar</type>
-       <length>255</length>
-       <required>true</required>
-       <localizable>true</localizable>
-       <comment>To save label for fields.</comment>
-      <add>1.4</add>
+    <name>label</name>
+    <title>Profile Field Label</title>
+    <type>varchar</type>
+    <length>255</length>
+    <required>true</required>
+    <localizable>true</localizable>
+    <comment>To save label for fields.</comment>
+    <add>1.4</add>
   </field>
   <field>
-       <name>field_type</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>This field saves field type (ie individual,household.. field etc).</comment>
-      <add>1.4</add>
+    <name>field_type</name>
+    <title>Profile Field Type</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>This field saves field type (ie individual,household.. field etc).</comment>
+    <add>1.4</add>
   </field>
   <field>
     <name>is_reserved</name>
+    <title>Profile Field Is Reserved</title>
     <type>boolean</type>
     <comment>Is this field reserved for use by some other CiviCRM functionality?</comment>
     <add>3.0</add>
   </field>
   <field>
     <name>is_multi_summary</name>
+    <title>Profile Field Supports Multiple</title>
     <type>boolean</type>
     <default>0</default>
     <comment>Include in multi-record listing?</comment>
   </field>
   <index>
     <name>IX_website_type_id</name>
+    <title>Profile Field Website Type</title>
     <fieldName>website_type_id</fieldName>
     <add>4.5</add>
   </index>
index 19db8bf78942ab88ea546c9dd54b2cd6b9f5d156..b1058e3d9a331317b9bf21de2bbc486d4df87998 100644 (file)
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique table ID</comment>
-      <add>1.1</add>
+    <name>id</name>
+    <title>Profile ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique table ID</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <default>1</default>
-       <comment>Is this form currently active? If false, hide all related fields for all sharing contexts.</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>group_type</name>
-       <type>varchar</type>
-       <length>255</length>
-       <import>true</import>
-       <comment>This column will store a comma separated list of the type(s) of profile fields.</comment>
-       <add>2.1</add>
-  </field>
-  <field>
-       <name>form_type</name>
-       <type>enum</type>
-       <values>CiviCRM Profile</values>
-       <comment>Type of form.</comment>
-       <drop>2.1</drop>
-  </field>
-  <field>
-       <name>title</name>
-       <type>varchar</type>
-       <length>64</length>
-       <localizable>true</localizable>
-      <required>true</required>
-       <comment>Form title.</comment>
-       <add>1.1</add>
-  </field>
-  <field>
-       <name>description</name>
-       <type>text</type>
-       <title>Profile Description</title>
-       <html>
-         <type>TextArea</type>
-         <rows>2</rows>
-         <cols>60</cols>
-       </html>
-       <comment>Optional verbose description of the profile.</comment>
-       <add>4.4</add>
-  </field>
-  <field>
-     <name>collapse_display</name>
-     <type>int unsigned</type>
-     <default>0</default>
-     <comment>Will this group be in collapsed or expanded mode on initial display ?</comment>
-     <add>1.1</add>
-     <drop>2.2</drop>
-  </field>
-  <field>
-     <name>help_pre</name>
-     <type>text</type>
-     <localizable>true</localizable>
-     <comment>Description and/or help text to display before fields in form.</comment>
-     <html>
-       <type>TextArea</type>
-       <rows>4</rows>
-       <cols>80</cols>
-     </html>
-     <add>1.2</add>
-  </field>
-  <field>
-     <name>help_post</name>
-     <type>text</type>
-     <localizable>true</localizable>
-     <comment>Description and/or help text to display after fields in form.</comment>
-     <html>
-       <type>TextArea</type>
-       <rows>4</rows>
-       <cols>80</cols>
-     </html>
-     <add>1.2</add>
-  </field>
-  <field>
-      <name>weight</name>
-      <type>int</type>
-      <required>true</required>
-      <default>1</default>
-      <comment>Controls display order when multiple user framework groups are setup for concurrent display.</comment>
-      <add>1.2</add>
-      <drop>1.3</drop>
-  </field>
-  <field>
-       <name>limit_listings_group_id</name>
-       <type>int unsigned</type>
-       <comment>Group id, foriegn key from civicrm_group</comment>
-      <add>1.4</add>
+    <name>is_active</name>
+    <title>Profile Is Active</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this form currently active? If false, hide all related fields for all sharing contexts.</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>group_type</name>
+    <title>Profile Group Type</title>
+    <type>varchar</type>
+    <length>255</length>
+    <import>true</import>
+    <comment>This column will store a comma separated list of the type(s) of profile fields.</comment>
+    <add>2.1</add>
+  </field>
+  <field>
+    <name>form_type</name>
+    <type>enum</type>
+    <values>CiviCRM Profile</values>
+    <comment>Type of form.</comment>
+    <drop>2.1</drop>
+  </field>
+  <field>
+    <name>title</name>
+    <type>varchar</type>
+    <length>64</length>
+    <localizable>true</localizable>
+    <required>true</required>
+    <comment>Form title.</comment>
+    <add>1.1</add>
+  </field>
+  <field>
+    <name>description</name>
+    <type>text</type>
+    <title>Profile Description</title>
+    <html>
+      <type>TextArea</type>
+      <rows>2</rows>
+      <cols>60</cols>
+    </html>
+    <comment>Optional verbose description of the profile.</comment>
+    <add>4.4</add>
+  </field>
+  <field>
+    <name>collapse_display</name>
+    <type>int unsigned</type>
+    <default>0</default>
+    <comment>Will this group be in collapsed or expanded mode on initial display ?</comment>
+    <add>1.1</add>
+    <drop>2.2</drop>
+  </field>
+  <field>
+    <name>help_pre</name>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Description and/or help text to display before fields in form.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>4</rows>
+      <cols>80</cols>
+    </html>
+    <add>1.2</add>
+  </field>
+  <field>
+    <name>help_post</name>
+    <title>Profile Post Text</title>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Description and/or help text to display after fields in form.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>4</rows>
+      <cols>80</cols>
+    </html>
+    <add>1.2</add>
+  </field>
+  <field>
+    <name>weight</name>
+    <title>Profile Weight</title>
+    <type>int</type>
+    <required>true</required>
+    <default>1</default>
+    <comment>Controls display order when multiple user framework groups are setup for concurrent display.</comment>
+    <add>1.2</add>
+    <drop>1.3</drop>
+  </field>
+  <field>
+    <name>limit_listings_group_id</name>
+    <title>Profile Search Limit Group</title>
+    <type>int unsigned</type>
+    <comment>Group id, foriegn key from civicrm_group</comment>
+    <add>1.4</add>
   </field>
   <foreignKey>
-       <name>limit_listings_group_id</name>
-       <table>civicrm_group</table>
-       <key>id</key>
-       <add>1.4</add>
-       <onDelete>SET NULL</onDelete>
+    <name>limit_listings_group_id</name>
+    <table>civicrm_group</table>
+    <key>id</key>
+    <add>1.4</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-       <name>post_URL</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Redirect to URL.</comment>
-       <add>1.4</add>
+    <name>post_URL</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Redirect to URL.</comment>
+    <add>1.4</add>
   </field>
   <field>
-      <name>add_to_group_id</name>
-      <type>int unsigned</type>
-      <comment>foreign key to civicrm_group_id</comment>
+    <name>add_to_group_id</name>
+    <title>Add Contact To Group</title>
+    <type>int unsigned</type>
+    <comment>foreign key to civicrm_group_id</comment>
   </field>
   <foreignKey>
-       <name>add_to_group_id</name>
-       <table>civicrm_group</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
+    <name>add_to_group_id</name>
+    <table>civicrm_group</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
-   <field>
-       <name>add_captcha</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Should a CAPTCHA widget be included this Profile form.</comment>
-       <add>1.1</add>
+  <field>
+    <name>add_captcha</name>
+    <title>Show Captcha On Profile</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Should a CAPTCHA widget be included this Profile form.</comment>
+    <add>1.1</add>
   </field>
   <field>
-       <name>is_map</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Do we want to map results from this profile.</comment>
-       <add>1.5</add>
+    <name>is_map</name>
+    <title>Map Profile</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Do we want to map results from this profile.</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>is_edit_link</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Should edit link display in profile selector</comment>
-       <add>1.6</add>
+    <name>is_edit_link</name>
+    <title>Show Edit Link?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Should edit link display in profile selector</comment>
+    <add>1.6</add>
   </field>
   <field>
-       <name>is_uf_link</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Should we display a link to the website profile in profile selector</comment>
-       <add>1.7</add>
+    <name>is_uf_link</name>
+    <title>Show Link to CMS User</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Should we display a link to the website profile in profile selector</comment>
+    <add>1.7</add>
   </field>
   <field>
-       <name>is_update_dupe</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Should we update the contact record if we find a duplicate</comment>
-       <add>1.7</add>
+    <name>is_update_dupe</name>
+    <title>Update on Duplicate</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Should we update the contact record if we find a duplicate</comment>
+    <add>1.7</add>
   </field>
   <field>
-       <name>cancel_URL</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Redirect to URL when Cancle button clik .</comment>
-       <add>1.4</add>
+    <name>cancel_URL</name>
+    <title>Profile Cancel URL</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Redirect to URL when Cancle button clik .</comment>
+    <add>1.4</add>
   </field>
   <field>
-       <name>is_cms_user</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Should we create a cms user for this profile </comment>
-       <add>1.8</add>
+    <name>is_cms_user</name>
+    <title>Create CMS User?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Should we create a cms user for this profile </comment>
+    <add>1.8</add>
   </field>
   <field>
-       <name>notify</name>
-       <type>text</type>
-       <add>1.8</add>
+    <name>notify</name>
+    <title>Notify on Profile Submit</title>
+    <type>text</type>
+    <add>1.8</add>
   </field>
   <field>
     <name>is_reserved</name>
+    <title>Profile Is Reserved</title>
     <type>boolean</type>
     <comment>Is this group reserved for use by some other CiviCRM functionality?</comment>
     <add>3.0</add>
   </field>
   <field>
     <name>name</name>
+    <title>Profile Name</title>
     <type>varchar</type>
     <length>64</length>
     <comment>Name of the UF group for directly addressing it in the codebase</comment>
   </field>
   <field>
     <name>created_id</name>
+    <title>Profile Created By</title>
     <type>int unsigned</type>
     <comment>FK to civicrm_contact, who created this UF group</comment>
     <add>3.0</add>
     <add>3.0</add>
   </field>
   <field>
-       <name>is_proximity_search</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Should we include proximity search feature in this profile search form?</comment>
-       <add>3.2</add>
+    <name>is_proximity_search</name>
+    <title>Include Proximity Search?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Should we include proximity search feature in this profile search form?</comment>
+    <add>3.2</add>
   </field>
 </table>
index 76a4845499034312efba10a11ac2dc4e75516231..6f23639427dbcbac4ebd87d3eaa16e4bea0f6a1b 100644 (file)
@@ -8,89 +8,97 @@
   <add>1.3</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Unique table ID</comment>
-      <add>1.3</add>
+    <name>id</name>
+    <title>UF Join ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Unique table ID</comment>
+    <add>1.3</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-        <default>1</default>
-       <comment>Is this join currently active?</comment>
-       <add>1.3</add>
+    <name>is_active</name>
+    <title>Profile Use is active</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this join currently active?</comment>
+    <add>1.3</add>
   </field>
   <field>
-       <name>module</name>
-       <type>varchar</type>
-       <length>64</length>
-       <required>true</required>
-       <comment>Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.</comment>
-       <add>1.3</add>
+    <name>module</name>
+    <title>Profile Module</title>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.</comment>
+    <add>1.3</add>
   </field>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Name of table where item being referenced is stored. Modules which only need a single collection of uf_join instances may choose not to populate entity_table and entity_id.</comment>
-       <add>1.3</add>
+    <name>entity_table</name>
+    <title>Profile Entity Table</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Name of table where item being referenced is stored. Modules which only need a single collection of uf_join instances may choose not to populate entity_table and entity_id.</comment>
+    <add>1.3</add>
   </field>
   <field>
-       <name>entity_id</name>
-       <type>int unsigned</type>
-       <comment>Foreign key to the referenced item.</comment>
-       <add>1.3</add>
+    <name>entity_id</name>
+    <title>Profile Entity ID</title>
+    <type>int unsigned</type>
+    <comment>Foreign key to the referenced item.</comment>
+    <add>1.3</add>
   </field>
   <dynamicForeignKey>
-       <idColumn>entity_id</idColumn>
-       <typeColumn>entity_table</typeColumn>
-       <add>1.3</add>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>1.3</add>
   </dynamicForeignKey>
   <index>
-       <name>index_entity</name>
-       <add>1.3</add>
-       <fieldName>entity_table</fieldName>
-       <fieldName>entity_id</fieldName>
-       <add>1.3</add>
+    <name>index_entity</name>
+    <add>1.3</add>
+    <fieldName>entity_table</fieldName>
+    <fieldName>entity_id</fieldName>
+    <add>1.3</add>
   </index>
   <field>
-      <name>weight</name>
-      <type>int</type>
-      <required>true</required>
-      <default>1</default>
-      <comment>Controls display order when multiple user framework groups are setup for concurrent display.</comment>
-      <add>1.3</add>
+    <name>weight</name>
+    <title>Profile Weight</title>
+    <type>int</type>
+    <required>true</required>
+    <default>1</default>
+    <comment>Controls display order when multiple user framework groups are setup for concurrent display.</comment>
+    <add>1.3</add>
   </field>
   <field>
-      <name>uf_group_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Which form does this field belong to.</comment>
-      <add>1.3</add>
-      <pseudoconstant>
-        <table>civicrm_uf_group</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>title</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>uf_group_id</name>
+    <title>Profile ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Which form does this field belong to.</comment>
+    <add>1.3</add>
+    <pseudoconstant>
+      <table>civicrm_uf_group</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>title</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>uf_group_id</name>
-       <table>civicrm_uf_group</table>
-       <key>id</key>
-       <add>1.3</add>
+    <name>uf_group_id</name>
+    <table>civicrm_uf_group</table>
+    <key>id</key>
+    <add>1.3</add>
   </foreignKey>
   <field>
-       <name>module_data</name>
-       <type>longtext</type>
-       <comment>Json serialized array of data used by the ufjoin.module</comment>
-       <add>4.5</add>
+    <name>module_data</name>
+    <title>Profile Use Data</title>
+    <type>longtext</type>
+    <comment>Json serialized array of data used by the ufjoin.module</comment>
+    <add>4.5</add>
   </field>
 </table>
index 6f6de437fe98e18de5795427ba0f11c1fb677059..fb3a05425dfb6af68856c6c1ecf9bd288bd5a8ef 100644 (file)
   <add>1.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>System generated ID.</comment>
-      <add>1.1</add>
+    <name>id</name>
+    <title>UF Match ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>System generated ID.</comment>
+    <add>1.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>domain_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Which Domain is this match entry for</comment>
-      <pseudoconstant>
-          <table>civicrm_domain</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <add>3.0</add>
+    <name>domain_id</name>
+    <title>UF Match Domain ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Which Domain is this match entry for</comment>
+    <pseudoconstant>
+      <table>civicrm_domain</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <add>3.0</add>
   </field>
   <foreignKey>
-       <name>domain_id</name>
-       <table>civicrm_domain</table>
-       <key>id</key>
-       <add>3.0</add>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <add>3.0</add>
   </foreignKey>
   <field>
-       <name>uf_id</name>
-       <type>int unsigned</type>
-       <required>true</required>
-       <comment>UF ID</comment>
-       <add>1.1</add>
+    <name>uf_id</name>
+    <title>CMS ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>UF ID</comment>
+    <add>1.1</add>
   </field>
   <index>
-     <name>I_civicrm_uf_match_uf_id</name>
-     <fieldName>uf_id</fieldName>
-     <add>3.3</add>
+    <name>I_civicrm_uf_match_uf_id</name>
+    <fieldName>uf_id</fieldName>
+    <add>3.3</add>
   </index>
   <field>
-       <name>uf_name</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>UF Name</comment>
-       <add>1.9.kabissa</add>
+    <name>uf_name</name>
+    <title>CMS Unique Identifier</title>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>UF Name</comment>
+    <add>1.9.kabissa</add>
   </field>
   <field>
-       <name>contact_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID</comment>
-      <add>1.1</add>
+    <name>contact_id</name>
+    <title>CiviCRM Contact ID</title>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID</comment>
+    <add>1.1</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.1</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.1</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-       <name>email</name>
-       <type>varchar</type>
-       <length>64</length>
-       <rule>email</rule>
-       <comment>Email address</comment>
-       <add>1.1</add>
-       <drop>2.0</drop>
+    <name>email</name>
+    <type>varchar</type>
+    <length>64</length>
+    <rule>email</rule>
+    <comment>Email address</comment>
+    <add>1.1</add>
+    <drop>2.0</drop>
   </field>
   <field>
     <name>language</name>
+    <title>Preferred Language</title>
     <type>varchar</type>
     <length>5</length>
     <comment>UI language preferred by the given user/contact</comment>
     <add>2.1</add>
   </field>
   <index>
-     <name>UI_uf_id_domain_id</name>
-     <fieldName>uf_id</fieldName>
-     <fieldName>domain_id</fieldName>
-     <unique>true</unique>
-     <add>1.5</add>
-     <drop>1.7</drop>
+    <name>UI_uf_id_domain_id</name>
+    <fieldName>uf_id</fieldName>
+    <fieldName>domain_id</fieldName>
+    <unique>true</unique>
+    <add>1.5</add>
+    <drop>1.7</drop>
   </index>
   <index>
-     <name>UI_uf_name_domain_id</name>
-     <fieldName>uf_name</fieldName>
-     <fieldName>domain_id</fieldName>
-     <unique>true</unique>
-     <add>2.1</add>
+    <name>UI_uf_name_domain_id</name>
+    <fieldName>uf_name</fieldName>
+    <fieldName>domain_id</fieldName>
+    <unique>true</unique>
+    <add>2.1</add>
   </index>
   <index>
     <name>UI_contact_domain_id</name>
     <fieldName>contact_id</fieldName>
-     <fieldName>domain_id</fieldName>
+    <fieldName>domain_id</fieldName>
     <unique>true</unique>
     <add>1.6</add>
   </index>
index d6a9fdff821f7e18afd0f4f2aa52f8243fcd4a0d..32a68a4c76fc04a7abd7112debbdc8359abd3a54 100644 (file)
@@ -7,58 +7,58 @@
   <comment>Website information for a specific location.</comment>
   <add>3.2</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <title>Website ID</title>
-      <required>true</required>
-      <comment>Unique Website ID</comment>
-       <add>3.2</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <title>Website ID</title>
+    <required>true</required>
+    <comment>Unique Website ID</comment>
+    <add>3.2</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <title>Contact</title>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID</comment>
-      <add>3.2</add>
+    <name>contact_id</name>
+    <title>Contact</title>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID</comment>
+    <add>3.2</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>3.2</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>3.2</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-       <name>url</name>
-       <title>Website</title>
-       <type>varchar</type>
-       <length>128</length>
-       <html>
-         <type>Text</type>
-         <size>BIG</size>
-       </html>
-       <import>true</import>
-       <headerPattern>/Website/i</headerPattern>
-       <dataPattern>/^[A-Za-z][0-9A-Za-z]{20,}$/</dataPattern>
-       <comment>Website</comment>
-       <add>3.2</add>
+    <name>url</name>
+    <title>Website</title>
+    <type>varchar</type>
+    <length>128</length>
+    <html>
+      <type>Text</type>
+      <size>BIG</size>
+    </html>
+    <import>true</import>
+    <headerPattern>/Website/i</headerPattern>
+    <dataPattern>/^[A-Za-z][0-9A-Za-z]{20,}$/</dataPattern>
+    <comment>Website</comment>
+    <add>3.2</add>
   </field>
   <field>
-      <name>website_type_id</name>
-      <title>Website Type</title>
-      <type>int unsigned</type>
-      <comment>Which Website type does this website belong to.</comment>
-      <add>3.2</add>
-      <pseudoconstant>
-        <optionGroupName>website_type</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>website_type_id</name>
+    <title>Website Type</title>
+    <type>int unsigned</type>
+    <comment>Which Website type does this website belong to.</comment>
+    <add>3.2</add>
+    <pseudoconstant>
+      <optionGroupName>website_type</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <index>
     <name>UI_website_type_id</name>
index 70654aa77c9eee590ad82ae4996ff3ee43701a71..e3a544ce29d8fcacd27676f539eb604b5124466f 100644 (file)
@@ -8,6 +8,7 @@
   <add>4.4</add>
   <field>
     <name>id</name>
+    <title>Word Replacement ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Word replacement ID</comment>
@@ -19,6 +20,7 @@
   </primaryKey>
   <field>
     <name>find_word</name>
+    <title>Replaced Word</title>
     <type>varchar</type>
     <length>255</length>
     <collate>utf8_bin</collate>
@@ -27,6 +29,7 @@
   </field>
   <field>
     <name>replace_word</name>
+    <title>Replacement Word</title>
     <type>varchar</type>
     <length>255</length>
     <collate>utf8_bin</collate>
     <add>4.4</add>
   </index>
   <field>
-       <name>match_type</name>
-       <type>varchar</type>
-       <length>16</length>
-       <default>"wildcardMatch"</default>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::getWordReplacementMatchType</callback>
-       </pseudoconstant>
-       <add>4.4</add>
-       <html>
-         <type>Select</type>
-       </html>
+     <name>match_type</name>
+     <title>Word Replacement Match Type</title>
+     <type>varchar</type>
+     <length>16</length>
+     <default>"wildcardMatch"</default>
+     <pseudoconstant>
+       <callback>CRM_Core_SelectValues::getWordReplacementMatchType</callback>
+     </pseudoconstant>
+     <add>4.4</add>
+     <html>
+       <type>Select</type>
+     </html>
   </field>
   <field>
     <name>domain_id</name>
+    <title>Word Replacement Domain ID</title>
     <type>int unsigned</type>
     <pseudoconstant>
       <table>civicrm_domain</table>
index 1c2f287004362281ba8f24e134433166c9b8423d..bdf52037c84b2cae972c3940db2721d00c437164 100644 (file)
@@ -6,24 +6,24 @@
   <name>civicrm_worldregion</name>
   <add>1.8</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Country Id</comment>
-      <add>1.8</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Country Id</comment>
+    <add>1.8</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <uniqueName>world_region</uniqueName>
-       <title>World Region</title>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>Region name to be associated with countries</comment>
-       <export>true</export>
-       <add>1.8</add>
+    <name>name</name>
+    <uniqueName>world_region</uniqueName>
+    <title>World Region</title>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>Region name to be associated with countries</comment>
+    <export>true</export>
+    <add>1.8</add>
   </field>
 </table>
index 5992f52ecd77a9495a07153a4bdfa32ccd1619e1..1969f6191070588f3844f35392bf66546abfbc39 100644 (file)
   <name>civicrm_event_page</name>
   <add>1.7</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Event Page ID</comment>
-       <add>1.7</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Event Page ID</comment>
+    <add>1.7</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>event_id</name>
-      <title>Event</title>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Event which this page belongs to.</comment>
-       <add>1.7</add>
+    <name>event_id</name>
+    <title>Event</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Event which this page belongs to.</comment>
+    <add>1.7</add>
   </field>
   <foreignKey>
-       <name>event_id</name>
-       <table>civicrm_event</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
+    <name>event_id</name>
+    <table>civicrm_event</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>intro_text</name>
-      <type>text</type>
-      <html>
-        <type>TextArea</type>
-        <rows>6</rows>
-        <cols>50</cols>
-      </html>
-      <title>Introductory Message</title>
-      <localizable>true</localizable>
-      <comment>Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>footer_text</name>
-      <title>Footer Message</title>
-      <type>text</type>
-      <html>
-        <type>TextArea</type>
-        <rows>6</rows>
-        <cols>50</cols>
-      </html>
-      <localizable>true</localizable>
-      <comment>Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>confirm_title</name>
-      <type>varchar</type>
-      <title>Confirmation Title</title>
-      <length>255</length>
-      <default>NULL</default>
-      <localizable>true</localizable>
-      <comment>Title for Confirmation page.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>confirm_text</name>
-      <type>text</type>
-      <html>
-        <type>TextArea</type>
-        <rows>6</rows>
-        <cols>50</cols>
-      </html>
-      <title>Confirm Text</title>
-      <localizable>true</localizable>
-      <comment>Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>confirm_footer_text</name>
-      <type>text</type>
-      <title>Footer Text</title>
-      <html>
-        <type>TextArea</type>
-        <rows>6</rows>
-        <cols>50</cols>
-      </html>
-      <localizable>true</localizable>
-      <comment>Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>is_email_confirm</name>
-      <type>boolean</type>
-      <title>Is confirm email</title>
-      <default>0</default>
-      <comment>If true, confirmation is automatically emailed to contact on successful registration.</comment>
-      <add>1.7</add>
-  </field>
- <field>
-      <name>confirm_email_text</name>
-      <type>text</type>
-      <title>Confirmation Email Text</title>
-      <html>
-        <type>TextArea</type>
-        <rows>4</rows>
-        <cols>50</cols>
-      </html>
-      <localizable>true</localizable>
-      <comment>text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now</comment>
-      <add>1.7</add>
-  </field>
- <field>
-      <name>confirm_from_name</name>
-      <type>varchar</type>
-      <title>Confirm From Name</title>
-      <length>255</length>
-      <localizable>true</localizable>
-      <comment>FROM email name used for confirmation emails.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>confirm_from_email</name>
-      <type>varchar</type>
-      <title>Confirm From Email</title>
-      <length>255</length>
-      <comment>FROM email address used for confirmation emails.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>cc_confirm</name>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>comma-separated list of email addresses to cc each time a confirmation is sent</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>bcc_confirm</name>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>comma-separated list of email addresses to bcc each time a confirmation is sent</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>default_fee_id</name>
-      <type>int unsigned</type>
-      <comment>FK to civicrm_option_value.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>default_discount_id</name>
-      <type>int unsigned</type>
-      <comment>FK to civicrm_option_value.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>thankyou_title</name>
-      <type>varchar</type>
-      <title>ThankYou Title</title>
-      <length>255</length>
-      <default>NULL</default>
-      <localizable>true</localizable>
-      <comment>Title for ThankYou page.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>thankyou_text</name>
-      <type>text</type>
-      <html>
-        <type>TextArea</type>
-        <rows>6</rows>
-        <cols>50</cols>
-      </html>
-      <title>ThankYou Text</title>
-      <localizable>true</localizable>
-      <comment>ThankYou Text.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>thankyou_footer_text</name>
-      <type>text</type>
-      <title>Footer Text</title>
-      <html>
-        <type>TextArea</type>
-        <rows>6</rows>
-        <cols>50</cols>
-      </html>
-      <localizable>true</localizable>
-      <comment>Footer message.</comment>
-      <add>1.7</add>
-  </field>
-  <field>
-      <name>is_pay_later</name>
-      <type>boolean</type>
-      <default>0</default>
-      <comment>if true - allows the user to send payment directly to the org later</comment>
-      <add>2.0</add>
-  </field>
-  <field>
-      <name>pay_later_text</name>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>The text displayed to the user in the main form</comment>
-      <add>2.0</add>
-  </field>
-  <field>
-      <name>pay_later_receipt</name>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>The receipt sent to the user instead of the normal receipt text</comment>
-      <add>2.0</add>
-  </field>
-  <field>
-      <name>is_multiple_registrations</name>
-      <type>boolean</type>
-      <default>0</default>
-      <comment>if true - allows the user to register multiple participants for event</comment>
-      <add>2.1</add>
+    <name>intro_text</name>
+    <type>text</type>
+    <html>
+      <type>TextArea</type>
+      <rows>6</rows>
+      <cols>50</cols>
+    </html>
+    <title>Introductory Message</title>
+    <localizable>true</localizable>
+    <comment>Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event
+      Registration form.
+    </comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>footer_text</name>
+    <title>Footer Message</title>
+    <type>text</type>
+    <html>
+      <type>TextArea</type>
+      <rows>6</rows>
+      <cols>50</cols>
+    </html>
+    <localizable>true</localizable>
+    <comment>Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event
+      Registration form.
+    </comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>confirm_title</name>
+    <type>varchar</type>
+    <title>Confirmation Title</title>
+    <length>255</length>
+    <default>NULL</default>
+    <localizable>true</localizable>
+    <comment>Title for Confirmation page.</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>confirm_text</name>
+    <type>text</type>
+    <html>
+      <type>TextArea</type>
+      <rows>6</rows>
+      <cols>50</cols>
+    </html>
+    <title>Confirm Text</title>
+    <localizable>true</localizable>
+    <comment>Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event
+      Registration form.
+    </comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>confirm_footer_text</name>
+    <type>text</type>
+    <title>Footer Text</title>
+    <html>
+      <type>TextArea</type>
+      <rows>6</rows>
+      <cols>50</cols>
+    </html>
+    <localizable>true</localizable>
+    <comment>Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event
+      Registration form.
+    </comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>is_email_confirm</name>
+    <type>boolean</type>
+    <title>Is confirm email</title>
+    <default>0</default>
+    <comment>If true, confirmation is automatically emailed to contact on successful registration.</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>confirm_email_text</name>
+    <type>text</type>
+    <title>Confirmation Email Text</title>
+    <html>
+      <type>TextArea</type>
+      <rows>4</rows>
+      <cols>50</cols>
+    </html>
+    <localizable>true</localizable>
+    <comment>text to include above standard event info on confirmation email. emails are text-only, so do not allow html
+      for now
+    </comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>confirm_from_name</name>
+    <type>varchar</type>
+    <title>Confirm From Name</title>
+    <length>255</length>
+    <localizable>true</localizable>
+    <comment>FROM email name used for confirmation emails.</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>confirm_from_email</name>
+    <type>varchar</type>
+    <title>Confirm From Email</title>
+    <length>255</length>
+    <comment>FROM email address used for confirmation emails.</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>cc_confirm</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>comma-separated list of email addresses to cc each time a confirmation is sent</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>bcc_confirm</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>comma-separated list of email addresses to bcc each time a confirmation is sent</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>default_fee_id</name>
+    <type>int unsigned</type>
+    <comment>FK to civicrm_option_value.</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>default_discount_id</name>
+    <type>int unsigned</type>
+    <comment>FK to civicrm_option_value.</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>thankyou_title</name>
+    <type>varchar</type>
+    <title>ThankYou Title</title>
+    <length>255</length>
+    <default>NULL</default>
+    <localizable>true</localizable>
+    <comment>Title for ThankYou page.</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>thankyou_text</name>
+    <type>text</type>
+    <html>
+      <type>TextArea</type>
+      <rows>6</rows>
+      <cols>50</cols>
+    </html>
+    <title>ThankYou Text</title>
+    <localizable>true</localizable>
+    <comment>ThankYou Text.</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>thankyou_footer_text</name>
+    <type>text</type>
+    <title>Footer Text</title>
+    <html>
+      <type>TextArea</type>
+      <rows>6</rows>
+      <cols>50</cols>
+    </html>
+    <localizable>true</localizable>
+    <comment>Footer message.</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>is_pay_later</name>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>if true - allows the user to send payment directly to the org later</comment>
+    <add>2.0</add>
+  </field>
+  <field>
+    <name>pay_later_text</name>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>The text displayed to the user in the main form</comment>
+    <add>2.0</add>
+  </field>
+  <field>
+    <name>pay_later_receipt</name>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>The receipt sent to the user instead of the normal receipt text</comment>
+    <add>2.0</add>
+  </field>
+  <field>
+    <name>is_multiple_registrations</name>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>if true - allows the user to register multiple participants for event</comment>
+    <add>2.1</add>
   </field>
 </table>
index e76bca9db94923fb4816a71b66125bad001573fa..260baff41817f3db3ba9872aeaa89ec00f01cc37 100644 (file)
@@ -7,73 +7,75 @@
   <add>1.7</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <uniqueName>participant_id</uniqueName>
-      <title>Participant ID</title>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Participant Id</comment>
-      <import>true</import>
-      <headerPattern>/(^(participant(.)?)?id$)/i</headerPattern>
-      <add>1.7</add>
+    <name>id</name>
+    <uniqueName>participant_id</uniqueName>
+    <title>Participant ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Participant Id</comment>
+    <import>true</import>
+    <headerPattern>/(^(participant(.)?)?id$)/i</headerPattern>
+    <add>1.7</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <uniqueName>participant_contact_id</uniqueName>
-      <type>int unsigned</type>
-      <title>Contact ID</title>
-      <headerPattern>/contact(.?id)?/i</headerPattern>
-      <import>true</import>
-      <required>true</required>
-      <comment>FK to Contact ID</comment>
-      <add>1.7</add>
+    <name>contact_id</name>
+    <uniqueName>participant_contact_id</uniqueName>
+    <type>int unsigned</type>
+    <title>Contact ID</title>
+    <headerPattern>/contact(.?id)?/i</headerPattern>
+    <import>true</import>
+    <required>true</required>
+    <comment>FK to Contact ID</comment>
+    <add>1.7</add>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>event_id</name>
-      <type>int unsigned</type>
-      <title>Event</title>
-      <import>true</import>
-      <headerPattern>/event id$/i</headerPattern>
-      <required>true</required>
-      <comment>FK to Event ID</comment>
-      <add>1.7</add>
+    <name>event_id</name>
+    <type>int unsigned</type>
+    <title>Event</title>
+    <import>true</import>
+    <headerPattern>/event id$/i</headerPattern>
+    <required>true</required>
+    <comment>FK to Event ID</comment>
+    <add>1.7</add>
   </field>
   <foreignKey>
-       <name>event_id</name>
-       <table>civicrm_event</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
+    <name>event_id</name>
+    <table>civicrm_event</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>status_id</name>
-      <uniqueName>participant_status_id</uniqueName>
-      <title>Participant Status</title>
-      <headerPattern>/(participant.)?(status)$/i</headerPattern>
-      <import>true</import>
-      <type>int unsigned</type>
-      <export>false</export>
-      <required>true</required>
-      <default>1</default>
-      <comment>Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.</comment>
-      <add>1.7</add>
-      <pseudoconstant>
-        <table>civicrm_participant_status_type</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>label</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>status_id</name>
+    <uniqueName>participant_status_id</uniqueName>
+    <title>Participant Status</title>
+    <headerPattern>/(participant.)?(status)$/i</headerPattern>
+    <import>true</import>
+    <type>int unsigned</type>
+    <export>false</export>
+    <required>true</required>
+    <default>1</default>
+    <comment>Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status =
+      Registered.
+    </comment>
+    <add>1.7</add>
+    <pseudoconstant>
+      <table>civicrm_participant_status_type</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>label</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
     <name>status_id</name>
     <add>1.8</add>
   </index>
   <field>
-      <name>role_id</name>
-      <uniqueName>participant_role_id</uniqueName>
-      <title>Participant Role(s)</title>
-      <pseudoconstant>
-        <optionGroupName>participant_role</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <headerPattern>/(participant.)?(role)$/i</headerPattern>
-      <import>true</import>
-      <type>varchar</type>
-      <length>128</length>
-      <export>false</export>
-      <default>NULL</default>
-      <comment>Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.</comment>
-      <add>1.7</add>
+    <name>role_id</name>
+    <uniqueName>participant_role_id</uniqueName>
+    <title>Participant Role(s)</title>
+    <pseudoconstant>
+      <optionGroupName>participant_role</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <headerPattern>/(participant.)?(role)$/i</headerPattern>
+    <import>true</import>
+    <type>varchar</type>
+    <length>128</length>
+    <export>false</export>
+    <default>NULL</default>
+    <comment>Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.</comment>
+    <add>1.7</add>
   </field>
   <index>
     <name>index_role_id</name>
     <add>1.8</add>
   </index>
   <field>
-      <name>register_date</name>
-      <uniqueName>participant_register_date</uniqueName>
-      <title>Register date</title>
-      <headerPattern>/^(r(egister\s)?date)$/i</headerPattern>
-      <import>true</import>
-      <type>datetime</type>
-      <comment>When did contact register for event?</comment>
-      <add>1.7</add>
+    <name>register_date</name>
+    <uniqueName>participant_register_date</uniqueName>
+    <title>Register date</title>
+    <headerPattern>/^(r(egister\s)?date)$/i</headerPattern>
+    <import>true</import>
+    <type>datetime</type>
+    <comment>When did contact register for event?</comment>
+    <add>1.7</add>
   </field>
   <field>
-      <name>source</name>
-      <uniqueName>participant_source</uniqueName>
-      <title>Participant Source</title>
-      <headerPattern>/(participant.)?(source)$/i</headerPattern>
-      <import>true</import>
-      <type>varchar</type>
-      <length>128</length>
-      <comment>Source of this event registration.</comment>
-      <add>1.7</add>
+    <name>source</name>
+    <uniqueName>participant_source</uniqueName>
+    <title>Participant Source</title>
+    <headerPattern>/(participant.)?(source)$/i</headerPattern>
+    <import>true</import>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>Source of this event registration.</comment>
+    <add>1.7</add>
   </field>
   <field>
-      <name>fee_level</name>
-      <uniqueName>participant_fee_level</uniqueName>
-      <title>Fee level</title>
-      <headerPattern>/^(f(ee\s)?level)$/i</headerPattern>
-      <type>text</type>
-      <import>true</import>
-      <comment>Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that we store the label value and not the key</comment>
-      <add>1.7</add>
+    <name>fee_level</name>
+    <uniqueName>participant_fee_level</uniqueName>
+    <title>Fee level</title>
+    <headerPattern>/^(f(ee\s)?level)$/i</headerPattern>
+    <type>text</type>
+    <import>true</import>
+    <comment>Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that
+      we store the label value and not the key
+    </comment>
+    <add>1.7</add>
   </field>
   <field>
-      <name>is_test</name>
-      <uniqueName>participant_is_test</uniqueName>
-      <title>Test</title>
-      <type>boolean</type>
-      <default>0</default>
-      <import>true</import>
-      <add>1.7</add>
+    <name>is_test</name>
+    <uniqueName>participant_is_test</uniqueName>
+    <title>Test</title>
+    <type>boolean</type>
+    <default>0</default>
+    <import>true</import>
+    <add>1.7</add>
   </field>
   <field>
-      <name>is_pay_later</name>
-      <uniqueName>participant_is_pay_later</uniqueName>
-      <title>Is Pay Later</title>
-      <type>boolean</type>
-      <default>0</default>
-      <import>true</import>
-      <headerPattern>/(is.)?(pay(.)?later)$/i</headerPattern>
-      <add>2.1</add>
+    <name>is_pay_later</name>
+    <uniqueName>participant_is_pay_later</uniqueName>
+    <title>Is Pay Later</title>
+    <type>boolean</type>
+    <default>0</default>
+    <import>true</import>
+    <headerPattern>/(is.)?(pay(.)?later)$/i</headerPattern>
+    <add>2.1</add>
   </field>
 
   <field>
-      <name>fee_amount</name>
-      <uniqueName>participant_fee_amount</uniqueName>
-      <title>Fee Amount</title>
-      <type>decimal</type>
-      <import>true</import>
-      <headerPattern>/fee(.?am(ou)?nt)?/i</headerPattern>
-      <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
-      <comment>actual processor fee if known - may be 0.</comment>
-      <add>2.1</add>
+    <name>fee_amount</name>
+    <uniqueName>participant_fee_amount</uniqueName>
+    <title>Fee Amount</title>
+    <type>decimal</type>
+    <import>true</import>
+    <headerPattern>/fee(.?am(ou)?nt)?/i</headerPattern>
+    <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
+    <comment>actual processor fee if known - may be 0.</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>registered_by_id</name>
-      <uniqueName>participant_registered_by_id</uniqueName>
-      <type>int unsigned</type>
-      <title>Registered By ID</title>
-      <import>true</import>
-      <default>NULL</default>
-      <comment>FK to Participant ID</comment>
-      <add>2.1</add>
-      <export>true</export>
+    <name>registered_by_id</name>
+    <uniqueName>participant_registered_by_id</uniqueName>
+    <type>int unsigned</type>
+    <title>Registered By ID</title>
+    <import>true</import>
+    <default>NULL</default>
+    <comment>FK to Participant ID</comment>
+    <add>2.1</add>
+    <export>true</export>
   </field>
   <foreignKey>
-       <name>registered_by_id</name>
-       <table>civicrm_participant</table>
-       <key>id</key>
-       <add>2.1</add>
-       <onDelete>SET NULL</onDelete>
+    <name>registered_by_id</name>
+    <table>civicrm_participant</table>
+    <key>id</key>
+    <add>2.1</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>discount_id</name>
-      <uniqueName>participant_discount_id</uniqueName>
-      <type>int unsigned</type>
-      <title>Discount ID</title>
-      <default>NULL</default>
-      <comment>FK to Discount ID</comment>
-      <add>2.1</add>
+    <name>discount_id</name>
+    <uniqueName>participant_discount_id</uniqueName>
+    <type>int unsigned</type>
+    <title>Discount ID</title>
+    <default>NULL</default>
+    <comment>FK to Discount ID</comment>
+    <add>2.1</add>
   </field>
   <foreignKey>
-       <name>discount_id</name>
-       <table>civicrm_discount</table>
-       <key>id</key>
-       <add>2.1</add>
-       <onDelete>SET NULL</onDelete>
+    <name>discount_id</name>
+    <table>civicrm_discount</table>
+    <key>id</key>
+    <add>2.1</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>fee_currency</name>
-      <uniqueName>participant_fee_currency</uniqueName>
-      <title>Fee Currency</title>
-      <type>varchar</type>
-      <length>3</length>
-      <default>NULL</default>
-      <import>true</import>
-      <headerPattern>/(fee)?.?cur(rency)?/i</headerPattern>
-      <dataPattern>/^[A-Z]{3}$/i</dataPattern>
-      <comment>3 character string, value derived from config setting.</comment>
-      <add>3.0</add>
-      <pseudoconstant>
-        <table>civicrm_currency</table>
-        <keyColumn>name</keyColumn>
-        <labelColumn>full_name</labelColumn>
-        <nameColumn>numeric_code</nameColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>fee_currency</name>
+    <uniqueName>participant_fee_currency</uniqueName>
+    <title>Fee Currency</title>
+    <type>varchar</type>
+    <length>3</length>
+    <default>NULL</default>
+    <import>true</import>
+    <headerPattern>/(fee)?.?cur(rency)?/i</headerPattern>
+    <dataPattern>/^[A-Z]{3}$/i</dataPattern>
+    <comment>3 character string, value derived from config setting.</comment>
+    <add>3.0</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>full_name</labelColumn>
+      <nameColumn>numeric_code</nameColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-      <name>campaign_id</name>
-      <uniqueName>participant_campaign_id</uniqueName>
-      <type>int unsigned</type>
-      <title>Campaign</title>
-      <import>true</import>
-      <comment>The campaign for which this participant has been registered.</comment>
-      <pseudoconstant>
-          <table>civicrm_campaign</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>title</labelColumn>
-      </pseudoconstant>
-      <add>3.4</add>
+    <name>campaign_id</name>
+    <uniqueName>participant_campaign_id</uniqueName>
+    <type>int unsigned</type>
+    <title>Campaign</title>
+    <import>true</import>
+    <comment>The campaign for which this participant has been registered.</comment>
+    <pseudoconstant>
+      <table>civicrm_campaign</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>title</labelColumn>
+    </pseudoconstant>
+    <add>3.4</add>
   </field>
   <foreignKey>
-      <name>campaign_id</name>
-      <table>civicrm_campaign</table>
-      <key>id</key>
-      <onDelete>SET NULL</onDelete>
+    <name>campaign_id</name>
+    <table>civicrm_campaign</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>discount_amount</name>
-      <type>int unsigned</type>
-      <title>Discount Amount</title>
-      <comment>Discount Amount</comment>
-      <add>4.1</add>
+    <name>discount_amount</name>
+    <type>int unsigned</type>
+    <title>Discount Amount</title>
+    <comment>Discount Amount</comment>
+    <add>4.1</add>
   </field>
   <field>
-      <name>cart_id</name>
-      <type>int unsigned</type>
-      <title>Event Cart ID</title>
-      <comment>FK to civicrm_event_carts</comment>
-      <add>4.1</add>
+    <name>cart_id</name>
+    <type>int unsigned</type>
+    <title>Event Cart ID</title>
+    <comment>FK to civicrm_event_carts</comment>
+    <add>4.1</add>
   </field>
   <foreignKey>
-      <name>cart_id</name>
-      <table>civicrm_event_carts</table>
-      <key>id</key>
-      <onDelete>SET NULL</onDelete>
+    <name>cart_id</name>
+    <table>civicrm_event_carts</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>must_wait</name>
-      <type>int</type>
-      <title>Must Wait on List</title>
-      <comment>On Waiting List</comment>
-      <add>4.1</add>
+    <name>must_wait</name>
+    <type>int</type>
+    <title>Must Wait on List</title>
+    <comment>On Waiting List</comment>
+    <add>4.1</add>
   </field>
 </table>
index ecb4df53bf24252dd65b1e5898dbf8810e960c8d..00edfcde042a9bbc80bc430a4f54af46ca90a2d0 100644 (file)
@@ -7,44 +7,45 @@
   <add>1.7</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <title>Payment ID</title>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Participant Payment Id</comment>
-       <add>1.7</add>
+    <name>id</name>
+    <title>Payment ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Participant Payment Id</comment>
+    <add>1.7</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>participant_id</name>
-      <title>Participant ID</title>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Participant Id (FK)</comment>
-      <add>1.7</add>
+    <name>participant_id</name>
+    <title>Participant ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Participant Id (FK)</comment>
+    <add>1.7</add>
   </field>
   <foreignKey>
-       <name>participant_id</name>
-       <table>civicrm_participant</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
+    <name>participant_id</name>
+    <table>civicrm_participant</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>contribution_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to contribution table.</comment>
-      <add>2.0</add>
+    <name>contribution_id</name>
+    <title>Contribution</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to contribution table.</comment>
+    <add>2.0</add>
   </field>
   <foreignKey>
-       <name>contribution_id</name>
-       <table>civicrm_contribution</table>
-       <key>id</key>
-       <add>2.0</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contribution_id</name>
+    <table>civicrm_contribution</table>
+    <key>id</key>
+    <add>2.0</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <index>
     <name>UI_contribution_participant</name>
index 407c6d1b1ea53f2d747e4f2010ab83b732964f7b..ee3e0337126354c6697e24690b063ba857185eb1 100644 (file)
@@ -8,6 +8,7 @@
   <log>true</log>
   <field>
     <name>id</name>
+    <title>Participant Status Type ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>unique participant status type id</comment>
@@ -30,6 +31,7 @@
   </field>
   <field>
     <name>label</name>
+    <title>Participant Status Label</title>
     <type>varchar</type>
     <length>255</length>
     <unique>true</unique>
@@ -39,6 +41,7 @@
   </field>
   <field>
     <name>class</name>
+    <title>Participant Status Class</title>
     <type>varchar</type>
     <length>8</length>
     <comment>the general group of status type this one belongs to</comment>
   </field>
   <field>
     <name>is_reserved</name>
+    <title>Participant Status Is Reserved?></title>
     <type>boolean</type>
     <comment>whether this is a status type required by the system</comment>
     <add>3.0</add>
   </field>
   <field>
     <name>is_active</name>
+    <title>Participant Status is Active</title>
     <type>boolean</type>
     <default>1</default>
     <comment>whether this status type is active</comment>
   </field>
   <field>
     <name>is_counted</name>
+    <title>Participant Status Counts?</title>
     <type>boolean</type>
     <comment>whether this status type is counted against event size limit</comment>
     <add>3.0</add>
   </field>
   <field>
     <name>weight</name>
+    <title>Status Weight</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>controls sort order</comment>
@@ -78,6 +85,7 @@
   </field>
   <field>
     <name>visibility_id</name>
+    <title>Participant Status Visibility</title>
     <type>int unsigned</type>
     <comment>whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group</comment>
     <add>3.0</add>
index 96113189f4a9552c207902c91f556c86e87c724d..19c5a24fcdd9703fb9a080a9bafc125ca79d0889 100644 (file)
@@ -7,54 +7,54 @@
   <add>1.7</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Currency Id</comment>
-      <add>1.7</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Currency Id</comment>
+    <add>1.7</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <title>Currency</title>
-       <type>varchar</type>
-       <length>64</length>
-       <import>true</import>
-       <comment>Currency Name</comment>
-       <add>1.7</add>
-       <html>
-          <type>Text</type>
-       </html>
+    <name>name</name>
+    <title>Currency</title>
+    <type>varchar</type>
+    <length>64</length>
+    <import>true</import>
+    <comment>Currency Name</comment>
+    <add>1.7</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-       <name>symbol</name>
-       <type>varchar</type>
-       <length>8</length>
-       <comment>Currency Symbol</comment>
-       <add>1.7</add>
-       <html>
-          <type>Text</type>
-        </html>
+    <name>symbol</name>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>Currency Symbol</comment>
+    <add>1.7</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-       <name>numeric_code</name>
-       <type>varchar</type>
-       <length>3</length>
-       <import>true</import>
-       <comment>Numeric currency code</comment>
-       <add>1.9</add>
+    <name>numeric_code</name>
+    <type>varchar</type>
+    <length>3</length>
+    <import>true</import>
+    <comment>Numeric currency code</comment>
+    <add>1.9</add>
   </field>
   <field>
-       <name>full_name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Full currency name</comment>
-       <html>
-          <type>Text</type>
-        </html>
-       <add>1.9</add>
+    <name>full_name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Full currency name</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>1.9</add>
   </field>
 </table>
index 82ee03d2f4ad524ff59a8c2e15a82208a4c201eb..eedf5c621069640207403b413993446f6d62fba4 100644 (file)
@@ -8,6 +8,7 @@
   <log>true</log>
   <field>
     <name>id</name>
+    <title>Financial Account ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>ID</comment>
@@ -19,6 +20,7 @@
   </primaryKey>
   <field>
     <name>name</name>
+    <title>Financial Account Name</title>
     <type>varchar</type>
     <length>255</length>
     <required>true</required>
@@ -50,6 +52,7 @@
   <field>
     <name>financial_account_type_id</name>
     <type>int unsigned</type>
+    <title>Financial Account Type</title>
     <required>true</required>
     <default>3</default>
     <add>4.3</add>
@@ -82,6 +85,7 @@
   <field>
     <name>description</name>
     <type>varchar</type>
+    <title>Financial Account Description</title>
     <length>255</length>
     <comment>Financial Type Description.</comment>
     <add>4.3</add>
@@ -89,6 +93,7 @@
   <field>
     <name>parent_id</name>
     <type>int unsigned</type>
+    <title>Financial Account Parent</title>
     <comment>Parent ID in account hierarchy</comment>
     <add>4.3</add>
   </field>
   <field>
     <name>is_header_account</name>
     <type>boolean</type>
+    <title>Header Financial Account?</title>
     <default>0</default>
     <comment>Is this a header account which does not allow transactions to be posted against it directly, but only to its sub-accounts?</comment>
     <add>4.3</add>
   <field>
     <name>is_deductible</name>
     <type>boolean</type>
+    <title>Deductible Financial Account?</title>
     <default>1</default>
     <comment>Is this account tax-deductible?</comment>
     <add>4.3</add>
   <field>
     <name>is_tax</name>
     <type>boolean</type>
+    <title>Tax Financial Account?</title>
     <default>0</default>
     <comment>Is this account for taxes?</comment>
     <add>4.3</add>
   <field>
     <name>tax_rate</name>
     <type>decimal</type>
+    <title>Financial Account Tax Rate</title>
     <length>10,8</length>
     <comment>The percentage of the total_amount that is due for this tax.</comment>
     <add>4.3</add>
   <field>
     <name>is_reserved</name>
     <type>boolean</type>
+    <title>Reserved Financial Account?</title>
     <comment>Is this a predefined system object?</comment>
     <add>4.3</add>
   </field>
   <field>
     <name>is_active</name>
     <type>boolean</type>
+    <title>Financial Account is Active</title>
     <comment>Is this property active?</comment>
     <add>4.3</add>
   </field>
   <field>
     <name>is_default</name>
     <type>boolean</type>
+    <title>Default Financial Account</title>
     <comment>Is this account the default one (or default tax one) for its financial_account_type?</comment>
     <add>4.3</add>
   </field>
index 6b580813c142ad6a0237886c8a53364c7d73577a..f5a7197155dc07f00bda6cab76715a3655a05fab 100644 (file)
@@ -9,6 +9,7 @@
   <log>true</log>
   <field>
     <name>id</name>
+    <title>Financial Type ID</title>
     <type>int unsigned</type>
     <length>10</length>
     <required>true</required>
@@ -51,6 +52,7 @@
   </field>
   <field>
     <name>is_deductible</name>
+    <title>Is Tax Deductible?</title>
     <type>boolean</type>
     <length>4</length>
     <default>1</default>
@@ -59,6 +61,7 @@
   </field>
   <field>
     <name>is_reserved</name>
+    <title>Financial Type is Reserved?</title>
     <type>boolean</type>
     <length>4</length>
     <comment>Is this a predefined system object?</comment>
@@ -67,6 +70,7 @@
   <field>
     <name>is_active</name>
     <type>boolean</type>
+    <title>Financial Type Is Active?</title>
     <length>4</length>
     <comment>Is this property active?</comment>
     <add>1.3</add>
index efc34c48464e692cff5180eb18ac76961d1c87c4..bae7d10a264476c08ba4a5a8c0dab3a93b1f240d 100644 (file)
@@ -7,6 +7,7 @@
   <add>1.8</add>
   <field>
     <name>id</name>
+    <title>Payment Processor ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Payment Processor ID</comment>
@@ -18,6 +19,7 @@
   </primaryKey>
   <field>
     <name>domain_id</name>
+    <title>Payment Processor Domain</title>
     <type>int unsigned</type>
     <required>true</required>
     <pseudoconstant>
@@ -44,6 +46,7 @@
   </field>
   <field>
     <name>description</name>
+    <title>Processor Description</title>
     <type>varchar</type>
     <length>255</length>
     <comment>Payment Processor Description.</comment>
@@ -59,6 +62,7 @@
   </field>
   <field>
     <name>payment_processor_type_id</name>
+    <title>Payment Processor Type ID</title>
     <type>int unsigned</type>
     <length>10</length>
     <add>4.3</add>
   </foreignKey>
   <field>
     <name>is_active</name>
+    <title>Processor is Active?</title>
     <type>boolean</type>
     <comment>Is this processor active?</comment>
     <add>1.8</add>
   </field>
   <field>
     <name>is_default</name>
+    <title>Processor Is Default?</title>
     <type>boolean</type>
     <comment>Is this processor the default?</comment>
     <add>1.8</add>
   </field>
   <field>
     <name>is_test</name>
+    <title>Is Test Processor?</title>
     <type>boolean</type>
     <comment>Is this processor for a test site?</comment>
     <add>1.8</add>
   </field>
   <field>
     <name>billing_mode</name>
+    <title>Processor Billing Mode</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Billing Mode</comment>
   </field>
   <field>
     <name>is_recur</name>
+    <title>Processor Supports Recurring?</title>
     <type>boolean</type>
     <comment>Can process recurring contributions</comment>
     <add>1.8</add>
   </field>
   <field>
     <name>payment_type</name>
+    <title>Payment Type</title>
     <type>int unsigned</type>
     <default>1</default>
     <comment>Payment Type: Credit or Debit</comment>
index 55b766bb4dfea113696b99c5701c91d8fbb74f0f..0e4de4de4d9eb1989789ac871236428b15e5870f 100644 (file)
@@ -6,50 +6,54 @@
   <name>civicrm_payment_processor_type</name>
   <add>1.8</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Payment Processor Type ID</comment>
-       <add>1.8</add>
+    <name>id</name>
+    <title>Payment Processor Type ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Payment Processor Type ID</comment>
+    <add>1.8</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <title>Payment Processor variable name to be used in code</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Payment Processor Name.</comment>
-       <add>1.8</add>
+    <name>name</name>
+    <title>Payment Processor variable name to be used in code</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Payment Processor Name.</comment>
+    <add>1.8</add>
   </field>
   <field>
-       <name>title</name>
-       <title>Payment Processor Title</title>
-       <type>varchar</type>
-       <length>127</length>
-       <comment>Payment Processor Name.</comment>
-       <add>1.8</add>
+    <name>title</name>
+    <title>Payment Processor Title</title>
+    <type>varchar</type>
+    <length>127</length>
+    <comment>Payment Processor Name.</comment>
+    <add>1.8</add>
   </field>
   <field>
-       <name>description</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Payment Processor Description.</comment>
-       <add>1.8</add>
+    <name>description</name>
+    <title>Processor Type De</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Payment Processor Description.</comment>
+    <add>1.8</add>
   </field>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this processor active?</comment>
-       <add>1.8</add>
+    <name>is_active</name>
+    <title>Processor Type Is Active?</title>
+    <type>boolean</type>
+    <comment>Is this processor active?</comment>
+    <add>1.8</add>
   </field>
   <field>
-        <name>is_default</name>
-        <type>boolean</type>
-        <comment>Is this processor the default?</comment>
-       <add>1.8</add>
+    <name>is_default</name>
+    <title>Processor Type is Default?</title>
+    <type>boolean</type>
+    <comment>Is this processor the default?</comment>
+    <add>1.8</add>
   </field>
   <index>
     <name>UI_name</name>
     <add>2.1</add>
   </index>
   <field>
-       <name>user_name_label</name>
-       <title>Label for User Name if used</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>user_name_label</name>
+    <title>Label for User Name if used</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>password_label</name>
-       <title>Label for password</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>password_label</name>
+    <title>Label for password</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>signature_label</name>
-       <title>Label for Signature</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>signature_label</name>
+    <title>Label for Signature</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>subject_label</name>
-       <title>Label for Subject</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>subject_label</name>
+    <title>Label for Subject</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>class_name</name>
-       <title>Suffix for PHP clas name implementation</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>class_name</name>
+    <title>Suffix for PHP clas name implementation</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>url_site_default</name>
-       <title>Default Live Site URL</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>url_site_default</name>
+    <title>Default Live Site URL</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>url_api_default</name>
-       <title>Default API Site URL</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>url_api_default</name>
+    <title>Default API Site URL</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>url_recur_default</name>
-       <title>Default Live Recurring Payments URL</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>url_recur_default</name>
+    <title>Default Live Recurring Payments URL</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>url_button_default</name>
-       <title>Default Live Button URL</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>url_button_default</name>
+    <title>Default Live Button URL</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>url_site_test_default</name>
-       <title>Default Test Site URL</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>url_site_test_default</name>
+    <title>Default Test Site URL</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>url_api_test_default</name>
-       <title>Default Test API URL</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>url_api_test_default</name>
+    <title>Default Test API URL</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>url_recur_test_default</name>
-       <title>Default Test Recurring Payment URL</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>url_recur_test_default</name>
+    <title>Default Test Recurring Payment URL</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-       <name>url_button_test_default</name>
-       <title>Default Test Button URL</title>
-       <type>varchar</type>
-       <length>255</length>
-       <add>1.8</add>
+    <name>url_button_test_default</name>
+    <title>Default Test Button URL</title>
+    <type>varchar</type>
+    <length>255</length>
+    <add>1.8</add>
   </field>
   <field>
-      <name>billing_mode</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Billing Mode</comment>
-      <pseudoconstant>
-        <callback>CRM_Core_SelectValues::billingMode</callback>
-      </pseudoconstant>
-<html>
-  <type>Select</type>
-</html>
-      <add>1.8</add>
+    <name>billing_mode</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Billing Mode</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::billingMode</callback>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>1.8</add>
   </field>
   <field>
-      <name>is_recur</name>
-      <type>boolean</type>
-      <comment>Can process recurring contributions</comment>
-      <add>1.8</add>
+    <name>is_recur</name>
+    <title>Processor Type Supports Recurring?</title>
+    <type>boolean</type>
+    <comment>Can process recurring contributions</comment>
+    <add>1.8</add>
   </field>
   <field>
-      <name>payment_type</name>
-      <type>int unsigned</type>
-      <default>1</default>
-      <comment>Payment Type: Credit or Debit</comment>
-      <add>3.0</add>
+    <name>payment_type</name>
+    <title>Processor Type Payment Type</title>
+    <type>int unsigned</type>
+    <default>1</default>
+    <comment>Payment Type: Credit or Debit</comment>
+    <add>3.0</add>
   </field>
 </table>
index 68cc704904ce694a7c3ed461fdad36f83413bb29..b851fdfdef8f0d61a7c4fbe9288f52a82c662917 100644 (file)
@@ -6,97 +6,97 @@
   <name>civicrm_tell_friend</name>
   <add>2.0</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Friend ID</comment>
-       <add>2.0</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Friend ID</comment>
+    <add>2.0</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <length>64</length>
-       <required>true</required>
-       <comment>Name of table where item being referenced is stored.</comment>
-       <add>2.0</add>
+    <name>entity_table</name>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Name of table where item being referenced is stored.</comment>
+    <add>2.0</add>
   </field>
   <field>
-       <name>entity_id</name>
-       <type>int unsigned</type>
-       <required>true</required>
-       <comment>Foreign key to the referenced item.</comment>
-       <add>2.0</add>
+    <name>entity_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Foreign key to the referenced item.</comment>
+    <add>2.0</add>
   </field>
   <dynamicForeignKey>
-       <idColumn>entity_id</idColumn>
-       <typeColumn>entity_table</typeColumn>
-       <add>2.0</add>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>2.0</add>
   </dynamicForeignKey>
   <field>
-      <name>title</name>
-      <type>varchar</type>
-      <length>255</length>
-      <localizable>true</localizable>
-      <html>
-          <type>Text</type>
-        </html>
-      <add>2.0</add>
+    <name>title</name>
+    <type>varchar</type>
+    <length>255</length>
+    <localizable>true</localizable>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.0</add>
   </field>
   <field>
-      <name>intro</name>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>Introductory message to contributor or participant displayed on the Tell a Friend form.</comment>
-      <html>
-        <type>Text</type>
-      </html>
-      <add>2.0</add>
+    <name>intro</name>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Introductory message to contributor or participant displayed on the Tell a Friend form.</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.0</add>
   </field>
   <field>
-      <name>suggested_message</name>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>Suggested message to friends, provided as default on the Tell A Friend form.</comment>
-      <html>
-          <type>Text</type>
-        </html>
-      <add>2.0</add>
+    <name>suggested_message</name>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Suggested message to friends, provided as default on the Tell A Friend form.</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.0</add>
   </field>
   <field>
-      <name>general_link</name>
-      <type>varchar</type>
-      <length>255</length>
-      <import>true</import>
-      <comment>URL for general info about the organization - included in the email sent to friends.</comment>
-      <html>
-          <type>Text</type>
-        </html>
-      <add>2.0</add>
+    <name>general_link</name>
+    <type>varchar</type>
+    <length>255</length>
+    <import>true</import>
+    <comment>URL for general info about the organization - included in the email sent to friends.</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.0</add>
   </field>
   <field>
-      <name>thankyou_title</name>
-      <type>varchar</type>
-      <length>255</length>
-      <localizable>true</localizable>
-      <comment>Text for Tell a Friend thank you page header and HTML title.</comment>
-      <html>
-          <type>Text</type>
-      </html>
-      <add>2.0</add>
+    <name>thankyou_title</name>
+    <type>varchar</type>
+    <length>255</length>
+    <localizable>true</localizable>
+    <comment>Text for Tell a Friend thank you page header and HTML title.</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.0</add>
   </field>
   <field>
-      <name>thankyou_text</name>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>Thank you message displayed on success page.</comment>
-      <add>2.0</add>
-      <html>
-          <type>Text</type>
-        </html>
+    <name>thankyou_text</name>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Thank you message displayed on success page.</comment>
+    <add>2.0</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
     <name>is_active</name>
index 88060e311cdb1a2ad7864d57abc05b585556e2b2..d5b4c784af341c7939b435c52b7450d48a95aa74 100644 (file)
@@ -1,35 +1,35 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing</base>
-    <class>BouncePattern</class>
-    <name>civicrm_mailing_bounce_pattern</name>
-    <comment>Pseudo-constant table of patterns for bounce classification</comment>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>bounce_type_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>Type of bounce</comment>
-    </field>
-    <foreignKey>
-        <name>bounce_type_id</name>
-        <table>civicrm_mailing_bounce_type</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>pattern</name>
-        <type>varchar</type>
-        <length>255</length>
-        <comment>A regexp to match a message to a bounce type</comment>
-    </field>
+  <base>CRM/Mailing</base>
+  <class>BouncePattern</class>
+  <name>civicrm_mailing_bounce_pattern</name>
+  <comment>Pseudo-constant table of patterns for bounce classification</comment>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>bounce_type_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Type of bounce</comment>
+  </field>
+  <foreignKey>
+    <name>bounce_type_id</name>
+    <table>civicrm_mailing_bounce_type</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>pattern</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>A regexp to match a message to a bounce type</comment>
+  </field>
 </table>
index 392cc9169b44850673a9d333c4b8a89266496412..3279d2d30fd0790de9ebe5d6e682cf5d454d65c7 100644 (file)
@@ -1,36 +1,36 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing</base>
-    <class>BounceType</class>
-    <name>civicrm_mailing_bounce_type</name>
-    <comment>Table to index the various bounce types and their properties</comment>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>name</name>
-        <type>varchar</type>
-        <length>8</length>
-        <required>true</required>
-        <comment>Type of bounce</comment>
-    </field>
-    <field>
-        <name>description</name>
-        <type>varchar</type>
-        <length>255</length>
-        <comment>A description of this bounce type</comment>
-    </field>
-    <field>
-        <name>hold_threshold</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>Number of bounces of this type required before the email address is put on bounce hold</comment>
-    </field>
+  <base>CRM/Mailing</base>
+  <class>BounceType</class>
+  <name>civicrm_mailing_bounce_type</name>
+  <comment>Table to index the various bounce types and their properties</comment>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>name</name>
+    <type>varchar</type>
+    <length>8</length>
+    <required>true</required>
+    <comment>Type of bounce</comment>
+  </field>
+  <field>
+    <name>description</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>A description of this bounce type</comment>
+  </field>
+  <field>
+    <name>hold_threshold</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Number of bounces of this type required before the email address is put on bounce hold</comment>
+  </field>
 </table>
index 9ff4b2accd586badfd59fd90a76b8aff6d9de9f5..76a27f027b9cc456b00827aca1ea840c865ea391 100644 (file)
@@ -6,67 +6,72 @@
   <name>civicrm_mailing_component</name>
   <comment>Stores information about the mailing components (header/footer).</comment>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
+    <name>id</name>
+    <title>Mailing Component ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <title>Component Name</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>The name of this component</comment>
+    <name>name</name>
+    <title>Component Name</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>The name of this component</comment>
   </field>
   <field>
-       <name>component_type</name>
-       <type>varchar</type>
-       <length>12</length>
-       <comment>Type of Component.</comment>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::mailingComponents</callback>
-       </pseudoconstant>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>component_type</name>
+    <title>Mailing Component Type</title>
+    <type>varchar</type>
+    <length>12</length>
+    <comment>Type of Component.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::mailingComponents</callback>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>subject</name>
-       <type>varchar</type>
-       <length>255</length>
+    <name>subject</name>
+    <type>varchar</type>
+    <length>255</length>
   </field>
   <field>
-       <name>body_html</name>
-       <type>text</type>
-       <comment>Body of the component in html format.</comment>
-       <html>
-         <type>TextArea</type>
-         <rows>8</rows>
-         <cols>80</cols>
-       </html>
-       </field>
+    <name>body_html</name>
+    <title>Mailing Component Body HTML</title>
+    <type>text</type>
+    <comment>Body of the component in html format.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>8</rows>
+      <cols>80</cols>
+    </html>
+  </field>
   <field>
-       <name>body_text</name>
-       <type>text</type>
-       <comment>Body of the component in text format.</comment>
-       <html>
-         <type>TextArea</type>
-         <rows>8</rows>
-         <cols>80</cols>
-       </html>
-       </field>
+    <name>body_text</name>
+    <type>text</type>
+    <comment>Body of the component in text format.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>8</rows>
+      <cols>80</cols>
+    </html>
+  </field>
   <field>
-       <name>is_default</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this the default component for this component_type?</comment>
+    <name>is_default</name>
+    <title>Mailing Component is Default?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this the default component for this component_type?</comment>
   </field>
   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <comment>Is this property active?</comment>
+    <name>is_active</name>
+    <title>Mailing Component Is Active?</title>
+    <type>boolean</type>
+    <comment>Is this property active?</comment>
   </field>
 </table>
index e634ac8b00771a66eba01a6776254e16250b7d77..5842e95102788aa3121c14d7391bf5cf7d00179d 100644 (file)
@@ -1,55 +1,55 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing/Event</base>
-    <class>Bounce</class>
-    <name>civicrm_mailing_event_bounce</name>
-    <comment>Tracks when and why an email bounced.</comment>
-    <archive>true</archive>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>event_queue_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to EventQueue</comment>
-    </field>
-    <foreignKey>
-        <name>event_queue_id</name>
-        <table>civicrm_mailing_event_queue</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-      <name>bounce_type_id</name>
-      <type>int unsigned</type>
-      <comment>What type of bounce was it?</comment>
-      <pseudoconstant>
-        <table>civicrm_mailing_bounce_type</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-    </field>
-    <field>
-        <name>bounce_reason</name>
-        <type>varchar</type>
-        <length>255</length>
-        <comment>The reason the email bounced.</comment>
-    </field>
-    <field>
-        <name>time_stamp</name>
-        <type>datetime</type>
-        <required>true</required>
-        <comment>When this bounce event occurred.</comment>
-    </field>
+  <base>CRM/Mailing/Event</base>
+  <class>Bounce</class>
+  <name>civicrm_mailing_event_bounce</name>
+  <comment>Tracks when and why an email bounced.</comment>
+  <archive>true</archive>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>event_queue_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to EventQueue</comment>
+  </field>
+  <foreignKey>
+    <name>event_queue_id</name>
+    <table>civicrm_mailing_event_queue</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>bounce_type_id</name>
+    <type>int unsigned</type>
+    <comment>What type of bounce was it?</comment>
+    <pseudoconstant>
+      <table>civicrm_mailing_bounce_type</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>bounce_reason</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>The reason the email bounced.</comment>
+  </field>
+  <field>
+    <name>time_stamp</name>
+    <type>datetime</type>
+    <required>true</required>
+    <comment>When this bounce event occurred.</comment>
+  </field>
 </table>
index c054d16ad3864d3b5fc0d5abddf63467ac951f9d..0dc679c0b0df63a9938afb9493f01af8064246e5 100644 (file)
@@ -1,36 +1,39 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing/Event</base>
-    <class>Confirm</class>
-    <name>civicrm_mailing_event_confirm</name>
-    <comment>Tracks when a subscription event is confirmed by email</comment>
-    <archive>true</archive>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>event_subscribe_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to civicrm_mailing_event_subscribe</comment>
-    </field>
-    <foreignKey>
-        <name>event_subscribe_id</name>
-        <table>civicrm_mailing_event_subscribe</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>time_stamp</name>
-        <type>datetime</type>
-        <required>true</required>
-        <comment>When this confirmation event occurred.</comment>
-    </field>
+  <base>CRM/Mailing/Event</base>
+  <class>Confirm</class>
+  <name>civicrm_mailing_event_confirm</name>
+  <comment>Tracks when a subscription event is confirmed by email</comment>
+  <archive>true</archive>
+  <field>
+    <name>id</name>
+    <title>Mailing Confirmation ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>event_subscribe_id</name>
+    <title>Mailing Subscribe ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to civicrm_mailing_event_subscribe</comment>
+  </field>
+  <foreignKey>
+    <name>event_subscribe_id</name>
+    <table>civicrm_mailing_event_subscribe</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>time_stamp</name>
+    <title>Confirm Timestamp</title>
+    <type>datetime</type>
+    <required>true</required>
+    <comment>When this confirmation event occurred.</comment>
+  </field>
 </table>
index 931c56810fe9e9a9ec32fbcf9133c5988d7ffeda..8eff1e1f84574933fda8e3c7a50ef545de4d9694 100644 (file)
@@ -1,36 +1,36 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing/Event</base>
-    <class>Delivered</class>
-    <name>civicrm_mailing_event_delivered</name>
-    <comment>Tracks when a queued email is actually delivered to the MTA</comment>
-    <archive>true</archive>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>event_queue_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to EventQueue</comment>
-    </field>
-    <foreignKey>
-        <name>event_queue_id</name>
-        <table>civicrm_mailing_event_queue</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>time_stamp</name>
-        <type>datetime</type>
-        <required>true</required>
-        <comment>When this delivery event occurred.</comment>
-    </field>
+  <base>CRM/Mailing/Event</base>
+  <class>Delivered</class>
+  <name>civicrm_mailing_event_delivered</name>
+  <comment>Tracks when a queued email is actually delivered to the MTA</comment>
+  <archive>true</archive>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>event_queue_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to EventQueue</comment>
+  </field>
+  <foreignKey>
+    <name>event_queue_id</name>
+    <table>civicrm_mailing_event_queue</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>time_stamp</name>
+    <type>datetime</type>
+    <required>true</required>
+    <comment>When this delivery event occurred.</comment>
+  </field>
 </table>
index 813abd255ceb52db18343b838cf5f64b1a69b919..1535bed82af878e0efc7b7daac4f004fdae2ffb9 100644 (file)
@@ -1,47 +1,47 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing/Event</base>
-    <class>Forward</class>
-    <name>civicrm_mailing_event_forward</name>
-    <comment>Tracks when a contact forwards a mailing to a (new) contact</comment>
-    <archive>true</archive>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>event_queue_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to EventQueue</comment>
-    </field>
-    <foreignKey>
-        <name>event_queue_id</name>
-        <table>civicrm_mailing_event_queue</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>dest_queue_id</name>
-        <type>int unsigned</type>
-        <comment>FK to EventQueue for destination</comment>
-    </field>
-    <foreignKey>
-        <name>dest_queue_id</name>
-        <table>civicrm_mailing_event_queue</table>
-        <key>id</key>
-        <onDelete>SET NULL</onDelete>
-    </foreignKey>
-    <field>
-        <name>time_stamp</name>
-        <type>datetime</type>
-        <required>true</required>
-        <comment>When this forward event occurred.</comment>
-    </field>
+  <base>CRM/Mailing/Event</base>
+  <class>Forward</class>
+  <name>civicrm_mailing_event_forward</name>
+  <comment>Tracks when a contact forwards a mailing to a (new) contact</comment>
+  <archive>true</archive>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>event_queue_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to EventQueue</comment>
+  </field>
+  <foreignKey>
+    <name>event_queue_id</name>
+    <table>civicrm_mailing_event_queue</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>dest_queue_id</name>
+    <type>int unsigned</type>
+    <comment>FK to EventQueue for destination</comment>
+  </field>
+  <foreignKey>
+    <name>dest_queue_id</name>
+    <table>civicrm_mailing_event_queue</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
+  </foreignKey>
+  <field>
+    <name>time_stamp</name>
+    <type>datetime</type>
+    <required>true</required>
+    <comment>When this forward event occurred.</comment>
+  </field>
 </table>
index be9f42d6f7c5d7dce6e328852d9b4b2a351c1f12..8367148a563de55aef0e39378bde5de893067620 100644 (file)
@@ -1,36 +1,36 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing/Event</base>
-    <class>Opened</class>
-    <name>civicrm_mailing_event_opened</name>
-    <comment>Tracks when a delivered email is opened by the recipient</comment>
-    <archive>true</archive>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>event_queue_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to EventQueue</comment>
-    </field>
-    <foreignKey>
-        <name>event_queue_id</name>
-        <table>civicrm_mailing_event_queue</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>time_stamp</name>
-        <type>datetime</type>
-        <required>true</required>
-        <comment>When this open event occurred.</comment>
-    </field>
+  <base>CRM/Mailing/Event</base>
+  <class>Opened</class>
+  <name>civicrm_mailing_event_opened</name>
+  <comment>Tracks when a delivered email is opened by the recipient</comment>
+  <archive>true</archive>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>event_queue_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to EventQueue</comment>
+  </field>
+  <foreignKey>
+    <name>event_queue_id</name>
+    <table>civicrm_mailing_event_queue</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>time_stamp</name>
+    <type>datetime</type>
+    <required>true</required>
+    <comment>When this open event occurred.</comment>
+  </field>
 </table>
index 13c8d775d822954b5eded6463343d4d6197df7cf..44fef4f0442cba0954fabcbc451d2b332c7bd8a6 100644 (file)
@@ -1,73 +1,73 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing/Event</base>
-    <class>Queue</class>
-    <name>civicrm_mailing_event_queue</name>
-    <comment>A collection of all intended recipients of a job</comment>
-    <archive>true</archive>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>job_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to Job</comment>
-    </field>
-    <foreignKey>
-        <name>job_id</name>
-        <table>civicrm_mailing_job</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>email_id</name>
-        <type>int unsigned</type>
-  <default>NULL</default>
-        <comment>FK to Email</comment>
-    </field>
-    <foreignKey>
-        <name>email_id</name>
-        <table>civicrm_email</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>contact_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to Contact</comment>
-    </field>
-    <foreignKey>
-        <name>contact_id</name>
-        <table>civicrm_contact</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>hash</name>
-        <type>varchar</type>
-        <length>255</length>
-        <required>true</required>
-        <comment>Security hash</comment>
-    </field>
-    <field>
-        <name>phone_id</name>
-        <type>int unsigned</type>
-        <default>NULL</default>
-        <comment>FK to Phone</comment>
-    </field>
-    <foreignKey>
-        <name>phone_id</name>
-        <table>civicrm_phone</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
+  <base>CRM/Mailing/Event</base>
+  <class>Queue</class>
+  <name>civicrm_mailing_event_queue</name>
+  <comment>A collection of all intended recipients of a job</comment>
+  <archive>true</archive>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>job_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Job</comment>
+  </field>
+  <foreignKey>
+    <name>job_id</name>
+    <table>civicrm_mailing_job</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>email_id</name>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>FK to Email</comment>
+  </field>
+  <foreignKey>
+    <name>email_id</name>
+    <table>civicrm_email</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Contact</comment>
+  </field>
+  <foreignKey>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>hash</name>
+    <type>varchar</type>
+    <length>255</length>
+    <required>true</required>
+    <comment>Security hash</comment>
+  </field>
+  <field>
+    <name>phone_id</name>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>FK to Phone</comment>
+  </field>
+  <foreignKey>
+    <name>phone_id</name>
+    <table>civicrm_phone</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
 </table>
index a964447e30d8bc5f60078c6cc6587d8f5049608a..0fe33e555844bb9cf3fe3c6ce54dacaddae9822d 100644 (file)
@@ -1,36 +1,36 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing/Event</base>
-    <class>Reply</class>
-    <name>civicrm_mailing_event_reply</name>
-    <comment>Tracks when a contact replies to a mailing</comment>
-    <archive>true</archive>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>event_queue_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to EventQueue</comment>
-    </field>
-    <foreignKey>
-        <name>event_queue_id</name>
-        <table>civicrm_mailing_event_queue</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>time_stamp</name>
-        <type>datetime</type>
-        <required>true</required>
-        <comment>When this reply event occurred.</comment>
-    </field>
+  <base>CRM/Mailing/Event</base>
+  <class>Reply</class>
+  <name>civicrm_mailing_event_reply</name>
+  <comment>Tracks when a contact replies to a mailing</comment>
+  <archive>true</archive>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>event_queue_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to EventQueue</comment>
+  </field>
+  <foreignKey>
+    <name>event_queue_id</name>
+    <table>civicrm_mailing_event_queue</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>time_stamp</name>
+    <type>datetime</type>
+    <required>true</required>
+    <comment>When this reply event occurred.</comment>
+  </field>
 </table>
index 21fe0f5794c8a5286d540f51380426546e42b8cc..e281de8443260b6f8c479633173241be4b9ea8dd 100644 (file)
@@ -1,63 +1,68 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing/Event</base>
-    <class>Subscribe</class>
-    <name>civicrm_mailing_event_subscribe</name>
-    <comment>Tracks when a (new) contact subscribes to a group by email</comment>
-    <archive>true</archive>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-      <name>group_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to Group</comment>
-      <pseudoconstant>
-        <table>civicrm_group</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>title</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-    </field>
-    <foreignKey>
-        <name>group_id</name>
-        <table>civicrm_group</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>contact_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to Contact</comment>
-    </field>
-    <foreignKey>
-        <name>contact_id</name>
-        <table>civicrm_contact</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>hash</name>
-        <type>varchar</type>
-        <length>255</length>
-        <required>true</required>
-        <comment>Security hash</comment>
-    </field>
-    <field>
-        <name>time_stamp</name>
-        <type>datetime</type>
-        <required>true</required>
-        <comment>When this subscription event occurred.</comment>
-    </field>
+  <base>CRM/Mailing/Event</base>
+  <class>Subscribe</class>
+  <name>civicrm_mailing_event_subscribe</name>
+  <comment>Tracks when a (new) contact subscribes to a group by email</comment>
+  <archive>true</archive>
+  <field>
+    <name>id</name>
+    <title>Mailing Subscribe ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>group_id</name>
+    <title>Mailing Subscribe Group</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Group</comment>
+    <pseudoconstant>
+      <table>civicrm_group</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>title</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <foreignKey>
+    <name>group_id</name>
+    <table>civicrm_group</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>contact_id</name>
+    <title>Mailing Subscribe Contact</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Contact</comment>
+  </field>
+  <foreignKey>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>hash</name>
+    <title>Mailing Subscribe Hash</title>
+    <type>varchar</type>
+    <length>255</length>
+    <required>true</required>
+    <comment>Security hash</comment>
+  </field>
+  <field>
+    <name>time_stamp</name>
+    <title>Mailing Subscribe Timestamp</title>
+    <type>datetime</type>
+    <required>true</required>
+    <comment>When this subscription event occurred.</comment>
+  </field>
 </table>
index 1f574b308c0484b474e314f76dbbe836a39ecc9e..575c7885d2e05bd9631a34d631466d49819ca23d 100644 (file)
@@ -1,48 +1,48 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing/Event</base>
-    <class>TrackableURLOpen</class>
-    <name>civicrm_mailing_event_trackable_url_open</name>
-    <comment>Tracks when a TrackableURL is clicked by a recipient.</comment>
-    <archive>true</archive>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>event_queue_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to EventQueue</comment>
-    </field>
-    <foreignKey>
-        <name>event_queue_id</name>
-        <table>civicrm_mailing_event_queue</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>trackable_url_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to TrackableURL</comment>
-    </field>
-    <foreignKey>
-        <name>trackable_url_id</name>
-        <table>civicrm_mailing_trackable_url</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>time_stamp</name>
-        <type>datetime</type>
-        <required>true</required>
-        <comment>When this trackable URL open occurred.</comment>
-    </field>
+  <base>CRM/Mailing/Event</base>
+  <class>TrackableURLOpen</class>
+  <name>civicrm_mailing_event_trackable_url_open</name>
+  <comment>Tracks when a TrackableURL is clicked by a recipient.</comment>
+  <archive>true</archive>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>event_queue_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to EventQueue</comment>
+  </field>
+  <foreignKey>
+    <name>event_queue_id</name>
+    <table>civicrm_mailing_event_queue</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>trackable_url_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to TrackableURL</comment>
+  </field>
+  <foreignKey>
+    <name>trackable_url_id</name>
+    <table>civicrm_mailing_trackable_url</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>time_stamp</name>
+    <type>datetime</type>
+    <required>true</required>
+    <comment>When this trackable URL open occurred.</comment>
+  </field>
 </table>
index 871453924d402a175686265beffef0a7d7e4e0ae..3504bf8c8142d8c99dce1844c4908c33bc7123b4 100644 (file)
@@ -1,42 +1,46 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing/Event</base>
-    <class>Unsubscribe</class>
-    <name>civicrm_mailing_event_unsubscribe</name>
-    <comment>Tracks when a recipient unsubscribes from a group/domain</comment>
-    <archive>true</archive>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>event_queue_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to EventQueue</comment>
-    </field>
-    <foreignKey>
-        <name>event_queue_id</name>
-        <table>civicrm_mailing_event_queue</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
-    <field>
-        <name>org_unsubscribe</name>
-        <type>boolean</type>
-        <required>true</required>
-        <comment>Unsubscribe at org- or group-level</comment>
-    </field>
-    <field>
-        <name>time_stamp</name>
-        <type>datetime</type>
-        <required>true</required>
-        <comment>When this delivery event occurred.</comment>
-    </field>
+  <base>CRM/Mailing/Event</base>
+  <class>Unsubscribe</class>
+  <name>civicrm_mailing_event_unsubscribe</name>
+  <comment>Tracks when a recipient unsubscribes from a group/domain</comment>
+  <archive>true</archive>
+  <field>
+    <name>id</name>
+    <title>Unsubscribe ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>event_queue_id</name>
+    <title>Mailing Event Queue</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to EventQueue</comment>
+  </field>
+  <foreignKey>
+    <name>event_queue_id</name>
+    <table>civicrm_mailing_event_queue</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
+  <field>
+    <name>org_unsubscribe</name>
+    <title>Unsubscribe is for Organization?</title>
+    <type>boolean</type>
+    <required>true</required>
+    <comment>Unsubscribe at org- or group-level</comment>
+  </field>
+  <field>
+    <name>time_stamp</name>
+    <title>Unsubscribe Timestamp</title>
+    <type>datetime</type>
+    <required>true</required>
+    <comment>When this delivery event occurred.</comment>
+  </field>
 </table>
index 182f7b34dd69aa2592032054667134b44c081a41..cefea95c39353f7169bb6349175f102e7f467e3a 100644 (file)
   <comment>Stores information about a mailing.</comment>
   <archive>true</archive>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
+    <name>id</name>
+    <title>Mailing ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>domain_id</name>
-      <type>int unsigned</type>
-      <pseudoconstant>
-          <table>civicrm_domain</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <comment>Which site is this mailing for</comment>
-      <add>3.4</add>
+    <name>domain_id</name>
+    <title>Mailing Domain</title>
+    <type>int unsigned</type>
+    <pseudoconstant>
+      <table>civicrm_domain</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <comment>Which site is this mailing for</comment>
+    <add>3.4</add>
   </field>
   <foreignKey>
-       <name>domain_id</name>
-       <table>civicrm_domain</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
-       <add>3.4</add>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
+    <add>3.4</add>
   </foreignKey>
   <field>
-      <name>header_id</name>
-      <type>int unsigned</type>
-      <comment>FK to the header component.</comment>
+    <name>header_id</name>
+    <title>Mailing Header</title>
+    <type>int unsigned</type>
+    <comment>FK to the header component.</comment>
   </field>
   <foreignKey>
-       <name>header_id</name>
-       <table>civicrm_mailing_component</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
+    <name>header_id</name>
+    <table>civicrm_mailing_component</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>footer_id</name>
-      <type>int unsigned</type>
-      <comment>FK to the footer component.</comment>
+    <name>footer_id</name>
+    <title>Mailing Footer</title>
+    <type>int unsigned</type>
+    <comment>FK to the footer component.</comment>
   </field>
   <foreignKey>
-       <name>footer_id</name>
-       <table>civicrm_mailing_component</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
+    <name>footer_id</name>
+    <table>civicrm_mailing_component</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-        <name>reply_id</name>
-        <type>int unsigned</type>
-        <comment>FK to the auto-responder component.</comment>
+    <name>reply_id</name>
+    <title>Mailing Reply</title>
+    <type>int unsigned</type>
+    <comment>FK to the auto-responder component.</comment>
   </field>
   <foreignKey>
-        <name>reply_id</name>
-        <table>civicrm_mailing_component</table>
-        <key>id</key>
-        <onDelete>SET NULL</onDelete>
+    <name>reply_id</name>
+    <table>civicrm_mailing_component</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-        <name>unsubscribe_id</name>
-        <type>int unsigned</type>
-        <comment>FK to the unsubscribe component.</comment>
+    <name>unsubscribe_id</name>
+    <title>Mailing Unsubscribe</title>
+    <type>int unsigned</type>
+    <comment>FK to the unsubscribe component.</comment>
   </field>
   <foreignKey>
-        <name>unsubscribe_id</name>
-        <table>civicrm_mailing_component</table>
-        <key>id</key>
-        <onDelete>SET NULL</onDelete>
+    <name>unsubscribe_id</name>
+    <table>civicrm_mailing_component</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-        <name>resubscribe_id</name>
-        <type>int unsigned</type>
+    <name>resubscribe_id</name>
+    <title>Mailing Resubscribe</title>
+    <type>int unsigned</type>
   </field>
   <foreignKey>
-        <name>optout_id</name>
-        <table>civicrm_mailing_component</table>
-        <key>id</key>
-        <onDelete>SET NULL</onDelete>
+    <name>optout_id</name>
+    <table>civicrm_mailing_component</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-        <name>optout_id</name>
-        <type>int unsigned</type>
-        <comment>FK to the opt-out component.</comment>
+    <name>optout_id</name>
+    <title>Mailing Opt Out</title>
+    <type>int unsigned</type>
+    <comment>FK to the opt-out component.</comment>
   </field>
   <foreignKey>
-        <name>optout_id</name>
-        <table>civicrm_mailing_component</table>
-        <key>id</key>
-        <onDelete>SET NULL</onDelete>
+    <name>optout_id</name>
+    <table>civicrm_mailing_component</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>Mailing Name.</comment>
-       <html>
-         <type>Text</type>
-       </html>
+    <name>name</name>
+    <title>Mailing Name</title>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>Mailing Name.</comment>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-       <name>from_name</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>From Header of mailing</comment>
-       <html>
-         <type>Text</type>
-       </html>
+    <name>from_name</name>
+    <title>Mailing From Name</title>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>From Header of mailing</comment>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-       <name>from_email</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>From Email of mailing</comment>
-       <html>
-         <type>Text</type>
-       </html>
+    <name>from_email</name>
+    <title>Mailing From Email</title>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>From Email of mailing</comment>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-       <name>replyto_email</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>Reply-To Email of mailing</comment>
-       <html>
-         <type>Text</type>
-       </html>
+    <name>replyto_email</name>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>Reply-To Email of mailing</comment>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-       <name>subject</name>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>Subject of mailing</comment>
-       <html>
-         <type>Text</type>
-       </html>
+    <name>subject</name>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>Subject of mailing</comment>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-       <name>body_text</name>
-       <type>longtext</type>
-       <comment>Body of the mailing in text format.</comment>
+    <name>body_text</name>
+    <type>longtext</type>
+    <comment>Body of the mailing in text format.</comment>
   </field>
   <field>
-       <name>body_html</name>
-       <type>longtext</type>
-       <comment>Body of the mailing in html format.</comment>
+    <name>body_html</name>
+    <type>longtext</type>
+    <comment>Body of the mailing in html format.</comment>
   </field>
   <field>
-       <name>url_tracking</name>
-       <type>boolean</type>
-       <comment>Should we track URL click-throughs for this mailing?</comment>
-       <html>
-         <type>CheckBox</type>
-       </html>
+    <name>url_tracking</name>
+    <type>boolean</type>
+    <comment>Should we track URL click-throughs for this mailing?</comment>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <field>
-       <name>forward_replies</name>
-       <type>boolean</type>
-       <comment>Should we forward replies back to the author?</comment>
-       <html>
-         <type>CheckBox</type>
-       </html>
+    <name>forward_replies</name>
+    <type>boolean</type>
+    <comment>Should we forward replies back to the author?</comment>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <field>
-        <name>auto_responder</name>
-        <type>boolean</type>
-        <comment>Should we enable the auto-responder?</comment>
-        <html>
-          <type>CheckBox</type>
-        </html>
+    <name>auto_responder</name>
+    <type>boolean</type>
+    <comment>Should we enable the auto-responder?</comment>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <field>
-       <name>open_tracking</name>
-       <type>boolean</type>
-       <comment>Should we track when recipients open/read this mailing?</comment>
+    <name>open_tracking</name>
+    <title>Track Mailing?</title>
+    <type>boolean</type>
+    <comment>Should we track when recipients open/read this mailing?</comment>
   </field>
   <field>
-       <name>is_completed</name>
-       <type>boolean</type>
-       <comment>Has at least one job associated with this mailing finished?</comment>
-       <html>
-         <type>CheckBox</type>
-       </html>
+    <name>is_completed</name>
+    <title>Mailing Completed</title>
+    <type>boolean</type>
+    <comment>Has at least one job associated with this mailing finished?</comment>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <field>
-      <name>msg_template_id</name>
-      <type>int unsigned</type>
-      <comment>FK to the message template.</comment>
+    <name>msg_template_id</name>
+    <title>Mailing Message Template</title>
+    <type>int unsigned</type>
+    <comment>FK to the message template.</comment>
   </field>
   <foreignKey>
-       <name>msg_template_id</name>
-       <table>civicrm_msg_template</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
+    <name>msg_template_id</name>
+    <table>civicrm_msg_template</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>override_verp</name>
-      <type>boolean</type>
-      <default>0</default>
-      <add>2.2</add>
-      <comment>Should we overrite VERP address in Reply-To</comment>
-      <html>
-         <type>CheckBox</type>
-      </html>
+    <name>override_verp</name>
+    <type>boolean</type>
+    <default>0</default>
+    <add>2.2</add>
+    <comment>Should we overrite VERP address in Reply-To</comment>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <field>
-      <name>created_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID who first created this mailing</comment>
+    <name>created_id</name>
+    <title>Mailing Creator</title>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID who first created this mailing</comment>
   </field>
   <foreignKey>
-       <name>created_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
+    <name>created_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>created_date</name>
-      <type>datetime</type>
-      <title>Mailing Created Date</title>
-      <comment>Date and time this mailing was created.</comment>
-      <add>3.0</add>
-      <html>
-        <type>Select Date</type>
-      </html>
+    <name>created_date</name>
+    <type>datetime</type>
+    <title>Mailing Created Date</title>
+    <comment>Date and time this mailing was created.</comment>
+    <add>3.0</add>
+    <html>
+      <type>Select Date</type>
+    </html>
   </field>
   <field>
-      <name>scheduled_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID who scheduled this mailing</comment>
+    <name>scheduled_id</name>
+    <title>Scheduled By</title>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID who scheduled this mailing</comment>
   </field>
   <foreignKey>
-       <name>scheduled_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
+    <name>scheduled_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>scheduled_date</name>
-      <type>datetime</type>
-      <title>Mailing Scheduled Date</title>
-      <comment>Date and time this mailing was scheduled.</comment>
-      <add>3.3</add>
+    <name>scheduled_date</name>
+    <type>datetime</type>
+    <title>Mailing Scheduled Date</title>
+    <comment>Date and time this mailing was scheduled.</comment>
+    <add>3.3</add>
   </field>
   <field>
-      <name>approver_id</name>
-      <type>int unsigned</type>
-      <comment>FK to Contact ID who approved this mailing</comment>
+    <name>approver_id</name>
+    <title>Approved By</title>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID who approved this mailing</comment>
   </field>
   <foreignKey>
-       <name>approver_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
+    <name>approver_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>approval_date</name>
-      <type>datetime</type>
-      <title>Mailing Approved Date</title>
-      <comment>Date and time this mailing was approved.</comment>
-      <add>3.3</add>
-  </field>
-  <field>
-      <name>approval_status_id</name>
-      <type>int unsigned</type>
-      <title>Approval Status</title>
-      <comment>The status of this mailing. Values: none, approved, rejected</comment>
-      <pseudoconstant>
-        <optionGroupName>mail_approval_status</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>3.3</add>
-  </field>
-  <field>
-      <name>approval_note</name>
-      <type>longtext</type>
-      <title>Approval Note</title>
-      <comment>Note behind the decision.</comment>
-      <add>3.3</add>
-      <html>
-         <type>TextArea</type>
-       </html>
-  </field>
-  <field>
-       <name>is_archived</name>
-       <type>boolean</type>
-       <default>0</default>
-       <comment>Is this mailing archived?</comment>
-       <html>
-         <type>CheckBox</type>
-       </html>
-       <add>2.2</add>
-  </field>
-  <field>
-       <name>visibility</name>
-       <type>varchar</type>
-       <length>40</length>
-       <default>'Public Pages'</default>
-       <comment>In what context(s) is the mailing contents visible (online viewing)</comment>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::groupVisibility</callback>
-       </pseudoconstant>
-       <add>3.3</add>
-       <html>
-         <type>Select</type>
-       </html>
-  </field>
-  <field>
-       <name>campaign_id</name>
-       <type>int unsigned</type>
-       <comment>The campaign for which this mailing has been initiated.</comment>
-       <pseudoconstant>
-          <table>civicrm_campaign</table>
-          <keyColumn>id</keyColumn>
-          <labelColumn>title</labelColumn>
-       </pseudoconstant>
-       <add>3.4</add>
-       <html>
-          <type>Select</type>
-        </html>
+    <name>approval_date</name>
+    <type>datetime</type>
+    <title>Mailing Approved Date</title>
+    <comment>Date and time this mailing was approved.</comment>
+    <add>3.3</add>
+  </field>
+  <field>
+    <name>approval_status_id</name>
+    <type>int unsigned</type>
+    <title>Approval Status</title>
+    <comment>The status of this mailing. Values: none, approved, rejected</comment>
+    <pseudoconstant>
+      <optionGroupName>mail_approval_status</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>3.3</add>
+  </field>
+  <field>
+    <name>approval_note</name>
+    <type>longtext</type>
+    <title>Approval Note</title>
+    <comment>Note behind the decision.</comment>
+    <add>3.3</add>
+    <html>
+      <type>TextArea</type>
+    </html>
+  </field>
+  <field>
+    <name>is_archived</name>
+    <type>boolean</type>
+    <title>Is Mailing Archived?</title>
+    <default>0</default>
+    <comment>Is this mailing archived?</comment>
+    <html>
+      <type>CheckBox</type>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>visibility</name>
+    <type>varchar</type>
+    <title>Mailing Visibility</title>
+    <length>40</length>
+    <default>'Public Pages'</default>
+    <comment>In what context(s) is the mailing contents visible (online viewing)</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::groupVisibility</callback>
+    </pseudoconstant>
+    <add>3.3</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>campaign_id</name>
+    <type>int unsigned</type>
+    <title>Mailing Campaign</title>
+    <comment>The campaign for which this mailing has been initiated.</comment>
+    <pseudoconstant>
+      <table>civicrm_campaign</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>title</labelColumn>
+    </pseudoconstant>
+    <add>3.4</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>campaign_id</name>
-       <table>civicrm_campaign</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
+    <name>campaign_id</name>
+    <table>civicrm_campaign</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>dedupe_email</name>
-      <type>boolean</type>
-      <default>0</default>
-      <add>4.1</add>
-      <comment>Remove duplicate emails?</comment>
-      <html>
-         <type>CheckBox</type>
-       </html>
-  </field>
-  <field>
-       <name>sms_provider_id</name>
-       <type>int unsigned</type>
-       <add>4.2</add>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>dedupe_email</name>
+    <type>boolean</type>
+    <title>No Duplicate emails?</title>
+    <default>0</default>
+    <add>4.1</add>
+    <comment>Remove duplicate emails?</comment>
+    <html>
+      <type>CheckBox</type>
+    </html>
+  </field>
+  <field>
+    <name>sms_provider_id</name>
+    <title>Mailing SMS Provider</title>
+    <type>int unsigned</type>
+    <add>4.2</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>sms_provider_id</name>
-       <table>civicrm_sms_provider</table>
-       <key>id</key>
-       <onDelete>SET NULL</onDelete>
-       <add>4.2</add>
+    <name>sms_provider_id</name>
+    <table>civicrm_sms_provider</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
+    <add>4.2</add>
   </foreignKey>
   <field>
-      <name>hash</name>
-      <title>Mailing Hash</title>
-      <type>varchar</type>
-      <length>16</length>
-      <comment>Key for validating requests related to this mailing.</comment>
-      <add>4.5</add>
+    <name>hash</name>
+    <title>Mailing Hash</title>
+    <type>varchar</type>
+    <length>16</length>
+    <comment>Key for validating requests related to this mailing.</comment>
+    <add>4.5</add>
   </field>
   <index>
-       <name>index_hash</name>
-       <fieldName>hash</fieldName>
-       <add>4.5</add>
+    <name>index_hash</name>
+    <fieldName>hash</fieldName>
+    <add>4.5</add>
   </index>
 </table>
index 0d4553681809e7a0de4b70496441dbcff6fd39bc..3bb7ec4fa6c53e75f4784b3a6b3188573db6bbfd 100644 (file)
@@ -7,63 +7,70 @@
   <comment>Stores information about the groups that participate in this mailing..</comment>
   <archive>true</archive>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
+    <name>id</name>
+    <title>Mailing Group ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>mailing_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>The ID of a previous mailing to include/exclude recipients.</comment>
+    <name>mailing_id</name>
+    <title>Mailing</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>The ID of a previous mailing to include/exclude recipients.</comment>
   </field>
   <foreignKey>
-       <name>mailing_id</name>
-       <table>civicrm_mailing</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
+    <name>mailing_id</name>
+    <table>civicrm_mailing</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-       <name>group_type</name>
-       <type>varchar</type>
-       <length>8</length>
-       <comment>Are the members of the group included or excluded?.</comment>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::getMailingGroupTypes</callback>
-       </pseudoconstant>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>group_type</name>
+    <title>Mailing Group Type</title>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>Are the members of the group included or excluded?.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::getMailingGroupTypes</callback>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <length>64</length>
-       <required>true</required>
-       <comment>Name of table where item being referenced is stored.</comment>
+    <name>entity_table</name>
+    <title>Mailing Group Entity Table</title>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Name of table where item being referenced is stored.</comment>
   </field>
   <field>
-       <name>entity_id</name>
-       <type>int unsigned</type>
-       <required>true</required>
-       <comment>Foreign key to the referenced item.</comment>
+    <name>entity_id</name>
+    <title>Mailing Group Entity</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Foreign key to the referenced item.</comment>
   </field>
   <dynamicForeignKey>
-       <idColumn>entity_id</idColumn>
-       <typeColumn>entity_table</typeColumn>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
   </dynamicForeignKey>
   <field>
-        <name>search_id</name>
-        <type>int</type>
-        <comment>The filtering search. custom search id or -1 for civicrm api search</comment>
+    <name>search_id</name>
+    <title>Mailing Group Search</title>
+    <type>int</type>
+    <comment>The filtering search. custom search id or -1 for civicrm api search</comment>
   </field>
   <field>
-        <name>search_args</name>
-        <type>text</type>
-        <comment>The arguments to be sent to the search function</comment>
+    <name>search_args</name>
+    <title>Mailing Group Search Arguments</title>
+    <type>text</type>
+    <comment>The arguments to be sent to the search function</comment>
   </field>
 </table>
index 244efea68a06999d920453593146cdb1920e5dab..8444b8b21f4564c06bbd2faaf662166c37bf164e 100644 (file)
   <comment>Stores information about the job that executes this mailing</comment>
   <archive>true</archive>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
+    <name>id</name>
+    <title>Mailing JOb ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>mailing_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>The ID of the mailing this Job will send.</comment>
+    <name>mailing_id</name>
+    <title>Mailing</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>The ID of the mailing this Job will send.</comment>
   </field>
   <foreignKey>
-       <name>mailing_id</name>
-       <table>civicrm_mailing</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
+    <name>mailing_id</name>
+    <table>civicrm_mailing</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>scheduled_date</name>
-      <type>datetime</type>
-      <comment>date on which this job was scheduled.</comment>
+    <name>scheduled_date</name>
+    <title>Mailing Scheduled Date</title>
+    <type>datetime</type>
+    <comment>date on which this job was scheduled.</comment>
   </field>
   <field>
-      <name>start_date</name>
-      <type>datetime</type>
-      <comment>date on which this job was started.</comment>
+    <name>start_date</name>
+    <title>Mailing Job Start Date</title>
+    <type>datetime</type>
+    <comment>date on which this job was started.</comment>
   </field>
   <field>
-      <name>end_date</name>
-      <type>datetime</type>
-      <comment>date on which this job ended.</comment>
+    <name>end_date</name>
+    <title>Mailing Job End Date</title>
+    <type>datetime</type>
+    <comment>date on which this job ended.</comment>
   </field>
   <field>
-      <name>status</name>
-      <type>varchar</type>
-      <length>12</length>
-      <comment>The state of this job</comment>
-      <pseudoconstant>
-        <callback>CRM_Core_SelectValues::getMailingJobStatus</callback>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>status</name>
+    <title>Mailing Job Status</title>
+    <type>varchar</type>
+    <length>12</length>
+    <comment>The state of this job</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::getMailingJobStatus</callback>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-      <name>is_test</name>
-      <type>boolean</type>
-      <default>0</default>
-      <comment>Is this job for a test mail?</comment>
-      <add>1.9</add>
+    <name>is_test</name>
+    <title>Mailing Job Is Test?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this job for a test mail?</comment>
+    <add>1.9</add>
   </field>
   <field>
-      <name>job_type</name>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>Type of mailling job: null | child </comment>
-      <add>3.3</add>
+    <name>job_type</name>
+    <title>Mailing Job Type</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Type of mailling job: null | child </comment>
+    <add>3.3</add>
   </field>
   <field>
-      <name>parent_id</name>
-      <type>int unsigned</type>
-      <comment>Parent job id</comment>
-      <default>NULL</default>
-      <add>3.3</add>
+    <name>parent_id</name>
+    <title>Mailing Job Parent</title>
+    <type>int unsigned</type>
+    <comment>Parent job id</comment>
+    <default>NULL</default>
+    <add>3.3</add>
   </field>
   <foreignKey>
-       <name>parent_id</name>
-       <table>civicrm_mailing_job</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
+    <name>parent_id</name>
+    <table>civicrm_mailing_job</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>job_offset</name>
-      <type>int</type>
-      <comment>Offset of the child job</comment>
-      <default>0</default>
-      <add>3.3</add>
+    <name>job_offset</name>
+    <title>Mailing Job Offset</title>
+    <type>int</type>
+    <comment>Offset of the child job</comment>
+    <default>0</default>
+    <add>3.3</add>
   </field>
   <field>
-      <name>job_limit</name>
-      <type>int</type>
-      <comment>Queue size limit for each child job</comment>
-      <default>0</default>
-      <add>3.3</add>
+    <name>job_limit</name>
+    <title>Mailing Job Limit</title>
+    <type>int</type>
+    <comment>Queue size limit for each child job</comment>
+    <default>0</default>
+    <add>3.3</add>
   </field>
 </table>
index 95b143626aea38a8e799a67389b007131a183c5e..188f64dbb1fa9942446e328ce1c57c0559debb19 100644 (file)
@@ -7,60 +7,65 @@
   <comment>Stores information about the recipients of a mailing.</comment>
   <archive>true</archive>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
+    <name>id</name>
+    <title>Mailing Recipients ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
   </field>
   <primaryKey>
-      <name>id</name>
-      <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>mailing_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>The ID of the mailing this Job will send.</comment>
+    <name>mailing_id</name>
+    <title>Mailing</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>The ID of the mailing this Job will send.</comment>
   </field>
   <foreignKey>
-      <name>mailing_id</name>
-      <table>civicrm_mailing</table>
-      <key>id</key>
-      <onDelete>CASCADE</onDelete>
+    <name>mailing_id</name>
+    <table>civicrm_mailing</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to Contact</comment>
+    <name>contact_id</name>
+    <title>Mailing Recipient</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Contact</comment>
   </field>
   <foreignKey>
-      <name>contact_id</name>
-      <table>civicrm_contact</table>
-      <key>id</key>
-      <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>email_id</name>
-      <type>int unsigned</type>
-      <default>NULL</default>
-      <comment>FK to Email</comment>
+    <name>email_id</name>
+    <title>Recipient Email</title>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>FK to Email</comment>
   </field>
   <foreignKey>
-      <name>email_id</name>
-      <table>civicrm_email</table>
-      <key>id</key>
-      <onDelete>CASCADE</onDelete>
+    <name>email_id</name>
+    <table>civicrm_email</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>phone_id</name>
-      <type>int unsigned</type>
-      <default>NULL</default>
-      <comment>FK to Phone</comment>
+    <name>phone_id</name>
+    <title>Recipient Phone</title>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>FK to Phone</comment>
   </field>
   <foreignKey>
-      <name>phone_id</name>
-      <table>civicrm_phone</table>
-      <key>id</key>
-      <onDelete>CASCADE</onDelete>
+    <name>phone_id</name>
+    <table>civicrm_phone</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
 </table>
index c820ef33ff51360efe1af74f3108843baaaee314..505de09fee49498905590f7a50ff1dd234901d00 100644 (file)
@@ -6,49 +6,49 @@
   <name>civicrm_mailing_spool</name>
   <comment>Stores the outbond mails</comment>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>job_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>The ID of the Job .</comment>
+    <name>job_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>The ID of the Job .</comment>
   </field>
   <foreignKey>
-       <name>job_id</name>
-       <table>civicrm_mailing_job</table>
-       <key>id</key>
-       <onDelete>CASCADE</onDelete>
+    <name>job_id</name>
+    <table>civicrm_mailing_job</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>recipient_email</name>
-      <type>text</type>
-      <comment>The email of the receipients this mail is to be sent.</comment>
+    <name>recipient_email</name>
+    <type>text</type>
+    <comment>The email of the receipients this mail is to be sent.</comment>
   </field>
   <field>
-      <name>headers</name>
-      <type>text</type>
-      <comment>The header information of this mailing .</comment>
+    <name>headers</name>
+    <type>text</type>
+    <comment>The header information of this mailing .</comment>
   </field>
   <field>
-      <name>body</name>
-      <type>text</type>
-      <comment>The body of this mailing.</comment>
+    <name>body</name>
+    <type>text</type>
+    <comment>The body of this mailing.</comment>
   </field>
   <field>
-      <name>added_at</name>
-      <type>datetime</type>
-      <comment>date on which this job was added.</comment>
+    <name>added_at</name>
+    <type>datetime</type>
+    <comment>date on which this job was added.</comment>
   </field>
   <field>
-      <name>removed_at</name>
-      <type>datetime</type>
-      <comment>date on which this job was removed.</comment>
+    <name>removed_at</name>
+    <type>datetime</type>
+    <comment>date on which this job was removed.</comment>
   </field>
 </table>
index 5c95a7a54a9a6dbc29de9e4c9a50ff33796e73fe..92fb4353abd295feb01e4c125202e23b62951812 100644 (file)
@@ -1,37 +1,37 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 
 <table>
-    <base>CRM/Mailing</base>
-    <class>TrackableURL</class>
-    <name>civicrm_mailing_trackable_url</name>
-    <comment>Stores URLs for which we should track click-throughs from mailings</comment>
-    <archive>true</archive>
-    <field>
-        <name>id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-    </field>
-    <primaryKey>
-        <name>id</name>
-        <autoincrement>true</autoincrement>
-    </primaryKey>
-    <field>
-        <name>url</name>
-        <type>varchar</type>
-        <length>255</length>
-        <required>true</required>
-        <comment>The URL to be tracked.</comment>
-    </field>
-    <field>
-        <name>mailing_id</name>
-        <type>int unsigned</type>
-        <required>true</required>
-        <comment>FK to the mailing</comment>
-    </field>
-    <foreignKey>
-        <name>mailing_id</name>
-        <table>civicrm_mailing</table>
-        <key>id</key>
-        <onDelete>CASCADE</onDelete>
-    </foreignKey>
+  <base>CRM/Mailing</base>
+  <class>TrackableURL</class>
+  <name>civicrm_mailing_trackable_url</name>
+  <comment>Stores URLs for which we should track click-throughs from mailings</comment>
+  <archive>true</archive>
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>url</name>
+    <type>varchar</type>
+    <length>255</length>
+    <required>true</required>
+    <comment>The URL to be tracked.</comment>
+  </field>
+  <field>
+    <name>mailing_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to the mailing</comment>
+  </field>
+  <foreignKey>
+    <name>mailing_id</name>
+    <table>civicrm_mailing</table>
+    <key>id</key>
+    <onDelete>CASCADE</onDelete>
+  </foreignKey>
 </table>
index c1c1d52346269ceb2bcecd09bb2cd03bf9673f19..b37292db17ed0642393c7d58abd90d8a5a0695fb 100644 (file)
   <add>1.5</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <uniqueName>membership_id</uniqueName>
-      <type>int unsigned</type>
-      <required>true</required>
-      <import>true</import>
-      <title>Membership ID</title>
-      <headerPattern>/^(m(embership\s)?id)$/i</headerPattern>
-      <comment>Membership Id</comment>
-      <add>1.5</add>
+    <name>id</name>
+    <uniqueName>membership_id</uniqueName>
+    <type>int unsigned</type>
+    <required>true</required>
+    <import>true</import>
+    <title>Membership ID</title>
+    <headerPattern>/^(m(embership\s)?id)$/i</headerPattern>
+    <comment>Membership Id</comment>
+    <add>1.5</add>
   </field>
   <primaryKey>
-      <name>id</name>
-      <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
 
   <field>
-      <name>contact_id</name>
-      <uniqueName>membership_contact_id</uniqueName>
-      <type>int unsigned</type>
-      <required>true</required>
-      <title>Contact ID</title>
-      <headerPattern>/contact(.?id)?/i</headerPattern>
-      <dataPattern>/^\d+$/</dataPattern>
-      <import>true</import>
-      <comment>FK to Contact ID</comment>
-      <add>1.5</add>
-      <html>
-       <type>Autocomplete-Select</type>
-     </html>
+    <name>contact_id</name>
+    <uniqueName>membership_contact_id</uniqueName>
+    <type>int unsigned</type>
+    <required>true</required>
+    <title>Contact ID</title>
+    <headerPattern>/contact(.?id)?/i</headerPattern>
+    <dataPattern>/^\d+$/</dataPattern>
+    <import>true</import>
+    <comment>FK to Contact ID</comment>
+    <add>1.5</add>
+    <html>
+      <type>Autocomplete-Select</type>
+    </html>
   </field>
   <foreignKey>
-      <name>contact_id</name>
-      <table>civicrm_contact</table>
-      <key>id</key>
-      <add>1.5</add>
-      <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.5</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>membership_type_id</name>
-      <type>int unsigned</type>
-      <title>Membership Type Id</title>
-      <import>true</import>
-      <headerPattern>/^(m(embership\s)?type)$/i</headerPattern>
-      <export>false</export>
-      <required>true</required>
-      <comment>FK to Membership Type</comment>
-      <pseudoconstant>
-        <table>civicrm_membership_type</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>1.5</add>
+    <name>membership_type_id</name>
+    <type>int unsigned</type>
+    <title>Membership Type Id</title>
+    <import>true</import>
+    <headerPattern>/^(m(embership\s)?type)$/i</headerPattern>
+    <export>false</export>
+    <required>true</required>
+    <comment>FK to Membership Type</comment>
+    <pseudoconstant>
+      <table>civicrm_membership_type</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>1.5</add>
   </field>
   <foreignKey>
-      <name>membership_type_id</name>
-      <table>civicrm_membership_type</table>
-      <key>id</key>
-      <add>1.5</add>
-      <onDelete>CASCADE</onDelete>
+    <name>membership_type_id</name>
+    <table>civicrm_membership_type</table>
+    <key>id</key>
+    <add>1.5</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>join_date</name>
-      <title>Member Since</title>
-      <type>date</type>
-      <import>true</import>
-      <headerPattern>/^join|(j(oin\s)?date)$/i</headerPattern>
-      <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
-      <comment>Beginning of initial membership period (member since...).</comment>
-      <add>1.5</add>
-      <html>
-        <type>Select Date</type>
-      </html>
+    <name>join_date</name>
+    <title>Member Since</title>
+    <type>date</type>
+    <import>true</import>
+    <headerPattern>/^join|(j(oin\s)?date)$/i</headerPattern>
+    <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
+    <comment>Beginning of initial membership period (member since...).</comment>
+    <add>1.5</add>
+    <html>
+      <type>Select Date</type>
+    </html>
   </field>
   <field>
-      <name>start_date</name>
-      <uniqueName>membership_start_date</uniqueName>
-      <title>Membership Start Date</title>
-      <type>date</type>
-      <import>true</import>
-      <headerPattern>/(member(ship)?.)?start(s)?(.date$)?/i</headerPattern>
-      <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
-      <comment>Beginning of current uninterrupted membership period.</comment>
-      <add>1.5</add>
-      <html>
-        <type>Select Date</type>
-      </html>
+    <name>start_date</name>
+    <uniqueName>membership_start_date</uniqueName>
+    <title>Membership Start Date</title>
+    <type>date</type>
+    <import>true</import>
+    <headerPattern>/(member(ship)?.)?start(s)?(.date$)?/i</headerPattern>
+    <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
+    <comment>Beginning of current uninterrupted membership period.</comment>
+    <add>1.5</add>
+    <html>
+      <type>Select Date</type>
+    </html>
   </field>
   <field>
-      <name>end_date</name>
-      <uniqueName>membership_end_date</uniqueName>
-      <title>Membership Expiration Date</title>
-      <type>date</type>
-      <import>true</import>
-      <headerPattern>/(member(ship)?.)?end(s)?(.date$)?/i</headerPattern>
-      <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
-      <comment>Current membership period expire date.</comment>
-      <add>1.5</add>
-      <html>
-        <type>Select Date</type>
-      </html>
+    <name>end_date</name>
+    <uniqueName>membership_end_date</uniqueName>
+    <title>Membership Expiration Date</title>
+    <type>date</type>
+    <import>true</import>
+    <headerPattern>/(member(ship)?.)?end(s)?(.date$)?/i</headerPattern>
+    <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
+    <comment>Current membership period expire date.</comment>
+    <add>1.5</add>
+    <html>
+      <type>Select Date</type>
+    </html>
   </field>
   <field>
-      <name>source</name>
-      <uniqueName>membership_source</uniqueName>
-      <title>Source</title>
-      <import>true</import>
-       <headerPattern>/^(member(ship?))?source$/i</headerPattern>
-      <type>varchar</type>
-      <length>128</length>
-      <add>1.5</add>
-      <html>
-         <type>Text</type>
-       </html>
+    <name>source</name>
+    <uniqueName>membership_source</uniqueName>
+    <title>Source</title>
+    <import>true</import>
+    <headerPattern>/^(member(ship?))?source$/i</headerPattern>
+    <type>varchar</type>
+    <length>128</length>
+    <add>1.5</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-      <name>status_id</name>
-      <title>Membership Status Id</title>
-      <import>true</import>
-      <headerPattern>/(member(ship|).)?(status)$/i</headerPattern>
-      <type>int unsigned</type>
-      <export>false</export>
-      <required>true</required>
-      <comment>FK to Membership Status</comment>
-      <pseudoconstant>
-        <table>civicrm_membership_status</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>label</labelColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>1.5</add>
+    <name>status_id</name>
+    <title>Membership Status Id</title>
+    <import>true</import>
+    <headerPattern>/(member(ship|).)?(status)$/i</headerPattern>
+    <type>int unsigned</type>
+    <export>false</export>
+    <required>true</required>
+    <comment>FK to Membership Status</comment>
+    <pseudoconstant>
+      <table>civicrm_membership_status</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>label</labelColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>1.5</add>
   </field>
   <foreignKey>
-      <name>status_id</name>
-      <table>civicrm_membership_status</table>
-      <key>id</key>
-      <add>1.5</add>
-      <onDelete>CASCADE</onDelete>
+    <name>status_id</name>
+    <table>civicrm_membership_status</table>
+    <key>id</key>
+    <add>1.5</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>is_override</name>
-      <title>Status Override</title>
-      <import>true</import>
-      <headerPattern>/override$/i</headerPattern>
-      <type>boolean</type>
-      <comment>Admin users may set a manual status which overrides the calculated status. When this flag is true, automated status update scripts should NOT modify status for the record.</comment>
-      <html>
-         <type>CheckBox</type>
-       </html>
-      <add>1.5</add>
+    <name>is_override</name>
+    <title>Status Override</title>
+    <import>true</import>
+    <headerPattern>/override$/i</headerPattern>
+    <type>boolean</type>
+    <comment>Admin users may set a manual status which overrides the calculated status. When this flag is true, automated status update scripts should NOT modify status for the record.</comment>
+    <html>
+      <type>CheckBox</type>
+    </html>
+    <add>1.5</add>
   </field>
   <field>
-      <name>owner_membership_id</name>
-      <type>int unsigned</type>
+    <name>owner_membership_id</name>
+    <type>int unsigned</type>
     <title>Primary Member ID</title>
-      <comment>Optional FK to Parent Membership.</comment>
-      <export>true</export>
-      <add>1.7</add>
+    <comment>Optional FK to Parent Membership.</comment>
+    <export>true</export>
+    <add>1.7</add>
   </field>
   <foreignKey>
-       <name>owner_membership_id</name>
-       <table>civicrm_membership</table>
-       <key>id</key>
-       <add>1.7</add>
-       <onDelete>SET NULL</onDelete>
+    <name>owner_membership_id</name>
+    <table>civicrm_membership</table>
+    <key>id</key>
+    <add>1.7</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <index>
     <name>index_owner_membership_id</name>
     <add>1.7</add>
   </index>
   <field>
-      <name>max_related</name>
-      <type>int</type>
-      <comment>Maximum number of related memberships (membership_type override).</comment>
-      <add>4.3</add>
-      <html>
-         <type>Text</type>
-       </html>
+    <name>max_related</name>
+    <type>int</type>
+    <comment>Maximum number of related memberships (membership_type override).</comment>
+    <add>4.3</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-      <name>is_test</name>
-      <title>Test</title>
-      <uniqueName>member_is_test</uniqueName>
-      <type>boolean</type>
-      <default>0</default>
-      <import>true</import>
-      <headerPattern>/(is.)?test(.member(ship)?)?/i</headerPattern>
-      <html>
-         <type>CheckBox</type>
-       </html>
+    <name>is_test</name>
+    <title>Test</title>
+    <uniqueName>member_is_test</uniqueName>
+    <type>boolean</type>
+    <default>0</default>
+    <import>true</import>
+    <headerPattern>/(is.)?test(.member(ship)?)?/i</headerPattern>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <field>
-      <name>is_pay_later</name>
-      <uniqueName>member_is_pay_later</uniqueName>
-      <title>Is Pay Later</title>
-      <type>boolean</type>
-      <default>0</default>
-      <import>true</import>
-      <headerPattern>/(is.)?(pay(.)?later)$/i</headerPattern>
-      <add>2.1</add>
-      <html>
-         <type>CheckBox</type>
-       </html>
+    <name>is_pay_later</name>
+    <uniqueName>member_is_pay_later</uniqueName>
+    <title>Is Pay Later</title>
+    <type>boolean</type>
+    <default>0</default>
+    <import>true</import>
+    <headerPattern>/(is.)?(pay(.)?later)$/i</headerPattern>
+    <add>2.1</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <field>
     <name>contribution_recur_id</name>
+    <title>Memberhip Recurring Contribution</title>
     <type>int unsigned</type>
     <comment>Conditional foreign key to civicrm_contribution_recur id. Each membership in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.</comment>
     <add>3.3</add>
index ef1d5a1dd88ffe52883568709875049eb6543d98..a7dbccae28b5f1ae15a3929f695c67f9ed8ba0a2 100644 (file)
   <add>1.5</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Membership Id</comment>
-      <add>1.5</add>
+    <name>id</name>
+    <title>Membership Block ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Membership Id</comment>
+    <add>1.5</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Name for Membership Status</comment>
-       <add>1.5</add>
+    <name>entity_table</name>
+    <title>Membership Block Entity Table</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Name for Membership Status</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>entity_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to civicrm_contribution_page.id</comment>
-      <add>1.5</add>
+    <name>entity_id</name>
+    <title>Membership Block Entity ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to civicrm_contribution_page.id</comment>
+    <add>1.5</add>
   </field>
   <foreignKey>
-      <name>entity_id</name>
-      <table>civicrm_contribution_page</table>
-      <key>id</key>
-      <add>1.5</add>
+    <name>entity_id</name>
+    <table>civicrm_contribution_page</table>
+    <key>id</key>
+    <add>1.5</add>
   </foreignKey>
   <field>
-       <name>membership_types</name>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Membership types to be exposed by this block</comment>
-       <add>1.5</add>
+    <name>membership_types</name>
+    <title>Membership Block Membership Types</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Membership types to be exposed by this block</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>membership_type_default</name>
-      <type>int unsigned</type>
-      <comment>Optional foreign key to membership_type</comment>
-      <add>1.5</add>
+    <name>membership_type_default</name>
+    <title>Membership Block Default Type</title>
+    <type>int unsigned</type>
+    <comment>Optional foreign key to membership_type</comment>
+    <add>1.5</add>
   </field>
- <foreignKey>
-      <name>membership_type_default</name>
-      <table>civicrm_membership_type</table>
-      <key>id</key>
-      <add>1.5</add>
 <foreignKey>
+    <name>membership_type_default</name>
+    <table>civicrm_membership_type</table>
+    <key>id</key>
+    <add>1.5</add>
   </foreignKey>
   <field>
-      <name>display_min_fee</name>
-      <type>boolean</type>
-      <default>1</default>
-      <comment>Display minimum membership fee</comment>
-      <add>1.5</add>
+    <name>display_min_fee</name>
+    <title>Membership Block Display Minimum Fee</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Display minimum membership fee</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>is_separate_payment</name>
-      <type>boolean</type>
-      <default>1</default>
-      <comment>Should membership transactions be processed separately</comment>
-      <add>1.5</add>
+    <name>is_separate_payment</name>
+    <title>Membership Block Is Separate Payment</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Should membership transactions be processed separately</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>new_title</name>
-      <type>varchar</type>
-      <length>255</length>
-      <localizable>true</localizable>
-      <comment>Title to display at top of block</comment>
-      <add>1.5</add>
+    <name>new_title</name>
+    <title>Membership Block New Title</title>
+    <type>varchar</type>
+    <length>255</length>
+    <localizable>true</localizable>
+    <comment>Title to display at top of block</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>new_text</name>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>Text to display below title</comment>
-      <add>1.5</add>
+    <name>new_text</name>
+    <title>Membership Block New Text</title>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Text to display below title</comment>
+    <add>1.5</add>
   </field>
-<field>
-      <name>renewal_title</name>
-      <type>varchar</type>
-      <length>255</length>
-      <localizable>true</localizable>
-      <comment>Title for renewal</comment>
-      <add>1.5</add>
+  <field>
+    <name>renewal_title</name>
+    <title>Membership Block Renewal Title</title>
+    <type>varchar</type>
+    <length>255</length>
+    <localizable>true</localizable>
+    <comment>Title for renewal</comment>
+    <add>1.5</add>
   </field>
-<field>
-      <name>renewal_text</name>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>Text to display for member renewal</comment>
-      <add>1.5</add>
+  <field>
+    <name>renewal_text</name>
+    <title>Membership Block Renewal Text</title>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Text to display for member renewal</comment>
+    <add>1.5</add>
   </field>
- <field>
-      <name>is_required</name>
-      <title>Is Required</title>
-      <type>boolean</type>
-      <default>0</default>
-      <comment>Is membership sign up optional</comment>
-      <add>1.5</add>
 <field>
+    <name>is_required</name>
+    <title>Is Required</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is membership sign up optional</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>is_active</name>
-      <title>Is Active</title>
-      <type>boolean</type>
-      <default>1</default>
-      <comment>Is this membership_block enabled</comment>
-      <add>1.5</add>
+    <name>is_active</name>
+    <title>Is Active</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this membership_block enabled</comment>
+    <add>1.5</add>
   </field>
 </table>
index 1c092bc14cb897cfeb594b5ae4b2b8c85d9889c0..8310ec41d132c26668466c693e4417f8494d11c6 100644 (file)
@@ -8,21 +8,21 @@
   <comment>Logs actions which affect a Membership record (signup, status override, renewal, etc.)</comment>
   <add>1.5</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>1.5</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>1.5</add>
   </field>
   <primaryKey>
-      <name>id</name>
-      <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>membership_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to Membership table</comment>
-      <add>1.5</add>
+    <name>membership_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Membership table</comment>
+    <add>1.5</add>
   </field>
   <foreignKey>
     <name>membership_id</name>
     <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>status_id</name>
-      <title>Membership Status</title>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>New status assigned to membership by this action. FK to Membership Status</comment>
-      <add>1.5</add>
+    <name>status_id</name>
+    <title>Membership Status</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>New status assigned to membership by this action. FK to Membership Status</comment>
+    <add>1.5</add>
   </field>
   <foreignKey>
-      <name>status_id</name>
-      <table>civicrm_membership_status</table>
-      <key>id</key>
-      <add>1.5</add>
-      <onDelete>CASCADE</onDelete>
+    <name>status_id</name>
+    <table>civicrm_membership_status</table>
+    <key>id</key>
+    <add>1.5</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>start_date</name>
-      <type>date</type>
-      <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
-      <comment>New membership period start date</comment>
-      <add>1.5</add>
+    <name>start_date</name>
+    <type>date</type>
+    <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
+    <comment>New membership period start date</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>end_date</name>
-      <type>date</type>
-      <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
-      <comment>New membership period expiration date.</comment>
-      <add>1.5</add>
+    <name>end_date</name>
+    <type>date</type>
+    <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
+    <comment>New membership period expiration date.</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>modified_id</name>
-       <type>int unsigned</type>
-       <comment>FK to Contact ID of person under whose credentials this data modification was made.</comment>
-       <add>1.5</add>
+    <name>modified_id</name>
+    <type>int unsigned</type>
+    <comment>FK to Contact ID of person under whose credentials this data modification was made.</comment>
+    <add>1.5</add>
   </field>
   <foreignKey>
-       <name>modified_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.5</add>
-       <onDelete>SET NULL</onDelete>
+    <name>modified_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.5</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>modified_date</name>
-      <title>Membership Change Date</title>
-      <type>date</type>
-      <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
-      <comment>Date this membership modification action was logged.</comment>
-      <add>1.5</add>
+    <name>modified_date</name>
+    <title>Membership Change Date</title>
+    <type>date</type>
+    <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
+    <comment>Date this membership modification action was logged.</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>membership_type_id</name>
-       <type>int unsigned</type>
-       <comment>FK to Membership Type.</comment>
-       <add>3.4</add>
+    <name>membership_type_id</name>
+    <type>int unsigned</type>
+    <comment>FK to Membership Type.</comment>
+    <add>3.4</add>
   </field>
   <foreignKey>
-       <name>membership_type_id</name>
-       <table>civicrm_membership_type</table>
-       <key>id</key>
-       <add>3.4</add>
-       <onDelete>SET NULL</onDelete>
+    <name>membership_type_id</name>
+    <table>civicrm_membership_type</table>
+    <key>id</key>
+    <add>3.4</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-       <name>max_related</name>
-       <type>int</type>
-       <comment>Maximum number of related memberships.</comment>
-       <add>4.3</add>
+    <name>max_related</name>
+    <type>int</type>
+    <comment>Maximum number of related memberships.</comment>
+    <add>4.3</add>
   </field>
 </table>
index 8d5ff2b7a6ee21185f186ed94d27af33ed190654..3f8a7399cd73e5f8941bf9e2a5ccebffc8e2908c 100644 (file)
@@ -8,21 +8,23 @@
   <add>1.5</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>1.5</add>
+    <name>id</name>
+    <title>Membership Payment ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>1.5</add>
   </field>
   <primaryKey>
-      <name>id</name>
-      <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>membership_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to Membership table</comment>
-      <add>1.5</add>
+    <name>membership_id</name>
+    <title>Membership</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Membership table</comment>
+    <add>1.5</add>
   </field>
   <foreignKey>
     <name>membership_id</name>
     <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>contribution_id</name>
-      <type>int unsigned</type>
-      <comment>FK to contribution table.</comment>
-      <add>2.0</add>
+    <name>contribution_id</name>
+    <title>Contribution</title>
+    <type>int unsigned</type>
+    <comment>FK to contribution table.</comment>
+    <add>2.0</add>
   </field>
   <foreignKey>
     <name>contribution_id</name>
index 03cbec8012b46a212b02e975d0292381f55d8cb1..14ae53aa4c6bba6557b1072bd1486c640c4ebcb5 100644 (file)
   <add>1.5</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Membership Id</comment>
-      <add>1.5</add>
+    <name>id</name>
+    <title>Membership Status ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Membership Id</comment>
+    <add>1.5</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <uniqueName>membership_status</uniqueName>
-       <title>Membership Status</title>
-       <type>varchar</type>
-       <import>true</import>
-       <length>128</length>
-       <comment>Name for Membership Status</comment>
-       <add>1.5</add>
+    <name>name</name>
+    <uniqueName>membership_status</uniqueName>
+    <title>Membership Status</title>
+    <type>varchar</type>
+    <import>true</import>
+    <length>128</length>
+    <comment>Name for Membership Status</comment>
+    <add>1.5</add>
   </field>
   <field>
-       <name>label</name>
-       <type>varchar</type>
-       <length>128</length>
-       <localizable>true</localizable>
-       <comment>Label for Membership Status</comment>
-       <add>3.2</add>
+    <name>label</name>
+    <type>varchar</type>
+    <length>128</length>
+    <localizable>true</localizable>
+    <comment>Label for Membership Status</comment>
+    <add>3.2</add>
   </field>
   <field>
-       <name>start_event</name>
-       <type>varchar</type>
-       <length>12</length>
-       <comment>Event when this status starts.</comment>
-       <pseudoconstant>
-         <callback>CRM_Core_SelectValues::eventDate</callback>
-       </pseudoconstant>
-       <add>1.5</add>
-       <html>
-         <type>Select</type>
-       </html>
+    <name>start_event</name>
+    <type>varchar</type>
+    <length>12</length>
+    <comment>Event when this status starts.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::eventDate</callback>
+    </pseudoconstant>
+    <add>1.5</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-      <name>start_event_adjust_unit</name>
-      <type>varchar</type>
-      <length>8</length>
-      <comment>Unit used for adjusting from start_event.</comment>
-      <pseudoconstant>
-        <callback>CRM_Core_SelectValues::unitList</callback>
-      </pseudoconstant>
-      <add>1.5</add>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>start_event_adjust_unit</name>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>Unit used for adjusting from start_event.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::unitList</callback>
+    </pseudoconstant>
+    <add>1.5</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-      <name>start_event_adjust_interval</name>
-      <type>int</type>
-      <comment>Status range begins this many units from start_event.</comment>
-      <add>1.5</add>
+    <name>start_event_adjust_interval</name>
+    <type>int</type>
+    <comment>Status range begins this many units from start_event.</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>end_event</name>
-      <type>varchar</type>
-      <length>12</length>
-      <comment>Event after which this status ends.</comment>
-      <pseudoconstant>
-        <callback>CRM_Core_SelectValues::eventDate</callback>
-      </pseudoconstant>
-      <add>1.5</add>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>end_event</name>
+    <type>varchar</type>
+    <length>12</length>
+    <comment>Event after which this status ends.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::eventDate</callback>
+    </pseudoconstant>
+    <add>1.5</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-      <name>end_event_adjust_unit</name>
-      <type>varchar</type>
-      <length>8</length>
-      <comment>Unit used for adjusting from the ending event.</comment>
-      <pseudoconstant>
-        <callback>CRM_Core_SelectValues::unitList</callback>
-      </pseudoconstant>
-      <add>1.5</add>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>end_event_adjust_unit</name>
+    <type>varchar</type>
+    <length>8</length>
+    <comment>Unit used for adjusting from the ending event.</comment>
+    <pseudoconstant>
+      <callback>CRM_Core_SelectValues::unitList</callback>
+    </pseudoconstant>
+    <add>1.5</add>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
- <field>
-      <name>end_event_adjust_interval</name>
-      <type>int</type>
-      <comment>Status range ends this many units from end_event.</comment>
-      <add>1.5</add>
 <field>
+    <name>end_event_adjust_interval</name>
+    <type>int</type>
+    <comment>Status range ends this many units from end_event.</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>is_current_member</name>
-      <title>Current Membership?</title>
-      <type>boolean</type>
-      <comment>Does this status aggregate to current members (e.g. New, Renewed, Grace might all be TRUE... while Unrenewed, Lapsed, Inactive would be FALSE).</comment>
-      <add>1.5</add>
+    <name>is_current_member</name>
+    <title>Current Membership?</title>
+    <type>boolean</type>
+    <comment>Does this status aggregate to current members (e.g. New, Renewed, Grace might all be TRUE... while Unrenewed, Lapsed, Inactive would be FALSE).</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>is_admin</name>
-      <title>Admin Assigned Only?</title>
-      <type>boolean</type>
-      <comment>Is this status for admin/manual assignment only.</comment>
-      <add>1.5</add>
+    <name>is_admin</name>
+    <title>Admin Assigned Only?</title>
+    <type>boolean</type>
+    <comment>Is this status for admin/manual assignment only.</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>weight</name>
-      <title>Weight</title>
-      <type>int</type>
-      <add>1.5</add>
+    <name>weight</name>
+    <title>Weight</title>
+    <type>int</type>
+    <add>1.5</add>
   </field>
   <field>
-      <name>is_default</name>
-      <title>Default Status?</title>
-      <type>boolean</type>
-      <comment>Assign this status to a membership record if no other status match is found.</comment>
-      <add>1.5</add>
+    <name>is_default</name>
+    <title>Default Status?</title>
+    <type>boolean</type>
+    <comment>Assign this status to a membership record if no other status match is found.</comment>
+    <add>1.5</add>
   </field>
   <field>
-      <name>is_active</name>
-      <title>Is Active</title>
-      <type>boolean</type>
-      <default>1</default>
-      <comment>Is this membership_status enabled.</comment>
-      <add>1.5</add>
+    <name>is_active</name>
+    <title>Is Active</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this membership_status enabled.</comment>
+    <add>1.5</add>
   </field>
- <field>
-      <name>is_reserved</name>
-      <title>Is Reserved</title>
-      <type>boolean</type>
-      <default>0</default>
-      <comment>Is this membership_status reserved.</comment>
-      <add>2.1</add>
 <field>
+    <name>is_reserved</name>
+    <title>Is Reserved</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is this membership_status reserved.</comment>
+    <add>2.1</add>
   </field>
 </table>
index ef26a62a5290b26206c13cc401aca5eb27b8ba9f..db21761192c7f98b1b170880b65e92920d804892 100644 (file)
@@ -9,6 +9,7 @@
   <log>true</log>
   <field>
     <name>id</name>
+    <title>Membership Type ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Membership Id</comment>
@@ -20,6 +21,7 @@
   </primaryKey>
   <field>
     <name>domain_id</name>
+    <title>Membership Type Domain</title>
     <type>int unsigned</type>
     <required>true</required>
     <pseudoconstant>
@@ -49,6 +51,7 @@
   </field>
   <field>
     <name>description</name>
+    <title>Membership Type Description</title>
     <type>varchar</type>
     <html>
       <type>TextArea</type>
@@ -62,6 +65,7 @@
   </field>
   <field>
     <name>member_of_contact_id</name>
+    <title>Membership Type Organization</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Owner organization for this membership type. FK to Contact ID</comment>
@@ -91,6 +95,7 @@
   </foreignKey>
   <field>
     <name>financial_type_id</name>
+    <title>Membership Financial Type</title>
     <type>int unsigned</type>
     <required>true</required>
     <pseudoconstant>
   </foreignKey>
   <field>
     <name>minimum_fee</name>
+    <title>membership Type Minimum Fee</title>
     <type>decimal</type>
     <comment>Minimum fee for this membership (0 for free/complimentary memberships).</comment>
     <default>0</default>
   </field>
   <field>
     <name>duration_unit</name>
+    <title>Membership Type Duration Unit</title>
     <type>varchar</type>
     <length>8</length>
     <comment>Unit in which membership period is expressed.</comment>
   </field>
   <field>
     <name>duration_interval</name>
+    <title>Membership Type Duration Interval</title>
     <type>int</type>
     <comment>Number of duration units in membership period (e.g. 1 year, 12 months).</comment>
     <add>1.5</add>
   </field>
   <field>
     <name>period_type</name>
+    <title>Membership Type Plan</title>
     <type>varchar</type>
     <length>8</length>
     <comment>Rolling membership period starts on signup date. Fixed membership periods start on fixed_period_start_day.</comment>
   </field>
   <field>
     <name>fixed_period_start_day</name>
+    <title>Fixed Period Start Day</title>
     <type>int</type>
     <comment>For fixed period memberships, month and day (mmdd) on which subscription/membership will start. Period start is back-dated unless after rollover day.</comment>
     <add>1.5</add>
   </field>
   <field>
     <name>fixed_period_rollover_day</name>
+    <title>Fixed Period Rollover Day</title>
     <type>int</type>
     <comment>For fixed period memberships, signups after this day (mmdd) rollover to next period.</comment>
     <add>1.5</add>
   </field>
   <field>
     <name>relationship_type_id</name>
+    <title>Membership Type Relationship</title>
     <type>varchar</type>
     <length>64</length>
     <comment>FK to Relationship Type ID</comment>
   </field>
   <field>
     <name>max_related</name>
+    <title>Max Related Members for Type</title>
     <type>int</type>
     <comment>Maximum number of related memberships.</comment>
     <add>4.3</add>
   </field>
   <field>
     <name>receipt_text_signup</name>
+    <title>Membership Type Receipt Text</title>
     <type>varchar</type>
     <html>
       <type>TextArea</type>
   </field>
   <field>
     <name>receipt_text_renewal</name>
+    <title>Membership Type Renewal Text</title>
     <type>varchar</type>
     <html>
       <type>TextArea</type>
index a6e246d693528038da147541a3808ea2783deb32..214d521b39c072373cd5f7a85d8742bf187256d8 100644 (file)
   <add>2.2</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <uniqueName>pcp_id</uniqueName>
-      <type>int unsigned</type>
-      <required>true</required>
-      <title>Personal Campaign Page ID</title>
-      <comment>Personal Campaign Page ID</comment>
-      <add>2.2</add>
+    <name>id</name>
+    <uniqueName>pcp_id</uniqueName>
+    <type>int unsigned</type>
+    <required>true</required>
+    <title>Personal Campaign Page ID</title>
+    <comment>Personal Campaign Page ID</comment>
+    <add>2.2</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>contact_id</name>
-      <uniqueName>pcp_contact_id</uniqueName>
-      <title>Contact ID</title>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to Contact ID</comment>
-      <add>2.2</add>
-      <html>
-       <type>Autocomplete-Select</type>
-     </html>
+    <name>contact_id</name>
+    <uniqueName>pcp_contact_id</uniqueName>
+    <title>Contact ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Contact ID</comment>
+    <add>2.2</add>
+    <html>
+      <type>Autocomplete-Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>2.2</add>
-       <onDelete>CASCADE</onDelete>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>2.2</add>
+    <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>status_id</name>
-      <title>Personal Campaign Page Status</title>
-      <required>true</required>
-      <type>int unsigned</type>
-      <add>2.2</add>
-      <pseudoconstant>
-        <optionGroupName>pcp_status</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-  </field>
-  <field>
-      <name>title</name>
-      <title>Personal Campaign Page Title</title>
-      <type>varchar</type>
-      <length>255</length>
-      <default>NULL</default>
-      <add>2.2</add>
-      <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-      <name>intro_text</name>
-      <type>text</type>
-      <default>NULL</default>
-      <add>2.2</add>
-      <html>
-        <type>TexArea</type>
-      </html>
-  </field>
-  <field>
-      <name>page_text</name>
-      <type>text</type>
-      <default>NULL</default>
-      <add>2.2</add>
-      <html>
-        <type>TexArea</type>
-      </html>
-  </field>
-  <field>
-      <name>donate_link_text</name>
-      <type>varchar</type>
-      <length>255</length>
-      <default>NULL</default>
-      <add>2.2</add>
-      <html>
-        <type>Text</type>
-      </html>
-  </field>
-  <field>
-      <name>contribution_page_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>The Contribution Page which triggered this pcp</comment>
-      <add>2.2</add>
-      <drop>4.1</drop>
+    <name>status_id</name>
+    <title>Personal Campaign Page Status</title>
+    <required>true</required>
+    <type>int unsigned</type>
+    <add>2.2</add>
+    <pseudoconstant>
+      <optionGroupName>pcp_status</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>title</name>
+    <title>Personal Campaign Page Title</title>
+    <type>varchar</type>
+    <length>255</length>
+    <default>NULL</default>
+    <add>2.2</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>intro_text</name>
+    <type>text</type>
+    <default>NULL</default>
+    <add>2.2</add>
+    <html>
+      <type>TexArea</type>
+    </html>
+  </field>
+  <field>
+    <name>page_text</name>
+    <type>text</type>
+    <default>NULL</default>
+    <add>2.2</add>
+    <html>
+      <type>TexArea</type>
+    </html>
+  </field>
+  <field>
+    <name>donate_link_text</name>
+    <type>varchar</type>
+    <length>255</length>
+    <default>NULL</default>
+    <add>2.2</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>contribution_page_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>The Contribution Page which triggered this pcp</comment>
+    <add>2.2</add>
+    <drop>4.1</drop>
   </field>
   <foreignKey>
-      <name>contribution_page_id</name>
-      <table>civicrm_contribution_page</table>
-      <key>id</key>
-      <drop>4.1</drop>
+    <name>contribution_page_id</name>
+    <table>civicrm_contribution_page</table>
+    <key>id</key>
+    <drop>4.1</drop>
   </foreignKey>
   <field>
-      <name>page_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>The Contribution or Event Page which triggered this pcp</comment>
-      <add>4.1</add>
-  </field>
-  <field>
-      <name>page_type</name>
-      <title>PCP Page Type</title>
-      <comment>The type of PCP this is: contribute or event</comment>
-      <type>varchar</type>
-      <length>64</length>
-      <default>'contribute'</default>
-      <html>
-          <type>Select</type>
-       </html>
-      <add>2.2</add>
-  </field>
-  <field>
-      <name>pcp_block_id</name>
-      <comment>The pcp block that this pcp page was created from</comment>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>4.1</add>
-  </field>
-  <field>
-      <name>is_thermometer</name>
-      <type>int unsigned</type>
-      <default>0</default>
-      <html>
-         <type>CheckBox</type>
-       </html>
-      <add>2.2</add>
-  </field>
-  <field>
-      <name>is_honor_roll</name>
-      <type>int unsigned</type>
-      <default>0</default>
-      <add>2.2</add>
-      <html>
-         <type>CheckBox</type>
-       </html>
-  </field>
-  <field>
-      <name>goal_amount</name>
-      <type>decimal</type>
-      <comment>Goal amount of this Personal Campaign Page.</comment>
-      <add>2.2</add>
-      <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-      <name>currency</name>
-      <type>varchar</type>
-      <length>3</length>
-      <default>NULL</default>
-      <comment>3 character string, value from config setting or input via user.</comment>
-      <add>3.2</add>
-      <pseudoconstant>
-        <table>civicrm_currency</table>
-        <keyColumn>name</keyColumn>
-        <labelColumn>full_name</labelColumn>
-        <nameColumn>numeric_code</nameColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-  </field>
-  <field>
-      <name>referer</name>
-      <type>varchar</type>
-      <length>255</length>
-      <default>NULL</default>
-      <add>2.2</add>
-      <drop>4.1</drop>
-  </field>
-  <field>
-      <name>is_active</name>
-      <type>boolean</type>
-      <comment>Is Personal Campaign Page enabled/active?</comment>
-      <default>0</default>
-      <add>2.2</add>
-      <html>
-         <type>CheckBox</type>
-       </html>
+    <name>page_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>The Contribution or Event Page which triggered this pcp</comment>
+    <add>4.1</add>
+  </field>
+  <field>
+    <name>page_type</name>
+    <title>PCP Page Type</title>
+    <comment>The type of PCP this is: contribute or event</comment>
+    <type>varchar</type>
+    <length>64</length>
+    <default>'contribute'</default>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>pcp_block_id</name>
+    <comment>The pcp block that this pcp page was created from</comment>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>4.1</add>
+  </field>
+  <field>
+    <name>is_thermometer</name>
+    <type>int unsigned</type>
+    <default>0</default>
+    <html>
+      <type>CheckBox</type>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>is_honor_roll</name>
+    <type>int unsigned</type>
+    <default>0</default>
+    <add>2.2</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
+  </field>
+  <field>
+    <name>goal_amount</name>
+    <type>decimal</type>
+    <comment>Goal amount of this Personal Campaign Page.</comment>
+    <add>2.2</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>currency</name>
+    <type>varchar</type>
+    <length>3</length>
+    <default>NULL</default>
+    <comment>3 character string, value from config setting or input via user.</comment>
+    <add>3.2</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>full_name</labelColumn>
+      <nameColumn>numeric_code</nameColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>referer</name>
+    <type>varchar</type>
+    <length>255</length>
+    <default>NULL</default>
+    <add>2.2</add>
+    <drop>4.1</drop>
+  </field>
+  <field>
+    <name>is_active</name>
+    <type>boolean</type>
+    <comment>Is Personal Campaign Page enabled/active?</comment>
+    <default>0</default>
+    <add>2.2</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
 </table>
index 116a0b0574cb76a1e013ea65bd06446b09a9d4be..844c738fb0cd15ea0bc69622fc255e896e3ecf73 100644 (file)
   <add>2.2</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>PCP block Id</comment>
-      <add>2.2</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>PCP block Id</comment>
+    <add>2.2</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>entity_table</name>
-       <type>varchar</type>
-       <length>64</length>
-       <add>2.2</add>
+    <name>entity_table</name>
+    <type>varchar</type>
+    <length>64</length>
+    <add>2.2</add>
   </field>
   <field>
-      <name>entity_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to civicrm_contribution_page.id OR civicrm_event.id</comment>
-      <add>2.2</add>
+    <name>entity_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to civicrm_contribution_page.id OR civicrm_event.id</comment>
+    <add>2.2</add>
   </field>
   <dynamicForeignKey>
-      <idColumn>entity_id</idColumn>
-      <typeColumn>entity_table</typeColumn>
-      <add>2.2</add>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>2.2</add>
   </dynamicForeignKey>
   <foreignKey>
-      <name>entity_id</name>
-      <table>civicrm_contribution_page</table>
-      <key>id</key>
-      <add>2.2</add>
-      <drop>4.1</drop>
+    <name>entity_id</name>
+    <table>civicrm_contribution_page</table>
+    <key>id</key>
+    <add>2.2</add>
+    <drop>4.1</drop>
   </foreignKey>
   <field>
-      <name>target_entity_type</name>
-      <type>varchar</type>
-      <length>255</length>
-      <required>true</required>
-      <default>'contribute'</default>
-      <comment>The type of entity that this pcp targets</comment>
-      <add>4.1</add>
+    <name>target_entity_type</name>
+    <type>varchar</type>
+    <length>255</length>
+    <required>true</required>
+    <default>'contribute'</default>
+    <comment>The type of entity that this pcp targets</comment>
+    <add>4.1</add>
   </field>
   <field>
-      <name>target_entity_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>The entity that this pcp targets</comment>
-      <add>4.1</add>
+    <name>target_entity_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>The entity that this pcp targets</comment>
+    <add>4.1</add>
   </field>
   <dynamicForeignKey>
-      <idColumn>target_entity_id</idColumn>
-      <!-- FIXME: typename and not tablename? -->
-      <typeColumn>target_entity_type</typeColumn>
-      <add>4.1</add>
+    <idColumn>target_entity_id</idColumn>
+    <!-- FIXME: typename and not tablename? -->
+    <typeColumn>target_entity_type</typeColumn>
+    <add>4.1</add>
   </dynamicForeignKey>
   <field>
-      <name>supporter_profile_id</name>
-      <type>int unsigned</type>
-      <comment>FK to civicrm_uf_group.id. Does Personal Campaign Page require manual activation by administrator? (is inactive by default after setup)?</comment>
-      <default>NULL</default>
-      <add>2.2</add>
+    <name>supporter_profile_id</name>
+    <type>int unsigned</type>
+    <comment>FK to civicrm_uf_group.id. Does Personal Campaign Page require manual activation by administrator? (is inactive by default after setup)?</comment>
+    <default>NULL</default>
+    <add>2.2</add>
   </field>
   <foreignKey>
-      <name>supporter_profile_id</name>
-      <table>civicrm_uf_group</table>
-      <key>id</key>
-      <add>3.1</add>
-      <onDelete>SET NULL</onDelete>
+    <name>supporter_profile_id</name>
+    <table>civicrm_uf_group</table>
+    <key>id</key>
+    <add>3.1</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>is_approval_needed</name>
-      <type>boolean</type>
-      <comment>Does Personal Campaign Page require manual activation by administrator? (is inactive by default after setup)?</comment>
-      <default>NULL</default>
-      <add>2.2</add>
+    <name>is_approval_needed</name>
+    <type>boolean</type>
+    <comment>Does Personal Campaign Page require manual activation by administrator? (is inactive by default after setup)?</comment>
+    <default>NULL</default>
+    <add>2.2</add>
   </field>
   <field>
-      <name>is_tellfriend_enabled</name>
-      <type>boolean</type>
-      <comment>Does Personal Campaign Page allow using tell a friend?</comment>
-      <default>NULL</default>
-      <add>2.2</add>
+    <name>is_tellfriend_enabled</name>
+    <type>boolean</type>
+    <comment>Does Personal Campaign Page allow using tell a friend?</comment>
+    <default>NULL</default>
+    <add>2.2</add>
   </field>
   <field>
-      <name>tellfriend_limit</name>
-      <type>int unsigned</type>
-      <default>NULL</default>
-      <comment>Maximum recipient fields allowed in tell a friend</comment>
-      <add>2.2</add>
+    <name>tellfriend_limit</name>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>Maximum recipient fields allowed in tell a friend</comment>
+    <add>2.2</add>
   </field>
   <field>
-       <name>link_text</name>
-       <type>varchar</type>
-       <length>255</length>
-       <default>NULL</default>
-       <localizable>true</localizable>
-       <comment>Link text for PCP.</comment>
-       <add>2.2</add>
+    <name>link_text</name>
+    <type>varchar</type>
+    <length>255</length>
+    <default>NULL</default>
+    <localizable>true</localizable>
+    <comment>Link text for PCP.</comment>
+    <add>2.2</add>
   </field>
   <field>
-      <name>is_active</name>
-      <type>boolean</type>
-      <comment>Is Personal Campaign Page Block enabled/active?</comment>
-      <default>1</default>
-      <add>2.2</add>
+    <name>is_active</name>
+    <type>boolean</type>
+    <comment>Is Personal Campaign Page Block enabled/active?</comment>
+    <default>1</default>
+    <add>2.2</add>
   </field>
   <field>
-      <name>notify_email</name>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>If set, notification is automatically emailed to this email-address on create/update Personal Campaign Page</comment>
-      <default>NULL</default>
-      <add>2.2</add>
+    <name>notify_email</name>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>If set, notification is automatically emailed to this email-address on create/update Personal Campaign Page</comment>
+    <default>NULL</default>
+    <add>2.2</add>
   </field>
 </table>
index 9e76f27346dd29cbcb2547b0a875a059c12b999e..4012777a5c739d1285cb1089bd79ff7086b79e9a 100644 (file)
@@ -6,80 +6,80 @@
   <add>2.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Pledge ID</comment>
-      <add>2.1</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Pledge ID</comment>
+    <add>2.1</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>entity_table</name>
-       <title>Entity Table</title>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>physical tablename for entity being joined to pledge, e.g. civicrm_contact</comment>
-       <add>2.1</add>
+    <name>entity_table</name>
+    <title>Entity Table</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>physical tablename for entity being joined to pledge, e.g. civicrm_contact</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>entity_id</name>
-      <title>Entity Id</title>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to entity table specified in entity_table column.</comment>
-      <add>2.1</add>
+    <name>entity_id</name>
+    <title>Entity Id</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to entity table specified in entity_table column.</comment>
+    <add>2.1</add>
   </field>
   <dynamicForeignKey>
-      <idColumn>entity_id</idColumn>
-      <typeColumn>entity_table</typeColumn>
-      <add>2.1</add>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>2.1</add>
   </dynamicForeignKey>
   <index>
-       <name>index_entity</name>
-       <fieldName>entity_table</fieldName>
-       <fieldName>entity_id</fieldName>
-       <add>2.1</add>
+    <name>index_entity</name>
+    <fieldName>entity_table</fieldName>
+    <fieldName>entity_id</fieldName>
+    <add>2.1</add>
   </index>
   <field>
-       <name>pledge_frequency_unit</name>
-       <title>Pledge Frequency Unit</title>
-       <type>varchar</type>
-       <length>128</length>
-       <comment>Delimited list of supported frequency units</comment>
-       <add>2.1</add>
+    <name>pledge_frequency_unit</name>
+    <title>Pledge Frequency Unit</title>
+    <type>varchar</type>
+    <length>128</length>
+    <comment>Delimited list of supported frequency units</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>is_pledge_interval</name>
-      <type>boolean</type>
-      <default>0</default>
-      <comment>Is frequency interval exposed on the contribution form.</comment>
-      <add>2.1</add>
+    <name>is_pledge_interval</name>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Is frequency interval exposed on the contribution form.</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>max_reminders</name>
-      <title>Maximum Number of Reminders</title>
-      <type>int unsigned</type>
-      <default>1</default>
-      <comment>The maximum number of payment reminders to send for any given payment.</comment>
-      <add>2.1</add>
+    <name>max_reminders</name>
+    <title>Maximum Number of Reminders</title>
+    <type>int unsigned</type>
+    <default>1</default>
+    <comment>The maximum number of payment reminders to send for any given payment.</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>initial_reminder_day</name>
-      <title>Initial Reminder Day</title>
-      <type>int unsigned</type>
-      <default>5</default>
-      <comment>Send initial reminder this many days prior to the payment due date.</comment>
-      <add>2.1</add>
+    <name>initial_reminder_day</name>
+    <title>Initial Reminder Day</title>
+    <type>int unsigned</type>
+    <default>5</default>
+    <comment>Send initial reminder this many days prior to the payment due date.</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>additional_reminder_day</name>
-      <title>Additional Reminder Days</title>
-      <type>int unsigned</type>
-      <default>5</default>
-      <comment>Send additional reminder this many days after last one sent, up to maximum number of reminders.</comment>
-      <add>2.1</add>
+    <name>additional_reminder_day</name>
+    <title>Additional Reminder Days</title>
+    <type>int unsigned</type>
+    <default>5</default>
+    <comment>Send additional reminder this many days after last one sent, up to maximum number of reminders.</comment>
+    <add>2.1</add>
   </field>
 </table>
index 9031c05bf4ddcfcbb9c80f981942a5971e6e13da..7a79f476f6ab823a35987e77b4578b1104456478 100644 (file)
@@ -8,24 +8,25 @@
   <add>2.1</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <uniqueName>pledge_payment_id</uniqueName>
-      <title>Payment ID</title>
-      <type>int unsigned</type>
-      <required>true</required>
-      <import>true</import>
-      <add>2.1</add>
+    <name>id</name>
+    <uniqueName>pledge_payment_id</uniqueName>
+    <title>Payment ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <import>true</import>
+    <add>2.1</add>
   </field>
   <primaryKey>
-      <name>id</name>
-      <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>pledge_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to Pledge table</comment>
-      <add>2.1</add>
+    <name>pledge_id</name>
+    <title>Pledge</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Pledge table</comment>
+    <add>2.1</add>
   </field>
   <foreignKey>
     <name>pledge_id</name>
     <onDelete>CASCADE</onDelete>
   </foreignKey>
   <field>
-      <name>contribution_id</name>
-      <type>int unsigned</type>
-      <comment>FK to contribution table.</comment>
-      <add>2.1</add>
+    <name>contribution_id</name>
+    <title>Contribution</title>
+    <type>int unsigned</type>
+    <comment>FK to contribution table.</comment>
+    <add>2.1</add>
   </field>
   <foreignKey>
     <name>contribution_id</name>
     <add>2.1</add>
   </index>
   <field>
-       <name>scheduled_amount</name>
-       <uniqueName>pledge_payment_scheduled_amount</uniqueName>
-       <title>Scheduled Amount</title>
-       <import>true</import>
-       <type>decimal</type>
-       <required>true</required>
-       <comment>Pledged amount for this payment (the actual contribution amount might be different).</comment>
-       <add>2.1</add>
+    <name>scheduled_amount</name>
+    <uniqueName>pledge_payment_scheduled_amount</uniqueName>
+    <title>Scheduled Amount</title>
+    <import>true</import>
+    <type>decimal</type>
+    <required>true</required>
+    <comment>Pledged amount for this payment (the actual contribution amount might be different).</comment>
+    <add>2.1</add>
   </field>
   <field>
-       <name>actual_amount</name>
-       <uniqueName>pledge_payment_actual_amount</uniqueName>
-       <title>Actual Amount</title>
-       <import>true</import>
-       <type>decimal</type>
-       <comment>Actual amount that is paid as the Pledged installment amount.</comment>
-       <add>3.2</add>
+    <name>actual_amount</name>
+    <uniqueName>pledge_payment_actual_amount</uniqueName>
+    <title>Actual Amount</title>
+    <import>true</import>
+    <type>decimal</type>
+    <comment>Actual amount that is paid as the Pledged installment amount.</comment>
+    <add>3.2</add>
   </field>
   <field>
-      <name>currency</name>
-      <type>varchar</type>
-      <length>3</length>
-      <default>NULL</default>
-      <comment>3 character string, value from config setting or input via user.</comment>
-      <add>3.2</add>
-      <pseudoconstant>
-        <table>civicrm_currency</table>
-        <keyColumn>name</keyColumn>
-        <labelColumn>full_name</labelColumn>
-        <nameColumn>numeric_code</nameColumn>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
+    <name>currency</name>
+    <title>Currency</title>
+    <type>varchar</type>
+    <length>3</length>
+    <default>NULL</default>
+    <comment>3 character string, value from config setting or input via user.</comment>
+    <add>3.2</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>full_name</labelColumn>
+      <nameColumn>numeric_code</nameColumn>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
   </field>
   <field>
-       <name>scheduled_date</name>
-       <uniqueName>pledge_payment_scheduled_date</uniqueName>
-       <title>Scheduled Date</title>
-       <import>true</import>
-       <type>datetime</type>
-       <required>true</required>
-       <comment>The date the pledge payment is supposed to happen.</comment>
-       <add>2.1</add>
+    <name>scheduled_date</name>
+    <uniqueName>pledge_payment_scheduled_date</uniqueName>
+    <title>Scheduled Date</title>
+    <import>true</import>
+    <type>datetime</type>
+    <required>true</required>
+    <comment>The date the pledge payment is supposed to happen.</comment>
+    <add>2.1</add>
   </field>
   <field>
-       <name>reminder_date</name>
-       <uniqueName>pledge_payment_reminder_date</uniqueName>
-       <title>Last Reminder</title>
-       <import>true</import>
-       <type>datetime</type>
-       <comment>The date that the most recent payment reminder was sent.</comment>
-       <add>2.1</add>
+    <name>reminder_date</name>
+    <uniqueName>pledge_payment_reminder_date</uniqueName>
+    <title>Last Reminder</title>
+    <import>true</import>
+    <type>datetime</type>
+    <comment>The date that the most recent payment reminder was sent.</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>reminder_count</name>
-      <uniqueName>pledge_payment_reminder_count</uniqueName>
-      <title>Reminders Sent</title>
-      <import>true</import>
-      <type>int unsigned</type>
-      <default>0</default>
-      <comment>The number of payment reminders sent.</comment>
-      <add>2.1</add>
+    <name>reminder_count</name>
+    <uniqueName>pledge_payment_reminder_count</uniqueName>
+    <title>Reminders Sent</title>
+    <import>true</import>
+    <type>int unsigned</type>
+    <default>0</default>
+    <comment>The number of payment reminders sent.</comment>
+    <add>2.1</add>
   </field>
   <field>
-      <name>status_id</name>
-      <title>Payment Status</title>
-      <uniqueName>pledge_payment_status_id</uniqueName>
-      <import>true</import>
-      <export>false</export>
-      <type>int unsigned</type>
-      <add>2.1</add>
+    <name>status_id</name>
+    <title>Payment Status</title>
+    <uniqueName>pledge_payment_status_id</uniqueName>
+    <import>true</import>
+    <export>false</export>
+    <type>int unsigned</type>
+    <add>2.1</add>
   </field>
   <index>
     <name>index_status</name>
index 93b21181bdc7c2b9631548b515e3c13a514a39fd..cea603e8d74da5633c23ff46ed0529415a0e396b 100644 (file)
@@ -8,6 +8,7 @@
   <log>true</log>
   <field>
     <name>id</name>
+    <title>Line Item ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Line Item</comment>
@@ -19,6 +20,7 @@
   </primaryKey>
   <field>
     <name>entity_table</name>
+    <title>Line Item Entity Type</title>
     <type>varchar</type>
     <length>64</length>
     <required>true</required>
@@ -27,6 +29,7 @@
   </field>
   <field>
     <name>entity_id</name>
+    <title>Line Item Entity</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>entry in table</comment>
@@ -39,6 +42,7 @@
   </dynamicForeignKey>
   <field>
     <name>contribution_id</name>
+    <title>Line Item Contribution</title>
     <type>int unsigned</type>
     <comment>FK to civicrm_contribution</comment>
     <add>4.5</add>
@@ -51,6 +55,7 @@
   </foreignKey>
   <field>
     <name>price_field_id</name>
+    <title>Line Item Price Field</title>
     <type>int unsigned</type>
     <comment>FK to civicrm_price_field</comment>
     <!-- changed to not required in 4.3 in order to change ON DELETE CASCADE FK constraint to SET NULL -->
@@ -64,6 +69,7 @@
   </foreignKey>
   <field>
     <name>option_group_id</name>
+    <title>Line Item Option Group</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>FK to option group</comment>
@@ -72,6 +78,7 @@
   </field>
   <field>
     <name>label</name>
+    <title>Line Item Label</title>
     <type>varchar</type>
     <length>255</length>
     <default>NULL</default>
@@ -84,6 +91,7 @@
   </field>
   <field>
     <name>qty</name>
+    <title>Line Item Quantity</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>How many items ordered</comment>
   </field>
   <field>
     <name>line_total</name>
+    <title>Line Item Total</title>
     <type>decimal</type>
     <required>true</required>
     <comment>qty * unit_price</comment>
   </field>
   <field>
     <name>participant_count</name>
+    <title>Line Item Participant Count</title>
     <type>int unsigned</type>
     <default>NULL</default>
-    <comment>Participant count for fiel
-    <html>
-      <type>Text</type>
-    </html>d</comment>
+    <comment>Participant count for field</comment>
+      <html>
+        <type>Text</type>
+      </html>
     <add>3.2</add>
 
   </field>
   </index>
   <field>
     <name>price_field_value_id</name>
+    <title>Line Item Option</title>
     <type>int unsigned</type>
     <default>NULL</default>
     <comment>FK to civicrm_price_field_value</comment>
index 37ef91f5c3c454ea9af89cb977ace0f85ca2a2bf..a9c6d1d6439d68c8f5a21179a5effc50129a03de 100644 (file)
   <add>1.8</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Price Field</comment>
-      <add>1.8</add>
+    <name>id</name>
+    <title>Price Field ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Price Field</comment>
+    <add>1.8</add>
   </field>
   <primaryKey>
-      <name>id</name>
-      <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>price_set_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to civicrm_price_set</comment>
-      <add>1.8</add>
+    <name>price_set_id</name>
+    <title>Price Set</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to civicrm_price_set</comment>
+    <add>1.8</add>
   </field>
   <foreignKey>
-      <name>price_set_id</name>
-      <table>civicrm_price_set</table>
-      <key>id</key>
-      <add>1.8</add>
+    <name>price_set_id</name>
+    <table>civicrm_price_set</table>
+    <key>id</key>
+    <add>1.8</add>
   </foreignKey>
   <field>
-      <name>name</name>
-      <type>varchar</type>
-      <title>Name</title>
-      <length>255</length>
-      <required>true</required>
-      <comment>Variable name/programmatic handle for this field.</comment>
-      <add>1.8</add>
-      <html>
-        <type>Text</type>
-      </html>
+    <name>name</name>
+    <type>varchar</type>
+    <title>Name</title>
+    <length>255</length>
+    <required>true</required>
+    <comment>Variable name/programmatic handle for this field.</comment>
+    <add>1.8</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <index>
-      <name>index_name</name>
-      <fieldName>name</fieldName>
-      <add>1.8</add>
+    <name>index_name</name>
+    <fieldName>name</fieldName>
+    <add>1.8</add>
   </index>
   <field>
-      <name>label</name>
-      <type>varchar</type>
-      <title>Label</title>
-      <length>255</length>
-      <required>true</required>
-      <localizable>true</localizable>
-      <comment>Text for form field label (also friendly name for administering this field).</comment>
-      <html>
-        <type>Text</type>
-      </html>
-      <add>1.8</add>
-  </field>
-  <field>
-      <name>html_type</name>
-      <type>varchar</type>
-      <length>12</length>
-      <required>true</required>
-      <pseudoconstant>
-        <callback>CRM_Price_BAO_PriceField::htmlTypes</callback>
-      </pseudoconstant>
-      <add>1.8</add>
-      <html>
-        <type>Select</type>
-      </html>
-  </field>
-  <field>
-      <name>is_enter_qty</name>
-      <type>boolean</type>
-      <default>0</default>
-      <comment>Enter a quantity for this field?</comment>
-      <add>1.8</add>
-      <html>
-         <type>CheckBox</type>
-       </html>
-  </field>
-  <field>
-      <name>help_pre</name>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>Description and/or help text to display before this field.</comment>
-      <html>
-        <type>TextArea</type>
-        <rows>4</rows>
-        <cols>80</cols>
-      </html>
-      <add>1.8</add>
-  </field>
-  <field>
-      <name>help_post</name>
-      <type>text</type>
-      <localizable>true</localizable>
-      <comment>Description and/or help text to display after this field.</comment>
-      <html>
-        <type>TextArea</type>
-        <rows>4</rows>
-        <cols>80</cols>
-      </html>
-      <add>1.8</add>
-  </field>
-  <field>
-      <name>weight</name>
-      <type>int</type>
-      <default>1</default>
-      <comment>Order in which the fields should appear</comment>
-      <add>1.8</add>
-      <html>
-        <type>Select</type>
-      </html>
-  </field>
-  <field>
-      <name>is_display_amounts</name>
-      <type>boolean</type>
-      <default>1</default>
-      <comment>Should the price be displayed next to the label for each option?</comment>
-      <html>
-         <type>CheckBox</type>
-       </html>
-  </field>
-  <field>
-      <name>options_per_line</name>
-      <type>int unsigned</type>
-      <default>1</default>
-      <comment>number of options per line for checkbox and radio</comment>
-      <add>1.8</add>
-      <html>
-        <type>Text</type>
-      </html>
-  </field>
-  <field>
-      <name>is_active</name>
-      <type>boolean</type>
-      <comment>Is this price field active</comment>
-      <default>1</default>
-      <add>1.8</add>
-      <html>
-         <type>CheckBox</type>
-       </html>
-  </field>
-  <field>
-      <name>is_required</name>
-      <type>boolean</type>
-      <comment>Is this price field required (value must be > 1)</comment>
-      <default>1</default>
-      <add>1.8</add>
-      <html>
-         <type>CheckBox</type>
-       </html>
-  </field>
-  <field>
-      <name>active_on</name>
-      <type>datetime</type>
-      <default>NULL</default>
-      <comment>If non-zero, do not show this field before the date specified</comment>
-      <add>1.8</add>
-      <html>
-         <type>CheckBox</type>
-       </html>
-  </field>
-  <field>
-      <name>expire_on</name>
-      <type>datetime</type>
-      <default>NULL</default>
-      <comment>If non-zero, do not show this field after the date specified</comment>
-      <add>1.8</add>
-      <html>
-        <type>Select Date</type>
+    <name>label</name>
+    <type>varchar</type>
+    <title>Label</title>
+    <length>255</length>
+    <required>true</required>
+    <localizable>true</localizable>
+    <comment>Text for form field label (also friendly name for administering this field).</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>1.8</add>
+  </field>
+  <field>
+    <name>html_type</name>
+    <type>varchar</type>
+    <length>12</length>
+    <required>true</required>
+    <pseudoconstant>
+      <callback>CRM_Price_BAO_PriceField::htmlTypes</callback>
+    </pseudoconstant>
+    <add>1.8</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>is_enter_qty</name>
+    <title>Price Field Quantity Required?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <comment>Enter a quantity for this field?</comment>
+    <add>1.8</add>
+    <html>
+      <type>CheckBox</type>
     </html>
   </field>
   <field>
-      <name>javascript</name>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>Optional scripting attributes for field</comment>
-      <add>1.8</add>
-      <html>
-        <type>Text</type>
-      </html>
-  </field>
-  <field>
-      <name>visibility_id</name>
-      <type>int unsigned</type>
-      <default>1</default>
-      <comment>Implicit FK to civicrm_option_group with name = \'visibility\'</comment>
-      <add>3.2</add>
-      <pseudoconstant>
-        <optionGroupName>visibility</optionGroupName>
-      </pseudoconstant>
-      <html>
-        <type>Select</type>
-      </html>
-   </field>
-   <field>
-      <name>count</name>
-      <type>int unsigned</type>
-      <default>NULL</default>
-      <comment>Number of Participants Per field</comment>
-      <add>3.2</add>
-      <drop>3.3</drop>
-   </field>
+    <name>help_pre</name>
+    <title>Price Field Pre Text</title>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Description and/or help text to display before this field.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>4</rows>
+      <cols>80</cols>
+    </html>
+    <add>1.8</add>
+  </field>
+  <field>
+    <name>help_post</name>
+    <title>Price Field Post Test</title>
+    <type>text</type>
+    <localizable>true</localizable>
+    <comment>Description and/or help text to display after this field.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>4</rows>
+      <cols>80</cols>
+    </html>
+    <add>1.8</add>
+  </field>
+  <field>
+    <name>weight</name>
+    <title>Price Field Weight</title>
+    <type>int</type>
+    <default>1</default>
+    <comment>Order in which the fields should appear</comment>
+    <add>1.8</add>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>is_display_amounts</name>
+    <title>Price Field Show Amounts?</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Should the price be displayed next to the label for each option?</comment>
+    <html>
+      <type>CheckBox</type>
+    </html>
+  </field>
+  <field>
+    <name>options_per_line</name>
+    <title>Price Field Options per Row</title>
+    <type>int unsigned</type>
+    <default>1</default>
+    <comment>number of options per line for checkbox and radio</comment>
+    <add>1.8</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>is_active</name>
+    <title>Price Field Is Active?</title>
+    <type>boolean</type>
+    <comment>Is this price field active</comment>
+    <default>1</default>
+    <add>1.8</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
+  </field>
+  <field>
+    <name>is_required</name>
+    <title>Price Field is Required?</title>
+    <type>boolean</type>
+    <comment>Is this price field required (value must be > 1)</comment>
+    <default>1</default>
+    <add>1.8</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
+  </field>
+  <field>
+    <name>active_on</name>
+    <title>Price Field Start Date</title>
+    <type>datetime</type>
+    <default>NULL</default>
+    <comment>If non-zero, do not show this field before the date specified</comment>
+    <add>1.8</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
+  </field>
+  <field>
+    <name>expire_on</name>
+    <title>Price Field End Date</title>
+    <type>datetime</type>
+    <default>NULL</default>
+    <comment>If non-zero, do not show this field after the date specified</comment>
+    <add>1.8</add>
+    <html>
+      <type>Select Date</type>
+    </html>
+  </field>
+  <field>
+    <name>javascript</name>
+    <title>Price Field Javascript</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Optional scripting attributes for field</comment>
+    <add>1.8</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>visibility_id</name>
+    <title>Price Field Visibility</title>
+    <type>int unsigned</type>
+    <default>1</default>
+    <comment>Implicit FK to civicrm_option_group with name = \'visibility\'</comment>
+    <add>3.2</add>
+    <pseudoconstant>
+      <optionGroupName>visibility</optionGroupName>
+    </pseudoconstant>
+    <html>
+      <type>Select</type>
+    </html>
+  </field>
+  <field>
+    <name>count</name>
+    <type>int unsigned</type>
+    <default>NULL</default>
+    <comment>Number of Participants Per field</comment>
+    <add>3.2</add>
+    <drop>3.3</drop>
+  </field>
 </table>
 
index 096d6e9b338e3909725d9725182446307acf7a4b..3a0a490c9ebeda76935c1b43677164e80f3ad2eb 100644 (file)
@@ -7,6 +7,7 @@
   <add>3.3</add>
   <field>
     <name>id</name>
+    <title>Price Field Value ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Price Field Value</comment>
@@ -18,6 +19,7 @@
   </primaryKey>
   <field>
     <name>price_field_id</name>
+    <title>Price Field</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>FK to civicrm_price_field</comment>
@@ -58,7 +60,7 @@
     <html>
       <type>TextArea</type>
       <rows>2</rows>
-    <cols>60</cols>
+      <cols>60</cols>
     </html>
     <default>NULL</default>
     <localizable>true</localizable>
   </field>
   <field>
     <name>membership_type_id</name>
+    <title>Membership Type</title>
     <type>int unsigned</type>
     <default>NULL</default>
     <comment>FK to Membership Type</comment>
   </field>
   <field>
     <name>is_default</name>
+    <title>Is Default Price Field Option?</title>
     <type>boolean</type>
     <comment>Is this default price field option</comment>
     <default>0</default>
   </field>
   <field>
     <name>is_active</name>
+    <title>Price Field Value is Active</title>
     <type>boolean</type>
     <comment>Is this price field value active</comment>
     <default>1</default>
index 3b961957de097d1d1a213b811d3d8cea8354131c..034fe1b5e07571f747b193baf4bde4eab5f536ae 100644 (file)
@@ -8,6 +8,7 @@
   <log>true</log>
   <field>
     <name>id</name>
+    <title>Price Set ID</title>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Price Set</comment>
@@ -19,6 +20,7 @@
   </primaryKey>
   <field>
     <name>domain_id</name>
+    <title>Price Set Domain</title>
     <type>int unsigned</type>
     <pseudoconstant>
       <table>civicrm_domain</table>
@@ -56,6 +58,7 @@
   </index>
   <field>
     <name>title</name>
+    <title>Price Set Title</title>
     <type>varchar</type>
     <length>255</length>
     <required>true</required>
@@ -68,6 +71,7 @@
   </field>
   <field>
     <name>is_active</name>
+    <title>Price Set Is Active?</title>
     <type>boolean</type>
     <default>1</default>
     <comment>Is this price set active</comment>
@@ -78,6 +82,7 @@
   </field>
   <field>
     <name>help_pre</name>
+    <title>Price Set Pre Help</title>
     <type>text</type>
     <localizable>true</localizable>
     <comment>Description and/or help text to display before fields in form.</comment>
@@ -90,6 +95,7 @@
   </field>
   <field>
     <name>help_post</name>
+    <title>Price Set Post Help</title>
     <type>text</type>
     <localizable>true</localizable>
     <comment>Description and/or help text to display after fields in form.</comment>
   </field>
   <field>
     <name>javascript</name>
+    <title>Price Set Javascript</title>
     <type>varchar</type>
     <length>64</length>
     <comment>Optional Javascript script function(s) included on the form with this price_set. Can be used for conditional</comment>
   </field>
   <field>
     <name>extends</name>
+    <title>Price Set Extends</title>
     <type>varchar</type>
     <length>255</length>
     <required>true</required>
   </field>
   <field>
     <name>contribution_type_id</name>
+    <title>Price Set Contribution Type</title>
     <type>int unsigned</type>
     <default>NULL</default>
     <comment>FK to Contribution Type(for membership price sets only).</comment>
   </foreignKey>
   <field>
     <name>is_quick_config</name>
+    <title>Is Price Set Quick Config?</title>
     <type>boolean</type>
     <default>0</default>
     <comment>Is set if edited on Contribution or Event Page rather than through Manage Price Sets</comment>
   </field>
   <field>
     <name>is_reserved</name>
+    <title>Price Set Is Reserved</title>
     <type>boolean</type>
     <default>0</default>
     <comment>Is this a predefined system price set  (i.e. it can not be deleted, edited)?</comment>
index 4614eb7722b9459218541fb3f980fa9ebb7870d7..a6ec3c2713aade824751e960d81b49a9cf96ed26 100644 (file)
@@ -7,54 +7,54 @@
   <add>1.8</add>
   <log>true</log>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Price Set Entity</comment>
-      <add>1.8</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Price Set Entity</comment>
+    <add>1.8</add>
   </field>
   <primaryKey>
-      <name>id</name>
-      <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>entity_table</name>
-      <type>varchar</type>
-      <length>64</length>
-      <required>true</required>
-      <comment>Table which uses this price set</comment>
-      <add>1.8</add>
+    <name>entity_table</name>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>Table which uses this price set</comment>
+    <add>1.8</add>
   </field>
   <field>
-      <name>entity_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Item in table</comment>
-      <add>1.8</add>
+    <name>entity_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Item in table</comment>
+    <add>1.8</add>
   </field>
   <dynamicForeignKey>
-      <idColumn>entity_id</idColumn>
-      <typeColumn>entity_table</typeColumn>
-      <add>1.8</add>
+    <idColumn>entity_id</idColumn>
+    <typeColumn>entity_table</typeColumn>
+    <add>1.8</add>
   </dynamicForeignKey>
   <field>
-      <name>price_set_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>price set being used</comment>
-      <add>1.8</add>
+    <name>price_set_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>price set being used</comment>
+    <add>1.8</add>
   </field>
   <foreignKey>
-      <name>price_set_id</name>
-      <table>civicrm_price_set</table>
-      <key>id</key>
+    <name>price_set_id</name>
+    <table>civicrm_price_set</table>
+    <key>id</key>
   </foreignKey>
   <index>
-      <name>UI_entity</name>
-      <fieldName>entity_table</fieldName>
-      <fieldName>entity_id</fieldName>
-      <unique>true</unique>
-      <add>1.8</add>
+    <name>UI_entity</name>
+    <fieldName>entity_table</fieldName>
+    <fieldName>entity_id</fieldName>
+    <unique>true</unique>
+    <add>1.8</add>
   </index>
 </table>
 
index 106394ca79ba3a9f7c89d4eed2691ae79bdc1f28..fa2ed63e8b0b4e05f75224c170e24d56079b94b8 100644 (file)
   <comment>Stores a list of queue items</comment>
   <add>4.2</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>queue_name</name>
-      <type>varchar</type>
-      <length>64</length>
-      <comment>Name of the queue which includes this item</comment>
-      <required>true</required>
-      <html>
-        <type>Text</type>
-      </html>
+    <name>queue_name</name>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Name of the queue which includes this item</comment>
+    <required>true</required>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-      <name>weight</name>
-      <type>int</type>
-      <required>true</required>
-      <html>
-        <type>Text</type>
-      </html>
+    <name>weight</name>
+    <type>int</type>
+    <required>true</required>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
-      <name>submit_time</name>
-      <type>datetime</type>
-      <comment>date on which this item was submitted to the queue</comment>
-      <required>true</required>
-      <html>
-        <type>Select Date</type>
+    <name>submit_time</name>
+    <type>datetime</type>
+    <comment>date on which this item was submitted to the queue</comment>
+    <required>true</required>
+    <html>
+      <type>Select Date</type>
     </html>
   </field>
   <field>
-      <name>release_time</name>
-      <type>datetime</type>
-      <comment>date on which this job becomes available; null if ASAP</comment>
-      <html>
-        <type>Select Date</type>
+    <name>release_time</name>
+    <type>datetime</type>
+    <comment>date on which this job becomes available; null if ASAP</comment>
+    <html>
+      <type>Select Date</type>
     </html>
   </field>
-  
+
   <field>
-      <name>data</name>
-      <title>Queue item datas</title>
-      <type>text</type>
-      <comment>Serialized queue</comment>
+    <name>data</name>
+    <title>Queue item datas</title>
+    <type>text</type>
+    <comment>Serialized queue</comment>
   </field>
   <index>
-     <name>index_queueids</name>
-     <fieldName>queue_name</fieldName>
-     <fieldName>weight</fieldName>
-     <fieldName>id</fieldName>
+    <name>index_queueids</name>
+    <fieldName>queue_name</fieldName>
+    <fieldName>weight</fieldName>
+    <fieldName>id</fieldName>
   </index>
 </table>
index 22afdffe57594122b5d6a296f1505d0466a15e23..461a94fed0faa27e290eb9b27ff5dc4a36b5cdc9 100644 (file)
   <comment>Users can save their report instance and put in a cron tab etc.</comment>
   <add>2.2</add>
   <field>
-      <name>id</name>
-      <title>Report Instance ID</title>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>Report Instance ID</comment>
-       <add>2.2</add>
+    <name>id</name>
+    <title>Report Instance ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>Report Instance ID</comment>
+    <add>2.2</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>false</autoincrement>
+    <name>id</name>
+    <autoincrement>false</autoincrement>
   </primaryKey>
   <field>
-      <name>domain_id</name>
-      <title>Report Instance Domain ID</title>
-      <type>int unsigned</type>
-      <pseudoconstant>
-        <table>civicrm_domain</table>
-        <keyColumn>id</keyColumn>
-        <labelColumn>name</labelColumn>
-      </pseudoconstant>
-      <required>true</required>
-      <comment>Which Domain is this instance for</comment>
-      <add>3.1</add>
+    <name>domain_id</name>
+    <title>Report Instance Domain ID</title>
+    <type>int unsigned</type>
+    <pseudoconstant>
+      <table>civicrm_domain</table>
+      <keyColumn>id</keyColumn>
+      <labelColumn>name</labelColumn>
+    </pseudoconstant>
+    <required>true</required>
+    <comment>Which Domain is this instance for</comment>
+    <add>3.1</add>
   </field>
   <foreignKey>
-       <name>domain_id</name>
-       <table>civicrm_domain</table>
-       <key>id</key>
-       <add>3.1</add>
+    <name>domain_id</name>
+    <table>civicrm_domain</table>
+    <key>id</key>
+    <add>3.1</add>
   </foreignKey>
   <field>
-       <name>title</name>
-       <title>Report Instance Title</title>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Report Instance Title.</comment>
-       <html>
-        <type>Text</type>
-      </html>
-       <add>2.2</add>
-  </field>
-  <field>
-      <name>report_id</name>
-      <title>Report template ID</title>
-      <type>varchar</type>
-      <length>64</length>
-      <required>true</required>
-      <comment>FK to civicrm_option_value for the report template</comment>
-      <html>
-        <type>Select</type>
-      </html>
-      <add>2.2</add>
-  </field>
-  <field>
-      <name>name</name>
-      <title>Report instance Name</title>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>when combined with report_id/template uniquely identifies the instance</comment>
-      <html>
-        <type>Text</type>
-      </html>
-      <add>3.2</add>
-  </field>
-  <field>
-      <name>args</name>
-      <title>Report Instance Arguments</title>
-      <type>varchar</type>
-      <length>255</length>
-      <comment>arguments that are passed in the url when invoking the instance</comment>
-      <add>3.2</add>
-      <html>
-        <type>Text</type>
-      </html>
-  </field>
-  <field>
-       <name>description</name>
-       <title>Report Instance description</title>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Report Instance description.</comment>
-       <html>
-        <type>Text</type>
-      </html>
-       <add>2.2</add>
-  </field>
-  <field>
-       <name>permission</name>
-       <title>Report Instance Permissions</title>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>permission required to be able to run this instance</comment>
-       <html>
-        <type>Text</type>
-      </html>
-       <add>2.2</add>
-  </field>
-  <field>
-       <name>grouprole</name>
-       <title>Report Instance Assigned to Roles</title>
-       <type>varchar</type>
-       <length>1024</length>
-       <comment>role required to be able to run this instance</comment>
-       <add>4.1</add>
-       <html>
-        <type>Text</type>
-      </html>
-  </field>
-  <field>
-       <name>form_values</name>
-       <title>Submitted Form Values</title>
-       <type>text</type>
-       <import>true</import>
-       <comment>Submitted form values for this report</comment>
-       <add>2.2</add>
-  </field>
-  <field>
-       <name>is_active</name>
-       <title>Report Instance is Active</title>
-       <type>boolean</type>
-       <comment>Is this entry active?</comment>
-       <html>
-         <type>CheckBox</type>
-       </html>
-       <add>2.2</add>
-  </field>
-  <field>
-       <name>email_subject</name>
-       <title>Report Instance email Subject</title>
-       <type>varchar</type>
-       <length>255</length>
-       <comment>Subject of email</comment>
-       <html>
-         <type>Text</type>
-       </html>
-  </field>
-  <field>
-      <name>email_to</name>
-      <title>Email Report Instance To</title>
-      <type>text</type>
-      <comment>comma-separated list of email addresses to send the report to</comment>
-      <html>
-        <type>Text</type>
-      </html>
-      <add>2.2</add>
-  </field>
-  <field>
-      <name>email_cc</name>
-      <title>cc Email Report Instance To</title>
-      <type>text</type>
-      <comment>comma-separated list of email addresses to send the report to</comment>
-      <html>
-        <type>Text</type>
-      </html>
-      <add>2.2</add>
-  </field>
-  <field>
-      <name>header</name>
-      <title>Report Instance Header</title>
-      <type>text</type>
-      <comment>comma-separated list of email addresses to send the report to</comment>
-      <html>
-        <type>TextArea</type>
-        <rows>4</rows>
-        <cols>60</cols>
-      </html>
-      <add>2.2</add>
-  </field>
-  <field>
-      <name>footer</name>
-      <title>Report Instance Footer</title>
-      <type>text</type>
-      <comment>comma-separated list of email addresses to send the report to</comment>
-      <html>
-        <type>TextArea</type>
-        <rows>4</rows>
-        <cols>60</cols>
-      </html>
-      <add>2.2</add>
-  </field>
-  <field>
-      <name>navigation_id</name>
-      <title>Navigation ID</title>
-      <type>int unsigned</type>
-      <import>true</import>
-      <comment>FK to navigation ID</comment>
-      <add>3.0</add>
+    <name>title</name>
+    <title>Report Instance Title</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Report Instance Title.</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>report_id</name>
+    <title>Report template ID</title>
+    <type>varchar</type>
+    <length>64</length>
+    <required>true</required>
+    <comment>FK to civicrm_option_value for the report template</comment>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>name</name>
+    <title>Report instance Name</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>when combined with report_id/template uniquely identifies the instance</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>3.2</add>
+  </field>
+  <field>
+    <name>args</name>
+    <title>Report Instance Arguments</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>arguments that are passed in the url when invoking the instance</comment>
+    <add>3.2</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>description</name>
+    <title>Report Instance description</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Report Instance description.</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>permission</name>
+    <title>Report Instance Permissions</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>permission required to be able to run this instance</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>grouprole</name>
+    <title>Report Instance Assigned to Roles</title>
+    <type>varchar</type>
+    <length>1024</length>
+    <comment>role required to be able to run this instance</comment>
+    <add>4.1</add>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>form_values</name>
+    <title>Submitted Form Values</title>
+    <type>text</type>
+    <import>true</import>
+    <comment>Submitted form values for this report</comment>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>is_active</name>
+    <title>Report Instance is Active</title>
+    <type>boolean</type>
+    <comment>Is this entry active?</comment>
+    <html>
+      <type>CheckBox</type>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>email_subject</name>
+    <title>Report Instance email Subject</title>
+    <type>varchar</type>
+    <length>255</length>
+    <comment>Subject of email</comment>
+    <html>
+      <type>Text</type>
+    </html>
+  </field>
+  <field>
+    <name>email_to</name>
+    <title>Email Report Instance To</title>
+    <type>text</type>
+    <comment>comma-separated list of email addresses to send the report to</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>email_cc</name>
+    <title>cc Email Report Instance To</title>
+    <type>text</type>
+    <comment>comma-separated list of email addresses to send the report to</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>header</name>
+    <title>Report Instance Header</title>
+    <type>text</type>
+    <comment>comma-separated list of email addresses to send the report to</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>4</rows>
+      <cols>60</cols>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>footer</name>
+    <title>Report Instance Footer</title>
+    <type>text</type>
+    <comment>comma-separated list of email addresses to send the report to</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>4</rows>
+      <cols>60</cols>
+    </html>
+    <add>2.2</add>
+  </field>
+  <field>
+    <name>navigation_id</name>
+    <title>Navigation ID</title>
+    <type>int unsigned</type>
+    <import>true</import>
+    <comment>FK to navigation ID</comment>
+    <add>3.0</add>
   </field>
   <foreignKey>
-       <name>navigation_id</name>
-       <table>civicrm_navigation</table>
-       <key>id</key>
-       <add>3.0</add>
-       <onDelete>SET NULL</onDelete>
+    <name>navigation_id</name>
+    <table>civicrm_navigation</table>
+    <key>id</key>
+    <add>3.0</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
-      <name>drilldown_id</name>
-      <title>Drilldown Report ID</title>
-      <type>int unsigned</type>
-      <import>true</import>
-      <comment>FK to instance ID drilldown to</comment>
-      <add>4.3</add>
+    <name>drilldown_id</name>
+    <title>Drilldown Report ID</title>
+    <type>int unsigned</type>
+    <import>true</import>
+    <comment>FK to instance ID drilldown to</comment>
+    <add>4.3</add>
   </field>
   <foreignKey>
-       <name>drilldown_id</name>
-       <table>civicrm_report_instance</table>
-       <key>id</key>
-       <add>4.3</add>
-       <onDelete>SET NULL</onDelete>
+    <name>drilldown_id</name>
+    <table>civicrm_report_instance</table>
+    <key>id</key>
+    <add>4.3</add>
+    <onDelete>SET NULL</onDelete>
   </foreignKey>
   <field>
     <name>is_reserved</name>
index c5713abffe3baa890df3d53f09c555a8aa8983f6..550b4b8a2c2e42911d3fbb02554f2459e954040e 100644 (file)
@@ -8,47 +8,47 @@
   <add>1.4</add>
   <drop>2.0</drop>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>SMS History ID</comment>
-       <add>1.4</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>SMS History ID</comment>
+    <add>1.4</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>message</name>
-       <type>text</type>
-       <comment>Contents of the SMS.</comment>
-       <html>
-         <type>TextArea</type>
-         <rows>5</rows>
-         <cols>80</cols>
-       </html>
-       <add>1.4</add>
+    <name>message</name>
+    <type>text</type>
+    <comment>Contents of the SMS.</comment>
+    <html>
+      <type>TextArea</type>
+      <rows>5</rows>
+      <cols>80</cols>
+    </html>
+    <add>1.4</add>
   </field>
   <field>
-      <name>contact_id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>FK to Contact who is sending this SMS</comment>
-       <add>1.4</add>
-       <html>
-         <type>Autocomplete-Select</type>
-       </html>
+    <name>contact_id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>FK to Contact who is sending this SMS</comment>
+    <add>1.4</add>
+    <html>
+      <type>Autocomplete-Select</type>
+    </html>
   </field>
   <foreignKey>
-       <name>contact_id</name>
-       <table>civicrm_contact</table>
-       <key>id</key>
-       <add>1.4</add>
+    <name>contact_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>1.4</add>
   </foreignKey>
   <field>
-       <name>sent_date</name>
-       <type>date</type>
-       <comment>When was this SMS sent</comment>
-       <add>1.4</add>
+    <name>sent_date</name>
+    <type>date</type>
+    <comment>When was this SMS sent</comment>
+    <add>1.4</add>
   </field>
 </table>
index b6db936a55c15059d8f231fc03a984a43b23ca1f..72d9369cbc4097242c9d3d498d43d229e443d93f 100644 (file)
   <comment>Table to add different sms providers </comment>
   <add>4.2</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <comment>SMS Provider ID</comment>
-      <add>4.2</add>
+    <name>id</name>
+    <title>SMS Provider ID</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>SMS Provider ID</comment>
+    <add>4.2</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-       <name>name</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Provider internal name points to option_value of option_group sms_provider_name</comment>
-       <add>4.2</add>
+    <name>name</name>
+    <title>SMS Provider Name</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Provider internal name points to option_value of option_group sms_provider_name</comment>
+    <add>4.2</add>
   </field>
   <field>
-       <name>title</name>
-       <type>varchar</type>
-       <length>64</length>
-       <comment>Provider name visible to user</comment>
-       <html>
-         <type>Text</type>
-       </html>
-       <add>4.2</add>
+    <name>title</name>
+    <title>SMS Provider Title</title>
+    <type>varchar</type>
+    <length>64</length>
+    <comment>Provider name visible to user</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>4.2</add>
   </field>
   <field>
-       <name>username</name>
-       <type>varchar</type>
-       <length>255</length>
-       <html>
-          <type>Text</type>
-       </html>
-       <add>4.2</add>
+    <name>username</name>
+    <title>SMS Provider Username</title>
+    <type>varchar</type>
+    <length>255</length>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>4.2</add>
   </field>
   <field>
-       <name>password</name>
-       <type>varchar</type>
-       <length>255</length>
-       <html>
-          <type>Text</type>
-       </html>
-       <add>4.2</add>
+    <name>password</name>
+    <title>SMS Provider Password</title>
+    <type>varchar</type>
+    <length>255</length>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>4.2</add>
   </field>
   <field>
-       <name>api_type</name>
-       <type>int unsigned</type>
-       <required>true</required>
-       <comment>points to value in civicrm_option_value for group sms_api_type</comment>
-       <html>
-         <type>Select</type>
-       </html>
-       <add>4.2</add>
+    <name>api_type</name>
+    <title>SMS Provider API</title>
+    <type>int unsigned</type>
+    <required>true</required>
+    <comment>points to value in civicrm_option_value for group sms_api_type</comment>
+    <html>
+      <type>Select</type>
+    </html>
+    <add>4.2</add>
   </field>
   <field>
-       <name>api_url</name>
-       <type>varchar</type>
-       <length>128</length>
-       <html>
-          <type>Text</type>
-       </html>
-       <add>4.2</add>
+    <name>api_url</name>
+    <title>SMS Provider API URL</title>
+    <type>varchar</type>
+    <length>128</length>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>4.2</add>
   </field>
   <field>
-       <name>api_params</name>
-       <type>text</type>
-       <comment>the api params in xml, http or smtp format</comment>
-       <html>
-          <type>Text</type>
-       </html>
-       <add>4.2</add>
+    <name>api_params</name>
+    <title>SMS Provider API Params</title>
+    <type>text</type>
+    <comment>the api params in xml, http or smtp format</comment>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>4.2</add>
   </field>
-   <field>
-       <name>is_default</name>
-       <type>boolean</type>
-       <default>0</default>
-       <add>4.2</add>
-       <html>
-         <type>CheckBox</type>
-       </html>
+  <field>
+    <name>is_default</name>
+    <title>SMS Provider is Default?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <add>4.2</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
-   <field>
-       <name>is_active</name>
-       <type>boolean</type>
-       <default>0</default>
-       <add>4.2</add>
-       <html>
-         <type>CheckBox</type>
-       </html>       
+  <field>
+    <name>is_active</name>
+    <title>SMS Provider is Active?</title>
+    <type>boolean</type>
+    <default>0</default>
+    <add>4.2</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
 </table>
index 07a379bbe9da8d82b6a88b9e41c0d2f9d9216b8d..b4f693fbe9c93c216f4acf5af0306b353781d015 100644 (file)
@@ -7,58 +7,58 @@
   <comment>The OpenID associations store for standalone login.</comment>
   <add>2.0</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>2.0</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>2.0</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>server_url</name>
-      <type>blob</type>
-      <add>2.0</add>
+    <name>server_url</name>
+    <type>blob</type>
+    <add>2.0</add>
   </field>
   <field>
-       <name>handle</name>
-       <type>varchar</type>
-       <length>255</length>
-       <html>
-          <type>Text</type>
-       </html>
-       <add>2.0</add>
+    <name>handle</name>
+    <type>varchar</type>
+    <length>255</length>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.0</add>
   </field>
   <field>
-      <name>secret</name>
-      <type>blob</type>
-      <add>2.0</add>
+    <name>secret</name>
+    <type>blob</type>
+    <add>2.0</add>
   </field>
   <field>
-      <name>issued</name>
-      <type>int</type>
-      <add>2.0</add>
+    <name>issued</name>
+    <type>int</type>
+    <add>2.0</add>
   </field>
   <field>
-      <name>lifetime</name>
-      <type>int</type>
-      <add>2.0</add>
+    <name>lifetime</name>
+    <type>int</type>
+    <add>2.0</add>
   </field>
   <field>
-      <name>assoc_type</name>
-      <type>varchar</type>
-      <length>64</length>
-      <html>
-          <type>Text</type>
-       </html>
-      <add>2.0</add>
+    <name>assoc_type</name>
+    <type>varchar</type>
+    <length>64</length>
+    <html>
+      <type>Text</type>
+    </html>
+    <add>2.0</add>
   </field>
   <index>
-      <name>server_url_handle_index</name>
-      <fieldName length="166">server_url</fieldName>
-      <fieldName length="166">handle</fieldName>
-      <unique>true</unique>
-      <add>2.0</add>
+    <name>server_url_handle_index</name>
+    <fieldName length="166">server_url</fieldName>
+    <fieldName length="166">handle</fieldName>
+    <unique>true</unique>
+    <add>2.0</add>
   </index>
 </table>
index 9023c97ae08b52a5e6bc56d08d61c66c2e18557e..60b502a1e29d3eddb0206e3d471c20d61e7245e4 100644 (file)
@@ -7,37 +7,37 @@
   <comment>The OpenID nonce store for standalone login.</comment>
   <add>2.0</add>
   <field>
-      <name>id</name>
-      <type>int unsigned</type>
-      <required>true</required>
-      <add>2.0</add>
+    <name>id</name>
+    <type>int unsigned</type>
+    <required>true</required>
+    <add>2.0</add>
   </field>
   <primaryKey>
-       <name>id</name>
-       <autoincrement>true</autoincrement>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
   </primaryKey>
   <field>
-      <name>server_url</name>
-      <type>blob</type>
-      <add>2.0</add>
+    <name>server_url</name>
+    <type>blob</type>
+    <add>2.0</add>
   </field>
   <field>
-       <name>timestamp</name>
-       <type>int</type>
-       <add>2.0</add>
+    <name>timestamp</name>
+    <type>int</type>
+    <add>2.0</add>
   </field>
   <field>
-       <name>salt</name>
-       <type>char</type>
-       <length>40</length>
-       <add>2.0</add>
+    <name>salt</name>
+    <type>char</type>
+    <length>40</length>
+    <add>2.0</add>
   </field>
   <index>
-       <name>nonce_index</name>
-       <fieldName length="255">server_url</fieldName>
-       <fieldName>timestamp</fieldName>
-       <fieldName>salt</fieldName>
-       <unique>true</unique>
-       <add>2.0</add>
+    <name>nonce_index</name>
+    <fieldName length="255">server_url</fieldName>
+    <fieldName>timestamp</fieldName>
+    <fieldName>salt</fieldName>
+    <unique>true</unique>
+    <add>2.0</add>
   </index>
-</table>
\ No newline at end of file
+</table>
index 7ea2e056382e3ee0ea525f24dd53e13244764e0b..dcaba4f152e7bb46ea5dacad9d09f138e9a66351 100644 (file)
@@ -520,6 +520,7 @@ VALUES
   (@option_group_id_acsOpt, '{ts escape="sql"}City{/ts}'            , 5, 'city'          , NULL, 0, NULL, 5, NULL, 0, 0, 1, NULL, NULL),
   (@option_group_id_acsOpt, '{ts escape="sql"}State/Province{/ts}'  , 6, 'state_province', NULL, 0, NULL, 6, NULL, 0, 0, 1, NULL, NULL),
   (@option_group_id_acsOpt, '{ts escape="sql"}Country{/ts}'         , 7, 'country'       , NULL, 0, NULL, 7, NULL, 0, 0, 1, NULL, NULL),
+  (@option_group_id_acsOpt, '{ts escape="sql"}Postal Code{/ts}'     , 8, 'postal_code'   , NULL, 0, NULL, 8, NULL, 0, 0, 1, NULL, NULL),
 
   (@option_group_id_acConRef, '{ts escape="sql"}Email Address{/ts}'   , 2, 'email'         , NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL),
   (@option_group_id_acConRef, '{ts escape="sql"}Phone{/ts}'           , 3, 'phone'         , NULL, 0, NULL, 3, NULL, 0, 0, 1, NULL, NULL),
@@ -527,6 +528,7 @@ VALUES
   (@option_group_id_acConRef, '{ts escape="sql"}City{/ts}'            , 5, 'city'          , NULL, 0, NULL, 5, NULL, 0, 0, 1, NULL, NULL),
   (@option_group_id_acConRef, '{ts escape="sql"}State/Province{/ts}'  , 6, 'state_province', NULL, 0, NULL, 6, NULL, 0, 0, 1, NULL, NULL),
   (@option_group_id_acConRef, '{ts escape="sql"}Country{/ts}'         , 7, 'country'       , NULL, 0, NULL, 7, NULL, 0, 0, 1, NULL, NULL),
+  (@option_group_id_acConRef, '{ts escape="sql"}Postal Code{/ts}'     , 8, 'country'       , NULL, 0, NULL, 8, NULL, 0, 0, 1, NULL, NULL),
 
   (@option_group_id_adOpt, '{ts escape="sql"}Street Address{/ts}'    ,  1, 'street_address', NULL, 0, NULL,  1, NULL, 0, 0, 1, NULL, NULL),
   (@option_group_id_adOpt, '{ts escape="sql"}Supplemental Address 1{/ts}'  ,  2, 'supplemental_address_1', NULL, 0, NULL,  2, NULL, 0, 0, 1, NULL, NULL),
@@ -869,19 +871,19 @@ VALUES
    (@option_group_id_ere, '{ts escape="sql"}Participant Role{/ts}', 1, 'participant_role', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
 
 -- default conference slots
-   (@option_group_id_conference_slot, '{ts escape="sql"}Morning Sessions{/ts}', 1, '{ts escape="sql"}Morning Sessions{/ts}', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
-   (@option_group_id_conference_slot, '{ts escape="sql"}Evening Sessions{/ts}', 2, '{ts escape="sql"}Evening Sessions{/ts}', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL),
+   (@option_group_id_conference_slot, '{ts escape="sql"}Morning Sessions{/ts}', 1, 'Morning Sessions', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
+   (@option_group_id_conference_slot, '{ts escape="sql"}Evening Sessions{/ts}', 2, 'Evening Sessions', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL),
 
 -- default batch type
-   (@option_group_id_batch_type, '{ts escape="sql"}Contribution{/ts}', 1, '{ts escape="sql"}Contribution{/ts}', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
-   (@option_group_id_batch_type, '{ts escape="sql"}Membership{/ts}', 2, '{ts escape="sql"}Membership{/ts}', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL),
-
--- default batch statues
-   (@option_group_id_batch_status, '{ts escape="sql"}Open{/ts}', 1, '{ts escape="sql"}Open{/ts}', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
-   (@option_group_id_batch_status, '{ts escape="sql"}Closed{/ts}', 2, '{ts escape="sql"}Closed{/ts}', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL),
-   (@option_group_id_batch_status, '{ts escape="sql"}Data Entry{/ts}', 3, '{ts escape="sql"}Data Entry{/ts}', NULL, 0, NULL, 3, NULL, 0, 0, 1, NULL, NULL),
-   (@option_group_id_batch_status, '{ts escape="sql"}Reopened{/ts}', 4, '{ts escape="sql"}Reopened{/ts}', NULL, 0, NULL, 4, NULL, 0, 0, 1, NULL, NULL),
-   (@option_group_id_batch_status, '{ts escape="sql"}Exported{/ts}', 5, '{ts escape="sql"}Exported{/ts}', NULL, 0, NULL, 5, NULL, 0, 0, 1, NULL, NULL),
+   (@option_group_id_batch_type, '{ts escape="sql"}Contribution{/ts}', 1, 'Contribution', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
+   (@option_group_id_batch_type, '{ts escape="sql"}Membership{/ts}', 2, 'Membership', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL),
+
+-- default batch statuses
+   (@option_group_id_batch_status, '{ts escape="sql"}Open{/ts}', 1, 'Open', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
+   (@option_group_id_batch_status, '{ts escape="sql"}Closed{/ts}', 2, 'Closed', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL),
+   (@option_group_id_batch_status, '{ts escape="sql"}Data Entry{/ts}', 3, 'Data Entry', NULL, 0, NULL, 3, NULL, 0, 0, 1, NULL, NULL),
+   (@option_group_id_batch_status, '{ts escape="sql"}Reopened{/ts}', 4, 'Reopened', NULL, 0, NULL, 4, NULL, 0, 0, 1, NULL, NULL),
+   (@option_group_id_batch_status, '{ts escape="sql"}Exported{/ts}', 5, 'Exported', NULL, 0, NULL, 5, NULL, 0, 0, 1, NULL, NULL),
 
 -- default batch modes
    (@option_group_id_batch_mode, '{ts escape="sql"}Manual Batch{/ts}', 1, 'Manual Batch', NULL, 0, 0, 1, 'Manual Batch', 0, 1, 1, 2, NULL),
index 774863dcedf8d7ac8b287aa6f9fcc77a80b72aab..c5ac3109c4ffd355059850e8f15486e8762f9329 100644 (file)
@@ -47,7 +47,7 @@ Duplicate Matching Rules for your site.{/ts}</p>
      </tr>
      <tr>
       <td {$labelStyle}>
-       {ts}Organization Contact Id{/ts}
+       {ts}Organization Contact ID{/ts}
       </td>
       <td {$valueStyle}>
        {$onBehalfID}
index f1784809078f08136078eb532a022446e915ef53..217c0536a1610606287e204e1d85b1811037b72b 100644 (file)
@@ -4,7 +4,7 @@ Duplicate Matching Rules for your site.{/ts}
 
 {ts}Organization Name{/ts}: {$onBehalfName}
 {ts}Organization Email{/ts}: {$onBehalfEmail}
-{ts}Organization Contact Id{/ts}: {$onBehalfID}
+{ts}Organization Contact ID{/ts}: {$onBehalfID}
 
 {ts}If you think this may be a duplicate contact which should be merged with an existing record -
 Go to "Contacts >> Find and Merge Duplicate Contacts". Use the strict
index 60a4725ea56d26e6c9a4e5365698bf41e297ff94..fae516dfdabf94a962545122eef081ed56b81fa6 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 <version>
-  <version_no>4.5.beta5</version_no>
+  <version_no>4.5.beta8</version_no>
 </version>