-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
54 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
src/Sylius/Bundle/ShopBundle/Resources/views/Checkout/Address/_form.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
<div id="sylius-shipping-address"> | ||
<div id="sylius-shipping-address" {{ sylius_test_html_attribute('shipping-address') }}> | ||
{% include '@SyliusShop/Checkout/Address/_addressBookSelect.html.twig' %} | ||
<h3 class="ui dividing header">{{ 'sylius.ui.shipping_address'|trans }}</h3> | ||
{% if form.customer is defined %} | ||
{% include '@SyliusShop/Common/Form/_login.html.twig' with {'form': form.customer} %} | ||
{% endif %} | ||
{% include '@SyliusShop/Common/Form/_address.html.twig' with {'form': form.shippingAddress, 'order': order} %} | ||
{{ form_row(form.differentBillingAddress, {'attr': {'data-toggles': 'sylius-billing-address'}}) }} | ||
{% include '@SyliusShop/Common/Form/_address.html.twig' with {'form': form.shippingAddress, 'order': order, 'type': 'shipping'} %} | ||
{{ form_row(form.differentBillingAddress, {'attr': {'data-toggles': 'sylius-billing-address'}}, sylius_test_form_attribute('different-billing-address')) }} | ||
|
||
{{ sonata_block_render_event('sylius.shop.checkout.address.shipping_address_form', {'order': order}) }} | ||
</div> | ||
|
||
<div id="sylius-billing-address"> | ||
<div id="sylius-billing-address" {{ sylius_test_html_attribute('billing-address') }}> | ||
<div class="ui hidden divider"></div> | ||
{% include '@SyliusShop/Checkout/Address/_addressBookSelect.html.twig' %} | ||
<h3 class="ui dividing header">{{ 'sylius.ui.billing_address'|trans }}</h3> | ||
{% include '@SyliusShop/Common/Form/_address.html.twig' with {'form': form.billingAddress, 'order': order} %} | ||
{% include '@SyliusShop/Common/Form/_address.html.twig' with {'form': form.billingAddress, 'order': order, 'type': 'billing'} %} | ||
|
||
{{ sonata_block_render_event('sylius.shop.checkout.address.billing_address_form', {'order': order}) }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 13 additions & 9 deletions
22
src/Sylius/Bundle/ShopBundle/Resources/views/Common/Form/_address.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
{% if type is not defined %} | ||
{% set type = null %} | ||
{% endif %} | ||
|
||
<div class="two fields"> | ||
{{ form_row(form.firstName) }} | ||
{{ form_row(form.lastName) }} | ||
{{ form_row(form.firstName, sylius_test_form_attribute(type ~ '-first-name')) }} | ||
{{ form_row(form.lastName, sylius_test_form_attribute(type ~ '-last-name')) }} | ||
</div> | ||
{{ form_row(form.company) }} | ||
{{ form_row(form.street) }} | ||
{{ form_row(form.company, sylius_test_form_attribute(type ~ '-company')) }} | ||
{{ form_row(form.street, sylius_test_form_attribute(type ~ '-street')) }} | ||
|
||
{% include '@SyliusShop/Common/Form/_countryCode.html.twig' with {'form': form.countryCode} %} | ||
|
||
<div class="province-container field" data-url="{{ path('sylius_shop_ajax_render_province_form') }}"> | ||
{% if form.provinceCode is defined %} | ||
{{ form_row(form.provinceCode, {'attr': {'class': 'ui dropdown'}}) }} | ||
{{ form_row(form.provinceCode, {'attr': {'class': 'ui dropdown'}}, sylius_test_form_attribute(type ~ '-province-code')) }} | ||
{% elseif form.provinceName is defined %} | ||
{{ form_row(form.provinceName) }} | ||
{{ form_row(form.provinceName, sylius_test_form_attribute(type ~ '-province')) }} | ||
{% endif %} | ||
</div> | ||
|
||
{% if form.provinceCode is defined %} | ||
{% if form.provinceCode is defined %}a | ||
{{ form_errors(form) }} | ||
{% endif %} | ||
|
||
<div class="two fields"> | ||
{{ form_row(form.city) }} | ||
{{ form_row(form.postcode) }} | ||
{{ form_row(form.city, sylius_test_form_attribute(type ~ '-city')) }} | ||
{{ form_row(form.postcode, sylius_test_form_attribute(type ~ '-postcode')) }} | ||
</div> | ||
{{ form_row(form.phoneNumber) }} |
4 changes: 2 additions & 2 deletions
4
src/Sylius/Bundle/ShopBundle/Resources/views/Common/Form/_countryCode.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{% if form.vars.choices|length == 1 %} | ||
{{ form_row(form, {'value': form.vars.choices[0].value}) }} | ||
{{ form_row(form, sylius_test_form_attribute(type ~ '-country')|merge({'value': form.vars.choices[0].value})) }} | ||
{% else %} | ||
{{ form_row(form) }} | ||
{{ form_row(form, sylius_test_form_attribute(type ~ '-country')) }} | ||
{% endif %} |
6 changes: 3 additions & 3 deletions
6
src/Sylius/Bundle/ShopBundle/Resources/views/Common/Form/_login.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters