diff --git a/extensions/wallet/signonviewer/resources/content/SignonViewer.js b/extensions/wallet/signonviewer/resources/content/SignonViewer.js index 2b291177a2b..e6fdc70af8e 100644 --- a/extensions/wallet/signonviewer/resources/content/SignonViewer.js +++ b/extensions/wallet/signonviewer/resources/content/SignonViewer.js @@ -331,6 +331,18 @@ function DeleteSignon() { } function DeleteAllSignons() { + var prompter = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] + .getService(Components.interfaces.nsIPromptService); + + // Confirm the user wants to remove all passwords + var dummy = { value: false }; + if (prompter.confirmEx(window, + kSignonBundle.getString("removeAllPasswordsTitle"), + kSignonBundle.getString("removeAllPasswordsPrompt"), + prompter.STD_YES_NO_BUTTONS + prompter.BUTTON_POS_1_DEFAULT, + null, null, null, null, dummy) == 1) // 1 == "No" button + return; + DeleteAllFromTree(signonsTree, signonsTreeView, signons, deletedSignons, "removeSignon", "removeAllSignons"); diff --git a/extensions/wallet/signonviewer/resources/locale/en-US/SignonViewer.properties b/extensions/wallet/signonviewer/resources/locale/en-US/SignonViewer.properties index 348d7580497..f6f7d22f170 100644 --- a/extensions/wallet/signonviewer/resources/locale/en-US/SignonViewer.properties +++ b/extensions/wallet/signonviewer/resources/locale/en-US/SignonViewer.properties @@ -3,3 +3,5 @@ close=Close hidePasswords=Hide Passwords showPasswords=Show Passwords noMasterPasswordPrompt=Are you sure you wish to show your passwords? +removeAllPasswordsPrompt=Are you sure you wish to remove all passwords? +removeAllPasswordsTitle=Remove all passwords