Skip to content

Commit

Permalink
Change refund form fields style
Browse files Browse the repository at this point in the history
  • Loading branch information
bartek-sek authored and GSadee committed Jan 13, 2025
1 parent 7235335 commit fec4a55
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions assets/entrypoint.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import './js/refund-button';

import './styles/main.scss';
1 change: 1 addition & 0 deletions assets/styles/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'refund';
4 changes: 4 additions & 0 deletions assets/styles/refund.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
textarea.refund-comment {
min-height: 4rem;
height: 4rem;
}
4 changes: 2 additions & 2 deletions config/twig_hooks/admin/order/refund/show.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ sylius_twig_hooks:
'sylius_refund.admin.order.refund.content.sections.form.fields':
payment_method:
template: '@SyliusRefundPlugin/admin/order/refund/content/sections/form/fields/payment_method.html.twig'
priority: 100
priority: 0
comment:
template: '@SyliusRefundPlugin/admin/order/refund/content/sections/form/fields/comment.html.twig'
priority: 0
priority: 100
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="col-12 col-md-6">
<div class="col-12 col-md-6 mb-3 mb-md-0">
<div class="field">
<label for="sylius-refund-comment" class="form-label">{{ 'sylius.ui.comment'|trans }}</label>
<textarea rows="3" name="sylius_refund_comment" id="sylius-refund-comment" class="form-control" style="height: 8rem;"></textarea>
<textarea rows="3" name="sylius_refund_comment" id="sylius-refund-comment" class="form-control refund-comment"></textarea>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% set payment_methods = hookable_metadata.context.payment_methods %}
{% set original_payment_method = order.lastPayment(completed).method %}

<div class="col-12 col-md-6 mb-3">
<div class="col-12 col-md-6">
<div class="field">
<label for="payment-methods" class="form-label">{{ 'sylius.ui.payment_method'|trans }}</label>
<select id="payment-methods" name="sylius_refund_payment_method" class="form-select mb-1">
Expand Down
4 changes: 4 additions & 0 deletions tests/Application/config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ sylius_twig_hooks:
'sylius_admin.base#javascripts':
app_javascripts:
template: 'admin/javascripts.html.twig'

'sylius_admin.base#stylesheets':
app_stylesheets:
template: 'admin/stylesheets.html.twig'
1 change: 1 addition & 0 deletions tests/Application/templates/admin/stylesheets.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ encore_entry_link_tags('app-admin-entry', null, 'app.admin') }}

0 comments on commit fec4a55

Please sign in to comment.