|
5 | 5 | */
|
6 | 6 | -->
|
7 | 7 | <li id="shipping" class="checkout-shipping-address" data-bind="fadeVisible: visible()">
|
8 |
| - <div class="step-title" data-bind="i18n: 'Shipping Address'" data-role="title"></div> |
| 8 | + <div class="step-title" translate="'Shipping Address'" data-role="title" /> |
9 | 9 | <div id="checkout-step-shipping"
|
10 | 10 | class="step-content"
|
11 | 11 | data-role="content">
|
12 | 12 |
|
13 |
| - <!-- ko if: (!quoteIsVirtual) --> |
14 |
| - <!-- ko foreach: getRegion('customer-email') --> |
15 |
| - <!-- ko template: getTemplate() --><!-- /ko --> |
16 |
| - <!--/ko--> |
17 |
| - <!--/ko--> |
18 |
| - |
19 |
| - <!-- ko foreach: getRegion('address-list') --> |
20 |
| - <!-- ko template: getTemplate() --><!-- /ko --> |
21 |
| - <!--/ko--> |
22 |
| - |
23 |
| - <!-- ko foreach: getRegion('address-list-additional-addresses') --> |
24 |
| - <!-- ko template: getTemplate() --><!-- /ko --> |
25 |
| - <!--/ko--> |
| 13 | + <each if="!quoteIsVirtual" args="getRegion('customer-email')" render="" /> |
| 14 | + <each args="getRegion('address-list')" render="" /> |
| 15 | + <each args="getRegion('address-list-additional-addresses')" render="" /> |
26 | 16 |
|
27 | 17 | <!-- Address form pop up -->
|
28 |
| - <!-- ko if: (!isFormInline) --> |
29 |
| - <button type="button" |
30 |
| - data-bind="click: showFormPopUp, visible: !isNewAddressAdded()" |
31 |
| - class="action action-show-popup"> |
32 |
| - <span data-bind="i18n: 'New Address'"></span></button> |
33 |
| - <div id="opc-new-shipping-address" data-bind="visible: isFormPopUpVisible()"> |
34 |
| - <!-- ko template: 'Magento_Checkout/shipping-address/form' --><!-- /ko --> |
35 |
| - </div> |
36 |
| - <!-- /ko --> |
| 18 | + <if args="!isFormInline"> |
| 19 | + <button type="button" |
| 20 | + class="action action-show-popup" |
| 21 | + click="showFormPopUp" |
| 22 | + visible="!isNewAddressAdded()"> |
| 23 | + <span translate="'New Address'" /> |
| 24 | + </button> |
| 25 | + <div id="opc-new-shipping-address" |
| 26 | + visible="isFormPopUpVisible()" |
| 27 | + render="shippingFormTemplate" /> |
| 28 | + </if> |
37 | 29 |
|
38 |
| - <!-- ko foreach: getRegion('before-form') --> |
39 |
| - <!-- ko template: getTemplate() --><!-- /ko --> |
40 |
| - <!--/ko--> |
| 30 | + <each args="getRegion('before-form')" render="" /> |
41 | 31 |
|
42 | 32 | <!-- Inline address form -->
|
43 |
| - <!-- ko if: (isFormInline) --> |
44 |
| - <!-- ko template: 'Magento_Checkout/shipping-address/form' --><!-- /ko --> |
45 |
| - <!-- /ko --> |
| 33 | + <render if="isFormInline" args="shippingFormTemplate" /> |
46 | 34 | </div>
|
47 | 35 | </li>
|
48 | 36 |
|
49 |
| - |
50 | 37 | <!--Shipping method template-->
|
51 | 38 | <li id="opc-shipping_method"
|
52 | 39 | class="checkout-shipping-method"
|
53 | 40 | data-bind="fadeVisible: visible(), blockLoader: isLoading"
|
54 | 41 | role="presentation">
|
55 | 42 | <div class="checkout-shipping-method">
|
56 |
| - <div class="step-title" data-bind="i18n: 'Shipping Methods'" data-role="title"></div> |
57 |
| - <!-- ko foreach: getRegion('before-shipping-method-form') --> |
58 |
| - <!-- ko template: getTemplate() --><!-- /ko --> |
59 |
| - <!-- /ko --> |
| 43 | + <div class="step-title" |
| 44 | + translate="'Shipping Methods'" |
| 45 | + data-role="title" /> |
| 46 | + |
| 47 | + <each args="getRegion('before-shipping-method-form')" render="" /> |
| 48 | + |
60 | 49 | <div id="checkout-step-shipping_method"
|
61 | 50 | class="step-content"
|
62 | 51 | data-role="content"
|
63 | 52 | role="tabpanel"
|
64 | 53 | aria-hidden="false">
|
65 |
| - <!-- ko if: rates().length --> |
66 |
| - <form class="form methods-shipping" id="co-shipping-method-form" data-bind="submit: setShippingInformation" novalidate="novalidate"> |
67 |
| - <div id="checkout-shipping-method-load"> |
68 |
| - <table class="table-checkout-shipping-method"> |
69 |
| - <thead> |
70 |
| - <tr class="row"> |
71 |
| - <th class="col col-method" data-bind="i18n: 'Select Method'"></th> |
72 |
| - <th class="col col-price" data-bind="i18n: 'Price'"></th> |
73 |
| - <th class="col col-method" data-bind="i18n: 'Method Title'"></th> |
74 |
| - <th class="col col-carrier" data-bind="i18n: 'Carrier Title'"></th> |
75 |
| - </tr> |
76 |
| - </thead> |
77 |
| - <tbody> |
| 54 | + <form id="co-shipping-method-form" |
| 55 | + class="form methods-shipping" |
| 56 | + if="rates().length" |
| 57 | + submit="setShippingInformation" |
| 58 | + novalidate="novalidate"> |
78 | 59 |
|
79 |
| - <!--ko foreach: { data: rates(), as: 'method'}--> |
80 |
| - <tr class="row" data-bind="click: $parent.selectShippingMethod"> |
81 |
| - <td class="col col-method"> |
82 |
| - <!-- ko ifnot: method.error_message --> |
83 |
| - <!-- ko if: $parent.rates().length == 1 --> |
84 |
| - <input class="radio" |
85 |
| - type="radio" |
86 |
| - data-bind="attr: { |
87 |
| - checked: $parent.rates().length == 1, |
88 |
| - 'value' : method.carrier_code + '_' + method.method_code, |
89 |
| - 'id': 's_method_' + method.method_code, |
90 |
| - 'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code |
91 |
| - }" /> |
92 |
| - <!-- /ko --> |
93 |
| - <!--ko ifnot: ($parent.rates().length == 1)--> |
94 |
| - <input type="radio" |
95 |
| - data-bind=" |
96 |
| - value: method.carrier_code + '_' + method.method_code, |
97 |
| - checked: $parent.isSelected, |
98 |
| - attr: { |
99 |
| - 'id': 's_method_' + method.carrier_code + '_' + method.method_code, |
100 |
| - 'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code |
101 |
| - }" |
102 |
| - class="radio"/> |
103 |
| - <!--/ko--> |
104 |
| - <!-- /ko --> |
105 |
| - </td> |
106 |
| - <td class="col col-price"> |
107 |
| - <!-- ko foreach: $parent.getRegion('price') --> |
108 |
| - <!-- ko template: getTemplate() --><!-- /ko --> |
109 |
| - <!-- /ko --> |
110 |
| - </td> |
111 |
| - |
112 |
| - <td class="col col-method" |
113 |
| - data-bind="text: method.method_title, attr: {'id': 'label_method_' + method.method_code + '_' + method.carrier_code}"></td> |
114 |
| - |
115 |
| - <td class="col col-carrier" |
116 |
| - data-bind="text: method.carrier_title, attr: {'id': 'label_carrier_' + method.method_code + '_' + method.carrier_code}"></td> |
117 |
| - </tr> |
118 |
| - |
119 |
| - <!-- ko if: method.error_message --> |
120 |
| - <tr class="row row-error"> |
121 |
| - <td class="col col-error" colspan="4"> |
122 |
| - <div role="alert" class="message error"> |
123 |
| - <div data-bind="text: method.error_message"></div> |
124 |
| - </div> |
125 |
| - <span class="no-display"> |
126 |
| - <input type="radio" data-bind="attr: {'value' : method.method_code, 'id': 's_method_' + method.method_code}"/> |
127 |
| - </span> |
128 |
| - </td> |
129 |
| - </tr> |
130 |
| - <!-- /ko --> |
131 |
| - |
132 |
| - <!-- /ko --> |
133 |
| - </tbody> |
134 |
| - </table> |
135 |
| - </div> |
| 60 | + <render args="shippingMethodListTemplate"/> |
136 | 61 |
|
137 | 62 | <div id="onepage-checkout-shipping-method-additional-load">
|
138 |
| - <!-- ko foreach: getRegion('shippingAdditional') --> |
139 |
| - <!-- ko template: getTemplate() --><!-- /ko --> |
140 |
| - <!-- /ko --> |
| 63 | + <each args="getRegion('shippingAdditional')" render="" /> |
141 | 64 | </div>
|
142 |
| - <!-- ko if: errorValidationMessage().length > 0 --> |
143 |
| - <div role="alert" class="message notice"> |
144 |
| - <span><!-- ko text: errorValidationMessage()--><!-- /ko --></span> |
| 65 | + <div role="alert" |
| 66 | + if="errorValidationMessage().length" |
| 67 | + class="message notice"> |
| 68 | + <span text="errorValidationMessage()" /> |
145 | 69 | </div>
|
146 |
| - <!-- /ko --> |
147 | 70 | <div class="actions-toolbar" id="shipping-method-buttons-container">
|
148 | 71 | <div class="primary">
|
149 | 72 | <button data-role="opc-continue" type="submit" class="button action continue primary">
|
150 |
| - <span><!-- ko i18n: 'Next'--><!-- /ko --></span> |
| 73 | + <span translate="'Next'" /> |
151 | 74 | </button>
|
152 | 75 | </div>
|
153 | 76 | </div>
|
154 | 77 | </form>
|
155 |
| - <!-- /ko --> |
156 |
| - <!-- ko ifnot: rates().length > 0 --><div class="no-quotes-block"><!-- ko i18n: 'Sorry, no quotes are available for this order at this time'--><!-- /ko --></div><!-- /ko --> |
| 78 | + <div class="no-quotes-block" |
| 79 | + ifnot="rates().length > 0" |
| 80 | + translate="'Sorry, no quotes are available for this order at this time'" /> |
157 | 81 | </div>
|
158 | 82 | </div>
|
159 | 83 | </li>
|
0 commit comments