mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Refactor AXO module
This commit is contained in:
parent
a9d2f97a80
commit
578a5426dc
7 changed files with 337 additions and 121 deletions
|
@ -21,14 +21,14 @@ class BillingView {
|
|||
if (data.isEmpty()) {
|
||||
return `
|
||||
<div style="margin-bottom: 20px;">
|
||||
<h3>Billing details <a href="javascript:void(0)" ${this.el.changeBillingAddressLink.attributes} style="margin-left: 20px;">Edit</a></h3>
|
||||
<h3>Billing <a href="javascript:void(0)" ${this.el.changeBillingAddressLink.attributes} style="margin-left: 20px;">Edit</a></h3>
|
||||
<div>Please fill in your billing details.</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
return `
|
||||
<div style="margin-bottom: 20px;">
|
||||
<h3>Billing details <a href="javascript:void(0)" ${this.el.changeBillingAddressLink.attributes} style="margin-left: 20px;">Edit</a></h3>
|
||||
<h3>Billing <a href="javascript:void(0)" ${this.el.changeBillingAddressLink.attributes} style="margin-left: 20px;">Edit</a></h3>
|
||||
<div>${data.value('email')}</div>
|
||||
<div>${data.value('company')}</div>
|
||||
<div>${data.value('firstName')} ${data.value('lastName')}</div>
|
||||
|
@ -89,6 +89,10 @@ class BillingView {
|
|||
});
|
||||
}
|
||||
|
||||
isActive() {
|
||||
return this.billingFormFields.active;
|
||||
}
|
||||
|
||||
activate() {
|
||||
this.billingFormFields.activate();
|
||||
}
|
||||
|
@ -97,6 +101,10 @@ class BillingView {
|
|||
this.billingFormFields.deactivate();
|
||||
}
|
||||
|
||||
refresh() {
|
||||
this.billingFormFields.refresh();
|
||||
}
|
||||
|
||||
setData(data) {
|
||||
this.billingFormFields.setData(data);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue