Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
7dc87603
Unverified
Commit
7dc87603
authored
6 years ago
by
mattwire
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #13994 from eileenmcnaughton/recur_cancel
#846
Convert Recurring forms to entity forms
parents
b5a59dbd
379d6cd7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Contribute/Form/ContributionRecur.php
+18
-0
18 additions, 0 deletions
CRM/Contribute/Form/ContributionRecur.php
CRM/Core/Form/EntityFormTrait.php
+14
-0
14 additions, 0 deletions
CRM/Core/Form/EntityFormTrait.php
with
32 additions
and
0 deletions
CRM/Contribute/Form/ContributionRecur.php
+
18
−
0
View file @
7dc87603
...
...
@@ -36,6 +36,8 @@
*/
class
CRM_Contribute_Form_ContributionRecur
extends
CRM_Core_Form
{
use
CRM_Core_Form_EntityFormTrait
;
/**
* @var int Contribution ID
*/
...
...
@@ -76,6 +78,21 @@ class CRM_Contribute_Form_ContributionRecur extends CRM_Core_Form {
*/
public
$_paymentProcessor
=
[];
/**
* Fields for the entity to be assigned to the template.
*
* Fields may have keys
* - name (required to show in tpl from the array)
* - description (optional, will appear below the field)
* - not-auto-addable - this class will not attempt to add the field using addField.
* (this will be automatically set if the field does not have html in it's metadata
* or is not a core field on the form's entity).
* - help (option) add help to the field - e.g ['id' => 'id-source', 'file' => 'CRM/Contact/Form/Contact']]
* - template - use a field specific template to render this field
* @var array
*/
protected
$entityFields
=
[];
/**
* Explicitly declare the entity api name.
*/
...
...
@@ -94,6 +111,7 @@ class CRM_Contribute_Form_ContributionRecur extends CRM_Core_Form {
* Set variables up before form is built.
*/
public
function
preProcess
()
{
$this
->
setAction
(
CRM_Core_Action
::
UPDATE
);
$this
->
_mid
=
CRM_Utils_Request
::
retrieve
(
'mid'
,
'Integer'
,
$this
,
FALSE
);
$this
->
_crid
=
CRM_Utils_Request
::
retrieve
(
'crid'
,
'Integer'
,
$this
,
FALSE
);
$this
->
contributionRecurID
=
$this
->
_crid
;
...
...
This diff is collapsed.
Click to expand it.
CRM/Core/Form/EntityFormTrait.php
+
14
−
0
View file @
7dc87603
...
...
@@ -64,6 +64,20 @@ trait CRM_Core_Form_EntityFormTrait {
return
$this
->
deleteMessage
;
}
/**
* Set the delete message.
*
* We do this from the constructor in order to do a translation.
*/
public
function
setDeleteMessage
()
{
}
/**
* Set entity fields to be assigned to the form.
*/
protected
function
setEntityFields
()
{
}
/**
* Get the entity id being edited.
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment