зеркало из https://github.com/mozilla/pjs.git
fix for 82375, password UI problems
r=javi,sr=blizzard,a=choffman for trunk (also for 0.9.2, checked in)
This commit is contained in:
Родитель
a5a71a6dd1
Коммит
a6bdb25cde
|
@ -31,7 +31,6 @@
|
|||
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();"
|
||||
>
|
||||
|
@ -87,9 +86,6 @@
|
|||
</rows>
|
||||
|
||||
<columns>
|
||||
<column>
|
||||
<text value="&setPassword.meter.bad;"/>
|
||||
</column>
|
||||
<column style="margin: 5px;">
|
||||
<progressmeter
|
||||
flex="1"
|
||||
|
@ -102,40 +98,9 @@
|
|||
style="forground-color: red"
|
||||
/>
|
||||
</column>
|
||||
<column>
|
||||
<text value="&setPassword.meter.good;"/>
|
||||
</column>
|
||||
</columns>
|
||||
</grid>
|
||||
|
||||
<grid>
|
||||
<columns>
|
||||
<column />
|
||||
<column />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<text value="&setPassword.stats.total;"/>
|
||||
<textbox id="pwchars" size="2" readonly="true"/>
|
||||
</row>
|
||||
<row>
|
||||
<text value="&setPassword.stats.numbers;"/>
|
||||
<textbox id="pwnumbers" size="2" readonly="true"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<text value="&setPassword.stats.symbols;"/>
|
||||
<textbox id="pwsymbols" size="2" readonly="true"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<text value="&setPassword.stats.upper;"/>
|
||||
<textbox id="pwupper" size="2" readonly="true"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
|
||||
<box>
|
||||
<button id="ok-button" class="dialog" label="&ok.label;"
|
||||
style="width: 8ex" oncommand="setPassword();" disabled="true"/>
|
||||
|
|
|
@ -148,27 +148,23 @@ function setPasswordStrength()
|
|||
var pwlength=(pw.length);
|
||||
if (pwlength>5)
|
||||
pwlength=5;
|
||||
document.getElementById('pwchars').setAttribute("value",pw.length);
|
||||
|
||||
|
||||
//use of numbers in the password
|
||||
var numnumeric = pw.replace (/[0-9]/g, "");
|
||||
var numeric=(pw.length - numnumeric.length);
|
||||
document.getElementById('pwnumbers').setAttribute("value",numeric);
|
||||
if (numeric>3)
|
||||
numeric=3;
|
||||
|
||||
//use of symbols in the password
|
||||
var symbols = pw.replace (/\W/g, "");
|
||||
var numsymbols=(pw.length - symbols.length);
|
||||
document.getElementById('pwsymbols').setAttribute("value",numsymbols);
|
||||
if (numsymbols>3)
|
||||
numsymbols=3;
|
||||
|
||||
//use of uppercase in the password
|
||||
var numupper = pw.replace (/[A-Z]/g, "");
|
||||
var upper=(pw.length - numupper.length);
|
||||
document.getElementById('pwupper').setAttribute("value",upper);
|
||||
if (upper>3)
|
||||
upper=3;
|
||||
|
||||
|
|
|
@ -64,40 +64,13 @@
|
|||
<grid style="margin: 4px;">
|
||||
<rows> <row/> </rows>
|
||||
<columns>
|
||||
<column>
|
||||
<text value="&setPassword.meter.bad;"/>
|
||||
</column>
|
||||
<column style="margin: 5px;">
|
||||
<progressmeter flex="1" id="pwmeter" mode="determined" value="0%"
|
||||
align="horizontal" progresstext="Loading"
|
||||
width="200" style="foreground-color: red" />
|
||||
</column>
|
||||
<column>
|
||||
<text value="&setPassword.meter.good;"/>
|
||||
</column>
|
||||
</columns>
|
||||
</grid>
|
||||
<grid>
|
||||
<columns> <column /> <column /> </columns>
|
||||
<rows>
|
||||
<row>
|
||||
<text value="&setPassword.stats.total;"/>
|
||||
<textbox id="pwchars" size="2" readonly="true"/>
|
||||
</row>
|
||||
<row>
|
||||
<text value="&setPassword.stats.numbers;"/>
|
||||
<textbox id="pwnumbers" size="2" readonly="true"/>
|
||||
</row>
|
||||
<row>
|
||||
<text value="&setPassword.stats.symbols;"/>
|
||||
<textbox id="pwsymbols" size="2" readonly="true"/>
|
||||
</row>
|
||||
<row>
|
||||
<text value="&setPassword.stats.upper;"/>
|
||||
<textbox id="pwupper" size="2" readonly="true"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<box>
|
||||
<button id="ok-button" class="dialog" label="&ok.label;"
|
||||
style="width: 8ex" oncommand="setP12Password();" disabled="true"/>
|
||||
|
|
|
@ -22,22 +22,16 @@
|
|||
|
||||
<!-- Values for changepassword.xul -->
|
||||
<!ENTITY setPassword.title "Set Master Password">
|
||||
<!ENTITY setPassword.tokenName.label "Token Name">
|
||||
<!ENTITY setPassword.tokenName.label "Security Device">
|
||||
<!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.meter.loading "Loading">
|
||||
<!ENTITY setPassword.stats.total "Total characters:">
|
||||
<!ENTITY setPassword.stats.numbers "Numbers:">
|
||||
<!ENTITY setPassword.stats.symbols "Symbols:">
|
||||
<!ENTITY setPassword.stats.upper "Uppercase:">
|
||||
|
||||
<!-- Values for getpassword.xul -->
|
||||
<!ENTITY getPassword.title "Enter Master Password">
|
||||
<!ENTITY getPassword.tokenName.label "Token Name">
|
||||
<!ENTITY getPassword.tokenName.label "Security Device">
|
||||
<!ENTITY getPassword.password.label "Password:">
|
||||
|
||||
<!-- These should be common -->
|
||||
|
|
Загрузка…
Ссылка в новой задаче