Skip to content

Commit 8e8e154

Browse files
committed
[FIX] CMS_STRICT_VARIABLES issues + [FIX] add missing translation strings
1 parent e0a4c5e commit 8e8e154

File tree

114 files changed

+344
-328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+344
-328
lines changed

classes/payments/stripe/form.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
});
2828

2929
function initStripe() {
30-
var stripe = Stripe('{{ cart.payment_method.settings.stripe_publishable_key }}');
30+
var stripe = Stripe('{{ cart.payment_method.settings.stripe_publishable_key|default('') }}');
3131
var elements = stripe.elements();
3232

3333
var card = elements.create('card');

components/addressform/actions.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<button class="mall-btn mall-btn--primary" type="submit" data-attach-loading>
2-
{{ 'offline.mall::frontend.save' | trans }}
2+
{{ 'offline.mall::frontend.save'|trans }}
33
</button>

components/addressform/countrystate.htm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
{% set type = type|default('') %}
1010
{% set id = type ~ 'country_id' %}
1111
<div class="mall-form-control">
12-
<label for="{{ id }}">{{ 'offline.mall::frontend.form.country' | trans }}</label>
12+
<label for="{{ id }}">{{ 'offline.mall::frontend.form.country'|trans }}</label>
1313
{{ form_select_country(id, countryId, {
1414
id: id,
15-
emptyOption: ('offline.mall::frontend.select' | trans ),
15+
emptyOption: ('offline.mall::frontend.select'|trans ),
1616
'data-request': 'onInit',
1717
'data-request-update': {
1818
(__SELF__ ~ '::countrystate'): '#countryState'
@@ -24,9 +24,9 @@
2424
{% if __SELF__.useState %}
2525
{% set id = type ~ 'state_id' %}
2626
<div class="mall-form-control">
27-
<label for="{{ id }}">{{ 'offline.mall::frontend.form.state' | trans }}</label>
27+
<label for="{{ id }}">{{ 'offline.mall::frontend.form.state'|trans }}</label>
2828
{{ form_select_state(id, countryId, stateId, {
29-
emptyOption: ('offline.mall::frontend.select' | trans ),
29+
emptyOption: ('offline.mall::frontend.select'|trans ),
3030
id: id,
3131
}) }}
3232
<div data-validate-for="{{ id }}"></div>

components/addresslist/actions.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<a class="mall-btn mall-btn--primary mall-btn--sm"
2-
href="{{ __SELF__.addressPage | page({ address: "new", redirect: "account" }) }}">
2+
href="{{ __SELF__.addressPage|page({ address: "new", redirect: "account" }) }}">
33
{{ 'offline.mall::frontend.address_selector.create'|trans }}
44
</a>

components/addresslist/list.htm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,26 @@
2121
<a href="javascript:;" data-request="onChangeDefaultBillingAddress"
2222
data-request-data="id: '{{ address.hashId }}'" data-request-flash
2323
class="mall-switcher__item {{ __SELF__.defaultBillingAddressId == address.id ? 'mall-switcher__item--active' }}">
24-
{{ 'offline.mall::frontend.billing_address' | trans }}
24+
{{ 'offline.mall::frontend.billing_address'|trans }}
2525
</a>
2626
<a href="javascript:;" data-request="onChangeDefaultShippingAddress"
2727
data-request-data="id: '{{ address.hashId }}'" data-request-flash
2828
class="mall-switcher__item {{ __SELF__.defaultShippingAddressId == address.id ? 'mall-switcher__item--active' }}">
29-
{{ 'offline.mall::frontend.shipping_address' | trans }}
29+
{{ 'offline.mall::frontend.shipping_address'|trans }}
3030
</a>
3131
</div>
3232
</div>
3333
</td>
3434
<td class="mall-address-list__table-actions">
3535
<a href="{{ __SELF__.addressPage | page({address: address.hashId, redirect: 'account'}) }}"
3636
class="mall-btn mall-btn--sm">
37-
{{ 'offline.mall::frontend.edit' | trans }}
37+
{{ 'offline.mall::frontend.edit'|trans }}
3838
</a>
3939
{% if __SELF__.addresses.count > 1 %}
4040
<a href="javascript:;" data-request="onDelete" data-request-data="id: '{{ address.hashId }}'"
41-
data-request-confirm="{{ 'offline.mall::frontend.are_you_sure' | trans }}" data-request-flash
41+
data-request-confirm="{{ 'offline.mall::frontend.are_you_sure'|trans }}" data-request-flash
4242
class="mall-btn mall-btn--sm">
43-
{{ 'offline.mall::frontend.delete' | trans }}
43+
{{ 'offline.mall::frontend.delete'|trans }}
4444
</a>
4545
{% endif %}
4646
</td>
Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
<div class="mall-address" id="mall-address-{{ __SELF__.alias }}">
2-
<p>
3-
{% if address.company %}
4-
{{ address.company }}<br/>
5-
{% endif %}
6-
{{ address.name }}<br/>
7-
{{ address.lines }} <br/>
8-
{{ address.zip }} {{ address.city }}<br/>
9-
{% if address.state_id %}
10-
{{ address.state.name }} <br/>
11-
{% endif %}
12-
{{ address.country.name }}
13-
</p>
14-
<p class="mall-address__actions">
15-
<a href="javascript:;" class="js-change-address" data-type="{{ __SELF__.type }}">
16-
{{ 'offline.mall::frontend.change' | trans }}
17-
</a>
18-
</p>
19-
</div>
1+
{% if address|default(null) %}
2+
<div class="mall-address" id="mall-address-{{ __SELF__.alias }}">
3+
<p>
4+
{% if address.company %}
5+
{{ address.company }}<br/>
6+
{% endif %}
7+
{{ address.name }}<br/>
8+
{{ address.lines }} <br/>
9+
{{ address.zip }} {{ address.city }}<br/>
10+
{% if address.state_id %}
11+
{{ address.state.name }} <br/>
12+
{% endif %}
13+
{{ address.country.name }}
14+
</p>
15+
<p class="mall-address__actions">
16+
<a href="javascript:;" class="js-change-address" data-type="{{ __SELF__.type }}">
17+
{{ 'offline.mall::frontend.change'|trans }}
18+
</a>
19+
</p>
20+
</div>
21+
{% endif %}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<div>
22
<div class="mall-form-control">
3-
<label for="mall_address_id">{{ 'offline.mall::frontend.address_selector.select' | trans }}</label>
3+
<label for="mall_address_id">{{ 'offline.mall::frontend.address_selector.select'|trans }}</label>
44
<select id="mall_address_id" name="id">
5-
{% for address in addresses %}
5+
{% for address in addresses|default([]) %}
66
<option value="{{ address.id }}" {{ address.id == activeAddress ? 'selected' : '' }}>
77
{{ address.oneLiner }}
88
</option>
99
{% endfor %}
1010
<option value="new">
11-
{{ 'offline.mall::frontend.address_selector.create' | trans }}
11+
{{ 'offline.mall::frontend.address_selector.create'|trans }}
1212
</option>
1313
</select>
1414
<div data-validate-for="id"></div>
@@ -20,11 +20,11 @@
2020
data-request-validate
2121
data-request-success="$.publish('mall.address.update')"
2222
type="submit">
23-
{{ 'offline.mall::frontend.apply' | trans }}
23+
{{ 'offline.mall::frontend.apply'|trans }}
2424
</button>
25-
<a href="{{ __SELF__.addressPage | page({address: address.hashId, redirect: __SELF__.property('redirect')}) }}"
25+
<a href="{{ __SELF__.addressPage|page({address: address.hashId, redirect: __SELF__.property('redirect')}) }}"
2626
class="mall-btn mall-btn--link mall-btn--sm">
27-
{{ 'offline.mall::frontend.address_selector.edit' | trans }}
27+
{{ 'offline.mall::frontend.address_selector.edit'|trans }}
2828
</a>
2929
</div>
3030
</div>

components/addressselector/scripts.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
});
1111
$body.on('change', '.mall-address-selector--{{ __SELF__.type }} #mall_address_id', function () {
1212
if (this.value === 'new') {
13-
document.location.href = '{{ __SELF__.addressPage | page({
13+
document.location.href = '{{ __SELF__.addressPage|page({
1414
address: "new",
1515
redirect: __SELF__.property('redirect'),
1616
set: __SELF__.type,

components/cart/cart.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<div data-validate-for="cart"></div>
99
{% endif %}
1010

11-
{% if __SELF__.showProceedToCheckoutButton and cart.products.count > 0 %}
11+
{% if __SELF__.showProceedToCheckoutButton and cart.products.count|default(0) > 0 %}
1212
{% partial __SELF__ ~ '::proceedtocheckout' %}
1313
{% endif %}

components/cart/empty.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<div class="mall-cart__empty">
2-
{{ 'offline.mall::frontend.cart.empty' | trans }}
2+
{{ 'offline.mall::frontend.cart.empty'|trans }}
33
</div>

0 commit comments

Comments
 (0)