Fixes AXO module

This commit is contained in:
Pedro Silva 2024-04-10 18:27:21 +01:00
parent c71c56973a
commit 995621ba21
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
8 changed files with 138 additions and 58 deletions

View file

@ -5,7 +5,7 @@ class ShippingView {
constructor(selector, elements) {
this.el = elements;
this.shippingFormFields = new FormFieldGroup({
this.group = new FormFieldGroup({
baseSelector: '.woocommerce-checkout',
contentSelector: selector,
template: (data) => {
@ -86,23 +86,27 @@ class ShippingView {
}
isActive() {
return this.shippingFormFields.active;
return this.group.active;
}
activate() {
this.shippingFormFields.activate();
this.group.activate();
}
deactivate() {
this.shippingFormFields.deactivate();
this.group.deactivate();
}
refresh() {
this.shippingFormFields.refresh();
this.group.refresh();
}
setData(data) {
this.shippingFormFields.setData(data);
this.group.setData(data);
}
copyDataToForm() {
return this.group.copyDataToForm();
}
}