mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 15:55:16 +00:00
Bug 343253: Improve unknown cert issuer dialog, r=kaie, sr=neil, ui-r=beltzner
This commit is contained in:
parent
2a7800e38a
commit
233fb74755
@ -145,7 +145,8 @@
|
||||
ondialoghelp="openHelp('cert_backup_pwd');"/>
|
||||
|
||||
<dialog id="newServerDialog"
|
||||
buttons="accept,cancel,help"
|
||||
spacerflex="1"
|
||||
buttons="accept,cancel,help,extra2"
|
||||
ondialoghelp="openHelp('new_web_cert');"/>
|
||||
|
||||
<dialog id="crlUpdatePref"
|
||||
|
@ -42,7 +42,6 @@
|
||||
<!ENTITY newserver.reason1 "- Your browser does not recognize the Certificate Authority that issued the site's certificate.">
|
||||
<!ENTITY newserver.reason2 "- The site's certificate is incomplete due to a server misconfiguration.">
|
||||
<!ENTITY newserver.notify "Please notify the site's webmaster about this problem.">
|
||||
<!ENTITY newserver.examine "Examine Certificate...">
|
||||
<!ENTITY newserver.examine "View Certificate...">
|
||||
<!ENTITY newserver.remember "Accept this certificate permanently">
|
||||
<!ENTITY newserver.session "Accept this certificate temporarily for this session">
|
||||
<!ENTITY newserver.refuse "Do not accept this certificate and do not connect to this Web site">
|
||||
|
@ -69,37 +69,13 @@ function onLoad()
|
||||
setText("intro", intro);
|
||||
setText("reason3", reason3);
|
||||
setText("question", question);
|
||||
|
||||
// Focus the accept button explicitly, because the dialog onLoad handler
|
||||
// focuses the first focusable element in the dialog, which is the "View
|
||||
// Certificate" button.
|
||||
// Never explicitly focus buttons on OS X, as this breaks default focus
|
||||
// handling, outlined in dialog.xml
|
||||
#ifndef XP_MACOSX
|
||||
document.documentElement.getButton("accept").focus();
|
||||
#endif
|
||||
}
|
||||
|
||||
function doOK()
|
||||
{
|
||||
var selectedID = document.getElementById("whatnow").selectedItem.id;
|
||||
|
||||
if (selectedID == "refuse") {
|
||||
dialogParams.SetInt(1,0);
|
||||
}
|
||||
else {
|
||||
dialogParams.SetInt(1,1);
|
||||
|
||||
// 0 = accept perm, 1 = accept for this session
|
||||
var userchoice = 1;
|
||||
|
||||
if (selectedID == "remember") {
|
||||
userchoice = 0;
|
||||
}
|
||||
|
||||
dialogParams.SetInt(2, userchoice);
|
||||
}
|
||||
|
||||
dialogParams.SetInt(1, 1);
|
||||
var selectedItem = document.getElementById("whatnow").selectedItem;
|
||||
dialogParams.SetInt(2, parseInt(selectedItem.value));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -51,9 +51,12 @@
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
style="width: 47em;"
|
||||
onload="onLoad();"
|
||||
buttons="accept,cancel"
|
||||
buttons="accept,cancel,extra2"
|
||||
defaultButton="cancel"
|
||||
buttonlabelextra2="&newserver.examine;"
|
||||
ondialogaccept="return doOK();"
|
||||
ondialogcancel="return doCancel();">
|
||||
ondialogcancel="return doCancel();"
|
||||
ondialogextra2="viewCert();">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||
<script type="application/x-javascript" src="chrome://pippki/content/pippki.js"/>
|
||||
@ -77,15 +80,10 @@
|
||||
<separator/>
|
||||
<description id="question"/>
|
||||
<separator class="thin"/>
|
||||
<hbox>
|
||||
<button id="examineCert-button" label="&newserver.examine;"
|
||||
oncommand="viewCert();"/>
|
||||
</hbox>
|
||||
<separator class="thin"/>
|
||||
<radiogroup id="whatnow">
|
||||
<radio label="&newserver.remember;" id="remember"/>
|
||||
<radio label="&newserver.session;" id="session" selected="true"/>
|
||||
<radio label="&newserver.refuse;" id="refuse"/>
|
||||
<radio label="&newserver.remember;" id="remember" value="0"/>
|
||||
<radio label="&newserver.session;" id="session"
|
||||
value="1" selected="true"/>
|
||||
</radiogroup>
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
@ -14,7 +14,7 @@ pippki.jar:
|
||||
content/pippki/pref-ssl.xul (content/pref-ssl.xul)
|
||||
content/pippki/pref-certs.xul (content/pref-certs.xul)
|
||||
content/pippki/PageInfoOverlay.xul (content/PageInfoOverlay.xul)
|
||||
* content/pippki/newserver.js (content/newserver.js)
|
||||
content/pippki/newserver.js (content/newserver.js)
|
||||
content/pippki/newserver.xul (content/newserver.xul)
|
||||
content/pippki/downloadcert.js (content/downloadcert.js)
|
||||
content/pippki/downloadcert.xul (content/downloadcert.xul)
|
||||
|
Loading…
x
Reference in New Issue
Block a user