-
-
Notifications
You must be signed in to change notification settings - Fork 9
SYL-4341 Remove documentation links #74
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
Changes from 6 commits
048f572
7749312
e6854cc
01ba721
1480fdb
16d76c6
4d2ea3f
f2213e1
461dd0d
a8d1cd4
2acc979
8c0df8d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,12 +1,20 @@ | ||||||
{% import '@SyliusAdmin/PaymentMethod/_documentation_helpers.html.twig' as doc %} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Custom templates should live in the app There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
|
||||||
<div class="field"> | ||||||
<label for="sylius_payment_method_gatewayConfig_config_{{ field.vars.name }}" class="required"> | ||||||
{{ field.vars.label|trans|raw|nl2br }} | ||||||
</label> | ||||||
<div class="ui input"> | ||||||
{{ form_widget(field) }} | ||||||
<button id="{{ field.vars.name }}" type="button" class="ui button primary">{{ 'sylius_mollie_plugin.ui.show_hide'|trans }}</button> | ||||||
<button id="{{ field.vars.name }}" type="button" class="ui button primary"> | ||||||
{{ 'sylius_mollie_plugin.ui.show_hide'|trans }} | ||||||
</button> | ||||||
</div> | ||||||
|
||||||
<div class="ui pointing label"> | ||||||
{{ doc.documentation_help('api_key_live') }} | ||||||
</div> | ||||||
{{ form_help(field) }} | ||||||
|
||||||
{{ form_errors(field) }} | ||||||
</div> | ||||||
|
||||||
|
@@ -19,4 +27,5 @@ | |||||
{{ 'sylius_mollie_plugin.ui.test_api_keys'|trans }} | ||||||
</button> | ||||||
</div> | ||||||
|
||||||
<div class="ui test-api-key-div"></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
{% import '@SyliusAdmin/PaymentMethod/_documentation_helpers.html.twig' as doc %} | ||
|
||
<div class="required field"> | ||
<label for="sylius_payment_method_gatewayConfig_config_{{ field.vars.name }}" class="required"> | ||
{{ field.vars.label|trans|raw|nl2br }} | ||
</label> | ||
<div class="ui input js-onboardingWizard-apiKey"> | ||
{{ form_widget(field) }} | ||
<button id="{{ field.vars.name }}" type="button" class="ui button primary">{{ 'sylius_mollie_plugin.ui.show_hide'|trans }}</button> | ||
<button id="{{ field.vars.name }}" type="button" class="ui button primary"> | ||
{{ 'sylius_mollie_plugin.ui.show_hide'|trans }} | ||
</button> | ||
</div> | ||
|
||
<div class="ui pointing label"> | ||
{{ doc.documentation_help('api_key_test') }} | ||
</div> | ||
|
||
{{ form_errors(field) }} | ||
</div> |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if adding this macro makes sense, as these keys are used once 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not just create form_theme for each field and set the links in there? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{% macro documentation_help(key) %} | ||
{% set links = { | ||
'single_click': 'https://help.mollie.com/hc/en-us/articles/115000671249-What-are-single-click-payments-and-how-does-it-work-', | ||
'mollie_components': 'https://www.mollie.com/en/news/post/better-checkout-flows-with-mollie-components', | ||
'payment_methods': 'https://docs.mollie.com/orders/why-use-orders', | ||
'api_key': 'https://www.mollie.com/dashboard/developers/api-keys' | ||
} %} | ||
|
||
{% if key == 'single_click' %} | ||
{{ 'sylius_mollie_plugin.ui.read_more_single_click_enabled'|trans({ | ||
'%link%': '<a target="_blank" href="' ~ links.single_click ~ '">' ~ 'sylius_mollie_plugin.ui.mollie_single_click'|trans ~ '</a>' | ||
})|raw }} | ||
|
||
{% elseif key == 'mollie_components' %} | ||
{{ 'sylius_mollie_plugin.ui.read_more_enable_components'|trans({ | ||
'%link%': '<a target="_blank" href="' ~ links.mollie_components ~ '">' ~ 'sylius_mollie_plugin.ui.mollie_components'|trans ~ '</a>' | ||
})|raw }} | ||
|
||
{% elseif key == 'api_key_live' %} | ||
{{ 'sylius_mollie_plugin.ui.read_more_live_api_key'|trans({ | ||
'%link%': '<a target="_blank" href="' ~ links.api_key ~ '">' ~ 'sylius_mollie_plugin.ui.mollie_profile'|trans ~ '</a>' | ||
})|raw }} | ||
|
||
{% elseif key == 'api_key_test' %} | ||
{{ 'sylius_mollie_plugin.ui.read_more_test_api_key'|trans({ | ||
'%link%': '<a target="_blank" href="' ~ links.api_key ~ '">' ~ 'sylius_mollie_plugin.ui.mollie_profile'|trans ~ '</a>' | ||
})|raw }} | ||
|
||
{% endif %} | ||
{% endmacro %} |
Uh oh!
There was an error while loading. Please reload this page.