Allow PaymentMethod to register a custom partial view to display above "Payment Provider Settings" #294
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows user to define a custom partial view containing instructions for Payment Method configuration.
The process of creating a custom partial:
/spree_backend/app/views/spree/admin/payment_methods/configuration_guides/
- create theconfiguration_guides
folder if it doesn't exist._name.html.erb
.payment_configuration_guide
in chosen Payment Method class declaration. It should return the name of partial file.Example custom partial view configuration for Spree::Gateway::Bogus:
View of the Payment Methods edit page before the changes:
_bogus_partial.html.erb
in said directory. Contents of example partial file:/spree/core/app/models/spree/gateway/bogus.rb
. Add following method to class declaration:View of the Payment Methods edit page after the changes: