From bc74c520b1426c1c93fe8365e620bcdcec7c125d Mon Sep 17 00:00:00 2001 From: "javi%netscape.com" Date: Thu, 26 Jul 2001 01:53:13 +0000 Subject: [PATCH] Fix for Bug 91466, Checking in for Hakan Waara r=javi, cotter sr=hewitt, a=dbaron Re-work the Unknown CA dialog to make it less confusing. --- .../pki/resources/content/newserver.js | 37 ++++++--- .../pki/resources/content/newserver.xul | 79 +++++++------------ .../pki/resources/locale/en-US/newserver.dtd | 9 +-- .../locale/en-US/newserver.properties | 6 +- 4 files changed, 61 insertions(+), 70 deletions(-) diff --git a/security/manager/pki/resources/content/newserver.js b/security/manager/pki/resources/content/newserver.js index e1f71728514..da3500dc21a 100644 --- a/security/manager/pki/resources/content/newserver.js +++ b/security/manager/pki/resources/content/newserver.js @@ -19,6 +19,7 @@ * * Contributor(s): * Javier Delgadillo + * Håkan Waara */ @@ -43,23 +44,35 @@ function onLoad() var gBundleBrand = srGetStrBundle("chrome://global/locale/brand.properties"); var brandName = gBundleBrand.GetStringFromName("brandShortName"); - var message1 = bundle.formatStringFromName("newServerMessage1", - [ cert.commonName, brandName ], - 2); - var message4 = bundle.formatStringFromName("newServerMessage4", - [ cert.commonName ], - 1); - setText("message1", message1); - setText("message4", message4); - //Set the focus so key press events work - document.getElementById('ok-button').focus(); + var continueButton = bundle.GetStringFromName("continueButton"); + + document.getElementById("ok").label = continueButton; + + var message = + bundle.formatStringFromName("newServerMessage", + [cert.commonName], + 1); + var notRecognized = + bundle.formatStringFromName("certNotRecognized", + [brandName], + 1); + + setText("message", message); + setText("notRecognized", notRecognized); +} + +function doHelpButton() +{ + openHelp('chrome://help/content/help.xul?new_web_cert'); } function doOK() { dialogParams.SetInt(1,1); - var radioGroup = document.getElementById("trustSiteCert"); - dialogParams.SetInt(2,parseInt(radioGroup.selectedItem.value)); + var checkbox = document.getElementById("alwaysAccept"); + var alwaysAccept = checkbox.getAttribute("checked"); + + dialogParams.SetInt(2, (alwaysAccept ? 0 : 1)); window.close(); } diff --git a/security/manager/pki/resources/content/newserver.xul b/security/manager/pki/resources/content/newserver.xul index 6cc6e940aed..8a6ebdec4f4 100644 --- a/security/manager/pki/resources/content/newserver.xul +++ b/security/manager/pki/resources/content/newserver.xul @@ -14,6 +14,7 @@ - Contributor(s): - Javier Delgadillo - Bob Lord + - Håkan Waara --> @@ -25,65 +26,45 @@ %pippkiDTD; ]> + - -