Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move settings definition on contribution settings form to metadata. #16513

Merged
merged 1 commit into from
Feb 12, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Feb 12, 2020

Overview

This moves the code that allows settings to be added to forms by metadata from the Generic setting form to the setting trait.

This means many more forms will support injecting settings by metadata. Specifically we switch across the Contribution preferences form,
making credit_note_prefix a metadata-added field. This is preliminary to moving that to an extension & allows us to inject it
in by simply defining the metadata in a hook

Before

Hard coded settings on form

After

Setting spec for adding settings to form used & respected

Technical Details

Pre the setting spec the preferred way to add a setting to a setting page is through metadata
-ie
'settings_pages' => ['contribute' => ['weight' => 80]],

Note that some pages are fully converted to the extent there is no actual php class for them - this doesn't do that :-) - It allows settings to be added by metadata to non fully converted forms

Comments

Credit notes prefix is pulled out of the invoicing section and into the metadata-defined section - as disabling invoicing does not enable the credit not prefix usage

This moves the code that allows settings to be added to forms by metadata from the Generic setting form to the setting trait.

This means many more forms will support injecting settings by metadata. Specifically we switch across the Contribution preferences form,
making credit_note_prefix a metadata-added field. This is preliminary to moving that to an extension & allows us to inject it
in by simply defining the metadata in a hook
@civibot
Copy link

civibot bot commented Feb 12, 2020

(Standard links)

@mattwire
Copy link
Contributor

Before, settings. After, settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants