Skip to content

Commit fec4a55

Browse files
bartek-sekGSadee
authored andcommitted
Change refund form fields style
1 parent 7235335 commit fec4a55

File tree

8 files changed

+17
-5
lines changed

8 files changed

+17
-5
lines changed

assets/entrypoint.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
import './js/refund-button';
2+
3+
import './styles/main.scss';

assets/styles/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import 'refund';

assets/styles/refund.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
textarea.refund-comment {
2+
min-height: 4rem;
3+
height: 4rem;
4+
}

config/twig_hooks/admin/order/refund/show.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ sylius_twig_hooks:
117117
'sylius_refund.admin.order.refund.content.sections.form.fields':
118118
payment_method:
119119
template: '@SyliusRefundPlugin/admin/order/refund/content/sections/form/fields/payment_method.html.twig'
120-
priority: 100
120+
priority: 0
121121
comment:
122122
template: '@SyliusRefundPlugin/admin/order/refund/content/sections/form/fields/comment.html.twig'
123-
priority: 0
123+
priority: 100
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<div class="col-12 col-md-6">
1+
<div class="col-12 col-md-6 mb-3 mb-md-0">
22
<div class="field">
33
<label for="sylius-refund-comment" class="form-label">{{ 'sylius.ui.comment'|trans }}</label>
4-
<textarea rows="3" name="sylius_refund_comment" id="sylius-refund-comment" class="form-control" style="height: 8rem;"></textarea>
4+
<textarea rows="3" name="sylius_refund_comment" id="sylius-refund-comment" class="form-control refund-comment"></textarea>
55
</div>
66
</div>

templates/admin/order/refund/content/sections/form/fields/payment_method.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% set payment_methods = hookable_metadata.context.payment_methods %}
44
{% set original_payment_method = order.lastPayment(completed).method %}
55

6-
<div class="col-12 col-md-6 mb-3">
6+
<div class="col-12 col-md-6">
77
<div class="field">
88
<label for="payment-methods" class="form-label">{{ 'sylius.ui.payment_method'|trans }}</label>
99
<select id="payment-methods" name="sylius_refund_payment_method" class="form-select mb-1">

tests/Application/config/packages/_sylius.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ sylius_twig_hooks:
1717
'sylius_admin.base#javascripts':
1818
app_javascripts:
1919
template: 'admin/javascripts.html.twig'
20+
21+
'sylius_admin.base#stylesheets':
22+
app_stylesheets:
23+
template: 'admin/stylesheets.html.twig'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{ encore_entry_link_tags('app-admin-entry', null, 'app.admin') }}

0 commit comments

Comments
 (0)