-
-
Notifications
You must be signed in to change notification settings - Fork 9
[Admin] Adjust payment method views #180
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
[Admin] Adjust payment method views #180
Conversation
d5e719a
to
c6c61dd
Compare
[Admin][PaymentMethod] Extract custom help messages to separate form theme blocks
[Admin][PaymentMethod] Fix info and version notifications placement
c6c61dd
to
16c981d
Compare
priority: 300 | ||
api_key_live: | ||
template: '@SyliusMolliePlugin/admin/payment_method/form/sections/gateway_configuration/credentials/api_key_live.html.twig' | ||
priority: 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
priority: 200 | |
priority: 100 |
priority: 300 | ||
api_key_live: | ||
template: '@SyliusMolliePlugin/admin/payment_method/form/sections/gateway_configuration/credentials/api_key_live.html.twig' | ||
priority: 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
priority: 200 | |
priority: 100 |
@@ -0,0 +1,5 @@ | |||
{% set form = hookable_metadata.context.form.gatewayConfig.config.api_key_live %} | |||
|
|||
{% form_theme form '@SyliusMolliePlugin/admin/payment_method/form/form_theme.html.twig' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this to the main twig file instead of importing it in multiple places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately the block names for forms are pretty much generic, it's prefixed as _sylius_admin_payment_method_gatewayConfig_config_
with no indicator as to what factory/gateway the config relates to, so adding the theme globally can potentially conflict with other payment providers.
{% hook 'item' %} | ||
</div> | ||
{% else %} | ||
{% include '@SyliusMolliePlugin/admin/payment_method/form/sections/gateway_configuration/mollie_payment_methods/body/accordion/no_results.html.twig' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should add a no_results
hook. https://github.com/Sylius/Sylius/blob/2.1/src/Sylius/Bundle/ShopBundle/Resources/config/app/twig_hooks/checkout/select_shipping.yaml#L40
No description provided.