mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Refactor AXO form submission
This commit is contained in:
parent
7a5d61bf2b
commit
0cb26c4457
6 changed files with 55 additions and 28 deletions
|
@ -131,8 +131,7 @@ class FormFieldGroup {
|
|||
return el ? el.value : '';
|
||||
}
|
||||
|
||||
copyDataToForm() {
|
||||
|
||||
toSubmitData(data) {
|
||||
Object.keys(this.fields).forEach((fieldKey) => {
|
||||
const field = this.fields[fieldKey];
|
||||
|
||||
|
@ -146,11 +145,8 @@ class FormFieldGroup {
|
|||
return true;
|
||||
}
|
||||
|
||||
jQuery(inputElement).val(
|
||||
this.dataValue(fieldKey)
|
||||
);
|
||||
data[inputElement.name] = this.dataValue(fieldKey);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue