Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send the timezone offset as string instead of integer #2633

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/recipient-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (!customElements.get('recipient-form')) {
this.messageInput = this.querySelector(`#Recipient-message-${ this.dataset.sectionId }`);
this.sendonInput = this.querySelector(`#Recipient-send-on-${ this.dataset.sectionId }`);
this.offsetProperty = this.querySelector(`#Recipient-timezone-offset-${ this.dataset.sectionId }`);
if (this.offsetProperty) this.offsetProperty.value = new Date().getTimezoneOffset();
if (this.offsetProperty) this.offsetProperty.value = new Date().getTimezoneOffset().toString();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backend already casts the property to int if its a string, so this is safe.


this.errorMessageWrapper = this.querySelector('.product-form__recipient-error-message-wrapper');
this.errorMessageList = this.errorMessageWrapper?.querySelector('ul');
Expand Down
3 changes: 3 additions & 0 deletions locales/en.default.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@
}
}
}
},
"presets": {
"name": "Announcement bar"
}
},
"apps": {
Expand Down
3 changes: 3 additions & 0 deletions locales/es.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@
"change_slides_speed": {
"label": "Cambiar de diapositiva cada"
}
},
"presets": {
"name": "Barra de anuncios"
}
},
"collage": {
Expand Down
3 changes: 3 additions & 0 deletions locales/ko.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@
"change_slides_speed": {
"label": "슬라이드 변경 간격"
}
},
"presets": {
"name": "공지 표시줄"
}
},
"collage": {
Expand Down
3 changes: 3 additions & 0 deletions locales/nb.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@
"change_slides_speed": {
"label": "Endre lysbilde hvert"
}
},
"presets": {
"name": "Kunngjøringslinje"
}
},
"collage": {
Expand Down
3 changes: 3 additions & 0 deletions locales/tr.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@
"change_slides_speed": {
"label": "Slaytları şu zaman aralığında değiştir:"
}
},
"presets": {
"name": "Duyuru çubuğu"
}
},
"collage": {
Expand Down
20 changes: 13 additions & 7 deletions sections/announcement-bar.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
"name": "t:sections.announcement-bar.name",
"max_blocks": 12,
"class": "announcement-bar-section",
"enabled_on": {
"groups": ["header"]
},
"settings": [
{
"type": "color_scheme",
Expand Down Expand Up @@ -146,12 +149,15 @@
]
}
],
"default": {
"blocks": [
{
"type": "announcement"
}
]
}
"presets": [
{
"name": "t:sections.announcement-bar.presets.name",
"blocks": [
{
"type": "announcement"
}
]
}
]
}
{% endschema %}
1 change: 1 addition & 0 deletions sections/featured-product.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{ 'component-price.css' | asset_url | stylesheet_tag }}
{{ 'component-loading-overlay.css' | asset_url | stylesheet_tag }}
{{ 'component-deferred-media.css' | asset_url | stylesheet_tag }}
{{ 'component-rating.css' | asset_url | stylesheet_tag }}

{%- style -%}
.section-{{ section.id }}-padding {
Expand Down