mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fixes AXO module
This commit is contained in:
parent
c71c56973a
commit
995621ba21
8 changed files with 138 additions and 58 deletions
|
@ -5,7 +5,7 @@ class BillingView {
|
|||
constructor(selector, elements) {
|
||||
this.el = elements;
|
||||
|
||||
this.billingFormFields = new FormFieldGroup({
|
||||
this.group = new FormFieldGroup({
|
||||
baseSelector: '.woocommerce-checkout',
|
||||
contentSelector: selector,
|
||||
template: (data) => {
|
||||
|
@ -81,42 +81,46 @@ class BillingView {
|
|||
'selector': '#billing_company_field',
|
||||
'valuePath': null,
|
||||
},
|
||||
phone: {
|
||||
'selector': '#billing_phone_field',
|
||||
'valuePath': null,
|
||||
},
|
||||
// phone: {
|
||||
// 'selector': '#billing_phone_field',
|
||||
// 'valuePath': null,
|
||||
// },
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
isActive() {
|
||||
return this.billingFormFields.active;
|
||||
return this.group.active;
|
||||
}
|
||||
|
||||
activate() {
|
||||
this.billingFormFields.activate();
|
||||
this.group.activate();
|
||||
}
|
||||
|
||||
deactivate() {
|
||||
this.billingFormFields.deactivate();
|
||||
this.group.deactivate();
|
||||
}
|
||||
|
||||
refresh() {
|
||||
this.billingFormFields.refresh();
|
||||
this.group.refresh();
|
||||
}
|
||||
|
||||
setData(data) {
|
||||
this.billingFormFields.setData(data);
|
||||
this.group.setData(data);
|
||||
}
|
||||
|
||||
inputValue(name) {
|
||||
return this.billingFormFields.inputValue(name);
|
||||
return this.group.inputValue(name);
|
||||
}
|
||||
|
||||
fullName() {
|
||||
return `${this.inputValue('firstName')} ${this.inputValue('lastName')}`.trim();
|
||||
}
|
||||
|
||||
copyDataToForm() {
|
||||
return this.group.copyDataToForm();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default BillingView;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue