From 9139737bcb1971efc4a2c75d3dcb21ded4947dd4 Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Tue, 25 Sep 2018 11:52:28 +0100 Subject: [PATCH] Switch UpdateSubscription to use datepicker and add metadata for all date fields in ContributionRecur --- CRM/Contribute/DAO/ContributionRecur.php | 9 ++++++++- CRM/Contribute/Form/UpdateSubscription.php | 2 +- xml/schema/Contribute/ContributionRecur.xml | 7 +++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/DAO/ContributionRecur.php b/CRM/Contribute/DAO/ContributionRecur.php index c27f63c004..5880968364 100644 --- a/CRM/Contribute/DAO/ContributionRecur.php +++ b/CRM/Contribute/DAO/ContributionRecur.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Contribute/ContributionRecur.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:a1007a4585bac4fcb04ce47535aecec0) + * (GenCodeChecksum:86dee7eccc17a37ef08043f32396b80d) */ /** @@ -378,6 +378,7 @@ class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'Select Date', + 'formatType' => 'activityDate', ], ], 'create_date' => [ @@ -392,6 +393,7 @@ class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'Select Date', + 'formatType' => 'activityDate', ], ], 'modified_date' => [ @@ -405,6 +407,7 @@ class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'Select Date', + 'formatType' => 'activityDate', ], ], 'cancel_date' => [ @@ -418,6 +421,7 @@ class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'Select Date', + 'formatType' => 'activityDate', ], ], 'end_date' => [ @@ -431,6 +435,7 @@ class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'Select Date', + 'formatType' => 'activityDate', ], ], 'processor_id' => [ @@ -543,6 +548,7 @@ class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'Select Date', + 'formatType' => 'activityDate', ], ], 'failure_count' => [ @@ -570,6 +576,7 @@ class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'Select Date', + 'formatType' => 'activityDate', ], ], 'auto_renew' => [ diff --git a/CRM/Contribute/Form/UpdateSubscription.php b/CRM/Contribute/Form/UpdateSubscription.php index 6f8a080bda..3ed257189b 100644 --- a/CRM/Contribute/Form/UpdateSubscription.php +++ b/CRM/Contribute/Form/UpdateSubscription.php @@ -145,7 +145,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form { $alreadyHardCodedFields = array('amount', 'installments'); foreach ($this->editableScheduleFields as $editableScheduleField) { if (!in_array($editableScheduleField, $alreadyHardCodedFields)) { - $this->addField($editableScheduleField, array('entity' => 'ContributionRecur')); + $this->addField($editableScheduleField, array('entity' => 'ContributionRecur'), FALSE, FALSE); } } diff --git a/xml/schema/Contribute/ContributionRecur.xml b/xml/schema/Contribute/ContributionRecur.xml index 26407dcc93..9a8e4ba9eb 100644 --- a/xml/schema/Contribute/ContributionRecur.xml +++ b/xml/schema/Contribute/ContributionRecur.xml @@ -107,6 +107,7 @@ 1.6 Select Date + activityDate @@ -118,6 +119,7 @@ 1.6 Select Date + activityDate @@ -128,6 +130,7 @@ 1.6 Select Date + activityDate @@ -138,6 +141,7 @@ 1.6 Select Date + activityDate @@ -148,6 +152,7 @@ 1.6 Select Date + activityDate @@ -253,6 +258,7 @@ 4.4 Select Date + activityDate @@ -274,6 +280,7 @@ 1.6 Select Date + activityDate -- 2.25.1