Create DTD for pippki module

This commit is contained in:
thayes%netscape.com 2001-02-07 18:51:23 +00:00
parent 2d2aa5439c
commit b3db34c62b
4 changed files with 47 additions and 20 deletions

View File

@ -1,15 +1,17 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://pippki/locale/pippki.dtd">
<window
id="cert_mgr" title="Change Master Password"
id="set_password" title="&setPassword.title;"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
debug="false"
height="320"
width="300"
onload="onLoad(); document.getElementById('pw1').focus();"
onload="onLoad();"
>
<script src="password.js"/>
@ -17,16 +19,17 @@
<box orient="vertical" style="margin: 5px;" flex="1">
<box orient="horizontal">
<text value="Select device:"/>
<text value="&setPassword.tokenName.label;:"/>
<text id="tokenName" />
<!--
<menulist id="signerList">
<!--
<menulist id="signerList" disabled="true">
<menupopup>
<menuitem value="Built-in private key database"/>
<menuitem id="token-menu" value="Built-in private key database"/>
<menuitem value="Bob Lord's iButton"/>
</menupopup>
</menulist>
-->
-->
</box>
<separator />
@ -38,22 +41,22 @@
</columns>
<rows>
<row>
<text value="Old password:"/>
<text value="&setPassword.oldPassword.label;: " />
<textfield id="oldpw" maxlength="30" disabled="true" value="(password not set)"/>
</row>
<row>
<text value="Enter a new password"/>
<text value="&setPassword.newPassword.label;" />
<textfield id="pw1" type="password" maxlength="30"
onkeypress="setPasswordStrength(); checkPasswords();"/>
</row>
<row>
<text value="Enter the password again"/>
<text value="&setPassword.reenterPassword.label;" />
<textfield id="pw2" type="password" maxlength="30" onkeypress="checkPasswords();"/>
</row>
</rows>
</grid>
<text value="Password quality meter:"/>
<text value="&setPassword.meter.label;"/>
<grid style="margin: 4px;">
<rows>
@ -62,7 +65,7 @@
<columns>
<column>
<text value="Bad"/>
<text value="&setPassword.meter.bad;"/>
</column>
<column style="margin: 5px;">
<progressmeter
@ -77,7 +80,7 @@
/>
</column>
<column>
<text value="Good"/>
<text value="&setPassword.meter.good;"/>
</column>
</columns>
</grid>
@ -89,21 +92,21 @@
</columns>
<rows>
<row>
<text value="Total characters:"/>
<text value="&setPassword.stats.total;"/>
<textfield id="pwchars" size="2" readonly="true"/>
</row>
<row>
<text value="Numbers:"/>
<text value="&setPassword.stats.numbers;"/>
<textfield id="pwnumbers" size="2" readonly="true"/>
</row>
<row>
<text value="Symbols:"/>
<text value="&setPassword.stats.symbols;"/>
<textfield id="pwsymbols" size="2" readonly="true"/>
</row>
<row>
<text value="Uppercase:"/>
<text value="&setPassword.stats.upper;"/>
<textfield id="pwupper" size="2" readonly="true"/>
</row>
</rows>
@ -111,11 +114,11 @@
<box>
<button id="ok-button" class="dialog" value="OK"
<button id="ok-button" class="dialog" value="&setPassword.ok.label;"
style="width: 8ex" oncommand="setPassword();" disabled="true"/>
<button id="cancel-button" class="dialog" value="Cancel"
<button id="cancel-button" class="dialog" value="&setPassword.cancel.label;"
style="width: 8ex" oncommand="window.close();" />
<button id="help-button" class="dialog" value="Help"
<button id="help-button" class="dialog" value="&setPassword.help.label;"
style="width: 8ex" oncommand="alert('The old password you entered is incorrect. Try again.');" />
</box>

View File

@ -16,6 +16,9 @@ function onLoad()
// Set token name in display
var t = document.getElementById("tokenName");
t.setAttribute("value", tokenName);
// Select first password field
document.getElementById('pw1').focus();
}
function setPassword()

View File

@ -3,3 +3,5 @@ pippki.jar:
content/pippki/changepassword.xul (content/changepassword.xul)
content/pippki/password.js (content/password.js)
locale/en-US/pippki/contents.rdf (locale/en-US/contents.rdf)
locale/en-US/pippki/pippki.dtd (locale/en-US/pippki.dtd)

View File

@ -0,0 +1,19 @@
<!-- Values for changepassword.xul -->
<!ENTITY setPassword.title "Set Master Password">
<!ENTITY setPassword.tokenName.label "Token Name">
<!ENTITY setPassword.oldPassword.label "Old password">
<!ENTITY setPassword.newPassword.label "Enter a new password">
<!ENTITY setPassword.reenterPassword.label "Enter the password again">
<!ENTITY setPassword.meter.label "Password quality meter:">
<!ENTITY setPassword.meter.bad "Bad">
<!ENTITY setPassword.meter.good "Good">
<!ENTITY setPassword.stats.total "Total characters:">
<!ENTITY setPassword.stats.numbers "Numbers:">
<!ENTITY setPassword.stats.symbols "Symbols:">
<!ENTITY setPassword.stats.upper "Uppercase:">
<!-- These should be common -->
<!ENTITY setPassword.ok.label "OK">
<!ENTITY setPassword.cancel.label "Cancel">
<!ENTITY setPassword.help.label "Help">