diff options
Diffstat (limited to 'browser/extensions/formautofill/content')
5 files changed, 12 insertions, 21 deletions
diff --git a/browser/extensions/formautofill/content/autofillEditForms.js b/browser/extensions/formautofill/content/autofillEditForms.js index fea7a90a0a..290b436a64 100644 --- a/browser/extensions/formautofill/content/autofillEditForms.js +++ b/browser/extensions/formautofill/content/autofillEditForms.js @@ -112,10 +112,8 @@ class EditAutofillForm { /** * Handle input events - * - * @param {DOMEvent} event */ - handleInput(event) {} + handleInput(_e) {} /** * Attach event listener @@ -140,9 +138,9 @@ class EditAutofillForm { /** * Run custom validity routines specific to the field and type of form. * - * @param {DOMElement} field The field that will be validated. + * @param {DOMElement} _field The field that will be validated. */ - updateCustomValidity(field) {} + updateCustomValidity(_field) {} } class EditAddress extends EditAutofillForm { diff --git a/browser/extensions/formautofill/content/customElements.js b/browser/extensions/formautofill/content/customElements.js index 0f1260634d..2f22a8173a 100644 --- a/browser/extensions/formautofill/content/customElements.js +++ b/browser/extensions/formautofill/content/customElements.js @@ -287,16 +287,7 @@ this._itemBox.setAttribute("no-warning", "true"); } - // After focusing a field that was previously filled with cc information, - // the "ac-image" is falsely set for the listitem-footer. For now it helps us - // to distinguish between address and cc footer. In the future this false attribute - // setting should be fixed and the "ac-image" check replaced by a different method. - const buttonTextBundleKey = !this.getAttribute("ac-image") - ? "autocompleteManageAddresses" - : "autocompleteManageCreditCards"; - const buttonText = - this._stringBundle.GetStringFromName(buttonTextBundleKey); - this._optionButton.textContent = buttonText; + this._optionButton.textContent = value.manageLabel; } } diff --git a/browser/extensions/formautofill/content/editDialog.js b/browser/extensions/formautofill/content/editDialog.js index 8aad87ceb3..467acbdd07 100644 --- a/browser/extensions/formautofill/content/editDialog.js +++ b/browser/extensions/formautofill/content/editDialog.js @@ -8,7 +8,7 @@ "use strict"; ChromeUtils.defineESModuleGetters(this, { - AutofillTelemetry: "resource://autofill/AutofillTelemetry.sys.mjs", + AutofillTelemetry: "resource://gre/modules/shared/AutofillTelemetry.sys.mjs", formAutofillStorage: "resource://autofill/FormAutofillStorage.sys.mjs", }); @@ -107,10 +107,8 @@ class AutofillEditDialog { /** * Handle input events - * - * @param {DOMEvent} event */ - handleInput(event) { + handleInput(_e) { this.updateSaveButtonState(); } diff --git a/browser/extensions/formautofill/content/manageCreditCards.xhtml b/browser/extensions/formautofill/content/manageCreditCards.xhtml index 2b33f7750f..e7baf9d364 100644 --- a/browser/extensions/formautofill/content/manageCreditCards.xhtml +++ b/browser/extensions/formautofill/content/manageCreditCards.xhtml @@ -11,6 +11,7 @@ <head> <title data-l10n-id="autofill-manage-payment-methods-title"></title> <link rel="localization" href="browser/preferences/formAutofill.ftl" /> + <link rel="localization" href="toolkit/formautofill/formAutofill.ftl" /> <link rel="localization" href="toolkit/payments/payments.ftl" /> <link rel="stylesheet" href="chrome://global/skin/in-content/common.css" /> <link diff --git a/browser/extensions/formautofill/content/manageDialog.js b/browser/extensions/formautofill/content/manageDialog.js index b6bcb3a77b..ad5cefbb15 100644 --- a/browser/extensions/formautofill/content/manageDialog.js +++ b/browser/extensions/formautofill/content/manageDialog.js @@ -17,7 +17,7 @@ const { FormAutofill } = ChromeUtils.importESModule( "resource://autofill/FormAutofill.sys.mjs" ); const { AutofillTelemetry } = ChromeUtils.importESModule( - "resource://autofill/AutofillTelemetry.sys.mjs" + "resource://gre/modules/shared/AutofillTelemetry.sys.mjs" ); ChromeUtils.defineESModuleGetters(this, { @@ -197,6 +197,9 @@ class ManageRecords { this._elements.edit.setAttribute("disabled", "disabled"); this._elements.remove.removeAttribute("disabled"); } + this._elements.add.disabled = !Services.prefs.getBoolPref( + `extensions.formautofill.${this._subStorageName}.enabled` + ); } /** @@ -265,7 +268,7 @@ class ManageRecords { } } - observe(subject, topic, data) { + observe(_subject, topic, _data) { switch (topic) { case "formautofill-storage-changed": { this.loadRecords(); |